You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/02/01 18:47:37 UTC

[01/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Repository: brooklyn-library
Updated Branches:
  refs/heads/master [created] 02abbab09


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/webapp/src/main/java/org/apache/brooklyn/entity/dns/AbstractGeoDnsServiceImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/webapp/src/main/java/org/apache/brooklyn/entity/dns/AbstractGeoDnsServiceImpl.java b/brooklyn-library/software/webapp/src/main/java/org/apache/brooklyn/entity/dns/AbstractGeoDnsServiceImpl.java
deleted file mode 100644
index ca2caf7..0000000
--- a/brooklyn-library/software/webapp/src/main/java/org/apache/brooklyn/entity/dns/AbstractGeoDnsServiceImpl.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.dns;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.Group;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.Sensor;
-import org.apache.brooklyn.core.entity.AbstractEntity;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic.ServiceNotUpLogic;
-import org.apache.brooklyn.core.location.geo.HostGeoInfo;
-import org.apache.brooklyn.entity.group.AbstractMembershipTrackingPolicy;
-import org.apache.brooklyn.entity.group.DynamicGroup;
-import org.apache.brooklyn.entity.webapp.WebAppService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.util.collections.MutableSet;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Maps;
-
-public abstract class AbstractGeoDnsServiceImpl extends AbstractEntity implements AbstractGeoDnsService {
-    private static final Logger log = LoggerFactory.getLogger(AbstractGeoDnsService.class);
-
-    @SetFromFlag
-    protected Group targetEntityProvider;
-    protected AbstractMembershipTrackingPolicy tracker;
-
-    protected Map<Entity, HostGeoInfo> targetHosts = Collections.synchronizedMap(new LinkedHashMap<Entity, HostGeoInfo>());
-
-    // We complain (at debug) when we encounter a target entity for whom we can't derive hostname/ip information; 
-    // this is the commonest case for the transient condition between the time the entity is created and the time 
-    // it is started (at which point the location is specified). This set contains those entities we've complained 
-    // about already, to avoid repetitive logging.
-    transient protected Set<Entity> entitiesWithoutHostname = new HashSet<Entity>();
-
-    // We complain (at info/warn) when we encounter a target entity for whom we can't derive geo information, even 
-    // when hostname/ip is known. This set contains those entities we've complained about already, to avoid repetitive 
-    // logging.
-    transient protected Set<Entity> entitiesWithoutGeoInfo = new HashSet<Entity>();
-
-    public AbstractGeoDnsServiceImpl() {
-        super();
-    }
-
-    @Override
-    public void init() {
-        super.init();
-        Group initialProvider = config().get(ENTITY_PROVIDER);
-        if (initialProvider != null) {
-            setTargetEntityProvider(initialProvider);
-        }
-    }
-
-    @Override
-    public Map<Entity, HostGeoInfo> getTargetHosts() {
-        return targetHosts;
-    }
-
-    @Override
-    public void onManagementBecomingMaster() {
-        super.onManagementBecomingMaster();
-        startTracker();
-    }
-
-    @Override
-    public void onManagementNoLongerMaster() {
-        endTracker();
-        super.onManagementNoLongerMaster();
-    }
-
-    @Override
-    public void destroy() {
-        setServiceState(Lifecycle.DESTROYED);
-        super.destroy();
-    }
-
-    @Override
-    public void setServiceState(Lifecycle state) {
-        sensors().set(HOSTNAME, getHostname());
-        ServiceStateLogic.setExpectedState(this, state);
-        if (state==Lifecycle.RUNNING)
-            ServiceNotUpLogic.clearNotUpIndicator(this, SERVICE_STATE_ACTUAL);
-        else
-            ServiceNotUpLogic.updateNotUpIndicator(this, SERVICE_STATE_ACTUAL, "Not in RUNNING state");
-    }
-
-    @Override
-    public void setTargetEntityProvider(final Group entityProvider) {
-        this.targetEntityProvider = checkNotNull(entityProvider, "targetEntityProvider");
-        startTracker();
-    }
-
-    /** should set up so these hosts are targeted, and setServiceState appropriately */
-    protected abstract void reconfigureService(Collection<HostGeoInfo> targetHosts);
-
-    protected synchronized void startTracker() {
-        if (targetEntityProvider==null || !getManagementSupport().isDeployed()) {
-            log.debug("Tracker for "+this+" not yet active: "+targetEntityProvider+" / "+getManagementContext());
-            return;
-        }
-        endTracker();
-
-        ImmutableSet.Builder<Sensor<?>> sensorsToTrack = ImmutableSet.<Sensor<?>>builder().add(
-                HOSTNAME, ADDRESS, Attributes.MAIN_URI, WebAppService.ROOT_URL);
-        // Don't subscribe to lifecycle events if entities will be included regardless of their status.
-        if (Boolean.TRUE.equals(config().get(FILTER_FOR_RUNNING))) {
-            sensorsToTrack.add(Attributes.SERVICE_STATE_ACTUAL);
-        }
-        log.debug("Initializing tracker for "+this+", following "+targetEntityProvider);
-        tracker = policies().add(PolicySpec.create(MemberTrackingPolicy.class)
-                .displayName("GeoDNS targets tracker")
-                .configure(AbstractMembershipTrackingPolicy.SENSORS_TO_TRACK, sensorsToTrack.build())
-                .configure(AbstractMembershipTrackingPolicy.GROUP, targetEntityProvider));
-        refreshGroupMembership();
-    }
-
-    protected synchronized void endTracker() {
-        if (tracker == null || targetEntityProvider==null) return;
-        policies().remove(tracker);
-        tracker = null;
-    }
-
-    public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy {
-        @Override
-        protected void onEntityEvent(EventType type, Entity entity) {
-            ((AbstractGeoDnsServiceImpl)super.entity).refreshGroupMembership();
-        }
-    }
-
-    @Override
-    public abstract String getHostname();
-
-    long lastUpdate = -1;
-
-    // TODO: remove group member polling once locations can be determined via subscriptions
-    protected void refreshGroupMembership() {
-        try {
-            if (log.isDebugEnabled()) log.debug("GeoDns {} refreshing targets", this);
-            if (targetEntityProvider == null)
-                return;
-            if (targetEntityProvider instanceof DynamicGroup)
-                ((DynamicGroup) targetEntityProvider).rescanEntities();
-            Set<Entity> pool = MutableSet.copyOf(targetEntityProvider instanceof Group ? ((Group)targetEntityProvider).getMembers(): targetEntityProvider.getChildren());
-            if (log.isDebugEnabled()) log.debug("GeoDns {} refreshing targets, pool now {}", this, pool);
-
-            boolean changed = false;
-            boolean filterForRunning = Boolean.TRUE.equals(config().get(FILTER_FOR_RUNNING));
-            Set<Entity> previousOnes = MutableSet.copyOf(targetHosts.keySet());
-            for (Entity e: pool) {
-                if (!filterForRunning || Lifecycle.RUNNING.equals(e.sensors().get(Attributes.SERVICE_STATE_ACTUAL))) {
-                    previousOnes.remove(e);
-                    changed |= addTargetHost(e);
-                }
-            }
-            // anything left in previousOnes is no longer applicable
-            for (Entity e: previousOnes) {
-                changed |= removeTargetHost(e, false);
-            }
-
-            // do a periodic full update hourly once we are active (the latter is probably not needed)
-            if (changed || (lastUpdate > 0 && Time.hasElapsedSince(lastUpdate, Duration.ONE_HOUR))) {
-                update();
-            }
-        } catch (Exception e) {
-            log.error("Problem refreshing group membership: "+e, e);
-        }
-    }
-
-    /**
-     * Adds this host, if it is absent or if its hostname has changed.
-     * <p>
-     * For whether to use hostname or ip, see config and attributes {@link AbstractGeoDnsService#USE_HOSTNAMES}, 
-     * {@link Attributes#HOSTNAME} and {@link Attributes#ADDRESS} (via {@link #inferHostname(Entity)} and {@link #inferIp(Entity)}.
-     * Note that the "hostname" could in fact be an IP address, if {@link #inferHostname(Entity)} returns an IP!
-     * <p>
-     * TODO in a future release, we may change this to explicitly set the sensor(s) to look at on the entity, and 
-     * be stricter about using them in order.
-     * 
-     * @return true if host is added or changed
-     */
-    protected boolean addTargetHost(Entity entity) {
-        try {
-            HostGeoInfo oldGeo = targetHosts.get(entity);
-            String hostname = inferHostname(entity);
-            String ip = inferIp(entity);
-            String addr = (getConfig(USE_HOSTNAMES) || ip == null) ? hostname : ip;
-
-            if (addr==null) addr = ip;
-            if (addr == null) {
-                if (entitiesWithoutHostname.add(entity)) {
-                    log.debug("GeoDns ignoring {} (no hostname/ip/URL info yet available)", entity);
-                }
-                return false;
-            }
-
-            // prefer the geo from the entity (or location parent), but fall back to inferring
-            // e.g. if it supplies a URL
-            HostGeoInfo geo = HostGeoInfo.fromEntity(entity);
-            if (geo==null) geo = inferHostGeoInfo(hostname, ip);
-
-            if (Networking.isPrivateSubnet(addr) && ip!=null && !Networking.isPrivateSubnet(ip)) {
-                // fix for #1216
-                log.debug("GeoDns using IP "+ip+" for "+entity+" as addr "+addr+" resolves to private subnet");
-                addr = ip;
-            }
-            if (Networking.isPrivateSubnet(addr)) {
-                if (getConfig(INCLUDE_HOMELESS_ENTITIES)) {
-                    if (entitiesWithoutGeoInfo.add(entity)) {
-                        log.info("GeoDns including {}, even though {} is a private subnet (homeless entities included)", entity, addr);
-                    }
-                } else {
-                    if (entitiesWithoutGeoInfo.add(entity)) {
-                        log.warn("GeoDns ignoring {} (private subnet detected for {})", entity, addr);
-                    }
-                    return false;
-                }
-            }
-
-            if (geo == null) {
-                if (getConfig(INCLUDE_HOMELESS_ENTITIES)) {
-                    if (entitiesWithoutGeoInfo.add(entity)) {
-                        log.info("GeoDns including {}, even though no geography info available for {})", entity, addr);
-                    }
-                    geo = HostGeoInfo.create(addr, "unknownLocation("+addr+")", 0, 0);
-                } else {
-                    if (entitiesWithoutGeoInfo.add(entity)) {
-                        log.warn("GeoDns ignoring {} (no geography info available for {})", entity, addr);
-                    }
-                    return false;
-                }
-            }
-
-            if (!addr.equals(geo.getAddress())) {
-                // if the location provider did not have an address, create a new one with it
-                geo = HostGeoInfo.create(addr, geo.displayName, geo.latitude, geo.longitude);
-            }
-
-            // If we already knew about it, and it hasn't changed, then nothing to do
-            if (oldGeo != null && geo.getAddress().equals(oldGeo.getAddress())) {
-                return false;
-            }
-
-            entitiesWithoutHostname.remove(entity);
-            entitiesWithoutGeoInfo.remove(entity);
-            log.info("GeoDns adding "+entity+" at "+geo+(oldGeo != null ? " (previously "+oldGeo+")" : ""));
-            targetHosts.put(entity, geo);
-            return true;
-
-        } catch (Exception ee) {
-            log.warn("GeoDns ignoring "+entity+" (error analysing location): "+ee, ee);
-            return false;
-        }
-    }
-
-    /** remove if host removed */
-    protected boolean removeTargetHost(Entity e, boolean doUpdate) {
-        if (targetHosts.remove(e) != null) {
-            log.info("GeoDns removing reference to {}", e);
-            if (doUpdate) update();
-            return true;
-        }
-        return false;
-    }
-
-    protected void update() {
-        lastUpdate = System.currentTimeMillis();
-
-        Map<Entity, HostGeoInfo> m;
-        synchronized(targetHosts) { m = ImmutableMap.copyOf(targetHosts); }
-        if (log.isDebugEnabled()) log.debug("Full update of "+this+" ("+m.size()+" target hosts)");
-
-        Map<String,String> entityIdToAddress = Maps.newLinkedHashMap();
-        for (Map.Entry<Entity, HostGeoInfo> entry : m.entrySet()) {
-            entityIdToAddress.put(entry.getKey().getId(), entry.getValue().address);
-        }
-
-        reconfigureService(new LinkedHashSet<HostGeoInfo>(m.values()));
-
-        if (log.isDebugEnabled()) log.debug("Targets being set as "+entityIdToAddress);
-        sensors().set(TARGETS, entityIdToAddress);
-    }
-
-    protected String inferHostname(Entity entity) {
-        String hostname = entity.getAttribute(Attributes.HOSTNAME);
-        URI url = entity.getAttribute(Attributes.MAIN_URI);
-        if (url!=null) {
-            try {
-                URL u = url.toURL();
-
-                String hostname2 = u.getHost(); 
-                if (hostname==null) {
-                    if (!entitiesWithoutGeoInfo.contains(entity))  //don't log repeatedly
-                        log.warn("GeoDns "+this+" using URL {} to redirect to {} (HOSTNAME attribute is preferred, but not available)", url, entity);
-                    hostname = hostname2;
-                } else if (!hostname.equals(hostname2)) {
-                    if (!entitiesWithoutGeoInfo.contains(entity))  //don't log repeatedly
-                        log.warn("GeoDns "+this+" URL {} of "+entity+" does not match advertised HOSTNAME {}; using hostname, not URL", url, hostname);
-                }
-
-                if (u.getPort() > 0 && u.getPort() != 80 && u.getPort() != 443) {
-                    if (!entitiesWithoutGeoInfo.contains(entity))  //don't log repeatedly
-                        log.warn("GeoDns "+this+" detected non-standard port in URL {} for {}; forwarding may not work", url, entity);
-                }
-
-            } catch (MalformedURLException e) {
-                log.warn("Invalid URL {} for entity {} in {}", new Object[] {url, entity, this});
-            }
-        }
-        return hostname;
-    }
-
-    protected String inferIp(Entity entity) {
-        return entity.getAttribute(Attributes.ADDRESS);
-    }
-
-    protected HostGeoInfo inferHostGeoInfo(String hostname, String ip) throws UnknownHostException {
-        HostGeoInfo geoH = null;
-        if (hostname != null) {
-            try {
-                // For some entities, the hostname can actually be an IP! Therefore use Networking.getInetAddressWithFixedName
-                InetAddress addr = Networking.getInetAddressWithFixedName(hostname);
-                geoH = HostGeoInfo.fromIpAddress(addr);
-            } catch (RuntimeException e) {
-                // Most likely caused by (a wrapped) UnknownHostException
-                Exceptions.propagateIfFatal(e);
-                if (ip == null) {
-                    if (log.isTraceEnabled()) log.trace("inferHostGeoInfo failing ("+Exceptions.getFirstInteresting(e)+"): hostname="+hostname+"; ip="+ip);
-                    throw e;
-                } else {
-                    if (log.isTraceEnabled()) log.trace("GeoDns failed to infer GeoInfo from hostname {}; will try with IP {} ({})", new Object[] {hostname, ip, e});
-                }
-            }
-        }
-
-        // Try IP address (prior to Mar 2014 we did not do this if USE_HOSTNAME was set but don't think that is desirable due to #1216)
-        if (ip != null) {
-            if (geoH == null) {
-                InetAddress addr = Networking.getInetAddressWithFixedName(ip);
-                geoH = HostGeoInfo.fromIpAddress(addr);
-                if (log.isTraceEnabled()) log.trace("GeoDns inferred GeoInfo {} from ip {} (could not infer from hostname {})", new Object[] {geoH, ip, hostname});
-            } else {
-                geoH = HostGeoInfo.create(ip, geoH.displayName, geoH.latitude, geoH.longitude);
-                if (log.isTraceEnabled()) log.trace("GeoDns inferred GeoInfo {} from hostname {}; switching it to ip {}", new Object[] {geoH, hostname, ip});
-            }
-        } else {
-            if (log.isTraceEnabled()) log.trace("GeoDns inferred GeoInfo {} from hostname {}", geoH, hostname);
-        }
-
-        return geoH;
-    }
-}


[40/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-touch.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-touch.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-touch.js
deleted file mode 100644
index b4f036f..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-touch.js
+++ /dev/null
@@ -1,584 +0,0 @@
-/**
- * @license AngularJS v1.2.19
- * (c) 2010-2014 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-/**
- * @ngdoc module
- * @name ngTouch
- * @description
- *
- * # ngTouch
- *
- * The `ngTouch` module provides touch events and other helpers for touch-enabled devices.
- * The implementation is based on jQuery Mobile touch event handling
- * ([jquerymobile.com](http://jquerymobile.com/)).
- *
- *
- * See {@link ngTouch.$swipe `$swipe`} for usage.
- *
- * <div doc-module-components="ngTouch"></div>
- *
- */
-
-// define ngTouch module
-/* global -ngTouch */
-var ngTouch = angular.module('ngTouch', []);
-
-/* global ngTouch: false */
-
-    /**
-     * @ngdoc service
-     * @name $swipe
-     *
-     * @description
-     * The `$swipe` service is a service that abstracts the messier details of hold-and-drag swipe
-     * behavior, to make implementing swipe-related directives more convenient.
-     *
-     * Requires the {@link ngTouch `ngTouch`} module to be installed.
-     *
-     * `$swipe` is used by the `ngSwipeLeft` and `ngSwipeRight` directives in `ngTouch`, and by
-     * `ngCarousel` in a separate component.
-     *
-     * # Usage
-     * The `$swipe` service is an object with a single method: `bind`. `bind` takes an element
-     * which is to be watched for swipes, and an object with four handler functions. See the
-     * documentation for `bind` below.
-     */
-
-ngTouch.factory('$swipe', [function() {
-  // The total distance in any direction before we make the call on swipe vs. scroll.
-  var MOVE_BUFFER_RADIUS = 10;
-
-  function getCoordinates(event) {
-    var touches = event.touches && event.touches.length ? event.touches : [event];
-    var e = (event.changedTouches && event.changedTouches[0]) ||
-        (event.originalEvent && event.originalEvent.changedTouches &&
-            event.originalEvent.changedTouches[0]) ||
-        touches[0].originalEvent || touches[0];
-
-    return {
-      x: e.clientX,
-      y: e.clientY
-    };
-  }
-
-  return {
-    /**
-     * @ngdoc method
-     * @name $swipe#bind
-     *
-     * @description
-     * The main method of `$swipe`. It takes an element to be watched for swipe motions, and an
-     * object containing event handlers.
-     *
-     * The four events are `start`, `move`, `end`, and `cancel`. `start`, `move`, and `end`
-     * receive as a parameter a coordinates object of the form `{ x: 150, y: 310 }`.
-     *
-     * `start` is called on either `mousedown` or `touchstart`. After this event, `$swipe` is
-     * watching for `touchmove` or `mousemove` events. These events are ignored until the total
-     * distance moved in either dimension exceeds a small threshold.
-     *
-     * Once this threshold is exceeded, either the horizontal or vertical delta is greater.
-     * - If the horizontal distance is greater, this is a swipe and `move` and `end` events follow.
-     * - If the vertical distance is greater, this is a scroll, and we let the browser take over.
-     *   A `cancel` event is sent.
-     *
-     * `move` is called on `mousemove` and `touchmove` after the above logic has determined that
-     * a swipe is in progress.
-     *
-     * `end` is called when a swipe is successfully completed with a `touchend` or `mouseup`.
-     *
-     * `cancel` is called either on a `touchcancel` from the browser, or when we begin scrolling
-     * as described above.
-     *
-     */
-    bind: function(element, eventHandlers) {
-      // Absolute total movement, used to control swipe vs. scroll.
-      var totalX, totalY;
-      // Coordinates of the start position.
-      var startCoords;
-      // Last event's position.
-      var lastPos;
-      // Whether a swipe is active.
-      var active = false;
-
-      element.on('touchstart mousedown', function(event) {
-        startCoords = getCoordinates(event);
-        active = true;
-        totalX = 0;
-        totalY = 0;
-        lastPos = startCoords;
-        eventHandlers['start'] && eventHandlers['start'](startCoords, event);
-      });
-
-      element.on('touchcancel', function(event) {
-        active = false;
-        eventHandlers['cancel'] && eventHandlers['cancel'](event);
-      });
-
-      element.on('touchmove mousemove', function(event) {
-        if (!active) return;
-
-        // Android will send a touchcancel if it thinks we're starting to scroll.
-        // So when the total distance (+ or - or both) exceeds 10px in either direction,
-        // we either:
-        // - On totalX > totalY, we send preventDefault() and treat this as a swipe.
-        // - On totalY > totalX, we let the browser handle it as a scroll.
-
-        if (!startCoords) return;
-        var coords = getCoordinates(event);
-
-        totalX += Math.abs(coords.x - lastPos.x);
-        totalY += Math.abs(coords.y - lastPos.y);
-
-        lastPos = coords;
-
-        if (totalX < MOVE_BUFFER_RADIUS && totalY < MOVE_BUFFER_RADIUS) {
-          return;
-        }
-
-        // One of totalX or totalY has exceeded the buffer, so decide on swipe vs. scroll.
-        if (totalY > totalX) {
-          // Allow native scrolling to take over.
-          active = false;
-          eventHandlers['cancel'] && eventHandlers['cancel'](event);
-          return;
-        } else {
-          // Prevent the browser from scrolling.
-          event.preventDefault();
-          eventHandlers['move'] && eventHandlers['move'](coords, event);
-        }
-      });
-
-      element.on('touchend mouseup', function(event) {
-        if (!active) return;
-        active = false;
-        eventHandlers['end'] && eventHandlers['end'](getCoordinates(event), event);
-      });
-    }
-  };
-}]);
-
-/* global ngTouch: false */
-
-/**
- * @ngdoc directive
- * @name ngClick
- *
- * @description
- * A more powerful replacement for the default ngClick designed to be used on touchscreen
- * devices. Most mobile browsers wait about 300ms after a tap-and-release before sending
- * the click event. This version handles them immediately, and then prevents the
- * following click event from propagating.
- *
- * Requires the {@link ngTouch `ngTouch`} module to be installed.
- *
- * This directive can fall back to using an ordinary click event, and so works on desktop
- * browsers as well as mobile.
- *
- * This directive also sets the CSS class `ng-click-active` while the element is being held
- * down (by a mouse click or touch) so you can restyle the depressed element if you wish.
- *
- * @element ANY
- * @param {expression} ngClick {@link guide/expression Expression} to evaluate
- * upon tap. (Event object is available as `$event`)
- *
- * @example
-    <example module="ngClickExample" deps="angular-touch.js">
-      <file name="index.html">
-        <button ng-click="count = count + 1" ng-init="count=0">
-          Increment
-        </button>
-        count: {{ count }}
-      </file>
-      <file name="script.js">
-        angular.module('ngClickExample', ['ngTouch']);
-      </file>
-    </example>
- */
-
-ngTouch.config(['$provide', function($provide) {
-  $provide.decorator('ngClickDirective', ['$delegate', function($delegate) {
-    // drop the default ngClick directive
-    $delegate.shift();
-    return $delegate;
-  }]);
-}]);
-
-ngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement',
-    function($parse, $timeout, $rootElement) {
-  var TAP_DURATION = 750; // Shorter than 750ms is a tap, longer is a taphold or drag.
-  var MOVE_TOLERANCE = 12; // 12px seems to work in most mobile browsers.
-  var PREVENT_DURATION = 2500; // 2.5 seconds maximum from preventGhostClick call to click
-  var CLICKBUSTER_THRESHOLD = 25; // 25 pixels in any dimension is the limit for busting clicks.
-
-  var ACTIVE_CLASS_NAME = 'ng-click-active';
-  var lastPreventedTime;
-  var touchCoordinates;
-  var lastLabelClickCoordinates;
-
-
-  // TAP EVENTS AND GHOST CLICKS
-  //
-  // Why tap events?
-  // Mobile browsers detect a tap, then wait a moment (usually ~300ms) to see if you're
-  // double-tapping, and then fire a click event.
-  //
-  // This delay sucks and makes mobile apps feel unresponsive.
-  // So we detect touchstart, touchmove, touchcancel and touchend ourselves and determine when
-  // the user has tapped on something.
-  //
-  // What happens when the browser then generates a click event?
-  // The browser, of course, also detects the tap and fires a click after a delay. This results in
-  // tapping/clicking twice. We do "clickbusting" to prevent it.
-  //
-  // How does it work?
-  // We attach global touchstart and click handlers, that run during the capture (early) phase.
-  // So the sequence for a tap is:
-  // - global touchstart: Sets an "allowable region" at the point touched.
-  // - element's touchstart: Starts a touch
-  // (- touchmove or touchcancel ends the touch, no click follows)
-  // - element's touchend: Determines if the tap is valid (didn't move too far away, didn't hold
-  //   too long) and fires the user's tap handler. The touchend also calls preventGhostClick().
-  // - preventGhostClick() removes the allowable region the global touchstart created.
-  // - The browser generates a click event.
-  // - The global click handler catches the click, and checks whether it was in an allowable region.
-  //     - If preventGhostClick was called, the region will have been removed, the click is busted.
-  //     - If the region is still there, the click proceeds normally. Therefore clicks on links and
-  //       other elements without ngTap on them work normally.
-  //
-  // This is an ugly, terrible hack!
-  // Yeah, tell me about it. The alternatives are using the slow click events, or making our users
-  // deal with the ghost clicks, so I consider this the least of evils. Fortunately Angular
-  // encapsulates this ugly logic away from the user.
-  //
-  // Why not just put click handlers on the element?
-  // We do that too, just to be sure. If the tap event caused the DOM to change,
-  // it is possible another element is now in that position. To take account for these possibly
-  // distinct elements, the handlers are global and care only about coordinates.
-
-  // Checks if the coordinates are close enough to be within the region.
-  function hit(x1, y1, x2, y2) {
-    return Math.abs(x1 - x2) < CLICKBUSTER_THRESHOLD && Math.abs(y1 - y2) < CLICKBUSTER_THRESHOLD;
-  }
-
-  // Checks a list of allowable regions against a click location.
-  // Returns true if the click should be allowed.
-  // Splices out the allowable region from the list after it has been used.
-  function checkAllowableRegions(touchCoordinates, x, y) {
-    for (var i = 0; i < touchCoordinates.length; i += 2) {
-      if (hit(touchCoordinates[i], touchCoordinates[i+1], x, y)) {
-        touchCoordinates.splice(i, i + 2);
-        return true; // allowable region
-      }
-    }
-    return false; // No allowable region; bust it.
-  }
-
-  // Global click handler that prevents the click if it's in a bustable zone and preventGhostClick
-  // was called recently.
-  function onClick(event) {
-    if (Date.now() - lastPreventedTime > PREVENT_DURATION) {
-      return; // Too old.
-    }
-
-    var touches = event.touches && event.touches.length ? event.touches : [event];
-    var x = touches[0].clientX;
-    var y = touches[0].clientY;
-    // Work around desktop Webkit quirk where clicking a label will fire two clicks (on the label
-    // and on the input element). Depending on the exact browser, this second click we don't want
-    // to bust has either (0,0), negative coordinates, or coordinates equal to triggering label
-    // click event
-    if (x < 1 && y < 1) {
-      return; // offscreen
-    }
-    if (lastLabelClickCoordinates &&
-        lastLabelClickCoordinates[0] === x && lastLabelClickCoordinates[1] === y) {
-      return; // input click triggered by label click
-    }
-    // reset label click coordinates on first subsequent click
-    if (lastLabelClickCoordinates) {
-      lastLabelClickCoordinates = null;
-    }
-    // remember label click coordinates to prevent click busting of trigger click event on input
-    if (event.target.tagName.toLowerCase() === 'label') {
-      lastLabelClickCoordinates = [x, y];
-    }
-
-    // Look for an allowable region containing this click.
-    // If we find one, that means it was created by touchstart and not removed by
-    // preventGhostClick, so we don't bust it.
-    if (checkAllowableRegions(touchCoordinates, x, y)) {
-      return;
-    }
-
-    // If we didn't find an allowable region, bust the click.
-    event.stopPropagation();
-    event.preventDefault();
-
-    // Blur focused form elements
-    event.target && event.target.blur();
-  }
-
-
-  // Global touchstart handler that creates an allowable region for a click event.
-  // This allowable region can be removed by preventGhostClick if we want to bust it.
-  function onTouchStart(event) {
-    var touches = event.touches && event.touches.length ? event.touches : [event];
-    var x = touches[0].clientX;
-    var y = touches[0].clientY;
-    touchCoordinates.push(x, y);
-
-    $timeout(function() {
-      // Remove the allowable region.
-      for (var i = 0; i < touchCoordinates.length; i += 2) {
-        if (touchCoordinates[i] == x && touchCoordinates[i+1] == y) {
-          touchCoordinates.splice(i, i + 2);
-          return;
-        }
-      }
-    }, PREVENT_DURATION, false);
-  }
-
-  // On the first call, attaches some event handlers. Then whenever it gets called, it creates a
-  // zone around the touchstart where clicks will get busted.
-  function preventGhostClick(x, y) {
-    if (!touchCoordinates) {
-      $rootElement[0].addEventListener('click', onClick, true);
-      $rootElement[0].addEventListener('touchstart', onTouchStart, true);
-      touchCoordinates = [];
-    }
-
-    lastPreventedTime = Date.now();
-
-    checkAllowableRegions(touchCoordinates, x, y);
-  }
-
-  // Actual linking function.
-  return function(scope, element, attr) {
-    var clickHandler = $parse(attr.ngClick),
-        tapping = false,
-        tapElement,  // Used to blur the element after a tap.
-        startTime,   // Used to check if the tap was held too long.
-        touchStartX,
-        touchStartY;
-
-    function resetState() {
-      tapping = false;
-      element.removeClass(ACTIVE_CLASS_NAME);
-    }
-
-    element.on('touchstart', function(event) {
-      tapping = true;
-      tapElement = event.target ? event.target : event.srcElement; // IE uses srcElement.
-      // Hack for Safari, which can target text nodes instead of containers.
-      if(tapElement.nodeType == 3) {
-        tapElement = tapElement.parentNode;
-      }
-
-      element.addClass(ACTIVE_CLASS_NAME);
-
-      startTime = Date.now();
-
-      var touches = event.touches && event.touches.length ? event.touches : [event];
-      var e = touches[0].originalEvent || touches[0];
-      touchStartX = e.clientX;
-      touchStartY = e.clientY;
-    });
-
-    element.on('touchmove', function(event) {
-      resetState();
-    });
-
-    element.on('touchcancel', function(event) {
-      resetState();
-    });
-
-    element.on('touchend', function(event) {
-      var diff = Date.now() - startTime;
-
-      var touches = (event.changedTouches && event.changedTouches.length) ? event.changedTouches :
-          ((event.touches && event.touches.length) ? event.touches : [event]);
-      var e = touches[0].originalEvent || touches[0];
-      var x = e.clientX;
-      var y = e.clientY;
-      var dist = Math.sqrt( Math.pow(x - touchStartX, 2) + Math.pow(y - touchStartY, 2) );
-
-      if (tapping && diff < TAP_DURATION && dist < MOVE_TOLERANCE) {
-        // Call preventGhostClick so the clickbuster will catch the corresponding click.
-        preventGhostClick(x, y);
-
-        // Blur the focused element (the button, probably) before firing the callback.
-        // This doesn't work perfectly on Android Chrome, but seems to work elsewhere.
-        // I couldn't get anything to work reliably on Android Chrome.
-        if (tapElement) {
-          tapElement.blur();
-        }
-
-        if (!angular.isDefined(attr.disabled) || attr.disabled === false) {
-          element.triggerHandler('click', [event]);
-        }
-      }
-
-      resetState();
-    });
-
-    // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click
-    // something else nearby.
-    element.onclick = function(event) { };
-
-    // Actual click handler.
-    // There are three different kinds of clicks, only two of which reach this point.
-    // - On desktop browsers without touch events, their clicks will always come here.
-    // - On mobile browsers, the simulated "fast" click will call this.
-    // - But the browser's follow-up slow click will be "busted" before it reaches this handler.
-    // Therefore it's safe to use this directive on both mobile and desktop.
-    element.on('click', function(event, touchend) {
-      scope.$apply(function() {
-        clickHandler(scope, {$event: (touchend || event)});
-      });
-    });
-
-    element.on('mousedown', function(event) {
-      element.addClass(ACTIVE_CLASS_NAME);
-    });
-
-    element.on('mousemove mouseup', function(event) {
-      element.removeClass(ACTIVE_CLASS_NAME);
-    });
-
-  };
-}]);
-
-/* global ngTouch: false */
-
-/**
- * @ngdoc directive
- * @name ngSwipeLeft
- *
- * @description
- * Specify custom behavior when an element is swiped to the left on a touchscreen device.
- * A leftward swipe is a quick, right-to-left slide of the finger.
- * Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag
- * too.
- *
- * Requires the {@link ngTouch `ngTouch`} module to be installed.
- *
- * @element ANY
- * @param {expression} ngSwipeLeft {@link guide/expression Expression} to evaluate
- * upon left swipe. (Event object is available as `$event`)
- *
- * @example
-    <example module="ngSwipeLeftExample" deps="angular-touch.js">
-      <file name="index.html">
-        <div ng-show="!showActions" ng-swipe-left="showActions = true">
-          Some list content, like an email in the inbox
-        </div>
-        <div ng-show="showActions" ng-swipe-right="showActions = false">
-          <button ng-click="reply()">Reply</button>
-          <button ng-click="delete()">Delete</button>
-        </div>
-      </file>
-      <file name="script.js">
-        angular.module('ngSwipeLeftExample', ['ngTouch']);
-      </file>
-    </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngSwipeRight
- *
- * @description
- * Specify custom behavior when an element is swiped to the right on a touchscreen device.
- * A rightward swipe is a quick, left-to-right slide of the finger.
- * Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag
- * too.
- *
- * Requires the {@link ngTouch `ngTouch`} module to be installed.
- *
- * @element ANY
- * @param {expression} ngSwipeRight {@link guide/expression Expression} to evaluate
- * upon right swipe. (Event object is available as `$event`)
- *
- * @example
-    <example module="ngSwipeRightExample" deps="angular-touch.js">
-      <file name="index.html">
-        <div ng-show="!showActions" ng-swipe-left="showActions = true">
-          Some list content, like an email in the inbox
-        </div>
-        <div ng-show="showActions" ng-swipe-right="showActions = false">
-          <button ng-click="reply()">Reply</button>
-          <button ng-click="delete()">Delete</button>
-        </div>
-      </file>
-      <file name="script.js">
-        angular.module('ngSwipeRightExample', ['ngTouch']);
-      </file>
-    </example>
- */
-
-function makeSwipeDirective(directiveName, direction, eventName) {
-  ngTouch.directive(directiveName, ['$parse', '$swipe', function($parse, $swipe) {
-    // The maximum vertical delta for a swipe should be less than 75px.
-    var MAX_VERTICAL_DISTANCE = 75;
-    // Vertical distance should not be more than a fraction of the horizontal distance.
-    var MAX_VERTICAL_RATIO = 0.3;
-    // At least a 30px lateral motion is necessary for a swipe.
-    var MIN_HORIZONTAL_DISTANCE = 30;
-
-    return function(scope, element, attr) {
-      var swipeHandler = $parse(attr[directiveName]);
-
-      var startCoords, valid;
-
-      function validSwipe(coords) {
-        // Check that it's within the coordinates.
-        // Absolute vertical distance must be within tolerances.
-        // Horizontal distance, we take the current X - the starting X.
-        // This is negative for leftward swipes and positive for rightward swipes.
-        // After multiplying by the direction (-1 for left, +1 for right), legal swipes
-        // (ie. same direction as the directive wants) will have a positive delta and
-        // illegal ones a negative delta.
-        // Therefore this delta must be positive, and larger than the minimum.
-        if (!startCoords) return false;
-        var deltaY = Math.abs(coords.y - startCoords.y);
-        var deltaX = (coords.x - startCoords.x) * direction;
-        return valid && // Short circuit for already-invalidated swipes.
-            deltaY < MAX_VERTICAL_DISTANCE &&
-            deltaX > 0 &&
-            deltaX > MIN_HORIZONTAL_DISTANCE &&
-            deltaY / deltaX < MAX_VERTICAL_RATIO;
-      }
-
-      $swipe.bind(element, {
-        'start': function(coords, event) {
-          startCoords = coords;
-          valid = true;
-        },
-        'cancel': function(event) {
-          valid = false;
-        },
-        'end': function(coords, event) {
-          if (validSwipe(coords)) {
-            scope.$apply(function() {
-              element.triggerHandler(eventName);
-              swipeHandler(scope, {$event: event});
-            });
-          }
-        }
-      });
-    };
-  }]);
-}
-
-// Left is negative X-coordinate, right is positive.
-makeSwipeDirective('ngSwipeLeft', -1, 'swipeleft');
-makeSwipeDirective('ngSwipeRight', 1, 'swiperight');
-
-
-
-})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-touch.min.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-touch.min.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-touch.min.js
deleted file mode 100644
index 27791fd..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-touch.min.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- AngularJS v1.2.19
- (c) 2010-2014 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(y,w,z){'use strict';function u(f,a,c){r.directive(f,["$parse","$swipe",function(m,p){var q=75,g=0.3,e=30;return function(h,n,l){function k(d){if(!b)return!1;var s=Math.abs(d.y-b.y);d=(d.x-b.x)*a;return v&&s<q&&0<d&&d>e&&s/d<g}var s=m(l[f]),b,v;p.bind(n,{start:function(d,s){b=d;v=!0},cancel:function(b){v=!1},end:function(b,a){k(b)&&h.$apply(function(){n.triggerHandler(c);s(h,{$event:a})})}})}}])}var r=w.module("ngTouch",[]);r.factory("$swipe",[function(){function f(a){var c=a.touches&&a.touches.length?
-a.touches:[a];a=a.changedTouches&&a.changedTouches[0]||a.originalEvent&&a.originalEvent.changedTouches&&a.originalEvent.changedTouches[0]||c[0].originalEvent||c[0];return{x:a.clientX,y:a.clientY}}return{bind:function(a,c){var m,p,q,g,e=!1;a.on("touchstart mousedown",function(a){q=f(a);e=!0;p=m=0;g=q;c.start&&c.start(q,a)});a.on("touchcancel",function(a){e=!1;c.cancel&&c.cancel(a)});a.on("touchmove mousemove",function(a){if(e&&q){var n=f(a);m+=Math.abs(n.x-g.x);p+=Math.abs(n.y-g.y);g=n;10>m&&10>p||
-(p>m?(e=!1,c.cancel&&c.cancel(a)):(a.preventDefault(),c.move&&c.move(n,a)))}});a.on("touchend mouseup",function(a){e&&(e=!1,c.end&&c.end(f(a),a))})}}}]);r.config(["$provide",function(f){f.decorator("ngClickDirective",["$delegate",function(a){a.shift();return a}])}]);r.directive("ngClick",["$parse","$timeout","$rootElement",function(f,a,c){function m(a,b,c){for(var d=0;d<a.length;d+=2)if(Math.abs(a[d]-b)<e&&Math.abs(a[d+1]-c)<e)return a.splice(d,d+2),!0;return!1}function p(a){if(!(Date.now()-n>g)){var b=
-a.touches&&a.touches.length?a.touches:[a],c=b[0].clientX,b=b[0].clientY;1>c&&1>b||k&&k[0]===c&&k[1]===b||(k&&(k=null),"label"===a.target.tagName.toLowerCase()&&(k=[c,b]),m(l,c,b)||(a.stopPropagation(),a.preventDefault(),a.target&&a.target.blur()))}}function q(c){c=c.touches&&c.touches.length?c.touches:[c];var b=c[0].clientX,e=c[0].clientY;l.push(b,e);a(function(){for(var a=0;a<l.length;a+=2)if(l[a]==b&&l[a+1]==e){l.splice(a,a+2);break}},g,!1)}var g=2500,e=25,h="ng-click-active",n,l,k;return function(a,
-b,e){function d(){k=!1;b.removeClass(h)}var g=f(e.ngClick),k=!1,t,r,u,x;b.on("touchstart",function(a){k=!0;t=a.target?a.target:a.srcElement;3==t.nodeType&&(t=t.parentNode);b.addClass(h);r=Date.now();a=a.touches&&a.touches.length?a.touches:[a];a=a[0].originalEvent||a[0];u=a.clientX;x=a.clientY});b.on("touchmove",function(a){d()});b.on("touchcancel",function(a){d()});b.on("touchend",function(a){var g=Date.now()-r,f=a.changedTouches&&a.changedTouches.length?a.changedTouches:a.touches&&a.touches.length?
-a.touches:[a],h=f[0].originalEvent||f[0],f=h.clientX,h=h.clientY,s=Math.sqrt(Math.pow(f-u,2)+Math.pow(h-x,2));k&&(750>g&&12>s)&&(l||(c[0].addEventListener("click",p,!0),c[0].addEventListener("touchstart",q,!0),l=[]),n=Date.now(),m(l,f,h),t&&t.blur(),w.isDefined(e.disabled)&&!1!==e.disabled||b.triggerHandler("click",[a]));d()});b.onclick=function(a){};b.on("click",function(b,c){a.$apply(function(){g(a,{$event:c||b})})});b.on("mousedown",function(a){b.addClass(h)});b.on("mousemove mouseup",function(a){b.removeClass(h)})}}]);
-u("ngSwipeLeft",-1,"swipeleft");u("ngSwipeRight",1,"swiperight")})(window,window.angular);
-//# sourceMappingURL=angular-touch.min.js.map

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-touch.min.js.map
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-touch.min.js.map b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-touch.min.js.map
deleted file mode 100644
index e26dfa8..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-touch.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-touch.min.js",
-"lineCount":12,
-"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAsgBtCC,QAASA,EAAkB,CAACC,CAAD,CAAgBC,CAAhB,CAA2BC,CAA3B,CAAsC,CAC/DC,CAAAC,UAAA,CAAkBJ,CAAlB,CAAiC,CAAC,QAAD,CAAW,QAAX,CAAqB,QAAQ,CAACK,CAAD,CAASC,CAAT,CAAiB,CAE7E,IAAIC,EAAwB,EAA5B,CAEIC,EAAqB,GAFzB,CAIIC,EAA0B,EAE9B,OAAO,SAAQ,CAACC,CAAD,CAAQC,CAAR,CAAiBC,CAAjB,CAAuB,CAKpCC,QAASA,EAAU,CAACC,CAAD,CAAS,CAS1B,GAAI,CAACC,CAAL,CAAkB,MAAO,CAAA,CACzB,KAAIC,EAASC,IAAAC,IAAA,CAASJ,CAAAK,EAAT,CAAoBJ,CAAAI,EAApB,CACTC,EAAAA,EAAUN,CAAAO,EAAVD,CAAqBL,CAAAM,EAArBD,EAAsCnB,CAC1C,OAAOqB,EAAP,EACIN,CADJ,CACaT,CADb,EAEa,CAFb,CAEIa,CAFJ,EAGIA,CAHJ,CAGaX,CAHb,EAIIO,CAJJ,CAIaI,CAJb,CAIsBZ,CAhBI,CAJ5B,IAAIe,EAAelB,CAAA,CAAOO,CAAA,CAAKZ,CAAL,CAAP,CAAnB,CAEIe,CAFJ,CAEiBO,CAqBjBhB,EAAAkB,KAAA,CAAYb,CAAZ,CAAqB,OACVc,QAAQ,CAACX,CAAD,CAASY,CAAT,CAAgB,CAC/BX,CAAA,CAAcD,CACdQ,EAAA,CAAQ,CAAA,CAFuB,CADd,QAKTK,QAAQ,CAACD,CAAD,CAAQ,CACxBJ,CAAA,CAAQ,CAAA,CADgB,CALP,KAQZM,QAAQ,CAACd,CAAD,CAASY,CAAT,CAAgB,CACzBb,CAAA,CAAWC,CAAX,CAAJ,EACEJ,CAAAmB,OA
 AA,CAAa,QAAQ,EAAG,CACtBlB,CAAAmB,eAAA,CAAuB5B,CAAvB,CACAqB,EAAA,CAAab,CAAb,CAAoB,QAASgB,CAAT,CAApB,CAFsB,CAAxB,CAF2B,CARZ,CAArB,CAxBoC,CARuC,CAA9C,CAAjC,CAD+D,CAhfjE,IAAIvB,EAAUN,CAAAkC,OAAA,CAAe,SAAf,CAA0B,EAA1B,CAuBd5B,EAAA6B,QAAA,CAAgB,QAAhB,CAA0B,CAAC,QAAQ,EAAG,CAIpCC,QAASA,EAAc,CAACP,CAAD,CAAQ,CAC7B,IAAIQ,EAAUR,CAAAQ,QAAA,EAAiBR,CAAAQ,QAAAC,OAAjB;AAAwCT,CAAAQ,QAAxC,CAAwD,CAACR,CAAD,CAClEU,EAAAA,CAAKV,CAAAW,eAALD,EAA6BV,CAAAW,eAAA,CAAqB,CAArB,CAA7BD,EACCV,CAAAY,cADDF,EACwBV,CAAAY,cAAAD,eADxBD,EAEIV,CAAAY,cAAAD,eAAA,CAAmC,CAAnC,CAFJD,EAGAF,CAAA,CAAQ,CAAR,CAAAI,cAHAF,EAG4BF,CAAA,CAAQ,CAAR,CAEhC,OAAO,GACFE,CAAAG,QADE,GAEFH,CAAAI,QAFE,CAPsB,CAa/B,MAAO,MA8BChB,QAAQ,CAACb,CAAD,CAAU8B,CAAV,CAAyB,CAAA,IAEjCC,CAFiC,CAEzBC,CAFyB,CAIjC5B,CAJiC,CAMjC6B,CANiC,CAQjCC,EAAS,CAAA,CAEblC,EAAAmC,GAAA,CAAW,sBAAX,CAAmC,QAAQ,CAACpB,CAAD,CAAQ,CACjDX,CAAA,CAAckB,CAAA,CAAeP,CAAf,CACdmB,EAAA,CAAS,CAAA,CAETF,EAAA,CADAD,CACA,CADS,CAETE,EAAA,CAAU7B,CACV0B,EAAA,MAAA,EAA0BA,CAAA,MAAA,CAAuB1B,CAAvB,CAAoCW,CAAp
 C,CANuB,CAAnD,CASAf,EAAAmC,GAAA,CAAW,aAAX,CAA0B,QAAQ,CAACpB,CAAD,CAAQ,CACxCmB,CAAA,CAAS,CAAA,CACTJ,EAAA,OAAA,EAA2BA,CAAA,OAAA,CAAwBf,CAAxB,CAFa,CAA1C,CAKAf,EAAAmC,GAAA,CAAW,qBAAX,CAAkC,QAAQ,CAACpB,CAAD,CAAQ,CAChD,GAAKmB,CAAL,EAQK9B,CARL,CAQA,CACA,IAAID,EAASmB,CAAA,CAAeP,CAAf,CAEbgB,EAAA,EAAUzB,IAAAC,IAAA,CAASJ,CAAAO,EAAT,CAAoBuB,CAAAvB,EAApB,CACVsB,EAAA,EAAU1B,IAAAC,IAAA,CAASJ,CAAAK,EAAT,CAAoByB,CAAAzB,EAApB,CAEVyB,EAAA,CAAU9B,CApFSiC,GAsFnB,CAAIL,CAAJ,EAtFmBK,EAsFnB,CAAmCJ,CAAnC;CAKIA,CAAJ,CAAaD,CAAb,EAEEG,CACA,CADS,CAAA,CACT,CAAAJ,CAAA,OAAA,EAA2BA,CAAA,OAAA,CAAwBf,CAAxB,CAH7B,GAOEA,CAAAsB,eAAA,EACA,CAAAP,CAAA,KAAA,EAAyBA,CAAA,KAAA,CAAsB3B,CAAtB,CAA8BY,CAA9B,CAR3B,CALA,CARA,CATgD,CAAlD,CAkCAf,EAAAmC,GAAA,CAAW,kBAAX,CAA+B,QAAQ,CAACpB,CAAD,CAAQ,CACxCmB,CAAL,GACAA,CACA,CADS,CAAA,CACT,CAAAJ,CAAA,IAAA,EAAwBA,CAAA,IAAA,CAAqBR,CAAA,CAAeP,CAAf,CAArB,CAA4CA,CAA5C,CAFxB,CAD6C,CAA/C,CA1DqC,CA9BlC,CAjB6B,CAAZ,CAA1B,CAwJAvB,EAAA8C,OAAA,CAAe,CAAC,UAAD,CAAa,QAAQ,CAACC,CAAD,CAAW,CAC7CA,CAAAC,UAAA,
 CAAmB,kBAAnB,CAAuC,CAAC,WAAD,CAAc,QAAQ,CAACC,CAAD,CAAY,CAEvEA,CAAAC,MAAA,EACA,OAAOD,EAHgE,CAAlC,CAAvC,CAD6C,CAAhC,CAAf,CAQAjD,EAAAC,UAAA,CAAkB,SAAlB,CAA6B,CAAC,QAAD,CAAW,UAAX,CAAuB,cAAvB,CACzB,QAAQ,CAACC,CAAD,CAASiD,CAAT,CAAmBC,CAAnB,CAAiC,CA2D3CC,QAASA,EAAqB,CAACC,CAAD,CAAmBpC,CAAnB,CAAsBF,CAAtB,CAAyB,CACrD,IAAK,IAAIuC,EAAI,CAAb,CAAgBA,CAAhB,CAAoBD,CAAAtB,OAApB,CAA6CuB,CAA7C,EAAkD,CAAlD,CACE,GARKzC,IAAAC,IAAA,CAQGuC,CAAAE,CAAiBD,CAAjBC,CARH,CAQ+CtC,CAR/C,CAQL,CARyBuC,CAQzB,EARkD3C,IAAAC,IAAA,CAQrBuC,CAAAI,CAAiBH,CAAjBG,CAAmB,CAAnBA,CARqB,CAQK1C,CARL,CAQlD,CARsEyC,CAQtE,CAEE,MADAH,EAAAK,OAAA,CAAwBJ,CAAxB,CAA2BA,CAA3B,CAA+B,CAA/B,CACO,CAAA,CAAA,CAGX,OAAO,CAAA,CAP8C,CAYvDK,QAASA,EAAO,CAACrC,CAAD,CAAQ,CACtB,GAAI,EAAAsC,IAAAC,IAAA,EAAA,CAAaC,CAAb,CAAiCC,CAAjC,CAAJ,CAAA,CAIA,IAAIjC;AAAUR,CAAAQ,QAAA,EAAiBR,CAAAQ,QAAAC,OAAjB,CAAwCT,CAAAQ,QAAxC,CAAwD,CAACR,CAAD,CAAtE,CACIL,EAAIa,CAAA,CAAQ,CAAR,CAAAK,QADR,CAEIpB,EAAIe,CAAA,CAAQ,CAAR,CAAAM,QAKA,EAAR,CAAInB,CAAJ,EAAiB,CAAjB,CAAaF,CAAb,EAGIiD,C
 AHJ,EAIIA,CAAA,CAA0B,CAA1B,CAJJ,GAIqC/C,CAJrC,EAI0C+C,CAAA,CAA0B,CAA1B,CAJ1C,GAI2EjD,CAJ3E,GAQIiD,CAWJ,GAVEA,CAUF,CAV8B,IAU9B,EAP2C,OAO3C,GAPI1C,CAAA2C,OAAAC,QAAAC,YAAA,EAOJ,GANEH,CAMF,CAN8B,CAAC/C,CAAD,CAAIF,CAAJ,CAM9B,EAAIqC,CAAA,CAAsBC,CAAtB,CAAwCpC,CAAxC,CAA2CF,CAA3C,CAAJ,GAKAO,CAAA8C,gBAAA,EAIA,CAHA9C,CAAAsB,eAAA,EAGA,CAAAtB,CAAA2C,OAAA,EAAgB3C,CAAA2C,OAAAI,KAAA,EAThB,CAnBA,CAXA,CADsB,CA8CxBC,QAASA,EAAY,CAAChD,CAAD,CAAQ,CACvBQ,CAAAA,CAAUR,CAAAQ,QAAA,EAAiBR,CAAAQ,QAAAC,OAAjB,CAAwCT,CAAAQ,QAAxC,CAAwD,CAACR,CAAD,CACtE,KAAIL,EAAIa,CAAA,CAAQ,CAAR,CAAAK,QAAR,CACIpB,EAAIe,CAAA,CAAQ,CAAR,CAAAM,QACRiB,EAAAkB,KAAA,CAAsBtD,CAAtB,CAAyBF,CAAzB,CAEAmC,EAAA,CAAS,QAAQ,EAAG,CAElB,IAAK,IAAII,EAAI,CAAb,CAAgBA,CAAhB,CAAoBD,CAAAtB,OAApB,CAA6CuB,CAA7C,EAAkD,CAAlD,CACE,GAAID,CAAA,CAAiBC,CAAjB,CAAJ,EAA2BrC,CAA3B,EAAgCoC,CAAA,CAAiBC,CAAjB,CAAmB,CAAnB,CAAhC,EAAyDvC,CAAzD,CAA4D,CAC1DsC,CAAAK,OAAA,CAAwBJ,CAAxB,CAA2BA,CAA3B,CAA+B,CAA/B,CACA,MAF0D,CAH5C,CAApB,CAQGS,CARH,CAQqB,CAAA,CARrB,CAN2B,CAlH7B,IAAIA,E
 AAmB,IAAvB,CACIP,EAAwB,EAD5B,CAGIgB,EAAoB,iBAHxB,CAIIV,CAJJ,CAKIT,CALJ,CAMIW,CA4IJ,OAAO,SAAQ,CAAC1D,CAAD;AAAQC,CAAR,CAAiBC,CAAjB,CAAuB,CAQpCiE,QAASA,EAAU,EAAG,CACpBC,CAAA,CAAU,CAAA,CACVnE,EAAAoE,YAAA,CAAoBH,CAApB,CAFoB,CARc,IAChCI,EAAe3E,CAAA,CAAOO,CAAAqE,QAAP,CADiB,CAEhCH,EAAU,CAAA,CAFsB,CAGhCI,CAHgC,CAIhCC,CAJgC,CAKhCC,CALgC,CAMhCC,CAOJ1E,EAAAmC,GAAA,CAAW,YAAX,CAAyB,QAAQ,CAACpB,CAAD,CAAQ,CACvCoD,CAAA,CAAU,CAAA,CACVI,EAAA,CAAaxD,CAAA2C,OAAA,CAAe3C,CAAA2C,OAAf,CAA8B3C,CAAA4D,WAEjB,EAA1B,EAAGJ,CAAAK,SAAH,GACEL,CADF,CACeA,CAAAM,WADf,CAIA7E,EAAA8E,SAAA,CAAiBb,CAAjB,CAEAO,EAAA,CAAYnB,IAAAC,IAAA,EAER/B,EAAAA,CAAUR,CAAAQ,QAAA,EAAiBR,CAAAQ,QAAAC,OAAjB,CAAwCT,CAAAQ,QAAxC,CAAwD,CAACR,CAAD,CAClEU,EAAAA,CAAIF,CAAA,CAAQ,CAAR,CAAAI,cAAJF,EAAgCF,CAAA,CAAQ,CAAR,CACpCkD,EAAA,CAAchD,CAAAG,QACd8C,EAAA,CAAcjD,CAAAI,QAfyB,CAAzC,CAkBA7B,EAAAmC,GAAA,CAAW,WAAX,CAAwB,QAAQ,CAACpB,CAAD,CAAQ,CACtCmD,CAAA,EADsC,CAAxC,CAIAlE,EAAAmC,GAAA,CAAW,aAAX,CAA0B,QAAQ,CAACpB,CAAD,CAAQ,CACxCmD,CAAA,EADwC,CAA1C,CAIAlE,EAAAm
 C,GAAA,CAAW,UAAX,CAAuB,QAAQ,CAACpB,CAAD,CAAQ,CACrC,IAAIgE,EAAO1B,IAAAC,IAAA,EAAPyB,CAAoBP,CAAxB,CAEIjD,EAAWR,CAAAW,eAAD,EAAyBX,CAAAW,eAAAF,OAAzB,CAAwDT,CAAAW,eAAxD,CACRX,CAAAQ,QAAD,EAAkBR,CAAAQ,QAAAC,OAAlB;AAA0CT,CAAAQ,QAA1C,CAA0D,CAACR,CAAD,CAH/D,CAIIU,EAAIF,CAAA,CAAQ,CAAR,CAAAI,cAAJF,EAAgCF,CAAA,CAAQ,CAAR,CAJpC,CAKIb,EAAIe,CAAAG,QALR,CAMIpB,EAAIiB,CAAAI,QANR,CAOImD,EAAO1E,IAAA2E,KAAA,CAAW3E,IAAA4E,IAAA,CAASxE,CAAT,CAAa+D,CAAb,CAA0B,CAA1B,CAAX,CAA0CnE,IAAA4E,IAAA,CAAS1E,CAAT,CAAakE,CAAb,CAA0B,CAA1B,CAA1C,CAEPP,EAAJ,GArMegB,GAqMf,CAAeJ,CAAf,EApMiBK,EAoMjB,CAAsCJ,CAAtC,IA7DGlC,CAwED,GAvEFF,CAAA,CAAa,CAAb,CAAAyC,iBAAA,CAAiC,OAAjC,CAA0CjC,CAA1C,CAAmD,CAAA,CAAnD,CAEA,CADAR,CAAA,CAAa,CAAb,CAAAyC,iBAAA,CAAiC,YAAjC,CAA+CtB,CAA/C,CAA6D,CAAA,CAA7D,CACA,CAAAjB,CAAA,CAAmB,EAqEjB,EAlEJS,CAkEI,CAlEgBF,IAAAC,IAAA,EAkEhB,CAhEJT,CAAA,CAAsBC,CAAtB,CAuDsBpC,CAvDtB,CAuDyBF,CAvDzB,CAgEI,CAJI+D,CAIJ,EAHEA,CAAAT,KAAA,EAGF,CAAK5E,CAAAoG,UAAA,CAAkBrF,CAAAsF,SAAlB,CAAL,EAA2D,CAAA,CAA3D,GAAyCtF,CAAAsF,SAAzC,
 EACEvF,CAAAmB,eAAA,CAAuB,OAAvB,CAAgC,CAACJ,CAAD,CAAhC,CAZJ,CAgBAmD,EAAA,EA1BqC,CAAvC,CA+BAlE,EAAAwF,QAAA,CAAkBC,QAAQ,CAAC1E,CAAD,CAAQ,EAQlCf,EAAAmC,GAAA,CAAW,OAAX,CAAoB,QAAQ,CAACpB,CAAD,CAAQ2E,CAAR,CAAkB,CAC5C3F,CAAAmB,OAAA,CAAa,QAAQ,EAAG,CACtBmD,CAAA,CAAatE,CAAb,CAAoB,QAAU2F,CAAV,EAAsB3E,CAAtB,CAApB,CADsB,CAAxB,CAD4C,CAA9C,CAMAf,EAAAmC,GAAA,CAAW,WAAX,CAAwB,QAAQ,CAACpB,CAAD,CAAQ,CACtCf,CAAA8E,SAAA,CAAiBb,CAAjB,CADsC,CAAxC,CAIAjE,EAAAmC,GAAA,CAAW,mBAAX,CAAgC,QAAQ,CAACpB,CAAD,CAAQ,CAC9Cf,CAAAoE,YAAA,CAAoBH,CAApB,CAD8C,CAAhD,CAxFoC,CArJK,CADhB,CAA7B,CAgXA7E;CAAA,CAAmB,aAAnB,CAAmC,EAAnC,CAAsC,WAAtC,CACAA,EAAA,CAAmB,cAAnB,CAAmC,CAAnC,CAAsC,YAAtC,CA9jBsC,CAArC,CAAA,CAkkBEH,MAlkBF,CAkkBUA,MAAAC,QAlkBV;",
-"sources":["angular-touch.js"],
-"names":["window","angular","undefined","makeSwipeDirective","directiveName","direction","eventName","ngTouch","directive","$parse","$swipe","MAX_VERTICAL_DISTANCE","MAX_VERTICAL_RATIO","MIN_HORIZONTAL_DISTANCE","scope","element","attr","validSwipe","coords","startCoords","deltaY","Math","abs","y","deltaX","x","valid","swipeHandler","bind","start","event","cancel","end","$apply","triggerHandler","module","factory","getCoordinates","touches","length","e","changedTouches","originalEvent","clientX","clientY","eventHandlers","totalX","totalY","lastPos","active","on","MOVE_BUFFER_RADIUS","preventDefault","config","$provide","decorator","$delegate","shift","$timeout","$rootElement","checkAllowableRegions","touchCoordinates","i","x1","CLICKBUSTER_THRESHOLD","y1","splice","onClick","Date","now","lastPreventedTime","PREVENT_DURATION","lastLabelClickCoordinates","target","tagName","toLowerCase","stopPropagation","blur","onTouchStart","push","ACTIVE_CLASS_NAME","resetState","tapping","removeCl
 ass","clickHandler","ngClick","tapElement","startTime","touchStartX","touchStartY","srcElement","nodeType","parentNode","addClass","diff","dist","sqrt","pow","TAP_DURATION","MOVE_TOLERANCE","addEventListener","isDefined","disabled","onclick","element.onclick","touchend"]
-}


[46/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/Monitor.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/Monitor.java b/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/Monitor.java
deleted file mode 100644
index b5ae0e4..0000000
--- a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/Monitor.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.longevity;
-
-import static java.util.concurrent.TimeUnit.SECONDS;
-import static org.apache.brooklyn.qa.longevity.StatusRecorder.Factory.chain;
-import static org.apache.brooklyn.qa.longevity.StatusRecorder.Factory.noop;
-import static org.apache.brooklyn.qa.longevity.StatusRecorder.Factory.toFile;
-import static org.apache.brooklyn.qa.longevity.StatusRecorder.Factory.toLog;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
-
-import joptsimple.OptionParser;
-import joptsimple.OptionSet;
-
-import org.apache.brooklyn.util.collections.TimeWindowedList;
-import org.apache.brooklyn.util.collections.TimestampedValue;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Charsets;
-import com.google.common.base.Throwables;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Range;
-import com.google.common.io.Files;
-
-public class Monitor {
-
-    private static final Logger LOG = LoggerFactory.getLogger(Monitor.class);
-    
-    private static final int checkPeriodMs = 1000;
-
-    private static final OptionParser parser = new OptionParser() {
-        {
-            acceptsAll(ImmutableList.of("help", "?", "h"), "show help");
-            accepts("webUrl", "Web-app url")
-                    .withRequiredArg().ofType(URL.class);
-            accepts("brooklynPid", "Brooklyn pid")
-                    .withRequiredArg().ofType(Integer.class);
-            accepts("logFile", "Brooklyn log file")
-                    .withRequiredArg().ofType(File.class);
-            accepts("logGrep", "Grep in log file (defaults to 'SEVERE|ERROR|WARN|Exception|Error'")
-                    .withRequiredArg().ofType(String.class);
-            accepts("logGrepExclusionsFile", "File of expressions to be ignored in log file")
-                    .withRequiredArg().ofType(File.class);
-            accepts("webProcesses", "Name (for `ps ax | grep` of web-processes")
-                    .withRequiredArg().ofType(String.class);
-            accepts("numWebProcesses", "Number of web-processes expected (e.g. 1 or 1-3)")
-                    .withRequiredArg().ofType(String.class);
-            accepts("webProcessesCyclingPeriod", "The period (in seconds) for cycling through the range of numWebProcesses")
-                    .withRequiredArg().ofType(Integer.class);
-            accepts("outFile", "File to write monitor status info")
-                    .withRequiredArg().ofType(File.class);
-            accepts("abortOnError", "Exit the JVM on error, with exit code 1")
-                    .withRequiredArg().ofType(Boolean.class);
-        }
-    };
-
-    public static void main(String[] argv) throws InterruptedException, IOException {
-        OptionSet options = parse(argv);
-
-        if (options == null || options.has("help")) {
-            parser.printHelpOn(System.out);
-            System.exit(0);
-        }
-
-        MonitorPrefs prefs = new MonitorPrefs();
-        prefs.webUrl = options.hasArgument("webUrl") ? (URL) options.valueOf("webUrl") : null;
-        prefs.brooklynPid = options.hasArgument("brooklynPid") ? (Integer) options.valueOf("brooklynPid") : -1;
-        prefs.logFile = options.hasArgument("logFile") ? (File) options.valueOf("logFile") : null;
-        prefs.logGrep = options.hasArgument("logGrep") ? (String) options.valueOf("logGrep") : "SEVERE|ERROR|WARN|Exception|Error";
-        prefs.logGrepExclusionsFile = options.hasArgument("logGrepExclusionsFile") ? (File) options.valueOf("logGrepExclusionsFile") : null;
-        prefs.webProcessesRegex = options.hasArgument("webProcesses") ? (String) options.valueOf("webProcesses") : null;
-        prefs.numWebProcesses = options.hasArgument("numWebProcesses") ? parseRange((String) options.valueOf("numWebProcesses")) : null;
-        prefs.webProcessesCyclingPeriod = options.hasArgument("webProcessesCyclingPeriod") ? (Integer) options.valueOf("webProcessesCyclingPeriod") : -1;
-        prefs.outFile = options.hasArgument("outFile") ? (File) options.valueOf("outFile") : null;
-        prefs.abortOnError = options.hasArgument("abortOnError") ? (Boolean) options.valueOf("abortOnError") : false;
-        Monitor main = new Monitor(prefs, MonitorListener.NOOP);
-        main.start();
-    }
-
-    private static Range<Integer> parseRange(String range) {
-        if (range.contains("-")) {
-            String[] parts = range.split("-");
-            return Range.closed(Integer.parseInt(parts[0]), Integer.parseInt(parts[1]));
-        } else {
-            return Range.singleton(Integer.parseInt(range));
-        }
-    }
-    
-    private static OptionSet parse(String...argv) {
-        try {
-            return parser.parse(argv);
-        } catch (Exception e) {
-            System.out.println("Error in parsing options: " + e.getMessage());
-            return null;
-        }
-    }
-
-    private final MonitorPrefs prefs;
-    private final StatusRecorder recorder;
-    private final MonitorListener listener;
-    
-    public Monitor(MonitorPrefs prefs, MonitorListener listener) {
-        this.prefs = prefs;
-        this.listener = listener;
-        this.recorder = chain(toLog(LOG), (prefs.outFile != null ? toFile(prefs.outFile) : noop()));
-    }
-
-    private void start() throws IOException {
-        LOG.info("Monitoring: "+prefs);
-        ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
-
-        final AtomicReference<List<String>> previousLogLines = new AtomicReference<List<String>>(Collections.<String>emptyList());
-        final TimeWindowedList<Integer> numWebProcessesHistory = new TimeWindowedList<Integer>(
-                ImmutableMap.of("timePeriod", Duration.seconds(prefs.webProcessesCyclingPeriod), "minExpiredVals", 1));
-        final Set<String> logGrepExclusions = ImmutableSet.copyOf(Files.readLines(prefs.logGrepExclusionsFile, Charsets.UTF_8));
-        
-        executor.scheduleAtFixedRate(new Runnable() {
-                @Override public void run() {
-                    StatusRecorder.Record record = new StatusRecorder.Record();
-                    StringBuilder failureMsg = new StringBuilder();
-                    try {
-                        if (prefs.brooklynPid > 0) {
-                            boolean pidRunning = MonitorUtils.isPidRunning(prefs.brooklynPid, "java");
-                            MonitorUtils.MemoryUsage memoryUsage = MonitorUtils.getMemoryUsage(prefs.brooklynPid, ".*brooklyn.*", 1000);
-                            record.put("pidRunning", pidRunning);
-                            record.put("totalMemoryBytes", memoryUsage.getTotalMemoryBytes());
-                            record.put("totalMemoryInstances", memoryUsage.getTotalInstances());
-                            record.put("instanceCounts", memoryUsage.getInstanceCounts());
-                            
-                            if (!pidRunning) {
-                                failureMsg.append("pid "+prefs.brooklynPid+" is not running"+"\n");
-                            }
-                        }
-                        if (prefs.webUrl != null) {
-                            boolean webUrlUp = MonitorUtils.isUrlUp(prefs.webUrl);
-                            record.put("webUrlUp", webUrlUp);
-                            
-                            if (!webUrlUp) {
-                                failureMsg.append("web URL "+prefs.webUrl+" is not available"+"\n");
-                            }
-                        }
-                        if (prefs.logFile != null) {
-                            List<String> logLines = MonitorUtils.searchLog(prefs.logFile, prefs.logGrep, logGrepExclusions);
-                            List<String> newLogLines = getAdditions(previousLogLines.get(), logLines);
-                            previousLogLines.set(logLines);
-                            record.put("logLines", newLogLines);
-                            
-                            if (newLogLines.size() > 0) {
-                                failureMsg.append("Log contains warnings/errors: "+newLogLines+"\n");
-                            }
-                        }
-                        if (prefs.webProcessesRegex != null) {
-                            List<Integer> pids = MonitorUtils.getRunningPids(prefs.webProcessesRegex, "--webProcesses");
-                            pids.remove((Object)MonitorUtils.findOwnPid());
-                            
-                            record.put("webPids", pids);
-                            record.put("numWebPids", pids.size());
-                            numWebProcessesHistory.add(pids.size());
-                            
-                            if (prefs.numWebProcesses != null) {
-                                boolean numWebPidsInRange = prefs.numWebProcesses.apply(pids.size());
-                                record.put("numWebPidsInRange", numWebPidsInRange);
-                                
-                                if (!numWebPidsInRange) {
-                                    failureMsg.append("num web processes out-of-range: pids="+pids+"; size="+pids.size()+"; expected="+prefs.numWebProcesses);
-                                }
-                            
-                                if (prefs.webProcessesCyclingPeriod > 0) {
-                                    List<TimestampedValue<Integer>> values = numWebProcessesHistory.getValues();
-                                    long valuesTimeRange = (values.get(values.size()-1).getTimestamp() - values.get(0).getTimestamp());
-                                    if (values.size() > 0 && valuesTimeRange > SECONDS.toMillis(prefs.webProcessesCyclingPeriod)) {
-                                        int min = -1;
-                                        int max = -1;
-                                        for (TimestampedValue<Integer> val : values) {
-                                            min = (min < 0) ? val.getValue() : Math.min(val.getValue(), min);
-                                            max = Math.max(val.getValue(), max);
-                                        }
-                                        record.put("minWebSizeInPeriod", min);
-                                        record.put("maxWebSizeInPeriod", max);
-                                        
-                                        if (min > prefs.numWebProcesses.lowerEndpoint() || max < prefs.numWebProcesses.upperEndpoint()) {
-                                            failureMsg.append("num web processes not increasing/decreasing correctly: " +
-                                                    "pids="+pids+"; size="+pids.size()+"; cyclePeriod="+prefs.webProcessesCyclingPeriod+
-                                                    "; expectedRange="+prefs.numWebProcesses+"; min="+min+"; max="+max+"; history="+values);
-                                        }
-                                    } else {
-                                        int numVals = values.size();
-                                        long startTime = (numVals > 0) ? values.get(0).getTimestamp() : 0;
-                                        long endTime = (numVals > 0) ? values.get(values.size()-1).getTimestamp() : 0;
-                                        LOG.info("Insufficient vals in time-window to determine cycling behaviour over period ("+prefs.webProcessesCyclingPeriod+"secs): "+
-                                                "numVals="+numVals+"; startTime="+startTime+"; endTime="+endTime+"; periodCovered="+(endTime-startTime)/1000);
-                                    }
-                                }
-                            }
-                        }
-                        
-                    } catch (Throwable t) {
-                        LOG.error("Error during periodic checks", t);
-                        throw Throwables.propagate(t);
-                    }
-                    
-                    try {
-                        recorder.record(record);
-                        listener.onRecord(record);
-                        
-                        if (failureMsg.length() > 0) {
-                            listener.onFailure(record, failureMsg.toString());
-                            
-                            if (prefs.abortOnError) {
-                                LOG.error("Aborting on error: "+failureMsg);
-                                System.exit(1);
-                            }
-                        }
-                        
-                    } catch (Throwable t) {
-                        LOG.warn("Error recording monitor info ("+record+")", t);
-                        throw Throwables.propagate(t);
-                    }
-                }
-            }, 0, checkPeriodMs, TimeUnit.MILLISECONDS);
-    }
-    
-    // TODO What is the guava equivalent? Don't want Set.difference, because duplicates/ordered.
-    private static List<String> getAdditions(List<String> prev, List<String> next) {
-        List<String> result = Lists.newArrayList(next);
-        result.removeAll(prev);
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/MonitorListener.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/MonitorListener.java b/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/MonitorListener.java
deleted file mode 100644
index 11fdd3f..0000000
--- a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/MonitorListener.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.longevity;
-
-import org.apache.brooklyn.qa.longevity.StatusRecorder.Record;
-
-public interface MonitorListener {
-
-    public static final MonitorListener NOOP = new MonitorListener() {
-        @Override public void onRecord(Record record) {
-        }
-        @Override public void onFailure(Record record, String msg) {
-        }
-    };
-    
-    public void onRecord(Record record);
-    
-    public void onFailure(Record record, String msg);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/MonitorPrefs.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/MonitorPrefs.java b/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/MonitorPrefs.java
deleted file mode 100644
index 4d74045..0000000
--- a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/MonitorPrefs.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.longevity;
-
-import java.io.File;
-import java.net.URL;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.Range;
-
-public class MonitorPrefs {
-
-    public URL webUrl;
-    public int brooklynPid;
-    public File logFile;
-    public String logGrep;
-    public File logGrepExclusionsFile;
-    public String webProcessesRegex;
-    public Range<Integer> numWebProcesses;
-    public int webProcessesCyclingPeriod;
-    public File outFile;
-    public boolean abortOnError;
-    
-    @Override
-    public String toString() {
-        return Objects.toStringHelper(this)
-                .add("webUrl", webUrl)
-                .add("brooklynPid", brooklynPid)
-                .add("logFile", logFile)
-                .add("logGrep", logGrep)
-                .add("logGrepExclusionsFile", logGrepExclusionsFile)
-                .add("outFile", outFile)
-                .add("webProcessesRegex", webProcessesRegex)
-                .add("numWebProcesses", numWebProcesses)
-                .add("webProcessesCyclingPeriod", webProcessesCyclingPeriod)
-                .toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/MonitorUtils.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/MonitorUtils.java b/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/MonitorUtils.java
deleted file mode 100644
index c9ce875..0000000
--- a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/MonitorUtils.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.longevity;
-
-import static com.google.common.base.Strings.isNullOrEmpty;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-import org.apache.brooklyn.util.http.HttpTool;
-import org.apache.brooklyn.util.http.HttpToolResponse;
-import org.apache.brooklyn.util.stream.StreamGobbler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Throwables;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Maps;
-import com.google.common.io.ByteStreams;
-
-public class MonitorUtils {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MonitorUtils.class);
-
-    private static volatile int ownPid = -1;
-
-    /**
-     * Confirm can read from URL.
-     *
-     * @param url
-     */
-    public static boolean isUrlUp(URL url) {
-        try {
-            HttpToolResponse result = HttpTool.httpGet(
-                    HttpTool.httpClientBuilder().trustAll().build(), 
-                    URI.create(url.toString()), 
-                    ImmutableMap.<String,String>of());
-            int statuscode = result.getResponseCode();
-
-            if (statuscode != 200) {
-                LOG.info("Error reading URL {}: {}, {}", new Object[]{url, statuscode, result.getReasonPhrase()});
-                return false;
-            } else {
-                return true;
-            }
-        } catch (Exception e) {
-            LOG.info("Error reading URL {}: {}", url, e);
-            return false;
-        }
-    }
-
-    public static boolean isPidRunning(int pid) {
-        return isPidRunning(pid, null);
-    }
-
-    /**
-     * Confirm the given pid is running, and that the the process matches the given regex.
-     *
-     * @param pid
-     * @param regex
-     */
-    public static boolean isPidRunning(int pid, String regex) {
-        Process process = exec("ps -p " + pid);
-        String out = waitFor(process);
-         if (process.exitValue() > 0) {
-            String err = toString(process.getErrorStream());
-            LOG.info(String.format("pid %s not running: %s", pid, err));
-            return false;
-        }
-
-        if (regex != null) {
-            String regex2 = "^\\s*" + pid + ".*" + regex;
-            boolean found = false;
-            for (String line : out.split("\n")) {
-                if (hasAtLeastOneMatch(line, regex2)) {
-                    found = true;
-                    break;
-                }
-            }
-
-            if (!found) {
-                String txt = toString(process.getInputStream());
-                LOG.info("process did not match regular expression: "+txt);
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    private static boolean hasAtLeastOneMatch(String line, String regex) {
-        return Pattern.matches(".*"+regex+".*", line);
-    }
-
-    private static String toString(InputStream in){
-        try {
-            byte[] bytes = ByteStreams.toByteArray(in);
-            return new String(bytes);
-        } catch (IOException e) {
-            throw Throwables.propagate(e);
-        }
-
-    }
-
-    public static List<Integer> getRunningPids(String regex) {
-        return getRunningPids(regex, null);
-    }
-
-    /**
-     * Confirm the given pid is running, and that the the process matches the given regex.
-     *
-     * @param regex
-     * @param excludingRegex
-     */
-    public static List<Integer> getRunningPids(String regex, String excludingRegex) {
-        Process process = exec("ps ax");
-        String out = waitFor(process);
-
-        List<Integer> result = new LinkedList<Integer>();
-        for (String line : out.split("\n")) {
-            if (excludingRegex != null && hasAtLeastOneMatch(line, excludingRegex)) {
-                continue;
-            }
-            if (hasAtLeastOneMatch(line, regex)) {
-                String[] linesplit = line.trim().split("\\s+");
-                result.add(Integer.parseInt(linesplit[0]));
-            }
-        }
-        return result;
-    }
-
-    public static MemoryUsage getMemoryUsage(int pid){
-          return getMemoryUsage(pid, null,0);
-    }
-
-    /**
-     * @param pid
-     */
-    public static MemoryUsage getMemoryUsage(int pid, String clazzRegexOfInterest, int minInstancesOfInterest) {
-        Process process = exec(String.format("jmap -histo %s", pid));
-        String out = waitFor(process);
-
-        Map<String, Integer> instanceCounts = Maps.newLinkedHashMap();
-        long totalInstances=0;
-        long totalMemoryBytes=0;
-
-        for (String line : out.split("\n")) {
-            if (clazzRegexOfInterest!=null && hasAtLeastOneMatch(line, clazzRegexOfInterest)) {
-                // Format is:
-                //   num     #instances         #bytes  class name
-                //   1:           43506        8047096  example.MyClazz
-
-                String[] parts = line.trim().split("\\s+");
-                String clazz = parts[3];
-                int instanceCount = Integer.parseInt(parts[1]);
-                if (instanceCount >= minInstancesOfInterest) {
-                    instanceCounts.put(clazz, instanceCount);
-                }
-            }
-            if (hasAtLeastOneMatch(line, "^Total.*")) {
-                String[] parts = line.split("\\s+");
-                totalInstances = Long.parseLong(parts[1]);
-                totalMemoryBytes = Long.parseLong(parts[2]);
-            }
-        }
-
-        return new MemoryUsage(totalInstances, totalMemoryBytes, instanceCounts);
-    }
-
-    public static class MemoryUsage {
-        final long totalInstances;
-        final long totalMemoryBytes;
-        final Map<String, Integer> instanceCounts;
-
-        MemoryUsage(long totalInstances, long totalMemoryBytes, Map<String, Integer> instanceCounts) {
-            this.totalInstances = totalInstances;
-            this.totalMemoryBytes = totalMemoryBytes;
-            this.instanceCounts = instanceCounts;
-        }
-
-        public String toString() {
-            return Objects.toStringHelper(this)
-                    .add("totalInstances", totalInstances)
-                    .add("totalMemoryBytes", totalMemoryBytes)
-                    .add("instanceCounts", instanceCounts)
-                    .toString();
-        }
-
-        public long getTotalInstances() {
-            return totalInstances;
-        }
-
-        public long getTotalMemoryBytes() {
-            return totalMemoryBytes;
-        }
-
-        public Map<String, Integer> getInstanceCounts() {
-            return instanceCounts;
-        }
-    }
-
-    public static List<String> searchLog(File file, String grepOfInterest) {
-        return searchLog(file, grepOfInterest, new LinkedHashSet<String>());
-    }
-
-    /**
-     * Find lines in the given file that match given given regex.
-     *
-     * @param file
-     * @param grepOfInterest
-     */
-    public static List<String> searchLog(File file, String grepOfInterest, Set<String> grepExclusions) {
-        Process process = exec(String.format("grep -E %s %s", grepOfInterest, file.getAbsoluteFile()));
-        String out = waitFor(process);
-
-        // TODO Annoying that String.split() returns size 1 when empty string; lookup javadoc when back online...
-        if (out.length() == 0) return Collections.<String>emptyList();
-
-        List<String> result = new ArrayList<String>();
-        for (String line : out.trim().split("\n")) {
-            boolean excluded = false;
-            for (String exclusion : grepExclusions) {
-                if (!isNullOrEmpty(exclusion) && hasAtLeastOneMatch(line, exclusion)) {
-                    excluded = true;
-                }
-            }
-            if (!excluded) {
-                result.add(line);
-            }
-        }
-        return result;
-    }
-
-    public static Process exec(String cmd) {
-        LOG.info("executing cmd: " + cmd);
-
-        try {
-            return Runtime.getRuntime().exec(cmd);
-        } catch (IOException e) {
-            throw Throwables.propagate(e);
-        }
-    }
-
-    public static class ProcessHasStderr extends IllegalStateException {
-        private static final long serialVersionUID = -937871002993888405L;
-        
-        byte[] stderrBytes;
-        public ProcessHasStderr(byte[] stderrBytes) {
-            this("Process printed to stderr: " + new String(stderrBytes), stderrBytes);
-        }
-        public ProcessHasStderr(String message, byte[] stderrBytes) {
-            super(message);
-            this.stderrBytes = stderrBytes;
-        }
-    }
-    
-    /**
-     * Waits for the given process to complete, consuming its stdout and returning it as a string.
-     * If there is any output on stderr an exception will be thrown.
-     */
-    public static String waitFor(Process process) {
-        ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") //Closeable doesn't seem appropriate for StreamGobbler since it isn't expected to be called every time
-        StreamGobbler gobblerOut = new StreamGobbler(process.getInputStream(), bytesOut, null);
-        gobblerOut.start();
-
-        ByteArrayOutputStream bytesErr = new ByteArrayOutputStream();
-        @SuppressWarnings("resource")
-        StreamGobbler gobblerErr = new StreamGobbler(process.getErrorStream(), bytesErr, null);
-        gobblerErr.start();
-
-        try {
-            process.waitFor();
-            gobblerOut.blockUntilFinished();
-            gobblerErr.blockUntilFinished();
-
-            if (bytesErr.size() > 0) {
-                throw new ProcessHasStderr(bytesErr.toByteArray());
-            }
-
-            return new String(bytesOut.toByteArray());
-        } catch (Exception e) {
-            throw Throwables.propagate(e);
-        } finally {
-            if (gobblerOut.isAlive()) gobblerOut.interrupt();
-            if (gobblerErr.isAlive()) gobblerErr.interrupt();
-        }
-    }
-
-    public static int findOwnPid() throws IOException {
-        if (ownPid >= 0) return ownPid;
-
-        String[] cmd = new String[]{"bash", "-c", "echo $PPID"};
-        Process process = Runtime.getRuntime().exec(cmd);
-        String out = MonitorUtils.waitFor(process);
-        ownPid = Integer.parseInt(out.trim());
-        return ownPid;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/StatusRecorder.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/StatusRecorder.java b/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/StatusRecorder.java
deleted file mode 100644
index 210e0a2..0000000
--- a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/longevity/StatusRecorder.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.longevity;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-
-import org.slf4j.Logger;
-
-import com.google.common.base.Charsets;
-import com.google.common.collect.Maps;
-import com.google.common.io.Files;
-
-public interface StatusRecorder {
-
-    public void record(Record record) throws IOException;
-    
-    public static class Factory {
-        public static final StatusRecorder NOOP = new StatusRecorder() {
-            @Override public void record(Record record) {}
-        };
-        
-        public static StatusRecorder noop() {
-            return NOOP;
-        }
-        public static StatusRecorder toFile(File outFile) {
-            return new FileBasedStatusRecorder(outFile);
-        }
-        public static StatusRecorder toSysout() {
-            return new SysoutBasedStatusRecorder();
-        }
-        public static StatusRecorder toLog(Logger log) {
-            return new LogBasedStatusRecorder(log);
-        }
-        public static StatusRecorder chain(StatusRecorder...recorders) {
-            return new ChainingStatusRecorder(recorders);
-        }
-    }
-    
-    public static class Record {
-        private final Map<String,Object> fields = Maps.newLinkedHashMap();
-        
-        public void putAll(Map<String,?> entries) {
-            fields.putAll(entries);
-        }
-        
-        public void putAll(String keyPrefix, Map<String,?> entries) {
-            for (Map.Entry<String,?> entry : entries.entrySet()) {
-                fields.put(keyPrefix+entry.getKey(), entry.getValue());
-            }
-        }
-        
-        public void put(String key, Object val) {
-            fields.put(key, val);
-        }
-        
-        @Override
-        public String toString() {
-            return fields.toString();
-        }
-    }
-    
-    public static class FileBasedStatusRecorder implements StatusRecorder {
-        private final File outFile;
-    
-        public FileBasedStatusRecorder(File outFile) {
-            this.outFile = outFile;
-        }
-        
-        @Override
-        public void record(Record record) throws IOException {
-            Files.append(record.fields.toString()+"\n", outFile, Charsets.UTF_8);
-        }
-    }
-    
-    public static class SysoutBasedStatusRecorder implements StatusRecorder {
-        public SysoutBasedStatusRecorder() {
-        }
-        
-        @Override
-        public void record(Record record) {
-            System.out.println(record.fields);
-        }
-    }
-    
-    public static class LogBasedStatusRecorder implements StatusRecorder {
-        private final Logger log;
-
-        public LogBasedStatusRecorder(Logger log) {
-            this.log = log;
-        }
-        
-        @Override
-        public void record(Record record) {
-            log.info("{}", record.fields);
-        }
-    }
-    
-    public static class ChainingStatusRecorder implements StatusRecorder {
-        private final StatusRecorder[] recorders;
-
-        public ChainingStatusRecorder(StatusRecorder... recorders) {
-            this.recorders = recorders;
-        }
-        
-        @Override
-        public void record(Record record) throws IOException {
-            for (StatusRecorder recorder : recorders) {
-                recorder.record(record);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/main/resources/hello-world.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/main/resources/hello-world.txt b/brooklyn-library/qa/src/main/resources/hello-world.txt
deleted file mode 100644
index ac2e350..0000000
--- a/brooklyn-library/qa/src/main/resources/hello-world.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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.
-
-The file hello-world.war contains its source code.
-
-It is the same as core/src/test/resources/hello-world-no-mapping.war, but is included here
-as a (small) binary to prevent build complication and leakage of test dependencies. This
-QA module contains useful building blocks for downstream projects/customers doing 
-performance and longevity testing, rather than it just being for the Brooklyn automated build.
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/main/resources/hello-world.war
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/main/resources/hello-world.war b/brooklyn-library/qa/src/main/resources/hello-world.war
deleted file mode 100644
index 0e17460..0000000
Binary files a/brooklyn-library/qa/src/main/resources/hello-world.war and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/brooklynnode/SoftlayerObtainPrivateLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/brooklynnode/SoftlayerObtainPrivateLiveTest.java b/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/brooklynnode/SoftlayerObtainPrivateLiveTest.java
deleted file mode 100644
index 9f351ce..0000000
--- a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/brooklynnode/SoftlayerObtainPrivateLiveTest.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.brooklynnode;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.mgmt.ManagementContext;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic;
-import org.apache.brooklyn.core.objs.BrooklynObjectInternal.ConfigurationSupportInternal;
-import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.entity.brooklynnode.BrooklynEntityMirror;
-import org.apache.brooklyn.entity.brooklynnode.BrooklynNode;
-import org.apache.brooklyn.entity.brooklynnode.BrooklynNode.DeployBlueprintEffector;
-import org.apache.brooklyn.entity.machine.MachineEntity;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.location.jclouds.JcloudsLocationConfig;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableList;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.BrooklynMavenArtifacts;
-import org.apache.brooklyn.util.maven.MavenRetriever;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Joiner;
-import com.google.common.base.Predicates;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Tests obtaining a machine with a private IP only. For the machine to be
- * accessible we should have a gateway machine already running in the same
- * network.
- *
- * Starts a BrooklynNode with a public IP and on it starts two machines -
- * one with public and one with private only IP.
- *
- * The test lives here so it has access to the dist archive.
- */
-public class SoftlayerObtainPrivateLiveTest {
-
-    // Expects that the location is already configured in brooklyn.properties
-    private static final String LOCATION_SPEC = "jclouds:aws-ec2";
-
-
-    private static final Logger log = LoggerFactory.getLogger(SoftlayerObtainPrivateLiveTest.class);
-
-    private static final ImmutableMap<String, Duration> TIMEOUT = ImmutableMap.of("timeout", Duration.ONE_HOUR);
-    // Should this be a black list instead?
-    private Set<String> LOCATION_CONFIG_WHITE_LIST = ImmutableSet.of(
-            JcloudsLocationConfig.CLOUD_REGION_ID.getName(),
-            JcloudsLocationConfig.ACCESS_IDENTITY.getName(),
-            JcloudsLocationConfig.ACCESS_CREDENTIAL.getName(),
-            JcloudsLocationConfig.IMAGE_ID.getName(),
-            JcloudsLocationConfig.HARDWARE_ID.getName(),
-            JcloudsLocationConfig.TEMPLATE_OPTIONS.getName());
-
-    private static final String NAMED_LOCATION_PREFIX = "brooklyn.location.named.";
-    private static final String TEST_LOCATION = "test-location";
-    private static final String TEST_LOCATION_PRIVATE = TEST_LOCATION + "-private";
-    private static final String TEST_LOCATION_PUBLIC = TEST_LOCATION + "-public";
-
-    private BrooklynLauncher launcher;
-    private ManagementContext mgmt;
-    private TestApplication app;
-    private Location loc;
-
-    @BeforeMethod(alwaysRun=true)
-    public void setUp() {
-        mgmt = LocalManagementContextForTests.builder(true)
-                .useDefaultProperties()
-                .build();
-        launcher = BrooklynLauncher
-                .newInstance()
-                .managementContext(mgmt)
-                .start();
-        app = mgmt.getEntityManager().createEntity(EntitySpec.create(TestApplication.class));
-        mgmt.getEntityManager().manage(app);
-        loc = createLocation();
-    }
-
-    @AfterMethod(alwaysRun=true)
-    public void tearDown() {
-        Entities.destroyAll(mgmt);
-        launcher.terminate();
-    }
-
-    private Location createLocation() {
-        return mgmt.getLocationRegistry().resolve(LOCATION_SPEC);
-    }
-
-    @Test(groups="Live")
-    public void testObtain() {
-        String localUrl = MavenRetriever.localUrl(BrooklynMavenArtifacts.artifact("", "brooklyn-dist", "tar.gz", "dist"));
-        String userName = "admin";
-        String userPassword = Strings.makeRandomId(6);
-        String remoteConfig = Joiner.on('\n').join(MutableList.of(
-                "brooklyn.webconsole.security.users=" + userName,
-                "brooklyn.webconsole.security.user.admin.password=" + userPassword)
-                .appendAll(getLocationConfig())
-                .append("\n"));
-
-        log.info("Using distribution {}", localUrl);
-        log.info("Remote credentials are {}:{}", userName, userPassword);
-        log.info("Remote config \n{}", remoteConfig);
-
-        EntitySpec<BrooklynNode> nodeSpec = EntitySpec.create(BrooklynNode.class)
-                .configure(BrooklynNode.DISTRO_UPLOAD_URL, localUrl)
-                .configure(BrooklynNode.MANAGEMENT_USER, userName)
-                .configure(BrooklynNode.MANAGEMENT_PASSWORD, userPassword)
-                .configure(BrooklynNode.BROOKLYN_LOCAL_PROPERTIES_CONTENTS, remoteConfig);
-
-        BrooklynNode node = app.createAndManageChild(nodeSpec);
-        app.start(ImmutableList.of(loc));
-        try {
-            // TODO Assumes that the second-level machines will be in the same private network as the BrooklynNode machine.
-            //      The private network id can be set explicitly in templateOptions.primaryBackendNetworkComponentNetworkVlanId.
-            BrooklynEntityMirror publicApp = deployTestApp(node, true);
-            BrooklynEntityMirror privateApp = deployTestApp(node, false);
-
-            EntityTestUtils.assertAttributeEventually(TIMEOUT, publicApp, ServiceStateLogic.SERVICE_STATE_ACTUAL,
-                    Predicates.in(ImmutableList.of(Lifecycle.RUNNING, Lifecycle.ON_FIRE)));
-            EntityTestUtils.assertAttributeEventually(TIMEOUT, privateApp, ServiceStateLogic.SERVICE_STATE_ACTUAL,
-                    Predicates.in(ImmutableList.of(Lifecycle.RUNNING, Lifecycle.ON_FIRE)));
-
-            EntityTestUtils.assertAttributeEquals(publicApp, ServiceStateLogic.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-            EntityTestUtils.assertAttributeEquals(privateApp, ServiceStateLogic.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-
-            EntityTestUtils.assertAttributeEqualsEventually(publicApp, Attributes.SERVICE_UP, Boolean.TRUE);
-            EntityTestUtils.assertAttributeEqualsEventually(privateApp, Attributes.SERVICE_UP, Boolean.TRUE);
-        } finally {
-            node.invoke(BrooklynNode.STOP_NODE_AND_KILL_APPS, ImmutableMap.<String, String>of()).getUnchecked();
-        }
-    }
-
-    private BrooklynEntityMirror deployTestApp(BrooklynNode node, boolean hasPublicNetwork) {
-        String entityId = node.invoke(BrooklynNode.DEPLOY_BLUEPRINT, ImmutableMap.of(DeployBlueprintEffector.BLUEPRINT_CAMP_PLAN.getName(), getBlueprintPlan(hasPublicNetwork))).getUnchecked();
-        return node.addChild(EntitySpec.create(BrooklynEntityMirror.class)
-                .configure(BrooklynEntityMirror.MIRRORED_ENTITY_ID, entityId)
-                .configure(BrooklynEntityMirror.MIRRORED_ENTITY_URL, node.getAttribute(BrooklynNode.WEB_CONSOLE_URI).toString() + "/v1/applications/"+entityId+"/entities/"+entityId));
-    }
-
-    private Collection<String> getLocationConfig() {
-        Map<String, Object> config = MutableMap.copyOf(((ConfigurationSupportInternal)loc.config()).getBag().getAllConfig());
-        config.putAll(customizeSharedLocation());
-        return MutableList.<String>of()
-                .appendAll(createLocationConfig(NAMED_LOCATION_PREFIX + TEST_LOCATION, (String)config.get("spec.original"), config))
-                .appendAll(createLocationConfig(NAMED_LOCATION_PREFIX + TEST_LOCATION_PUBLIC, "named:" + TEST_LOCATION, customizePublicLocation()))
-                .appendAll(createLocationConfig(NAMED_LOCATION_PREFIX + TEST_LOCATION_PRIVATE, "named:" + TEST_LOCATION, customizePrivateLocation()));
-    }
-
-    private Collection<String> createLocationConfig(String prefix, String parent, Map<String, ?> config) {
-        return MutableList.<String>of()
-                .append(prefix + "=" + parent)
-                .appendAll(locationConfigToProperties(prefix, config));
-    }
-
-    protected Collection<String> locationConfigToProperties(String prefix, Map<String, ?> config) {
-        Collection<String> loc = new ArrayList<String>();
-        for (String key : config.keySet()) {
-            if (LOCATION_CONFIG_WHITE_LIST.contains(key)) {
-                loc.add(prefix + "." + key + "=" + config.get(key));
-            }
-        }
-        return loc;
-    }
-
-    protected Map<String, String> customizeSharedLocation() {
-        return ImmutableMap.of();
-    }
-
-    protected Map<String, String> customizePublicLocation() {
-        return ImmutableMap.of();
-    }
-
-    protected Map<String, String> customizePrivateLocation() {
-        return ImmutableMap.<String, String>of(
-                "templateOptions", "{privateNetworkOnlyFlag: true}");
-    }
-
-    protected String getBlueprintPlan(boolean hasPublicNetwork) {
-        return Joiner.on('\n').join(ImmutableList.of(
-                "location: " + getTestLocation(hasPublicNetwork),
-                "services:",
-                "- type: "+MachineEntity.class.getName(),
-                "  name: " + (hasPublicNetwork ? "Public" : "Private")
-                ));
-    }
-
-    private static String getTestLocation(boolean hasPublicNetwork) {
-        return hasPublicNetwork ? TEST_LOCATION_PUBLIC : TEST_LOCATION_PRIVATE;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/EnrichersSlightlySimplerYamlTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/EnrichersSlightlySimplerYamlTest.java b/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/EnrichersSlightlySimplerYamlTest.java
deleted file mode 100644
index c24ead1..0000000
--- a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/EnrichersSlightlySimplerYamlTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.camp;
-
-import java.net.URI;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.camp.brooklyn.AbstractYamlTest;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.EntityInternal;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.webapp.JavaWebAppSoftwareProcess;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.CollectionFunctionals;
-import org.apache.brooklyn.util.collections.MutableList;
-import org.apache.brooklyn.util.math.MathPredicates;
-import org.apache.brooklyn.util.text.StringPredicates;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-import com.google.common.collect.Iterables;
-
-/** Tests some improvements to enricher classes to make them a bit more yaml friendly.
- * Called "SlightlySimpler" as it would be nice to make enrichers a lot more yaml friendly! */
-@Test
-public class EnrichersSlightlySimplerYamlTest extends AbstractYamlTest {
-    private static final Logger log = LoggerFactory.getLogger(EnrichersSlightlySimplerYamlTest.class);
-
-    @SuppressWarnings({ "unchecked", "rawtypes" })
-    @Test
-    public void testWithAppEnricher() throws Exception {
-        Entity app = createAndStartApplication(loadYaml("test-app-with-enrichers-slightly-simpler.yaml"));
-        waitForApplicationTasks(app);
-        log.info("Started "+app+":");
-        Entities.dumpInfo(app);
-        
-        Entity cluster = Iterables.getOnlyElement( app.getChildren() );
-        Collection<Entity> leafs = ((DynamicCluster)cluster).getMembers();
-        Iterator<Entity> li = leafs.iterator();
-        
-        Entity e1 = li.next();
-        ((EntityInternal)e1).sensors().set(Sensors.newStringSensor("ip"), "127.0.0.1");
-        EntityTestUtils.assertAttributeEqualsEventually(e1, Sensors.newStringSensor("url"), "http://127.0.0.1/");
-        EntityTestUtils.assertAttributeEqualsEventually(e1, Attributes.MAIN_URI, URI.create("http://127.0.0.1/"));
-
-        int i=2;
-        while (li.hasNext()) {
-            Entity ei = li.next();
-            ((EntityInternal)ei).sensors().set(Sensors.newStringSensor("ip"), "127.0.0."+i);
-            i++;
-        }
-        
-        EntityTestUtils.assertAttributeEventually(cluster, Sensors.newSensor(Iterable.class, "urls.list"),
-            (Predicate)CollectionFunctionals.sizeEquals(3));
-        
-        EntityTestUtils.assertAttributeEventually(cluster, Sensors.newSensor(String.class, "urls.list.comma_separated.max_2"),
-            StringPredicates.matchesRegex("\"http:\\/\\/127[^\"]*\\/\",\"http:\\/\\/127[^\"]*\\/\""));
-
-        EntityTestUtils.assertAttributeEventually(cluster, Attributes.MAIN_URI, Predicates.notNull());
-        URI main = cluster.getAttribute(Attributes.MAIN_URI);
-        Assert.assertTrue(main.toString().matches("http:\\/\\/127.0.0..\\/"), "Wrong URI: "+main);
-        
-        EntityTestUtils.assertAttributeEventually(app, Attributes.MAIN_URI, Predicates.notNull());
-        main = app.getAttribute(Attributes.MAIN_URI);
-        Assert.assertTrue(main.toString().matches("http:\\/\\/127.0.0..\\/"), "Wrong URI: "+main);
-        
-        // TODO would we want to allow "all-but-usual" as the default if nothing specified
-    }
-    
-    @Test(groups="Integration")
-    public void testWebappWithAveragingEnricher() throws Exception {
-        Entity app = createAndStartApplication(loadYaml("test-webapp-with-averaging-enricher.yaml"));
-        waitForApplicationTasks(app);
-        log.info("Started "+app+":");
-        Entities.dumpInfo(app);
-
-        List<JavaWebAppSoftwareProcess> appservers = MutableList.copyOf(Entities.descendants(app, JavaWebAppSoftwareProcess.class));
-        Assert.assertEquals(appservers.size(), 3);
-        
-        EntityInternal srv0 = (EntityInternal) appservers.get(0);
-        EntityInternal dwac = (EntityInternal) srv0.getParent();
-        EntityInternal cdwac = (EntityInternal) dwac.getParent();
-        
-        srv0.sensors().set(Sensors.newDoubleSensor("my.load"), 20.0);
-        
-        EntityTestUtils.assertAttributeEventually(dwac, Sensors.newSensor(Double.class, "my.load.averaged"),
-            MathPredicates.equalsApproximately(20));
-        EntityTestUtils.assertAttributeEventually(cdwac, Sensors.newSensor(Double.class, "my.load.averaged"),
-            MathPredicates.equalsApproximately(20));
-
-        srv0.sensors().set(Sensors.newDoubleSensor("my.load"), null);
-        EntityTestUtils.assertAttributeEventually(cdwac, Sensors.newSensor(Double.class, "my.load.averaged"),
-            Predicates.isNull());
-
-        ((EntityInternal) appservers.get(1)).sensors().set(Sensors.newDoubleSensor("my.load"), 10.0);
-        ((EntityInternal) appservers.get(2)).sensors().set(Sensors.newDoubleSensor("my.load"), 20.0);
-        EntityTestUtils.assertAttributeEventually(cdwac, Sensors.newSensor(Double.class, "my.load.averaged"),
-            MathPredicates.equalsApproximately(15));
-        srv0.sensors().set(Sensors.newDoubleSensor("my.load"), 0.0);
-        EntityTestUtils.assertAttributeEventually(cdwac, Sensors.newSensor(Double.class, "my.load.averaged"),
-            MathPredicates.equalsApproximately(10));
-    }
-    
-    @Override
-    protected Logger getLogger() {
-        return log;
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/EntitiesYamlIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/EntitiesYamlIntegrationTest.java b/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/EntitiesYamlIntegrationTest.java
deleted file mode 100644
index f92af6c..0000000
--- a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/EntitiesYamlIntegrationTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.camp;
-
-import static org.testng.Assert.*;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.camp.brooklyn.AbstractYamlTest;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.proxy.nginx.NginxController;
-import org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.tomcat.TomcatServer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.Iterables;
-
-public class EntitiesYamlIntegrationTest extends AbstractYamlTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(EntitiesYamlIntegrationTest.class);
-
-    @Test(groups = "Integration")
-    public void testStartTomcatCluster() throws Exception {
-        Entity app = createAndStartApplication(loadYaml("test-tomcat-cluster.yaml"));
-        waitForApplicationTasks(app);
-
-        assertNotNull(app);
-        assertEquals(app.getChildren().size(), 1);
-        final Entity entity = Iterables.getOnlyElement(app.getChildren());
-        assertTrue(entity instanceof ControlledDynamicWebAppCluster, "entity="+entity);
-        ControlledDynamicWebAppCluster cluster = (ControlledDynamicWebAppCluster) entity;
-
-        assertTrue(cluster.getController() instanceof NginxController, "controller="+cluster.getController());
-        Iterable<TomcatServer> tomcats = FluentIterable.from(cluster.getCluster().getMembers()).filter(TomcatServer.class);
-        assertEquals(Iterables.size(tomcats), 2);
-        for (TomcatServer tomcat : tomcats) {
-            assertTrue(tomcat.getAttribute(TomcatServer.SERVICE_UP), "serviceup");
-        }
-
-        EntitySpec<?> spec = entity.getConfig(DynamicCluster.MEMBER_SPEC);
-        assertNotNull(spec);
-        assertEquals(spec.getType(), TomcatServer.class);
-        assertEquals(spec.getConfig().get(DynamicCluster.QUARANTINE_FAILED_ENTITIES), Boolean.FALSE);
-        assertEquals(spec.getConfig().get(DynamicCluster.INITIAL_QUORUM_SIZE), 2);
-    }
-
-
-    @Override
-    protected Logger getLogger() {
-        return LOG;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/JavaWebAppsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/JavaWebAppsIntegrationTest.java b/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/JavaWebAppsIntegrationTest.java
deleted file mode 100644
index 1367ddd..0000000
--- a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/JavaWebAppsIntegrationTest.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.camp;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.mgmt.ManagementContext;
-import org.apache.brooklyn.api.mgmt.Task;
-import org.apache.brooklyn.api.policy.Policy;
-import org.apache.brooklyn.camp.brooklyn.BrooklynCampPlatform;
-import org.apache.brooklyn.camp.brooklyn.BrooklynCampPlatformLauncherNoServer;
-import org.apache.brooklyn.camp.spi.Assembly;
-import org.apache.brooklyn.camp.spi.AssemblyTemplate;
-import org.apache.brooklyn.camp.spi.PlatformComponent;
-import org.apache.brooklyn.camp.spi.PlatformRootSummary;
-import org.apache.brooklyn.camp.spi.collection.ResolvableLink;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.mgmt.BrooklynTaskTags;
-import org.apache.brooklyn.entity.webapp.DynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.JavaWebAppService;
-import org.apache.brooklyn.entity.webapp.WebAppService;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.ResourceUtils;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.net.Urls;
-import org.apache.brooklyn.util.stream.Streams;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy;
-
-import com.google.common.collect.Iterables;
-
-@Test(groups="Integration")
-public class JavaWebAppsIntegrationTest {
-
-    private static final Logger log = LoggerFactory.getLogger(JavaWebAppsIntegrationTest.class);
-    
-    private ManagementContext brooklynMgmt;
-    private BrooklynCampPlatform platform;
-
-    @BeforeMethod(alwaysRun=true)
-    public void setup() {
-        BrooklynCampPlatformLauncherNoServer launcher = new BrooklynCampPlatformLauncherNoServer();
-        launcher.launch();
-        brooklynMgmt = launcher.getBrooklynMgmt();
-      
-        platform = new BrooklynCampPlatform(
-              PlatformRootSummary.builder().name("Brooklyn CAMP Platform").build(),
-              brooklynMgmt);
-    }
-    
-    @AfterMethod
-    public void teardown() {
-        if (brooklynMgmt!=null) Entities.destroyAll(brooklynMgmt);
-    }
-    
-    public void testSimpleYamlDeploy() throws IOException {
-        Reader input = Streams.reader(new ResourceUtils(this).getResourceFromUrl("java-web-app-simple.yaml"));
-        AssemblyTemplate at = platform.pdp().registerDeploymentPlan(input);
-
-        try {
-            Assembly assembly = at.getInstantiator().newInstance().instantiate(at, platform);
-            log.info("Test - created "+assembly);
-            
-            final Entity app = brooklynMgmt.getEntityManager().getEntity(assembly.getId());
-            log.info("App - "+app);
-            Assert.assertEquals(app.getDisplayName(), "sample-single-jboss");
-                        
-            // locations set on AT in this yaml
-            Assert.assertEquals(app.getLocations().size(), 1);
-
-            Set<Task<?>> tasks = BrooklynTaskTags.getTasksInEntityContext(brooklynMgmt.getExecutionManager(), app);
-            log.info("Waiting on "+tasks.size()+" task(s)");
-            for (Task<?> t: tasks) {
-                t.blockUntilEnded();
-            }
-
-            log.info("App started:");
-            Entities.dumpInfo(app);
-
-            Assert.assertEquals(app.getChildren().size(), 1);
-            Assert.assertEquals(app.getChildren().iterator().next().getDisplayName(), "tomcat1");
-            Assert.assertEquals(app.getChildren().iterator().next().getLocations().size(), 1);
-            
-            final String url = Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TEN_SECONDS), new Callable<String>() {
-                @Override public String call() throws Exception {
-                    String url = app.getChildren().iterator().next().getAttribute(JavaWebAppService.ROOT_URL);
-                    return checkNotNull(url, "url of %s", app);
-                }});
-        
-            String site = Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TEN_SECONDS), new Callable<String>() {
-                    @Override public String call() throws Exception {
-                        return new ResourceUtils(this).getResourceAsString(url);
-                    }});
-            
-            log.info("App URL for "+app+": "+url);
-            Assert.assertTrue(url.contains("928"), "URL should be on port 9280+ based on config set in yaml, url "+url+", app "+app);
-            Assert.assertTrue(site.toLowerCase().contains("hello"), site);
-            Assert.assertTrue(!platform.assemblies().isEmpty());
-        } catch (Exception e) {
-            log.warn("Unable to instantiate "+at+" (rethrowing): "+e);
-            throw Exceptions.propagate(e);
-        }
-    }
-
-    public void testWithDbDeploy() throws IOException {
-        Reader input = Streams.reader(new ResourceUtils(this).getResourceFromUrl("java-web-app-and-db-with-function.yaml"));
-        AssemblyTemplate at = platform.pdp().registerDeploymentPlan(input);
-
-        try {
-            Assembly assembly = at.getInstantiator().newInstance().instantiate(at, platform);
-            log.info("Test - created "+assembly);
-            
-            final Entity app = brooklynMgmt.getEntityManager().getEntity(assembly.getId());
-            log.info("App - "+app);
-            
-            // locations set on individual services here
-            Assert.assertEquals(app.getLocations().size(), 0);
-            
-            Iterator<ResolvableLink<PlatformComponent>> pcs = assembly.getPlatformComponents().links().iterator();
-            PlatformComponent pc1 = pcs.next().resolve();
-            Entity cluster = brooklynMgmt.getEntityManager().getEntity(pc1.getId());
-            log.info("pc1 - "+pc1+" - "+cluster);
-            
-            PlatformComponent pc2 = pcs.next().resolve();
-            log.info("pc2 - "+pc2);
-            
-            Set<Task<?>> tasks = BrooklynTaskTags.getTasksInEntityContext(brooklynMgmt.getExecutionManager(), app);
-            log.info("Waiting on "+tasks.size()+" task(s)");
-            AtomicInteger i = new AtomicInteger(0);
-            for (Task<?> t: tasks) {
-                t.blockUntilEnded();
-                log.info("Completed task #" + i.incrementAndGet());
-            }
-
-            log.info("App started:");
-            Entities.dumpInfo(app);
-
-            EntityTestUtils.assertAttributeEqualsEventually(app, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-            Assert.assertEquals(app.getAttribute(Attributes.SERVICE_UP), Boolean.TRUE);
-            
-            final String url = Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TEN_SECONDS), new Callable<String>() {
-                    @Override public String call() throws Exception {
-                        Entity cluster = Iterables.getOnlyElement( Iterables.filter(app.getChildren(), WebAppService.class) );
-                        String url = cluster.getAttribute(JavaWebAppService.ROOT_URL);
-                        return checkNotNull(url, "url of %s", cluster);
-                    }});
-            
-            String site = Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TEN_SECONDS), new Callable<String>() {
-                    @Override public String call() throws Exception {
-                        return new ResourceUtils(this).getResourceAsString(url);
-                    }});
-            
-            log.info("App URL for "+app+": "+url);
-            Assert.assertTrue(url.contains("921"), "URL should be on port 9280+ based on config set in yaml, url "+url+", app "+app);
-            Assert.assertTrue(site.toLowerCase().contains("hello"), site);
-            Assert.assertTrue(!platform.assemblies().isEmpty());
-            
-            String dbPage = new ResourceUtils(this).getResourceAsString(Urls.mergePaths(url, "db.jsp"));
-            Assert.assertTrue(dbPage.contains("Isaac Asimov"), "db.jsp does not mention Isaac Asimov, probably the DB did not get initialised:\n"+dbPage);
-        } catch (Exception e) {
-            log.warn("Unable to instantiate "+at+" (rethrowing): "+e);
-            throw Exceptions.propagate(e);
-        }
-    }
-
-    public void testWithPolicyDeploy() {
-        Reader input = Streams.reader(new ResourceUtils(this).getResourceFromUrl("java-web-app-and-db-with-policy.yaml"));
-        AssemblyTemplate at = platform.pdp().registerDeploymentPlan(input);
-
-        try {
-            Assembly assembly = at.getInstantiator().newInstance().instantiate(at, platform);
-            log.info("Test - created "+assembly);
-            
-            final Entity app = brooklynMgmt.getEntityManager().getEntity(assembly.getId());
-            log.info("App - "+app);
-            
-            // locations set on individual services here
-            Assert.assertEquals(app.getLocations().size(), 0);
-            
-            Set<Task<?>> tasks = BrooklynTaskTags.getTasksInEntityContext(brooklynMgmt.getExecutionManager(), app);
-            log.info("Waiting on "+tasks.size()+" task(s)");
-            for (Task<?> t: tasks) {
-                t.blockUntilEnded();
-            }
-            
-            log.info("App started:");
-            Entities.dumpInfo(app);
-            
-            Iterator<ResolvableLink<PlatformComponent>> pcs = assembly.getPlatformComponents().links().iterator();
-            PlatformComponent clusterComponent = null;
-            while (pcs.hasNext() && clusterComponent == null) {
-                PlatformComponent component = pcs.next().resolve();
-                if (component.getName().equals("My Web with Policy"))
-                    clusterComponent = component;
-            }
-            Assert.assertNotNull(clusterComponent, "Database PlatformComponent not found");
-            Entity cluster = brooklynMgmt.getEntityManager().getEntity(clusterComponent.getId());
-            log.info("pc1 - "+clusterComponent+" - "+cluster);
-            
-            Assert.assertEquals(cluster.policies().size(), 1);
-            Policy policy = cluster.policies().iterator().next();
-            Assert.assertNotNull(policy);
-            Assert.assertTrue(policy instanceof AutoScalerPolicy, "policy="+policy);
-            Assert.assertEquals(policy.getConfig(AutoScalerPolicy.MAX_POOL_SIZE), (Integer)5);
-            Assert.assertEquals(policy.getConfig(AutoScalerPolicy.MIN_POOL_SIZE), (Integer)1);
-            Assert.assertEquals(policy.getConfig(AutoScalerPolicy.METRIC), DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW_PER_NODE);
-            Assert.assertEquals(policy.getConfig(AutoScalerPolicy.METRIC_LOWER_BOUND), (Integer)10);
-            Assert.assertEquals(policy.getConfig(AutoScalerPolicy.METRIC_UPPER_BOUND), (Integer)100);
-            Assert.assertTrue(policy.isRunning());
-
-            EntityTestUtils.assertAttributeEqualsEventually(app, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-            Assert.assertEquals(app.getAttribute(Attributes.SERVICE_UP), Boolean.TRUE);
-            
-            final String url = Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TEN_SECONDS), new Callable<String>() {
-                    @Override public String call() throws Exception {
-                        Entity cluster = Iterables.getOnlyElement( Iterables.filter(app.getChildren(), WebAppService.class) );
-                        String url = cluster.getAttribute(JavaWebAppService.ROOT_URL);
-                        return checkNotNull(url, "url of %s", cluster);
-                    }});
-            
-            String site = Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TEN_SECONDS), new Callable<String>() {
-                    @Override public String call() throws Exception {
-                        return new ResourceUtils(this).getResourceAsString(url);
-                    }});
-            
-            log.info("App URL for "+app+": "+url);
-            Assert.assertTrue(url.contains("921"), "URL should be on port 9280+ based on config set in yaml, url "+url+", app "+app);
-            Assert.assertTrue(site.toLowerCase().contains("hello"), site);
-            Assert.assertTrue(!platform.assemblies().isEmpty());
-            
-            String dbPage = new ResourceUtils(this).getResourceAsString(Urls.mergePaths(url, "db.jsp"));
-            Assert.assertTrue(dbPage.contains("Isaac Asimov"), "db.jsp does not mention Isaac Asimov, probably the DB did not get initialised:\n"+dbPage);
-        } catch (Exception e) {
-            log.warn("Unable to instantiate "+at+" (rethrowing): "+e);
-            throw Exceptions.propagate(e);
-        }
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/JavaWebAppsMatchingTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/JavaWebAppsMatchingTest.java b/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/JavaWebAppsMatchingTest.java
deleted file mode 100644
index 92e29b9..0000000
--- a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/camp/JavaWebAppsMatchingTest.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.camp;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.brooklyn.api.mgmt.ManagementContext;
-import org.apache.brooklyn.camp.brooklyn.BrooklynCampPlatform;
-import org.apache.brooklyn.camp.brooklyn.BrooklynCampReservedKeys;
-import org.apache.brooklyn.camp.spi.AssemblyTemplate;
-import org.apache.brooklyn.camp.spi.PlatformComponentTemplate;
-import org.apache.brooklyn.camp.spi.PlatformRootSummary;
-import org.apache.brooklyn.camp.spi.collection.ResolvableLink;
-import org.apache.brooklyn.camp.spi.pdp.DeploymentPlan;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.ResourceUtils;
-import org.apache.brooklyn.util.core.task.DeferredSupplier;
-import org.apache.brooklyn.util.stream.Streams;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-@Test
-public class JavaWebAppsMatchingTest {
-
-    private static final Logger log = LoggerFactory.getLogger(JavaWebAppsMatchingTest.class);
-    
-    private ManagementContext brooklynMgmt;
-    private BrooklynCampPlatform platform;
-
-    @BeforeMethod(alwaysRun=true)
-    public void setup() {
-        brooklynMgmt = new LocalManagementContextForTests();
-        platform = new BrooklynCampPlatform(
-              PlatformRootSummary.builder().name("Brooklyn CAMP Platform").build(),
-              brooklynMgmt);
-    }
-    
-    // FIXME all commented-out lines require camp server
-    
-    @AfterMethod(alwaysRun=true)
-    public void teardown() {
-        if (brooklynMgmt!=null) Entities.destroyAll(brooklynMgmt);
-    }
-    
-    public void testSimpleYamlParse() throws IOException {
-        Reader input = Streams.reader(new ResourceUtils(this).getResourceFromUrl("java-web-app-simple.yaml"));
-        DeploymentPlan plan = platform.pdp().parseDeploymentPlan(input);
-        log.info("DP is:\n"+plan.toString());
-        Assert.assertEquals(plan.getServices().size(), 1);
-        Assert.assertEquals(plan.getName(), "sample-single-jboss");
-    }
-    
-    public void testSimpleYamlMatch() throws IOException {
-        Reader input = Streams.reader(new ResourceUtils(this).getResourceFromUrl("java-web-app-simple.yaml"));
-        AssemblyTemplate at = platform.pdp().registerDeploymentPlan(input);
-        
-        Assert.assertEquals(at.getName(), "sample-single-jboss");
-    }
-
-    public void testExampleFunctionsYamlMatch() throws IOException {
-        Reader input = Streams.reader(new ResourceUtils(this).getResourceFromUrl("example-with-function.yaml"));
-        
-        DeploymentPlan plan = platform.pdp().parseDeploymentPlan(input);
-        log.info("DP is:\n"+plan.toString());
-        Map<?,?> cfg1 = (Map<?, ?>) plan.getServices().get(0).getCustomAttributes().get(BrooklynCampReservedKeys.BROOKLYN_CONFIG);
-        Map<?,?> cfg = MutableMap.copyOf(cfg1);
-        
-        Assert.assertEquals(cfg.remove("literalValue1"), "$brooklyn: is a fun place");
-        Assert.assertEquals(cfg.remove("literalValue2"), "$brooklyn: is a fun place");
-        Assert.assertEquals(cfg.remove("literalValue3"), "$brooklyn: is a fun place");
-        Assert.assertEquals(cfg.remove("literalValue4"), "$brooklyn: is a fun place");
-        Assert.assertEquals(cfg.remove("$brooklyn:1"), "key to the city");
-        Assert.assertTrue(cfg.isEmpty(), ""+cfg);
-
-        Assert.assertEquals(plan.getName(), "example-with-function");
-        Assert.assertEquals(plan.getCustomAttributes().get("location"), "localhost");
-        
-        AssemblyTemplate at = platform.pdp().registerDeploymentPlan(plan);
-        
-        Assert.assertEquals(at.getName(), "example-with-function");
-        Assert.assertEquals(at.getCustomAttributes().get("location"), "localhost");
-        
-        PlatformComponentTemplate pct = at.getPlatformComponentTemplates().links().iterator().next().resolve();
-        Object cfg2 = pct.getCustomAttributes().get(BrooklynCampReservedKeys.BROOKLYN_CONFIG);
-        Assert.assertEquals(cfg2, cfg1);
-    }
-
-    public void testJavaAndDbWithFunctionYamlMatch() throws IOException {
-        Reader input = Streams.reader(new ResourceUtils(this).getResourceFromUrl("java-web-app-and-db-with-function.yaml"));
-        assertWebDbWithFunctionValid(input);
-    }
-    
-    public void testJavaAndDbWithFunctionYamlMatch2() throws IOException {
-        Reader input = Streams.reader(new ResourceUtils(this).getResourceFromUrl("java-web-app-and-db-with-function-2.yaml"));
-        assertWebDbWithFunctionValid(input);
-    }
-    
-    protected void assertWebDbWithFunctionValid(Reader input) { 
-        DeploymentPlan plan = platform.pdp().parseDeploymentPlan(input);
-        log.info("DP is:\n"+plan.toString());
-        
-        AssemblyTemplate at = platform.pdp().registerDeploymentPlan(plan);
-        
-        Assert.assertEquals(at.getName(), "java-cluster-db-example");
-
-        Iterator<ResolvableLink<PlatformComponentTemplate>> pcti = at.getPlatformComponentTemplates().links().iterator();
-        PlatformComponentTemplate pct1 = pcti.next().resolve(); 
-
-        PlatformComponentTemplate pct2 = pcti.next().resolve(); 
-
-        Map<?,?> config = (Map<?, ?>) pct1.getCustomAttributes().get(BrooklynCampReservedKeys.BROOKLYN_CONFIG);
-        Map<?,?> javaSysProps = (Map<?, ?>) config.get("java.sysprops");
-        Object dbUrl = javaSysProps.get("brooklyn.example.db.url");
-        Assert.assertTrue(dbUrl instanceof DeferredSupplier<?>, "url is: "+dbUrl);
-        
-        Assert.assertEquals(pct2.getCustomAttributes().get("planId"), "db");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/downstreamparent/DownstreamParentTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/downstreamparent/DownstreamParentTest.java b/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/downstreamparent/DownstreamParentTest.java
deleted file mode 100644
index 33c4c42..0000000
--- a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/downstreamparent/DownstreamParentTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.downstreamparent;
-
-import static org.testng.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.shared.utils.io.FileUtils;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-public class DownstreamParentTest {
-
-    private static final String PROJECTS_DIR = "src/test/projects";
-    private static final String WORK_DIR = "target/ut/";
-
-    /**
-     * Asserts that a trivial project using brooklyn-downstream-parent can be
-     * loaded into Brooklyn's catalogue and its entities deployed.
-     */
-    @Test(groups = "Integration")
-    public void testDownstreamProjectsCanBeLoadedIntoBrooklynCatalogByDefault() throws Exception {
-        int port = Networking.nextAvailablePort(57000);
-        File dir = getBasedir("downstream-parent-test");
-        Verifier verifier = new Verifier(dir.getAbsolutePath());
-        verifier.setMavenDebug(true);
-        verifier.executeGoal("post-integration-test", ImmutableMap.of(
-                "bindPort", String.valueOf(port)));
-        verifier.verifyErrorFreeLog();
-        verifier.verifyTextInLog("Hello from the init method of the HelloEntity");
-    }
-
-    /** Replicates the behaviour of getBasedir in JUnit's TestResources class */
-    public File getBasedir(String project) throws IOException {
-        File src = (new File(PROJECTS_DIR, project)).getCanonicalFile();
-        assertTrue(src.isDirectory(), "Test project directory does not exist: " + src.getPath());
-        File basedir = (new File(WORK_DIR, getClass().getSimpleName() + "_" + project)).getCanonicalFile();
-        FileUtils.deleteDirectory(basedir);
-        assertTrue(basedir.mkdirs(), "Test project working directory created");
-        FileUtils.copyDirectoryStructure(src, basedir);
-        return basedir;
-    }
-}


[32/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-desktop.css
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-desktop.css b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-desktop.css
deleted file mode 100644
index e2eb84d..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-desktop.css
+++ /dev/null
@@ -1,531 +0,0 @@
-@media (min-width: 992px) {
-  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
-    float: left;
-  }
-  .col-md-12 {
-    width: 100%;
-  }
-  .col-md-11 {
-    width: 91.66666667%;
-  }
-  .col-md-10 {
-    width: 83.33333333%;
-  }
-  .col-md-9 {
-    width: 75%;
-  }
-  .col-md-8 {
-    width: 66.66666667%;
-  }
-  .col-md-7 {
-    width: 58.33333333%;
-  }
-  .col-md-6 {
-    width: 50%;
-  }
-  .col-md-5 {
-    width: 41.66666667%;
-  }
-  .col-md-4 {
-    width: 33.33333333%;
-  }
-  .col-md-3 {
-    width: 25%;
-  }
-  .col-md-2 {
-    width: 16.66666667%;
-  }
-  .col-md-1 {
-    width: 8.33333333%;
-  }
-  .col-md-pull-12 {
-    right: 100%;
-  }
-  .col-md-pull-11 {
-    right: 91.66666667%;
-  }
-  .col-md-pull-10 {
-    right: 83.33333333%;
-  }
-  .col-md-pull-9 {
-    right: 75%;
-  }
-  .col-md-pull-8 {
-    right: 66.66666667%;
-  }
-  .col-md-pull-7 {
-    right: 58.33333333%;
-  }
-  .col-md-pull-6 {
-    right: 50%;
-  }
-  .col-md-pull-5 {
-    right: 41.66666667%;
-  }
-  .col-md-pull-4 {
-    right: 33.33333333%;
-  }
-  .col-md-pull-3 {
-    right: 25%;
-  }
-  .col-md-pull-2 {
-    right: 16.66666667%;
-  }
-  .col-md-pull-1 {
-    right: 8.33333333%;
-  }
-  .col-md-pull-0 {
-    right: 0%;
-  }
-  .col-md-push-12 {
-    left: 100%;
-  }
-  .col-md-push-11 {
-    left: 91.66666667%;
-  }
-  .col-md-push-10 {
-    left: 83.33333333%;
-  }
-  .col-md-push-9 {
-    left: 75%;
-  }
-  .col-md-push-8 {
-    left: 66.66666667%;
-  }
-  .col-md-push-7 {
-    left: 58.33333333%;
-  }
-  .col-md-push-6 {
-    left: 50%;
-  }
-  .col-md-push-5 {
-    left: 41.66666667%;
-  }
-  .col-md-push-4 {
-    left: 33.33333333%;
-  }
-  .col-md-push-3 {
-    left: 25%;
-  }
-  .col-md-push-2 {
-    left: 16.66666667%;
-  }
-  .col-md-push-1 {
-    left: 8.33333333%;
-  }
-  .col-md-push-0 {
-    left: 0%;
-  }
-  .col-md-offset-12 {
-    margin-left: 100%;
-  }
-  .col-md-offset-11 {
-    margin-left: 91.66666667%;
-  }
-  .col-md-offset-10 {
-    margin-left: 83.33333333%;
-  }
-  .col-md-offset-9 {
-    margin-left: 75%;
-  }
-  .col-md-offset-8 {
-    margin-left: 66.66666667%;
-  }
-  .col-md-offset-7 {
-    margin-left: 58.33333333%;
-  }
-  .col-md-offset-6 {
-    margin-left: 50%;
-  }
-  .col-md-offset-5 {
-    margin-left: 41.66666667%;
-  }
-  .col-md-offset-4 {
-    margin-left: 33.33333333%;
-  }
-  .col-md-offset-3 {
-    margin-left: 25%;
-  }
-  .col-md-offset-2 {
-    margin-left: 16.66666667%;
-  }
-  .col-md-offset-1 {
-    margin-left: 8.33333333%;
-  }
-  .col-md-offset-0 {
-    margin-left: 0%;
-  }
-}
-@media (min-width: 1200px) {
-  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
-    float: left;
-  }
-  .col-lg-12 {
-    width: 100%;
-  }
-  .col-lg-11 {
-    width: 91.66666667%;
-  }
-  .col-lg-10 {
-    width: 83.33333333%;
-  }
-  .col-lg-9 {
-    width: 75%;
-  }
-  .col-lg-8 {
-    width: 66.66666667%;
-  }
-  .col-lg-7 {
-    width: 58.33333333%;
-  }
-  .col-lg-6 {
-    width: 50%;
-  }
-  .col-lg-5 {
-    width: 41.66666667%;
-  }
-  .col-lg-4 {
-    width: 33.33333333%;
-  }
-  .col-lg-3 {
-    width: 25%;
-  }
-  .col-lg-2 {
-    width: 16.66666667%;
-  }
-  .col-lg-1 {
-    width: 8.33333333%;
-  }
-  .col-lg-pull-12 {
-    right: 100%;
-  }
-  .col-lg-pull-11 {
-    right: 91.66666667%;
-  }
-  .col-lg-pull-10 {
-    right: 83.33333333%;
-  }
-  .col-lg-pull-9 {
-    right: 75%;
-  }
-  .col-lg-pull-8 {
-    right: 66.66666667%;
-  }
-  .col-lg-pull-7 {
-    right: 58.33333333%;
-  }
-  .col-lg-pull-6 {
-    right: 50%;
-  }
-  .col-lg-pull-5 {
-    right: 41.66666667%;
-  }
-  .col-lg-pull-4 {
-    right: 33.33333333%;
-  }
-  .col-lg-pull-3 {
-    right: 25%;
-  }
-  .col-lg-pull-2 {
-    right: 16.66666667%;
-  }
-  .col-lg-pull-1 {
-    right: 8.33333333%;
-  }
-  .col-lg-pull-0 {
-    right: 0%;
-  }
-  .col-lg-push-12 {
-    left: 100%;
-  }
-  .col-lg-push-11 {
-    left: 91.66666667%;
-  }
-  .col-lg-push-10 {
-    left: 83.33333333%;
-  }
-  .col-lg-push-9 {
-    left: 75%;
-  }
-  .col-lg-push-8 {
-    left: 66.66666667%;
-  }
-  .col-lg-push-7 {
-    left: 58.33333333%;
-  }
-  .col-lg-push-6 {
-    left: 50%;
-  }
-  .col-lg-push-5 {
-    left: 41.66666667%;
-  }
-  .col-lg-push-4 {
-    left: 33.33333333%;
-  }
-  .col-lg-push-3 {
-    left: 25%;
-  }
-  .col-lg-push-2 {
-    left: 16.66666667%;
-  }
-  .col-lg-push-1 {
-    left: 8.33333333%;
-  }
-  .col-lg-push-0 {
-    left: 0%;
-  }
-  .col-lg-offset-12 {
-    margin-left: 100%;
-  }
-  .col-lg-offset-11 {
-    margin-left: 91.66666667%;
-  }
-  .col-lg-offset-10 {
-    margin-left: 83.33333333%;
-  }
-  .col-lg-offset-9 {
-    margin-left: 75%;
-  }
-  .col-lg-offset-8 {
-    margin-left: 66.66666667%;
-  }
-  .col-lg-offset-7 {
-    margin-left: 58.33333333%;
-  }
-  .col-lg-offset-6 {
-    margin-left: 50%;
-  }
-  .col-lg-offset-5 {
-    margin-left: 41.66666667%;
-  }
-  .col-lg-offset-4 {
-    margin-left: 33.33333333%;
-  }
-  .col-lg-offset-3 {
-    margin-left: 25%;
-  }
-  .col-lg-offset-2 {
-    margin-left: 16.66666667%;
-  }
-  .col-lg-offset-1 {
-    margin-left: 8.33333333%;
-  }
-  .col-lg-offset-0 {
-    margin-left: 0%;
-  }
-}
-.breadcrumb {
-  padding: 8px 15px;
-  margin-bottom: 20px;
-  list-style: none;
-  background-color: #f5f5f5;
-  border-radius: 4px;
-}
-.breadcrumb > li {
-  display: inline-block;
-}
-.breadcrumb > li + li:before {
-  content: "/\00a0";
-  padding: 0 5px;
-  color: #cccccc;
-}
-.breadcrumb > .active {
-  color: #999999;
-}
-.pagination {
-  display: inline-block;
-  padding-left: 0;
-  margin: 20px 0;
-  border-radius: 4px;
-}
-.pagination > li {
-  display: inline;
-}
-.pagination > li > a,
-.pagination > li > span {
-  position: relative;
-  float: left;
-  padding: 6px 12px;
-  line-height: 1.42857143;
-  text-decoration: none;
-  color: #007aff;
-  background-color: #ffffff;
-  border: 1px solid #dddddd;
-  margin-left: -1px;
-}
-.pagination > li:first-child > a,
-.pagination > li:first-child > span {
-  margin-left: 0;
-  border-bottom-left-radius: 4px;
-  border-top-left-radius: 4px;
-}
-.pagination > li:last-child > a,
-.pagination > li:last-child > span {
-  border-bottom-right-radius: 4px;
-  border-top-right-radius: 4px;
-}
-.pagination > li > a:hover,
-.pagination > li > span:hover,
-.pagination > li > a:focus,
-.pagination > li > span:focus {
-  color: #0055b3;
-  background-color: #eeeeee;
-  border-color: #dddddd;
-}
-.pagination > .active > a,
-.pagination > .active > span,
-.pagination > .active > a:hover,
-.pagination > .active > span:hover,
-.pagination > .active > a:focus,
-.pagination > .active > span:focus {
-  z-index: 2;
-  color: #ffffff;
-  background-color: #007aff;
-  border-color: #007aff;
-  cursor: default;
-}
-.pagination > .disabled > span,
-.pagination > .disabled > span:hover,
-.pagination > .disabled > span:focus,
-.pagination > .disabled > a,
-.pagination > .disabled > a:hover,
-.pagination > .disabled > a:focus {
-  color: #999999;
-  background-color: #ffffff;
-  border-color: #dddddd;
-  cursor: not-allowed;
-}
-.pagination-lg > li > a,
-.pagination-lg > li > span {
-  padding: 10px 16px;
-  font-size: 18px;
-}
-.pagination-lg > li:first-child > a,
-.pagination-lg > li:first-child > span {
-  border-bottom-left-radius: 6px;
-  border-top-left-radius: 6px;
-}
-.pagination-lg > li:last-child > a,
-.pagination-lg > li:last-child > span {
-  border-bottom-right-radius: 6px;
-  border-top-right-radius: 6px;
-}
-.pagination-sm > li > a,
-.pagination-sm > li > span {
-  padding: 5px 10px;
-  font-size: 12px;
-}
-.pagination-sm > li:first-child > a,
-.pagination-sm > li:first-child > span {
-  border-bottom-left-radius: 3px;
-  border-top-left-radius: 3px;
-}
-.pagination-sm > li:last-child > a,
-.pagination-sm > li:last-child > span {
-  border-bottom-right-radius: 3px;
-  border-top-right-radius: 3px;
-}
-.jumbotron {
-  padding: 30px;
-  margin-bottom: 30px;
-  color: inherit;
-  background-color: #eeeeee;
-}
-.jumbotron h1,
-.jumbotron .h1 {
-  color: inherit;
-}
-.jumbotron p {
-  margin-bottom: 15px;
-  font-size: 21px;
-  font-weight: 200;
-}
-.container .jumbotron {
-  border-radius: 6px;
-}
-.jumbotron .container {
-  max-width: 100%;
-}
-@media screen and (min-width: 768px) {
-  .jumbotron {
-    padding-top: 48px;
-    padding-bottom: 48px;
-  }
-  .container .jumbotron {
-    padding-left: 60px;
-    padding-right: 60px;
-  }
-  .jumbotron h1,
-  .jumbotron .h1 {
-    font-size: 63px;
-  }
-}
-@media (min-width: 992px) {
-  .sidebar-toggle {
-    display: none;
-  }
-  .navbar-brand-center {
-    text-align: left;
-  }
-  .sidebar-left {
-    display: block;
-    left: 0;
-    width: 300px;
-  }
-  .sidebar-right {
-    display: block;
-    right: 0;
-    left: auto;
-    width: 300px;
-  }
-  .sidebar-right-in .sidebar-left {
-    -webkit-transform: translate3d(0, 0, 0) !important;
-    -moz-transform: translate3d(0, 0, 0) !important;
-    transform: translate3d(0, 0, 0) !important;
-  }
-  .sidebar-left-in .sidebar-right {
-    -webkit-transform: translate3d(0, 0, 0) !important;
-    -moz-transform: translate3d(0, 0, 0) !important;
-    transform: translate3d(0, 0, 0) !important;
-  }
-  .has-sidebar-left .app,
-  .sidebar-left-in .app {
-    width: auto;
-    margin-left: 300px;
-    left: 0;
-    -webkit-transform: translate3d(0, 0, 0) !important;
-    -moz-transform: translate3d(0, 0, 0) !important;
-    transform: translate3d(0, 0, 0) !important;
-    position: relative;
-    -webkit-transition: -webkit-transform 0 ease;
-    -moz-transition: -moz-transform 0 ease;
-    transition: transform 0 ease;
-  }
-  .sidebar-right-in .app {
-    width: auto;
-    margin-right: 300px;
-    right: 0;
-    -webkit-transform: translate3d(0, 0, 0) !important;
-    -moz-transform: translate3d(0, 0, 0) !important;
-    transform: translate3d(0, 0, 0) !important;
-    position: relative;
-    -webkit-transition: -webkit-transform 0 ease;
-    -moz-transition: -moz-transform 0 ease;
-    transition: transform 0 ease;
-  }
-}
-@media (min-width: 1200px) {
-  .sidebar-left {
-    width: 320px;
-  }
-  .sidebar-right {
-    width: 320px;
-  }
-  .has-sidebar-left .app,
-  .sidebar-left-in .app {
-    margin-left: 320px;
-  }
-  .sidebar-right-in .app {
-    margin-right: 320px;
-  }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-desktop.min.css
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-desktop.min.css b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-desktop.min.css
deleted file mode 100644
index f78704b..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-desktop.min.css
+++ /dev/null
@@ -1 +0,0 @@
-@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md
 -push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33
 333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333
 333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decor
 ation:none;color:#007aff;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#0055b3;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;background-color:#007aff;border-color:#007aff;cursor:default}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>
 li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotr
 on{padding-left:60px;padding-right:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}@media (min-width:992px){.sidebar-toggle{display:none}.navbar-brand-center{text-align:left}.sidebar-left{display:block;left:0;width:300px}.sidebar-right{display:block;right:0;left:auto;width:300px}.sidebar-left-in .sidebar-right,.sidebar-right-in .sidebar-left{-webkit-transform:translate3d(0,0,0)!important;-moz-transform:translate3d(0,0,0)!important;transform:translate3d(0,0,0)!important}.has-sidebar-left .app,.sidebar-left-in .app{width:auto;margin-left:300px;left:0;-webkit-transform:translate3d(0,0,0)!important;-moz-transform:translate3d(0,0,0)!important;transform:translate3d(0,0,0)!important;position:relative;-webkit-transition:-webkit-transform 0 ease;-moz-transition:-moz-transform 0 ease;transition:transform 0 ease}.sidebar-right-in .app{width:auto;margin-right:300px;right:0;-webkit-transform:translate3d(0,0,0)!important;-moz-transform:translate3d(0,0,0)!important;transform:translate3d(0,0,0)!i
 mportant;position:relative;-webkit-transition:-webkit-transform 0 ease;-moz-transition:-moz-transform 0 ease;transition:transform 0 ease}}@media (min-width:1200px){.sidebar-left,.sidebar-right{width:320px}.has-sidebar-left .app,.sidebar-left-in .app{margin-left:320px}.sidebar-right-in .app{margin-right:320px}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-hover.css
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-hover.css b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-hover.css
deleted file mode 100644
index 6965e0c..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-hover.css
+++ /dev/null
@@ -1,480 +0,0 @@
-a:hover {
-  outline: 0;
-}
-
-a:hover {
-  color: #0055b3;
-  text-decoration: underline;
-}
-
-a.text-primary:hover {
-  color: #0062cc;
-}
-
-a.text-success:hover {
-  color: #2b542c;
-}
-
-a.text-info:hover {
-  color: #245269;
-}
-
-a.text-warning:hover {
-  color: #66512c;
-}
-
-a.text-danger:hover {
-  color: #843534;
-}
-
-a.bg-primary:hover {
-  background-color: #0062cc;
-}
-
-a.bg-success:hover {
-  background-color: #c1e2b3;
-}
-
-a.bg-info:hover {
-  background-color: #afd9ee;
-}
-
-a.bg-warning:hover {
-  background-color: #f7ecb5;
-}
-
-a.bg-danger:hover {
-  background-color: #e4b9b9;
-}
-
-.table-hover > tbody > tr:hover > td,
-.table-hover > tbody > tr:hover > th {
-  background-color: #f5f5f5;
-}
-
-.table-hover > tbody > tr > td.active:hover,
-.table-hover > tbody > tr > th.active:hover,
-.table-hover > tbody > tr.active:hover > td,
-.table-hover > tbody > tr.active:hover > th {
-  background-color: #e8e8e8;
-}
-
-.table-hover > tbody > tr > td.success:hover,
-.table-hover > tbody > tr > th.success:hover,
-.table-hover > tbody > tr.success:hover > td,
-.table-hover > tbody > tr.success:hover > th {
-  background-color: #d0e9c6;
-}
-
-.table-hover > tbody > tr > td.info:hover,
-.table-hover > tbody > tr > th.info:hover,
-.table-hover > tbody > tr.info:hover > td,
-.table-hover > tbody > tr.info:hover > th {
-  background-color: #c4e3f3;
-}
-
-.table-hover > tbody > tr > td.warning:hover,
-.table-hover > tbody > tr > th.warning:hover,
-.table-hover > tbody > tr.warning:hover > td,
-.table-hover > tbody > tr.warning:hover > th {
-  background-color: #faf2cc;
-}
-
-.table-hover > tbody > tr > td.danger:hover,
-.table-hover > tbody > tr > th.danger:hover,
-.table-hover > tbody > tr.danger:hover > td,
-.table-hover > tbody > tr.danger:hover > th {
-  background-color: #ebcccc;
-}
-
-.btn:hover {
-  color: #333333;
-  text-decoration: none;
-}
-
-.btn-default:hover {
-  color: #333333;
-  background-color: #ebebeb;
-  border-color: #adadad;
-}
-
-.btn-default.disabled:hover,
-.btn-default[disabled]:hover,
-fieldset[disabled] .btn-default:hover {
-  background-color: #ffffff;
-  border-color: #cccccc;
-}
-
-.btn-primary:hover {
-  color: #ffffff;
-  background-color: #0066d6;
-  border-color: #0051a8;
-}
-
-.btn-primary.disabled:hover,
-.btn-primary[disabled]:hover,
-fieldset[disabled] .btn-primary:hover {
-  background-color: #007aff;
-  border-color: #006ee6;
-}
-
-.btn-success:hover {
-  color: #ffffff;
-  background-color: #2cd048;
-  border-color: #24aa3b;
-}
-
-.btn-success.disabled:hover,
-.btn-success[disabled]:hover,
-fieldset[disabled] .btn-success:hover {
-  background-color: #4cd964;
-  border-color: #37d552;
-}
-
-.btn-info:hover {
-  color: #ffffff;
-  background-color: #2295c5;
-  border-color: #1b779e;
-}
-
-.btn-info.disabled:hover,
-.btn-info[disabled]:hover,
-fieldset[disabled] .btn-info:hover {
-  background-color: #34aadc;
-  border-color: #249ed2;
-}
-
-.btn-warning:hover {
-  color: #ffffff;
-  background-color: #d6ab00;
-  border-color: #a88700;
-}
-
-.btn-warning.disabled:hover,
-.btn-warning[disabled]:hover,
-fieldset[disabled] .btn-warning:hover {
-  background-color: #ffcc00;
-  border-color: #e6b800;
-}
-
-.btn-danger:hover {
-  color: #ffffff;
-  background-color: #ff1407;
-  border-color: #d80b00;
-}
-
-.btn-danger.disabled:hover,
-.btn-danger[disabled]:hover,
-fieldset[disabled] .btn-danger:hover {
-  background-color: #ff3b30;
-  border-color: #ff2317;
-}
-
-.btn-link:hover {
-  border-color: transparent;
-}
-
-.btn-link:hover {
-  color: #0055b3;
-  text-decoration: underline;
-  background-color: transparent;
-}
-
-.btn-link[disabled]:hover,
-fieldset[disabled] .btn-link:hover {
-  color: #999999;
-  text-decoration: none;
-}
-
-.dropdown-menu > li > a:hover {
-  text-decoration: none;
-  color: #262626;
-  background-color: #f5f5f5;
-}
-
-.dropdown-menu > .active > a:hover {
-  color: #ffffff;
-  text-decoration: none;
-  outline: 0;
-  background-color: #007aff;
-}
-
-.dropdown-menu > .disabled > a:hover {
-  color: #999999;
-}
-
-.dropdown-menu > .disabled > a:hover {
-  text-decoration: none;
-  background-color: transparent;
-  background-image: none;
-  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-  cursor: not-allowed;
-}
-
-.btn-group > .btn:hover,
-.btn-group-vertical > .btn:hover {
-  z-index: 2;
-}
-
-.input-group-btn > .btn:hover {
-  z-index: 2;
-}
-
-.nav > li > a:hover {
-  text-decoration: none;
-  background-color: #eeeeee;
-}
-
-.nav > li.disabled > a:hover {
-  color: #999999;
-  text-decoration: none;
-  background-color: transparent;
-  cursor: not-allowed;
-}
-
-.nav .open > a:hover {
-  background-color: #eeeeee;
-  border-color: #007aff;
-}
-
-.nav-tabs > li > a:hover {
-  border-color: #eeeeee #eeeeee #dddddd;
-}
-
-.nav-tabs > li.active > a:hover {
-  color: #555555;
-  background-color: #ffffff;
-  border: 1px solid #dddddd;
-  border-bottom-color: transparent;
-  cursor: default;
-}
-
-.nav-tabs.nav-justified > .active > a:hover {
-  border: 1px solid #dddddd;
-}
-
-.nav-pills > li.active > a:hover {
-  color: #ffffff;
-  background-color: #007aff;
-}
-
-.nav-tabs-justified > .active > a:hover {
-  border: 1px solid #dddddd;
-}
-
-.navbar-brand:hover {
-  text-decoration: none;
-}
-
-.navbar-default .navbar-brand:hover {
-  color: #0062cc;
-  background-color: transparent;
-}
-
-.navbar-default .navbar-nav > li > a:hover {
-  color: #006ee6;
-  background-color: transparent;
-}
-
-.navbar-default .navbar-nav > .active > a:hover {
-  color: #1a87ff;
-  background-color: #e6e6e6;
-}
-
-.navbar-default .navbar-nav > .disabled > a:hover {
-  color: #66afff;
-  background-color: transparent;
-}
-
-.navbar-default .navbar-toggle:hover {
-  background-color: #dddddd;
-}
-
-.navbar-default .navbar-nav > .open > a:hover {
-  background-color: #e6e6e6;
-  color: #1a87ff;
-}
-
-.navbar-default .navbar-link:hover {
-  color: #006ee6;
-}
-
-.navbar-inverse .navbar-brand:hover {
-  color: #ffffff;
-  background-color: transparent;
-}
-
-.navbar-inverse .navbar-nav > li > a:hover {
-  color: #ffffff;
-  background-color: transparent;
-}
-
-.navbar-inverse .navbar-nav > .active > a:hover {
-  color: #ffffff;
-  background-color: #080808;
-}
-
-.navbar-inverse .navbar-nav > .disabled > a:hover {
-  color: #444444;
-  background-color: transparent;
-}
-
-.navbar-inverse .navbar-toggle:hover {
-  background-color: #333333;
-}
-
-.navbar-inverse .navbar-nav > .open > a:hover {
-  background-color: #080808;
-  color: #ffffff;
-}
-
-.navbar-inverse .navbar-link:hover {
-  color: #ffffff;
-}
-
-.pager li > a:hover {
-  text-decoration: none;
-  background-color: #eeeeee;
-}
-
-.pager .disabled > a:hover {
-  color: #999999;
-  background-color: #ffffff;
-  cursor: not-allowed;
-}
-
-.label[href]:hover {
-  color: #ffffff;
-  text-decoration: none;
-  cursor: pointer;
-}
-
-.label-default[href]:hover {
-  background-color: #808080;
-}
-
-.label-primary[href]:hover {
-  background-color: #0062cc;
-}
-
-.label-success[href]:hover {
-  background-color: #2ac845;
-}
-
-.label-info[href]:hover {
-  background-color: #218ebd;
-}
-
-.label-warning[href]:hover {
-  background-color: #cca300;
-}
-
-.label-danger[href]:hover {
-  background-color: #fc0d00;
-}
-
-a.badge:hover {
-  color: #ffffff;
-  text-decoration: none;
-  cursor: pointer;
-}
-
-a.thumbnail:hover {
-  border-color: #007aff;
-}
-
-a.list-group-item:hover {
-  text-decoration: none;
-  background-color: #f5f5f5;
-}
-
-a.list-group-item.active:hover {
-  z-index: 2;
-  color: #ffffff;
-  background-color: #007aff;
-  border-color: #007aff;
-}
-
-a.list-group-item.active:hover .list-group-item-heading {
-  color: inherit;
-}
-
-a.list-group-item.active:hover .list-group-item-text {
-  color: #cce4ff;
-}
-
-a.list-group-item-success:hover {
-  color: #3c763d;
-  background-color: #d0e9c6;
-}
-
-a.list-group-item-success.active:hover {
-  color: #fff;
-  background-color: #3c763d;
-  border-color: #3c763d;
-}
-
-a.list-group-item-info:hover {
-  color: #31708f;
-  background-color: #c4e3f3;
-}
-
-a.list-group-item-info.active:hover {
-  color: #fff;
-  background-color: #31708f;
-  border-color: #31708f;
-}
-
-a.list-group-item-warning:hover {
-  color: #8a6d3b;
-  background-color: #faf2cc;
-}
-
-a.list-group-item-warning.active:hover {
-  color: #fff;
-  background-color: #8a6d3b;
-  border-color: #8a6d3b;
-}
-
-a.list-group-item-danger:hover {
-  color: #a94442;
-  background-color: #ebcccc;
-}
-
-a.list-group-item-danger.active:hover {
-  color: #fff;
-  background-color: #a94442;
-  border-color: #a94442;
-}
-
-.close:hover {
-  color: #000000;
-  text-decoration: none;
-  cursor: pointer;
-  opacity: 0.5;
-  filter: alpha(opacity=50);
-}
-
-.carousel-control:hover {
-  outline: none;
-  color: #ffffff;
-  text-decoration: none;
-  opacity: 0.9;
-  filter: alpha(opacity=90);
-}
-
-.btn.active:hover {
-  -webkit-box-shadow: none;
-  box-shadow: none;
-}
-
-.btn-group > .btn-default.active:hover {
-  color: #ffffff;
-  background-color: #007aff;
-  border-color: #006ee6;
-}
-
-.navbar-app .btn-navbar:hover,
-.navbar-app .btn:hover {
-  color: #007aff;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-hover.min.css
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-hover.min.css b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-hover.min.css
deleted file mode 100644
index d02c4a2..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-hover.min.css
+++ /dev/null
@@ -1 +0,0 @@
-a:hover{outline:0;color:#0055b3;text-decoration:underline}a.text-primary:hover{color:#0062cc}a.text-success:hover{color:#2b542c}a.text-info:hover{color:#245269}a.text-warning:hover{color:#66512c}a.text-danger:hover{color:#843534}a.bg-primary:hover{background-color:#0062cc}a.bg-success:hover{background-color:#c1e2b3}a.bg-info:hover{background-color:#afd9ee}a.bg-warning:hover{background-color:#f7ecb5}a.bg-danger:hover{background-color:#e4b9b9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr>td.info:hover
 ,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.btn:hover{color:#333;text-decoration:none}.btn-default:hover{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-primary:hover{color:#fff;background-color:#0066d6;border-color:#0051a8}.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover{background-color:#007aff;border-color:#006ee6}.btn-success:hover{color:#fff;background-color:#2cd048;border-color:#24aa3b}.btn-success.disabled:hover,.b
 tn-success[disabled]:hover,fieldset[disabled] .btn-success:hover{background-color:#4cd964;border-color:#37d552}.btn-info:hover{color:#fff;background-color:#2295c5;border-color:#1b779e}.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover{background-color:#34aadc;border-color:#249ed2}.btn-warning:hover{color:#fff;background-color:#d6ab00;border-color:#a88700}.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover{background-color:#fc0;border-color:#e6b800}.btn-danger:hover{color:#fff;background-color:#ff1407;border-color:#d80b00}.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover{background-color:#ff3b30;border-color:#ff2317}.btn-link:hover{border-color:transparent;color:#0055b3;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover{color:#999;text-decoration:none}.dropdown-menu>li>a:hover{text-decoration:none;colo
 r:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0;background-color:#007aff}.dropdown-menu>.disabled>a:hover{color:#999;text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.btn-group-vertical>.btn:hover,.btn-group>.btn:hover,.input-group-btn>.btn:hover{z-index:2}.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a:hover{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a:hover{background-color:#eee;border-color:#007aff}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}.nav-pills>li.active>a:hover{color:#fff;background-color:#007aff}.nav-tabs-justified>.active>a:hover{borde
 r:1px solid #ddd}.navbar-brand:hover{text-decoration:none}.navbar-default .navbar-brand:hover{color:#0062cc;background-color:transparent}.navbar-default .navbar-nav>li>a:hover{color:#006ee6;background-color:transparent}.navbar-default .navbar-nav>.active>a:hover{color:#1a87ff;background-color:#e6e6e6}.navbar-default .navbar-nav>.disabled>a:hover{color:#66afff;background-color:transparent}.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-nav>.open>a:hover{background-color:#e6e6e6;color:#1a87ff}.navbar-default .navbar-link:hover{color:#006ee6}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-nav>.open>a:hover{background-color:#080808;color:#fff
 }.navbar-inverse .navbar-link:hover{color:#fff}.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .disabled>a:hover{color:#999;background-color:#fff;cursor:not-allowed}.label[href]:hover{color:#fff;text-decoration:none;cursor:pointer}.label-default[href]:hover{background-color:gray}.label-primary[href]:hover{background-color:#0062cc}.label-success[href]:hover{background-color:#2ac845}.label-info[href]:hover{background-color:#218ebd}.label-warning[href]:hover{background-color:#cca300}.label-danger[href]:hover{background-color:#fc0d00}a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}a.thumbnail:hover{border-color:#007aff}a.list-group-item:hover{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active:hover{z-index:2;color:#fff;background-color:#007aff;border-color:#007aff}a.list-group-item.active:hover .list-group-item-heading{color:inherit}a.list-group-item.active:hover .list-group-item-text{color:#cce4ff}a.list-group-item-success:hover{colo
 r:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}.carousel-control:hover{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.btn.active:hover{-webkit-box-shadow:none;box-shadow:none}.btn-group>.btn-default.active:hover{color:#fff;background-color:#007aff;border-color:#006ee6}.navbar-app .btn-navbar
 :hover,.navbar-app .btn:hover{color:#007aff}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/FontAwesome.otf
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/FontAwesome.otf b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/FontAwesome.otf
deleted file mode 100644
index 3461e3f..0000000
Binary files a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/FontAwesome.otf and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.eot
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.eot b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.eot
deleted file mode 100644
index 6cfd566..0000000
Binary files a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.eot and /dev/null differ


[50/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f2fd833
--- /dev/null
+++ b/README.md
@@ -0,0 +1,9 @@
+
+# [![**Brooklyn**](https://brooklyn.apache.org/style/img/apache-brooklyn-logo-244px-wide.png)](http://brooklyn.apache.org/)
+
+### Library of Entities for Apache Brooklyn
+
+This sub-project contains various entities not *needed* for Brooklyn,
+but useful in practice as building blocks, including entities for webapps,
+datastores, and more.
+

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/.gitattributes
----------------------------------------------------------------------
diff --git a/brooklyn-library/.gitattributes b/brooklyn-library/.gitattributes
deleted file mode 100644
index 7920d0e..0000000
--- a/brooklyn-library/.gitattributes
+++ /dev/null
@@ -1,6 +0,0 @@
-#Don't auto-convert line endings for shell scripts on Windows (breaks the scripts)
-* text=auto
-*.sh text eol=lf
-*.bat text eol=crlf
-*.ps1 text eol=crlf
-*.ini text eol=crlf

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/.gitignore
----------------------------------------------------------------------
diff --git a/brooklyn-library/.gitignore b/brooklyn-library/.gitignore
deleted file mode 100644
index ed439f2..0000000
--- a/brooklyn-library/.gitignore
+++ /dev/null
@@ -1,32 +0,0 @@
-\#*\#
-*~
-*.bak
-*.swp
-*.swo
-.DS_Store
-
-atlassian-ide-plugin.xml
-*.class
-
-target/
-test-output/
-
-.project
-.classpath
-.settings/
-.metadata/
-
-.idea/
-*.iml
-
-nbactions.xml
-nb-configuration.xml
-
-prodDb.*
-
-*.log
-brooklyn*.log.*
-
-*brooklyn-persisted-state/
-
-ignored

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/LICENSE
----------------------------------------------------------------------
diff --git a/brooklyn-library/LICENSE b/brooklyn-library/LICENSE
deleted file mode 100644
index 3d8f4e7..0000000
--- a/brooklyn-library/LICENSE
+++ /dev/null
@@ -1,455 +0,0 @@
-
-This software is distributed under the Apache License, version 2.0. See (1) below.
-This software is copyright (c) The Apache Software Foundation and contributors.
-
-Contents:
-
-  (1) This software license: Apache License, version 2.0
-  (2) Notices for bundled software
-  (3) Licenses for bundled software
-
-
----------------------------------------------------
-
-(1) This software license: Apache License, version 2.0
-
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-
----------------------------------------------------
-
-(2) Notices for bundled software
-
-This project includes the software: async.js
-  Available at: https://github.com/p15martin/google-maps-hello-world/blob/master/js/libs/async.js
-  Developed by: Miller Medeiros (https://github.com/millermedeiros/)
-  Version used: 0.1.1
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) Miller Medeiros (2011)
-
-This project includes the software: backbone.js
-  Available at: http://backbonejs.org
-  Developed by: DocumentCloud Inc. (http://www.documentcloud.org/)
-  Version used: 1.0.0
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) Jeremy Ashkenas, DocumentCloud Inc. (2010-2013)
-
-This project includes the software: bootstrap.js
-  Available at: http://twitter.github.com/bootstrap/javascript.html#transitions
-  Version used: 2.0.4
-  Used under the following license: Apache License, version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
-  Copyright (c) Twitter, Inc. (2012)
-
-This project includes the software: handlebars.js
-  Available at: https://github.com/wycats/handlebars.js
-  Developed by: Yehuda Katz (https://github.com/wycats/)
-  Inclusive of: handlebars*.js
-  Version used: 1.0-rc1
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) Yehuda Katz (2012)
-
-This project includes the software: jQuery JavaScript Library
-  Available at: http://jquery.com/
-  Developed by: The jQuery Foundation (http://jquery.org/)
-  Inclusive of: jquery.js
-  Version used: 1.7.2
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) John Resig (2005-2011)
-  Includes code fragments from sizzle.js:
-    Copyright (c) The Dojo Foundation
-    Available at http://sizzlejs.com
-    Used under the MIT license
-
-This project includes the software: jQuery BBQ: Back Button & Query Library
-  Available at: http://benalman.com/projects/jquery-bbq-plugin/
-  Developed by: "Cowboy" Ben Alman (http://benalman.com/)
-  Inclusive of: jquery.ba-bbq*.js
-  Version used: 1.2.1
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) "Cowboy" Ben Alman (2010)"
-
-This project includes the software: DataTables Table plug-in for jQuery
-  Available at: http://www.datatables.net/
-  Developed by: SpryMedia Ltd (http://sprymedia.co.uk/)
-  Inclusive of: jquery.dataTables.{js,css}
-  Version used: 1.9.4
-  Used under the following license: The BSD 3-Clause (New BSD) License (http://opensource.org/licenses/BSD-3-Clause)
-  Copyright (c) Allan Jardine (2008-2012)
-
-This project includes the software: jQuery Form Plugin
-  Available at: https://github.com/malsup/form
-  Developed by: Mike Alsup (http://malsup.com/)
-  Inclusive of: jquery.form.js
-  Version used: 3.09
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) M. Alsup (2006-2013)
-
-This project includes the software: jQuery Wiggle
-  Available at: https://github.com/jordanthomas/jquery-wiggle
-  Inclusive of: jquery.wiggle.min.js
-  Version used: swagger-ui:1.0.1
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) WonderGroup and Jordan Thomas (2010)
-  Previously online at http://labs.wondergroup.com/demos/mini-ui/index.html.
-  The version included here is from the Swagger UI distribution.
-
-This project includes the software: js-uri
-  Available at: http://code.google.com/p/js-uri/
-  Developed by: js-uri contributors (https://code.google.com/js-uri)
-  Inclusive of: URI.js
-  Version used: 0.1
-  Used under the following license: The BSD 3-Clause (New BSD) License (http://opensource.org/licenses/BSD-3-Clause)
-  Copyright (c) js-uri contributors (2013)
-
-This project includes the software: js-yaml.js
-  Available at: https://github.com/nodeca/
-  Developed by: Vitaly Puzrin (https://github.com/nodeca/)
-  Version used: 3.2.7
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) Vitaly Puzrin (2011-2015)
-
-This project includes the software: marked.js
-  Available at: https://github.com/chjj/marked
-  Developed by: Christopher Jeffrey (https://github.com/chjj)
-  Version used: 0.3.1
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) Christopher Jeffrey (2011-2014)
-
-This project includes the software: moment.js
-  Available at: http://momentjs.com
-  Developed by: Tim Wood (http://momentjs.com)
-  Version used: 2.1.0
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) Tim Wood, Iskren Chernev, Moment.js contributors (2011-2014)
-
-This project includes the software: RequireJS
-  Available at: http://requirejs.org/
-  Developed by: The Dojo Foundation (http://dojofoundation.org/)
-  Inclusive of: require.js, text.js
-  Version used: 2.0.6
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) The Dojo Foundation (2010-2012)
-
-This project includes the software: RequireJS (r.js maven plugin)
-  Available at: http://github.com/jrburke/requirejs
-  Developed by: The Dojo Foundation (http://dojofoundation.org/)
-  Inclusive of: r.js
-  Version used: 2.1.6
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) The Dojo Foundation (2009-2013)
-  Includes code fragments for source-map and other functionality:
-    Copyright (c) The Mozilla Foundation and contributors (2011)
-    Used under the BSD 2-Clause license.
-  Includes code fragments for parse-js and other functionality:
-    Copyright (c) Mihai Bazon (2010, 2012)
-    Used under the BSD 2-Clause license.
-  Includes code fragments for uglifyjs/consolidator:
-    Copyright (c) Robert Gust-Bardon (2012)
-    Used under the BSD 2-Clause license.
-  Includes code fragments for the esprima parser:
-    Copyright (c):
-      Ariya Hidayat (2011, 2012)
-      Mathias Bynens (2012)
-      Joost-Wim Boekesteijn (2012)
-      Kris Kowal (2012)
-      Yusuke Suzuki (2012)
-      Arpad Borsos (2012)
-    Used under the BSD 2-Clause license.
-
-This project includes the software: Swagger UI
-  Available at: https://github.com/swagger-api/swagger-ui
-  Inclusive of: swagger*.{js,css,html}
-  Version used: 2.1.4
-  Used under the following license: Apache License, version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
-  Copyright (c) SmartBear Software (2011-2015)
-
-This project includes the software: typeahead.js
-  Available at: https://github.com/twitter/typeahead.js
-  Developed by: Twitter, Inc (http://twitter.com)
-  Version used: 0.10.5
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) Twitter, Inc. and other contributors (2013-2014)
-
-This project includes the software: underscore.js
-  Available at: http://underscorejs.org
-  Developed by: DocumentCloud Inc. (http://www.documentcloud.org/)
-  Inclusive of: underscore*.{js,map}
-  Version used: 1.4.4
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) Jeremy Ashkenas, DocumentCloud Inc. (2009-2013)
-
-This project includes the software: underscore.js:1.7.0
-  Available at: http://underscorejs.org
-  Developed by: DocumentCloud Inc. (http://www.documentcloud.org/)
-  Inclusive of: underscore*.{js,map}
-  Version used: 1.7.0
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors (2009-2014)
-
-This project includes the software: ZeroClipboard
-  Available at: http://zeroclipboard.org/
-  Developed by: ZeroClipboard contributors (https://github.com/zeroclipboard)
-  Inclusive of: ZeroClipboard.*
-  Version used: 1.3.1
-  Used under the following license: The MIT License (http://opensource.org/licenses/MIT)
-  Copyright (c) Jon Rohan, James M. Greene (2014)
-
-
----------------------------------------------------
-
-(3) Licenses for bundled software
-
-Contents:
-
-  The BSD 2-Clause License
-  The BSD 3-Clause License ("New BSD")
-  The MIT License ("MIT")
-
-
-The BSD 2-Clause License
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are met:
-  
-  1. Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimer.
-  
-  2. Redistributions in binary form must reproduce the above copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-  
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-  
-
-The BSD 3-Clause License ("New BSD")
-
-  Redistribution and use in source and binary forms, with or without modification,
-  are permitted provided that the following conditions are met:
-  
-  1. Redistributions of source code must retain the above copyright notice, 
-  this list of conditions and the following disclaimer.
-  
-  2. Redistributions in binary form must reproduce the above copyright notice, 
-  this list of conditions and the following disclaimer in the documentation 
-  and/or other materials provided with the distribution.
-  
-  3. Neither the name of the copyright holder nor the names of its contributors 
-  may be used to endorse or promote products derived from this software without 
-  specific prior written permission.
-  
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
-  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
-  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
-  POSSIBILITY OF SUCH DAMAGE.
-  
-
-The MIT License ("MIT")
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy
-  of this software and associated documentation files (the "Software"), to deal
-  in the Software without restriction, including without limitation the rights
-  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-  copies of the Software, and to permit persons to whom the Software is
-  furnished to do so, subject to the following conditions:
-  
-  The above copyright notice and this permission notice shall be included in
-  all copies or substantial portions of the Software.
-  
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-  THE SOFTWARE.
-  
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/NOTICE
----------------------------------------------------------------------
diff --git a/brooklyn-library/NOTICE b/brooklyn-library/NOTICE
deleted file mode 100644
index f790f13..0000000
--- a/brooklyn-library/NOTICE
+++ /dev/null
@@ -1,5 +0,0 @@
-Apache Brooklyn
-Copyright 2014-2015 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/README.md
----------------------------------------------------------------------
diff --git a/brooklyn-library/README.md b/brooklyn-library/README.md
deleted file mode 100644
index f2fd833..0000000
--- a/brooklyn-library/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-
-# [![**Brooklyn**](https://brooklyn.apache.org/style/img/apache-brooklyn-logo-244px-wide.png)](http://brooklyn.apache.org/)
-
-### Library of Entities for Apache Brooklyn
-
-This sub-project contains various entities not *needed* for Brooklyn,
-but useful in practice as building blocks, including entities for webapps,
-datastores, and more.
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/global-web-fabric/.gitignore
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/global-web-fabric/.gitignore b/brooklyn-library/examples/global-web-fabric/.gitignore
deleted file mode 100644
index 14fb0b8..0000000
--- a/brooklyn-library/examples/global-web-fabric/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-brooklyn-example-global-web-fabric/
-brooklyn-example-global-web-fabric.tar.gz
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/global-web-fabric/README.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/global-web-fabric/README.txt b/brooklyn-library/examples/global-web-fabric/README.txt
deleted file mode 100644
index 0d3ee8b..0000000
--- a/brooklyn-library/examples/global-web-fabric/README.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-Instructions for running examples
-=================================
-
-The commands below assume that the `brooklyn` script is on your $PATH, this project has been built,
-and you are in this directory.  Adjust to taste for other configurations.
-
-  export BROOKLYN_CLASSPATH=$(pwd)/target/classes
-
-  # Launch the app in aws-ec2 regions eu-west-1 and us-east-1
-  brooklyn launch --app org.apache.brooklyn.demo.GlobalWebFabricExample --location "aws-ec2:eu-west-1,aws-ec2:us-east-1"
-
----
-
-The aws-ec2 credentials are retrieved from ~/.brooklyn/brooklyn.properties
-
-This file should contain something like:
-  brooklyn.jclouds.aws-ec2.identity=AKA50M30N3S1DFR0MAW55
-  brooklyn.jclouds.aws-ec2.credential=aT0Ps3cr3tC0D3wh1chAW5w1llG1V3y0uTOus333
-
-Brooklyn defaults to using ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.
-
----
-
-For more information please visit https://brooklyn.incubator.apache.org/.
-
-----
-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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/global-web-fabric/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/global-web-fabric/pom.xml b/brooklyn-library/examples/global-web-fabric/pom.xml
deleted file mode 100644
index 2ddda90..0000000
--- a/brooklyn-library/examples/global-web-fabric/pom.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>jar</packaging>
-    <artifactId>brooklyn-example-global-web-fabric</artifactId>
-    <name>Brooklyn Global Web Fabric Example</name>
-
-    <parent>
-        <groupId>org.apache.brooklyn.example</groupId>
-        <artifactId>brooklyn-examples-parent</artifactId>
-        <version>0.9.0-SNAPSHOT</version>   <!-- BROOKLYN_VERSION -->
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-launcher</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-webapp</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <!-- copy the WAR so it is available on the classpath for programmatic deployment -->
-                <executions>
-                    <execution>
-                        <id>copy</id>
-                        <phase>process-classes</phase>
-                        <goals>
-                            <goal>copy</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <!-- this can fail in eclipse trying to copy _from_ target/classes.
-                                         see http://jira.codehaus.org/browse/MDEP-259 -->
-                                    <groupId>org.apache.brooklyn.example</groupId>
-                                    <artifactId>brooklyn-example-hello-world-webapp</artifactId>
-                                    <version>${project.version}</version>
-                                    <type>war</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>target/classes</outputDirectory>
-                                    <destFileName>hello-world-webapp.war</destFileName>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <artifactId>maven-clean-plugin</artifactId>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${project.basedir}</directory>
-							<includes>
-                                <include>${project.artifactId}/</include>
-                                <include>brooklyn*.log</include>
-                                <include>brooklyn*.log.*</include>
-                                <include>stacktrace.log</include>
-                            </includes>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-        
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/global-web-fabric/resources/vmc-delete-all.sh
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/global-web-fabric/resources/vmc-delete-all.sh b/brooklyn-library/examples/global-web-fabric/resources/vmc-delete-all.sh
deleted file mode 100755
index f90ce02..0000000
--- a/brooklyn-library/examples/global-web-fabric/resources/vmc-delete-all.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-# deletes all vmc applications against the current target (if no args) or against all targets specified
-
-vmc_delete_all() {
-  for x in `vmc apps | grep brooklyn | awk '{print $2}'` ; do vmc delete $x ; done  
-}
-
-if [ -z "$1" ]; then
-  vmc_delete_all
-else
-  for x in $@ ; do
-    vmc target $x
-    vmc_delete_all
-  done
-fi

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/global-web-fabric/src/main/java/org/apache/brooklyn/demo/GlobalWebFabricExample.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/global-web-fabric/src/main/java/org/apache/brooklyn/demo/GlobalWebFabricExample.java b/brooklyn-library/examples/global-web-fabric/src/main/java/org/apache/brooklyn/demo/GlobalWebFabricExample.java
deleted file mode 100644
index 99faf04..0000000
--- a/brooklyn-library/examples/global-web-fabric/src/main/java/org/apache/brooklyn/demo/GlobalWebFabricExample.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.catalog.CatalogConfig;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.config.StringConfigMap;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.dns.geoscaling.GeoscalingDnsService;
-import org.apache.brooklyn.entity.group.DynamicRegionsFabric;
-import org.apache.brooklyn.entity.proxy.AbstractController;
-import org.apache.brooklyn.entity.webapp.ElasticJavaWebAppService;
-import org.apache.brooklyn.entity.webapp.JavaWebAppService;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.util.CommandLineUtil;
-import org.apache.brooklyn.util.core.BrooklynMavenArtifacts;
-import org.apache.brooklyn.util.core.ResourceUtils;
-
-import com.google.common.base.Joiner;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-
-@Catalog(name="Global Web Fabric",
-description="Deploys a WAR to multiple clusters, showing how Brooklyn fabrics work",
-iconUrl="classpath://brooklyn/demo/glossy-3d-blue-web-icon.png")
-public class GlobalWebFabricExample extends AbstractApplication {
-
-    public static final Logger log = LoggerFactory.getLogger(GlobalWebFabricExample.class);
-    
-    static final List<String> DEFAULT_LOCATIONS = ImmutableList.of(
-            "aws-ec2:eu-west-1",
-            "aws-ec2:ap-southeast-1",
-            "aws-ec2:us-west-1" );
-    
-    public static final String DEFAULT_WAR_PATH = ResourceUtils.create(GlobalWebFabricExample.class)
-        // take this war, from the classpath, or via maven if not on the classpath
-        .firstAvailableUrl(
-                "classpath://hello-world-webapp.war",
-                BrooklynMavenArtifacts.localUrl("example", "brooklyn-example-hello-world-webapp", "war"))
-        .or("classpath://hello-world-webapp.war");
-
-    @CatalogConfig(label="WAR (URL)", priority=2)
-    public static final ConfigKey<String> WAR_PATH = ConfigKeys.newConfigKey(
-        "app.war", "URL to the application archive which should be deployed", 
-        DEFAULT_WAR_PATH);    
-
-    // load-balancer instances must run on some port to work with GeoDNS, port 80 to work without special, so make that default
-    // (but included here in case it runs on a different port on all machines, or use a range to work with multiple localhosts)
-    @CatalogConfig(label="Proxy server HTTP port")
-    public static final PortAttributeSensorAndConfigKey PROXY_HTTP_PORT =
-        new PortAttributeSensorAndConfigKey(AbstractController.PROXY_HTTP_PORT, PortRanges.fromInteger(80));
-    
-    @Override
-    public void initApp() {
-        StringConfigMap config = getManagementContext().getConfig();
-        
-        GeoscalingDnsService geoDns = addChild(EntitySpec.create(GeoscalingDnsService.class)
-                .displayName("GeoScaling DNS")
-                .configure("username", checkNotNull(config.getFirst("brooklyn.geoscaling.username"), "username"))
-                .configure("password", checkNotNull(config.getFirst("brooklyn.geoscaling.password"), "password"))
-                .configure("primaryDomainName", checkNotNull(config.getFirst("brooklyn.geoscaling.primaryDomain"), "primaryDomain")) 
-                .configure("smartSubdomainName", "brooklyn"));
-        
-        DynamicRegionsFabric webFabric = addChild(EntitySpec.create(DynamicRegionsFabric.class)
-                .displayName("Web Fabric")
-                .configure(DynamicRegionsFabric.FACTORY, new ElasticJavaWebAppService.Factory())
-                
-                //specify the WAR file to use
-                .configure(JavaWebAppService.ROOT_WAR, Entities.getRequiredUrlConfig(this, WAR_PATH)) );
-
-        //tell GeoDNS what to monitor
-        geoDns.setTargetEntityProvider(webFabric);
-    }
-
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String locations = CommandLineUtil.getCommandLineOption(args, "--locations", Joiner.on(",").join(DEFAULT_LOCATIONS));
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(StartableApplication.class, GlobalWebFabricExample.class).displayName("Brooklyn Global Web Fabric Example"))
-                .webconsolePort(port)
-                .locations(Arrays.asList(locations))
-                .start();
-         
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/global-web-fabric/src/main/java/org/apache/brooklyn/demo/ReadMe.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/global-web-fabric/src/main/java/org/apache/brooklyn/demo/ReadMe.java b/brooklyn-library/examples/global-web-fabric/src/main/java/org/apache/brooklyn/demo/ReadMe.java
deleted file mode 100644
index 6858630..0000000
--- a/brooklyn-library/examples/global-web-fabric/src/main/java/org/apache/brooklyn/demo/ReadMe.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-public class ReadMe {
-
-/* This class exists only so that javadoc is generated and artifacts can be staged at sonatype for deployment to maven central.
- * See: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
- *
- * (The actual examples are in other classes in this package / project.) */
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/pom.xml b/brooklyn-library/examples/pom.xml
deleted file mode 100644
index 08a2070..0000000
--- a/brooklyn-library/examples/pom.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>pom</packaging>
-
-    <groupId>org.apache.brooklyn.example</groupId>
-    <artifactId>brooklyn-examples-parent</artifactId>
-
-    <name>Brooklyn Examples Aggregator Project</name>
-    <description>
-        Brooklyn examples module, building the Brooklyn examples.
-    </description>
-
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version>   <!-- BROOKLYN_VERSION -->
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modules>
-        <module>webapps</module>
-        <module>simple-web-cluster</module>
-        <module>global-web-fabric</module>
-        <module>simple-messaging-pubsub</module>
-        <module>simple-nosql-cluster</module>
-    </modules>
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-messaging-pubsub/.gitignore
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-messaging-pubsub/.gitignore b/brooklyn-library/examples/simple-messaging-pubsub/.gitignore
deleted file mode 100644
index 7a8040d..0000000
--- a/brooklyn-library/examples/simple-messaging-pubsub/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-resources/lib/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-messaging-pubsub/README.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-messaging-pubsub/README.txt b/brooklyn-library/examples/simple-messaging-pubsub/README.txt
deleted file mode 100644
index 299695f..0000000
--- a/brooklyn-library/examples/simple-messaging-pubsub/README.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-Instructions for running examples
-=================================
-
-The commands below assume that the `brooklyn` script is already on your $PATH, and you are in the "examples" directory:
-
-  cd simple-messaging-pubsub
-  export BROOKLYN_CLASSPATH=$(pwd)/target/classes
-  
-  # Launches a qpid broker on localhost
-  brooklyn -v launch --app org.apache.brooklyn.demo.StandaloneQpidBrokerExample --location localhost
-
-  # You can get the broker's URL from the brooklyn web-console at http://localhost:8081
-  # by looking at the broker entity's sensors or from the verbose output from the application startup
-  URL="amqp://guest:guest@/localhost?brokerlist='tcp://localhost:5672'"
-
-  # Test subscribing, to receive a message from the broker
-  java -cp "./resources/lib/*:./target/classes" org.apache.brooklyn.demo.Subscribe ${URL}
-
-  # Test publishing a message to the broker
-  java -cp "./resources/lib/*:./target/classes" org.apache.brooklyn.demo.Publish ${URL}
-
-To test a Kafka distributed messaging cluster example, use the following command:
-
-  # Launches a Kafka cluster on AWS EC2 with two brokers
-  brooklyn -v launch --app org.apache.brooklyn.demo.KafkaClusterExample --location aws-ec2:eu-west-1
-
----
-
-For more information please visit https://brooklyn.incubator.apache.org/.
-
-----
-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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-messaging-pubsub/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-messaging-pubsub/pom.xml b/brooklyn-library/examples/simple-messaging-pubsub/pom.xml
deleted file mode 100644
index 094675d..0000000
--- a/brooklyn-library/examples/simple-messaging-pubsub/pom.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>jar</packaging>
-    <artifactId>brooklyn-example-simple-messaging-pubsub</artifactId>
-    <name>Brooklyn Simple Messaging Publish-Subscribe Example</name>
-
-    <parent>
-        <groupId>org.apache.brooklyn.example</groupId>
-        <artifactId>brooklyn-examples-parent</artifactId>
-        <version>0.9.0-SNAPSHOT</version>   <!-- BROOKLYN_VERSION -->
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <repositories>
-        <repository>
-            <id>oracle</id>
-            <url>http://download.oracle.com/maven</url>
-        </repository>
-    </repositories>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-launcher</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-messaging</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jms_1.1_spec</artifactId>
-            <version>${geronimo-jms_1.1_spec.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.qpid</groupId>
-            <artifactId>qpid-client</artifactId>
-            <version>${qpid.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy</id>
-                        <phase>process-classes</phase>
-                        <goals>
-                            <goal>copy</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.apache.qpid</groupId>
-                                    <artifactId>qpid-bdbstore</artifactId>
-                                    <version>${qpid.version}</version>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>com.sleepycat</groupId>
-                                    <artifactId>je</artifactId>
-                                    <version>${sleepycat-je.version}</version>
-                                </artifactItem>
-                            </artifactItems>
-                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>copy-dependencies</id>
-                        <phase>process-classes</phase>
-                        <goals>
-                            <goal>copy-dependencies</goal>
-                        </goals>
-                        <configuration>
-                            <includeArtifactIds>
-                                geronimo-jms_1.1_spec,guava,jsr305,log4j,qpid-client,qpid-common,slf4j-api,slf4j-log4j12
-                            </includeArtifactIds>
-                            <outputDirectory>${project.basedir}/resources/lib</outputDirectory>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <artifactId>maven-clean-plugin</artifactId>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${project.basedir}</directory>
-							<includes>
-                                <include>${project.artifactId}/</include>
-                                <include>brooklyn*.log</include>
-                                <include>brooklyn*.log.*</include>
-                                <include>stacktrace.log</include>
-                                <include>resources/lib/</include>
-                            </includes>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/KafkaClusterExample.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/KafkaClusterExample.java b/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/KafkaClusterExample.java
deleted file mode 100644
index 5c5afb2..0000000
--- a/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/KafkaClusterExample.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import java.util.List;
-
-import org.apache.brooklyn.entity.messaging.kafka.KafkaCluster;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-/** Kafka Cluster Application */
-public class KafkaClusterExample extends ApplicationBuilder {
-
-    public static final String DEFAULT_LOCATION = "localhost";
-
-    /** Configure the application. */
-    protected void doBuild() {
-        addChild(EntitySpec.create(KafkaCluster.class)
-                .configure("startTimeout", 300) // 5 minutes
-                .configure("initialSize", 2));
-        // TODO set application display name?
-    }
-
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION);
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(new KafkaClusterExample().appDisplayName("Kafka cluster application"))
-                .webconsolePort(port)
-                .location(location)
-                .start();
-
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/Publish.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/Publish.java b/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/Publish.java
deleted file mode 100644
index 8a68061..0000000
--- a/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/Publish.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import javax.jms.Connection;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.qpid.client.AMQConnectionFactory;
-import org.apache.qpid.configuration.ClientProperties;
-
-import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
-
-/** Publishes messages to a queue on a Qpid broker at a given URL. */
-public class Publish {
-    public static final String QUEUE = "'amq.direct'/'testQueue'; { node: { type: queue } }";
-        
-    public static void main(String...argv) throws Exception {
-        Preconditions.checkElementIndex(0, argv.length, "Must specify broker URL");
-        String url = argv[0];
-        
-        // Set Qpid client properties
-        System.setProperty(ClientProperties.AMQP_VERSION, "0-10");
-        System.setProperty(ClientProperties.DEST_SYNTAX, "ADDR");
-
-        // Connect to the broker
-        AMQConnectionFactory factory = new AMQConnectionFactory(url);
-        Connection connection = factory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        
-        try {
-            // Create a producer for the queue
-            Queue destination = session.createQueue(QUEUE);
-            MessageProducer messageProducer = session.createProducer(destination);
-
-            // Send 100 messages
-            for (int n = 0; n < 100; n++) {
-                String body = String.format("test message %03d", n+1);
-                TextMessage message = session.createTextMessage(body);
-                messageProducer.send(message);
-                System.out.printf("Sent message %s\n", body);
-            }
-        } catch (Exception e) {
-            System.err.printf("Error while sending - %s\n", e.getMessage());
-            System.err.printf("Cause: %s\n", Throwables.getStackTraceAsString(e));
-        } finally {
-            session.close();
-            connection.close();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/StandaloneQpidBrokerExample.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/StandaloneQpidBrokerExample.java b/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/StandaloneQpidBrokerExample.java
deleted file mode 100644
index 98f7acb..0000000
--- a/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/StandaloneQpidBrokerExample.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import java.util.List;
-
-import org.apache.brooklyn.entity.messaging.amqp.AmqpServer;
-import org.apache.brooklyn.entity.messaging.qpid.QpidBroker;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-
-/** Qpid Broker Application */
-public class StandaloneQpidBrokerExample extends AbstractApplication {
-
-    public static final String CUSTOM_CONFIG_PATH = "classpath://custom-config.xml";
-    public static final String PASSWD_PATH = "classpath://passwd";
-    public static final String QPID_BDBSTORE_JAR_PATH = "classpath://qpid-bdbstore-0.20.jar";
-    public static final String BDBSTORE_JAR_PATH = "classpath://je-5.0.34.jar";
-
-    public static final String DEFAULT_LOCATION = "localhost";
-    
-    @Override
-    public void initApp() {
-        // Configure the Qpid broker entity
-        QpidBroker broker = addChild(EntitySpec.create(QpidBroker.class)
-                .configure("amqpPort", 5672)
-                .configure("amqpVersion", AmqpServer.AMQP_0_10)
-                .configure("runtimeFiles", ImmutableMap.builder()
-                        .put(CUSTOM_CONFIG_PATH, QpidBroker.CONFIG_XML)
-                        .put(PASSWD_PATH, QpidBroker.PASSWD)
-                        .put(QPID_BDBSTORE_JAR_PATH, "lib/opt/qpid-bdbstore-0.20.jar")
-                        .put(BDBSTORE_JAR_PATH, "lib/opt/je-5.0.34.jar")
-                        .build())
-                .configure("queue", "testQueue"));
-    }
-
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION);
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(StartableApplication.class, StandaloneQpidBrokerExample.class).displayName("Qpid app"))
-                .webconsolePort(port)
-                .location(location)
-                .start();
-         
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/Subscribe.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/Subscribe.java b/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/Subscribe.java
deleted file mode 100644
index b7df104..0000000
--- a/brooklyn-library/examples/simple-messaging-pubsub/src/main/java/org/apache/brooklyn/demo/Subscribe.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.qpid.client.AMQConnectionFactory;
-import org.apache.qpid.configuration.ClientProperties;
-
-import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
-
-/** Receives messages from a queue on a Qpid broker at a given URL. */
-public class Subscribe {
-    public static final String QUEUE = "'amq.direct'/'testQueue'; { node: { type: queue } }";
-    private static final long MESSAGE_TIMEOUT_MILLIS = 15000L;
-    private static final int MESSAGE_COUNT = 100;
-    
-    public static void main(String...argv) throws Exception {
-        Preconditions.checkElementIndex(0, argv.length, "Must specify broker URL");
-        String url = argv[0];
-
-        // Set Qpid client properties
-        System.setProperty(ClientProperties.AMQP_VERSION, "0-10");
-        System.setProperty(ClientProperties.DEST_SYNTAX, "ADDR");
-
-        // Connect to the broker
-        AMQConnectionFactory factory = new AMQConnectionFactory(url);
-        Connection connection = factory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        System.out.printf("Waiting up to %s milliseconds to receive %s messages\n", MESSAGE_TIMEOUT_MILLIS, MESSAGE_COUNT);
-        try {
-            // Create a producer for the queue
-            Queue destination = session.createQueue(QUEUE);
-            MessageConsumer messageConsumer = session.createConsumer(destination);
-
-            // Try and receive 100 messages
-            for (int n = 0; n < MESSAGE_COUNT; n++) {
-                TextMessage msg = (TextMessage) messageConsumer.receive(MESSAGE_TIMEOUT_MILLIS);
-                if (msg == null) {
-                    System.out.printf("No message received in %s milliseconds, exiting", MESSAGE_TIMEOUT_MILLIS);
-                    break;
-                }
-                System.out.printf("Got message %d: '%s'\n", n+1, msg.getText());
-            }
-        } catch (Exception e) {
-            System.err.printf("Error while receiving - %s\n", e.getMessage());
-            System.err.printf("Cause: %s\n", Throwables.getStackTraceAsString(e));
-        } finally {
-            session.close();
-            connection.close();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-messaging-pubsub/src/main/resources/custom-config.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-messaging-pubsub/src/main/resources/custom-config.xml b/brooklyn-library/examples/simple-messaging-pubsub/src/main/resources/custom-config.xml
deleted file mode 100644
index f3a65f6..0000000
--- a/brooklyn-library/examples/simple-messaging-pubsub/src/main/resources/custom-config.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?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.
--->
-<broker>
-    <plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory>
-    <cache-directory>${QPID_HOME}/cache</cache-directory>
-	<connector>
-		<ssl>
-			<enabled>false</enabled>
-		</ssl>
-	</connector>
-	<management>
-		<enabled>true</enabled>
-		<ssl>
-			<enabled>false</enabled>
-		</ssl>
-	</management>
-	<security>
-		<pd-auth-manager>
-			<principal-database>
-				<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>
-				<attributes>
-					<attribute>
-						<name>passwordFile</name>
-						<value>${QPID_HOME}/etc/passwd</value>
-					</attribute>
-				</attributes>
-			</principal-database>
-		</pd-auth-manager>
-		<allow-all />
-		<msg-auth>false</msg-auth>
-	</security>
-	<virtualhosts>
-		<default>localhost</default>
-		<virtualhost>
-			<name>localhost</name>
-			<localhost>
-				<store>
-                    <class>org.apache.qpid.server.store.berkeleydb.BDBMessageStore</class>
-                    <environment-path>${QPID_HOME}/store/localhost</environment-path>
-                </store>
-			</localhost>
-		</virtualhost>
-	</virtualhosts>
-	<queue>
-		<auto_register>true</auto_register>
-	</queue>
-	<status-updates>ON</status-updates>
-</broker>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-messaging-pubsub/src/main/resources/passwd
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-messaging-pubsub/src/main/resources/passwd b/brooklyn-library/examples/simple-messaging-pubsub/src/main/resources/passwd
deleted file mode 100644
index a0f70ee..0000000
--- a/brooklyn-library/examples/simple-messaging-pubsub/src/main/resources/passwd
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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.
-#
-# Custom password file
-
-guest:guest
-admin:password

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/.gitignore
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/.gitignore b/brooklyn-library/examples/simple-nosql-cluster/.gitignore
deleted file mode 100644
index 7a8040d..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-resources/lib/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/README.md
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/README.md b/brooklyn-library/examples/simple-nosql-cluster/README.md
deleted file mode 100644
index 55659da..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/README.md
+++ /dev/null
@@ -1,41 +0,0 @@
-Instructions for running examples
-=================================
-
-The commands below assume that the `brooklyn` script is already on your $PATH, and you are in the `examples` directory:
-
-    cd simple-nosql-cluster
-    export BROOKLYN_CLASSPATH=$(pwd)/target/classes
-    
-    # Launches a Redis cluster on AWS EC2
-    brooklyn -v launch --app org.apache.brooklyn.demo.SimpleRedisCluster --location aws-ec2:eu-west-1
-    
-    # Launches a Cassandra cluster on AWS EC2
-    brooklyn -v launch --app org.apache.brooklyn.demo.SimpleCassandraCluster --location aws-ec2:eu-west-1
-    
-    # Launches a CouchDB cluster on AWS EC2
-    brooklyn -v launch --app org.apache.brooklyn.demo.SimpleCouchDBCluster --location aws-ec2:eu-west-1
-    
-    # Launches a CumulusRDF application backed by a cassandra cluster on AWS EC2
-    brooklyn -v launch --app org.apache.brooklyn.demo.CumulusRDFApplication --location aws-ec2:eu-west-1
-
---------
-
-For more information please visit https://brooklyn.incubator.apache.org/.
-
-----
-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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/pom.xml b/brooklyn-library/examples/simple-nosql-cluster/pom.xml
deleted file mode 100644
index 7ecfc8c..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/pom.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>jar</packaging>
-    <artifactId>brooklyn-example-simple-nosql-cluster</artifactId>
-
-    <name>Brooklyn NoSQL Cluster Examples</name>
-    <description>
-        Various NoSQL cluster-based applications, managed by Brooklyn.
-    </description>
-
-    <parent>
-        <groupId>org.apache.brooklyn.example</groupId>
-        <artifactId>brooklyn-examples-parent</artifactId>
-        <version>0.9.0-SNAPSHOT</version>   <!-- BROOKLYN_VERSION -->
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-launcher</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-messaging</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-nosql</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-logback-xml</artifactId>
-            <version>${project.version}</version>
-            <optional>true</optional>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-clean-plugin</artifactId>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${project.basedir}</directory>
-                            <includes>
-                                <include>${project.artifactId}/</include>
-                                <include>brooklyn*.log</include>
-                                <include>brooklyn*.log.*</include>
-                                <include>stacktrace.log</include>
-                                <include>resources/lib/</include>
-                            </includes>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptors>
-                        <descriptor>src/main/assembly/assembly.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/assembly/assembly.xml b/brooklyn-library/examples/simple-nosql-cluster/src/main/assembly/assembly.xml
deleted file mode 100644
index 5c82d26..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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.
--->
-<assembly>
-    <id>dist</id>
-    <formats>
-        <format>dir</format>
-        <format>tar.gz</format>
-    </formats>
-
-    <!-- Adds dependencies to zip package under lib directory -->
-    <dependencySets>
-        <dependencySet>
-            <useProjectArtifact>false</useProjectArtifact>
-            <outputDirectory>lib</outputDirectory>
-            <unpack>false</unpack>
-        </dependencySet>
-    </dependencySets>
-
-    <fileSets>
-        <fileSet>
-            <directory>src/main/assembly/scripts</directory>
-            <outputDirectory></outputDirectory>
-            <fileMode>0755</fileMode>
-            <includes>
-                <include>*</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>src/main/assembly/files</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>**</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>target</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>*.jar</include>
-            </includes>
-            <excludes>
-                <exclude>*-tests.jar</exclude>
-            </excludes>
-        </fileSet>
-    </fileSets>
-</assembly>
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/assembly/files/conf/logback.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/assembly/files/conf/logback.xml b/brooklyn-library/examples/simple-nosql-cluster/src/main/assembly/files/conf/logback.xml
deleted file mode 100644
index ddaa20c..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/assembly/files/conf/logback.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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>
-
-  <!-- logging configuration for this project; edit this file as required, or override the files 
-       this includes as described in the Logging section of the brooklyn users guide.
-       this project already supplies a logback-custom.xml which gets included to log our
-       classes at debug level and write to a log file named after this project -->
-
-  <include resource="logback-main.xml"/>
-  
-</configuration>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/assembly/scripts/start.sh
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/assembly/scripts/start.sh b/brooklyn-library/examples/simple-nosql-cluster/src/main/assembly/scripts/start.sh
deleted file mode 100755
index c7ff6d9..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/assembly/scripts/start.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-if [ ! -z "$JAVA_HOME" ] ; then 
-    JAVA=$JAVA_HOME/bin/java
-else
-    JAVA=`which java`
-fi
-
-if [ ! -x "$JAVA" ] ; then
-  echo Cannot find java. Set JAVA_HOME or add java to path.
-  exit 1
-fi
-
-if [[ ! `ls brooklyn-*.jar 2> /dev/null` ]] ; then
-  echo Command must be run from the directory where the JAR is installed.
-  exit 4
-fi
-
-$JAVA -Xms256m -Xmx1024m -XX:MaxPermSize=1024m \
-    -classpath "conf/:*:lib/*" \
-    org.apache.brooklyn.cli.Main \
-    "$@"


[17/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterImpl.java
deleted file mode 100644
index 79003c2..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterImpl.java
+++ /dev/null
@@ -1,629 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.annotation.Nullable;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.core.effector.EffectorBody;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.EntityPredicates;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic.ServiceNotUpLogic;
-import org.apache.brooklyn.core.location.Machines;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.group.AbstractMembershipTrackingPolicy;
-import org.apache.brooklyn.entity.group.DynamicClusterImpl;
-import org.apache.brooklyn.entity.group.DynamicGroup;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.util.collections.MutableList;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.collections.MutableSet;
-import org.apache.brooklyn.util.core.ResourceUtils;
-import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.Time;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Optional;
-import com.google.common.base.Supplier;
-import com.google.common.base.Throwables;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.LinkedHashMultimap;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Multimap;
-import com.google.common.collect.Sets;
-import com.google.common.net.HostAndPort;
-
-/**
- * Implementation of {@link CassandraDatacenter}.
- * <p>
- * Several subtleties to note:
- * - a node may take some time after it is running and serving JMX to actually be contactable on its thrift port
- *   (so we wait for thrift port to be contactable)
- * - sometimes new nodes take a while to peer, and/or take a while to get a consistent schema
- *   (each up to 1m; often very close to the 1m) 
- */
-public class CassandraDatacenterImpl extends DynamicClusterImpl implements CassandraDatacenter {
-
-    /*
-     * TODO Seed management is hard!
-     *  - The ServiceRestarter is not doing customize(), so is not refreshing the seeds in cassandra.yaml.
-     *    If we have two nodes that were seeds for each other and they both restart at the same time, we'll have a split brain.
-     */
-    
-    private static final Logger log = LoggerFactory.getLogger(CassandraDatacenterImpl.class);
-
-    // Mutex for synchronizing during re-size operations
-    private final Object mutex = new Object[0];
-
-    private final Supplier<Set<Entity>> defaultSeedSupplier = new Supplier<Set<Entity>>() {
-        // Mutex for (re)calculating our seeds
-        // TODO is this very dangerous?! Calling out to SeedTracker, which calls out to alien getAttribute()/getConfig(). But I think that's ok.
-        // TODO might not need mutex? previous race was being caused by something else, other than concurrent calls!
-        private final Object seedMutex = new Object();
-        
-        @Override
-        public Set<Entity> get() {
-            synchronized (seedMutex) {
-                boolean hasPublishedSeeds = Boolean.TRUE.equals(getAttribute(HAS_PUBLISHED_SEEDS));
-                int quorumSize = getSeedQuorumSize();
-                Set<Entity> potentialSeeds = gatherPotentialSeeds();
-                Set<Entity> potentialRunningSeeds = gatherPotentialRunningSeeds();
-                boolean stillWaitingForQuorum = (!hasPublishedSeeds) && (potentialSeeds.size() < quorumSize);
-                
-                if (stillWaitingForQuorum) {
-                    if (log.isDebugEnabled()) log.debug("Not refreshed seeds of cluster {}, because still waiting for quorum (need {}; have {} potentials)", new Object[] {CassandraDatacenterImpl.class, quorumSize, potentialSeeds.size()});
-                    return ImmutableSet.of();
-                } else if (hasPublishedSeeds) {
-                    Set<Entity> currentSeeds = getAttribute(CURRENT_SEEDS);
-                    if (getAttribute(SERVICE_STATE_ACTUAL) == Lifecycle.STARTING) {
-                        if (Sets.intersection(currentSeeds, potentialSeeds).isEmpty()) {
-                            log.warn("Cluster {} lost all its seeds while starting! Subsequent failure likely, but changing seeds during startup would risk split-brain: seeds={}", new Object[] {CassandraDatacenterImpl.this, currentSeeds});
-                        }
-                        return currentSeeds;
-                    } else if (potentialRunningSeeds.isEmpty()) {
-                        // TODO Could be race where nodes have only just returned from start() and are about to 
-                        // transition to serviceUp; so don't just abandon all our seeds!
-                        log.warn("Cluster {} has no running seeds (yet?); leaving seeds as-is; but risks split-brain if these seeds come back up!", new Object[] {CassandraDatacenterImpl.this});
-                        return currentSeeds;
-                    } else {
-                        Set<Entity> result = trim(quorumSize, potentialRunningSeeds);
-                        log.debug("Cluster {} updating seeds: chosen={}; potentialRunning={}", new Object[] {CassandraDatacenterImpl.this, result, potentialRunningSeeds});
-                        return result;
-                    }
-                } else {
-                    Set<Entity> result = trim(quorumSize, potentialSeeds);
-                    if (log.isDebugEnabled()) log.debug("Cluster {} has reached seed quorum: seeds={}", new Object[] {CassandraDatacenterImpl.this, result});
-                    return result;
-                }
-            }
-        }
-        private Set<Entity> trim(int num, Set<Entity> contenders) {
-            // Prefer existing seeds wherever possible; otherwise accept any other contenders
-            Set<Entity> currentSeeds = (getAttribute(CURRENT_SEEDS) != null) ? getAttribute(CURRENT_SEEDS) : ImmutableSet.<Entity>of();
-            Set<Entity> result = Sets.newLinkedHashSet();
-            result.addAll(Sets.intersection(currentSeeds, contenders));
-            result.addAll(contenders);
-            return ImmutableSet.copyOf(Iterables.limit(result, num));
-        }
-    };
-    
-    protected SeedTracker seedTracker = new SeedTracker();
-    protected TokenGenerator tokenGenerator = null;
-
-    public CassandraDatacenterImpl() {
-    }
-
-    @Override
-    public void init() {
-        super.init();
-
-        /*
-         * subscribe to hostname, and keep an accurate set of current seeds in a sensor;
-         * then at nodes we set the initial seeds to be the current seeds when ready (non-empty)
-         */
-        subscriptions().subscribeToMembers(this, Attributes.HOSTNAME, new SensorEventListener<String>() {
-            @Override
-            public void onEvent(SensorEvent<String> event) {
-                seedTracker.onHostnameChanged(event.getSource(), event.getValue());
-            }
-        });
-        subscriptions().subscribe(this, DynamicGroup.MEMBER_REMOVED, new SensorEventListener<Entity>() {
-            @Override public void onEvent(SensorEvent<Entity> event) {
-                seedTracker.onMemberRemoved(event.getValue());
-            }
-        });
-        subscriptions().subscribeToMembers(this, Attributes.SERVICE_UP, new SensorEventListener<Boolean>() {
-            @Override
-            public void onEvent(SensorEvent<Boolean> event) {
-                seedTracker.onServiceUpChanged(event.getSource(), event.getValue());
-            }
-        });
-        subscriptions().subscribeToMembers(this, Attributes.SERVICE_STATE_ACTUAL, new SensorEventListener<Lifecycle>() {
-            @Override
-            public void onEvent(SensorEvent<Lifecycle> event) {
-                // trigger a recomputation also when lifecycle state changes, 
-                // because it might not have ruled a seed as inviable when service up went true 
-                // because service state was not yet running
-                seedTracker.onServiceUpChanged(event.getSource(), Lifecycle.RUNNING==event.getValue());
-            }
-        });
-        
-        // Track the datacenters for this cluster
-        subscriptions().subscribeToMembers(this, CassandraNode.DATACENTER_NAME, new SensorEventListener<String>() {
-            @Override
-            public void onEvent(SensorEvent<String> event) {
-                Entity member = event.getSource();
-                String dcName = event.getValue();
-                if (dcName != null) {
-                    Multimap<String, Entity> datacenterUsage = getAttribute(DATACENTER_USAGE);
-                    Multimap<String, Entity> mutableDatacenterUsage = (datacenterUsage == null) ? LinkedHashMultimap.<String, Entity>create() : LinkedHashMultimap.create(datacenterUsage);
-                    Optional<String> oldDcName = getKeyOfVal(mutableDatacenterUsage, member);
-                    if (!(oldDcName.isPresent() && dcName.equals(oldDcName.get()))) {
-                        mutableDatacenterUsage.values().remove(member);
-                        mutableDatacenterUsage.put(dcName, member);
-                        sensors().set(DATACENTER_USAGE, mutableDatacenterUsage);
-                        sensors().set(DATACENTERS, Sets.newLinkedHashSet(mutableDatacenterUsage.keySet()));
-                    }
-                }
-            }
-            private <K,V> Optional<K> getKeyOfVal(Multimap<K,V> map, V val) {
-                for (Map.Entry<K,V> entry : map.entries()) {
-                    if (Objects.equal(val, entry.getValue())) {
-                        return Optional.of(entry.getKey());
-                    }
-                }
-                return Optional.absent();
-            }
-        });
-        subscriptions().subscribe(this, DynamicGroup.MEMBER_REMOVED, new SensorEventListener<Entity>() {
-            @Override public void onEvent(SensorEvent<Entity> event) {
-                Entity entity = event.getSource();
-                Multimap<String, Entity> datacenterUsage = getAttribute(DATACENTER_USAGE);
-                if (datacenterUsage != null && datacenterUsage.containsValue(entity)) {
-                    Multimap<String, Entity> mutableDatacenterUsage = LinkedHashMultimap.create(datacenterUsage);
-                    mutableDatacenterUsage.values().remove(entity);
-                    sensors().set(DATACENTER_USAGE, mutableDatacenterUsage);
-                    sensors().set(DATACENTERS, Sets.newLinkedHashSet(mutableDatacenterUsage.keySet()));
-                }
-            }
-        });
-        
-        getMutableEntityType().addEffector(EXECUTE_SCRIPT, new EffectorBody<String>() {
-            @Override
-            public String call(ConfigBag parameters) {
-                return executeScript((String)parameters.getStringKey("commands"));
-            }
-        });
-    }
-    
-    protected Supplier<Set<Entity>> getSeedSupplier() {
-        Supplier<Set<Entity>> seedSupplier = getConfig(SEED_SUPPLIER);
-        return (seedSupplier == null) ? defaultSeedSupplier : seedSupplier;
-    }
-    
-    protected boolean useVnodes() {
-        return Boolean.TRUE.equals(getConfig(USE_VNODES));
-    }
-    
-    protected synchronized TokenGenerator getTokenGenerator() {
-        if (tokenGenerator!=null) 
-            return tokenGenerator;
-        
-        try {
-            tokenGenerator = getConfig(TOKEN_GENERATOR_CLASS).newInstance();
-            
-            BigInteger shift = getConfig(TOKEN_SHIFT);
-            if (shift==null) 
-                shift = BigDecimal.valueOf(Math.random()).multiply(
-                    new BigDecimal(tokenGenerator.range())).toBigInteger();
-            tokenGenerator.setOrigin(shift);
-            
-            return tokenGenerator;
-        } catch (Exception e) {
-            throw Throwables.propagate(e);
-        }        
-    }
-    
-    protected int getSeedQuorumSize() {
-        Integer quorumSize = getConfig(INITIAL_QUORUM_SIZE);
-        if (quorumSize!=null && quorumSize>0)
-            return quorumSize;
-        // default 2 is recommended, unless initial size is smaller
-        return Math.min(Math.max(getConfig(INITIAL_SIZE), 1), DEFAULT_SEED_QUORUM);
-    }
-
-    @Override
-    public Set<Entity> gatherPotentialSeeds() {
-        return seedTracker.gatherPotentialSeeds();
-    }
-
-    @Override
-    public Set<Entity> gatherPotentialRunningSeeds() {
-        return seedTracker.gatherPotentialRunningSeeds();
-    }
-
-    /**
-     * Sets the default {@link #MEMBER_SPEC} to describe the Cassandra nodes.
-     */
-    @Override
-    protected EntitySpec<?> getMemberSpec() {
-        return getConfig(MEMBER_SPEC, EntitySpec.create(CassandraNode.class));
-    }
-
-    @Override
-    public String getClusterName() {
-        return getAttribute(CLUSTER_NAME);
-    }
-
-    @Override
-    public Collection<Entity> grow(int delta) {
-        if (useVnodes()) {
-            // nothing to do for token generator
-        } else {
-            if (getCurrentSize() == 0) {
-                getTokenGenerator().growingCluster(delta);
-            }
-        }
-        return super.grow(delta);
-    }
-    
-    @Override
-    protected Entity createNode(@Nullable Location loc, Map<?,?> flags) {
-        Map<Object, Object> allflags = MutableMap.copyOf(flags);
-
-        if (flags.containsKey("token") || flags.containsKey("cassandra.token")) {
-            // TODO Delete in future version; was deprecated in 0.7.0; deleted config key in 0.9.0
-            log.warn("Cassandra token no longer supported - use 'tokens' in "+CassandraDatacenterImpl.this);
-        }
-        if (flags.containsKey(CassandraNode.TOKENS) || flags.containsKey("tokens") || flags.containsKey("cassandra.tokens")) {
-            // leave token config as-is
-        } else if (!useVnodes()) {
-            BigInteger token = getTokenGenerator().newToken();
-            if (token != null) {
-                allflags.put(CassandraNode.TOKENS, ImmutableSet.of(token));
-            }
-        }
-
-        if ((flags.containsKey(CassandraNode.NUM_TOKENS_PER_NODE) || flags.containsKey("numTokensPerNode"))) {
-            // leave num_tokens as-is
-        } else if (useVnodes()) {
-            Integer numTokensPerNode = getConfig(NUM_TOKENS_PER_NODE);
-            allflags.put(CassandraNode.NUM_TOKENS_PER_NODE, numTokensPerNode);
-        } else {
-            allflags.put(CassandraNode.NUM_TOKENS_PER_NODE, 1);
-        }
-        
-        return super.createNode(loc, allflags);
-    }
-
-    @Override
-    protected Entity replaceMember(Entity member, Location memberLoc, Map<?, ?> extraFlags) {
-        Set<BigInteger> oldTokens = ((CassandraNode) member).getTokens();
-        Set<BigInteger> newTokens = (oldTokens != null && oldTokens.size() > 0) ? getTokenGenerator().getTokensForReplacementNode(oldTokens) : null;
-        return super.replaceMember(member, memberLoc,  MutableMap.copyOf(extraFlags).add(CassandraNode.TOKENS, newTokens));
-    }
-
-    @Override
-    public void start(Collection<? extends Location> locations) {
-        Machines.warnIfLocalhost(locations, "CassandraCluster does not support multiple nodes on localhost, " +
-                "due to assumptions Cassandra makes about the use of the same port numbers used across the cluster.");
-
-        // force this to be set - even if it is using the default
-        sensors().set(CLUSTER_NAME, getConfig(CLUSTER_NAME));
-        
-        super.start(locations);
-
-        connectSensors();
-
-        // TODO wait until all nodes which we think are up are consistent 
-        // i.e. all known nodes use the same schema, as reported by
-        // SshEffectorTasks.ssh("echo \"describe cluster;\" | /bin/cassandra-cli");
-        // once we've done that we can revert to using 2 seed nodes.
-        // see CassandraCluster.DEFAULT_SEED_QUORUM
-        // (also ensure the cluster is ready if we are about to run a creation script)
-        Time.sleep(getConfig(DELAY_BEFORE_ADVERTISING_CLUSTER));
-
-        String scriptUrl = getConfig(CassandraNode.CREATION_SCRIPT_URL);
-        if (Strings.isNonEmpty(scriptUrl)) {
-            executeScript(new ResourceUtils(this).getResourceAsString(scriptUrl));
-        }
-
-        update();
-    }
-
-    protected void connectSensors() {
-        connectEnrichers();
-        
-        policies().add(PolicySpec.create(MemberTrackingPolicy.class)
-                .displayName("Cassandra Cluster Tracker")
-                .configure("sensorsToTrack", ImmutableSet.of(Attributes.SERVICE_UP, Attributes.HOSTNAME, CassandraNode.THRIFT_PORT))
-                .configure("group", this));
-    }
-
-    public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy {
-        @Override
-        protected void onEntityChange(Entity member) {
-            if (log.isDebugEnabled()) log.debug("Node {} updated in Cluster {}", member, this);
-            ((CassandraDatacenterImpl)entity).update();
-        }
-        @Override
-        protected void onEntityAdded(Entity member) {
-            if (log.isDebugEnabled()) log.debug("Node {} added to Cluster {}", member, this);
-            ((CassandraDatacenterImpl)entity).update();
-        }
-        @Override
-        protected void onEntityRemoved(Entity member) {
-            if (log.isDebugEnabled()) log.debug("Node {} removed from Cluster {}", member, this);
-            ((CassandraDatacenterImpl)entity).update();
-        }
-    };
-
-    @SuppressWarnings("unchecked")
-    protected void connectEnrichers() {
-        List<? extends List<? extends AttributeSensor<? extends Number>>> summingEnricherSetup = ImmutableList.of(
-                ImmutableList.of(CassandraNode.READ_ACTIVE, READ_ACTIVE),
-                ImmutableList.of(CassandraNode.READ_PENDING, READ_PENDING),
-                ImmutableList.of(CassandraNode.WRITE_ACTIVE, WRITE_ACTIVE),
-                ImmutableList.of(CassandraNode.WRITE_PENDING, WRITE_PENDING)
-        );
-        
-        List<? extends List<? extends AttributeSensor<? extends Number>>> averagingEnricherSetup = ImmutableList.of(
-                ImmutableList.of(CassandraNode.READS_PER_SECOND_LAST, READS_PER_SECOND_LAST_PER_NODE),
-                ImmutableList.of(CassandraNode.WRITES_PER_SECOND_LAST, WRITES_PER_SECOND_LAST_PER_NODE),
-                ImmutableList.of(CassandraNode.WRITES_PER_SECOND_IN_WINDOW, WRITES_PER_SECOND_IN_WINDOW_PER_NODE),
-                ImmutableList.of(CassandraNode.READS_PER_SECOND_IN_WINDOW, READS_PER_SECOND_IN_WINDOW_PER_NODE),
-                ImmutableList.of(CassandraNode.THRIFT_PORT_LATENCY, THRIFT_PORT_LATENCY_PER_NODE),
-                ImmutableList.of(CassandraNode.THRIFT_PORT_LATENCY_IN_WINDOW, THRIFT_PORT_LATENCY_IN_WINDOW_PER_NODE),
-                ImmutableList.of(CassandraNode.PROCESS_CPU_TIME_FRACTION_LAST, PROCESS_CPU_TIME_FRACTION_LAST_PER_NODE),
-                ImmutableList.of(CassandraNode.PROCESS_CPU_TIME_FRACTION_IN_WINDOW, PROCESS_CPU_TIME_FRACTION_IN_WINDOW_PER_NODE)
-        );
-        
-        for (List<? extends AttributeSensor<? extends Number>> es : summingEnricherSetup) {
-            AttributeSensor<? extends Number> t = es.get(0);
-            AttributeSensor<? extends Number> total = es.get(1);
-            enrichers().add(Enrichers.builder()
-                    .aggregating(t)
-                    .publishing(total)
-                    .fromMembers()
-                    .computingSum()
-                    .defaultValueForUnreportedSensors(null)
-                    .valueToReportIfNoSensors(null)
-                    .build());
-        }
-        
-        for (List<? extends AttributeSensor<? extends Number>> es : averagingEnricherSetup) {
-            AttributeSensor<Number> t = (AttributeSensor<Number>) es.get(0);
-            AttributeSensor<Double> average = (AttributeSensor<Double>) es.get(1);
-            enrichers().add(Enrichers.builder()
-                    .aggregating(t)
-                    .publishing(average)
-                    .fromMembers()
-                    .computingAverage()
-                    .defaultValueForUnreportedSensors(null)
-                    .valueToReportIfNoSensors(null)
-                    .build());
-
-        }
-    }
-
-    @Override
-    public void stop() {
-        disconnectSensors();
-        
-        super.stop();
-    }
-    
-    protected void disconnectSensors() {
-    }
-
-    @Override
-    public void update() {
-        synchronized (mutex) {
-            // Update our seeds, as necessary
-            seedTracker.refreshSeeds();
-            
-            // Choose the first available cluster member to set host and port (and compute one-up)
-            Optional<Entity> upNode = Iterables.tryFind(getMembers(), EntityPredicates.attributeEqualTo(SERVICE_UP, Boolean.TRUE));
-
-            if (upNode.isPresent()) {
-                sensors().set(HOSTNAME, upNode.get().getAttribute(Attributes.HOSTNAME));
-                sensors().set(THRIFT_PORT, upNode.get().getAttribute(CassandraNode.THRIFT_PORT));
-
-                List<String> currentNodes = getAttribute(CASSANDRA_CLUSTER_NODES);
-                Set<String> oldNodes = (currentNodes != null) ? ImmutableSet.copyOf(currentNodes) : ImmutableSet.<String>of();
-                Set<String> newNodes = MutableSet.<String>of();
-                for (Entity member : getMembers()) {
-                    if (member instanceof CassandraNode && Boolean.TRUE.equals(member.getAttribute(SERVICE_UP))) {
-                        String hostname = member.getAttribute(Attributes.HOSTNAME);
-                        Integer thriftPort = member.getAttribute(CassandraNode.THRIFT_PORT);
-                        if (hostname != null && thriftPort != null) {
-                            newNodes.add(HostAndPort.fromParts(hostname, thriftPort).toString());
-                        }
-                    }
-                }
-                if (Sets.symmetricDifference(oldNodes, newNodes).size() > 0) {
-                    sensors().set(CASSANDRA_CLUSTER_NODES, MutableList.copyOf(newNodes));
-                }
-            } else {
-                sensors().set(HOSTNAME, null);
-                sensors().set(THRIFT_PORT, null);
-                sensors().set(CASSANDRA_CLUSTER_NODES, Collections.<String>emptyList());
-            }
-
-            ServiceNotUpLogic.updateNotUpIndicatorRequiringNonEmptyList(this, CASSANDRA_CLUSTER_NODES);
-        }
-    }
-    
-    /**
-     * For tracking our seeds. This gets fiddly! High-level logic is:
-     * <ul>
-     *   <li>If we have never reached quorum (i.e. have never published seeds), then continue to wait for quorum;
-     *       because entity-startup may be blocking for this. This is handled by the seedSupplier.
-     *   <li>If we previously reached quorum (i.e. have previousy published seeds), then always update;
-     *       we never want stale/dead entities listed in our seeds.
-     *   <li>If an existing seed looks unhealthy, then replace it.
-     *   <li>If a new potential seed becomes available (and we're in need of more), then add it.
-     * <ul>
-     * 
-     * Also note that {@link CassandraFabric} can take over, because it know about multiple sub-clusters!
-     * It will provide a different {@link CassandraDatacenter#SEED_SUPPLIER}. Each time we think that our seeds
-     * need to change, we call that. The fabric will call into {@link CassandraDatacenterImpl#gatherPotentialSeeds()}
-     * to find out what's available.
-     * 
-     * @author aled
-     */
-    protected class SeedTracker {
-        private final Map<Entity, Boolean> memberUpness = Maps.newLinkedHashMap();
-        
-        public void onMemberRemoved(Entity member) {
-            Set<Entity> seeds = getSeeds();
-            boolean maybeRemove = seeds.contains(member);
-            memberUpness.remove(member);
-            
-            if (maybeRemove) {
-                refreshSeeds();
-            } else {
-                if (log.isTraceEnabled()) log.trace("Seeds considered stable for cluster {} (node {} removed)", new Object[] {CassandraDatacenterImpl.this, member});
-                return;
-            }
-        }
-        public void onHostnameChanged(Entity member, String hostname) {
-            Set<Entity> seeds = getSeeds();
-            int quorum = getSeedQuorumSize();
-            boolean isViable = isViableSeed(member);
-            boolean maybeAdd = isViable && seeds.size() < quorum;
-            boolean maybeRemove = seeds.contains(member) && !isViable;
-            
-            if (maybeAdd || maybeRemove) {
-                refreshSeeds();
-            } else {
-                if (log.isTraceEnabled()) log.trace("Seeds considered stable for cluster {} (node {} changed hostname {})", new Object[] {CassandraDatacenterImpl.this, member, hostname});
-                return;
-            }
-        }
-        public void onServiceUpChanged(Entity member, Boolean serviceUp) {
-            Boolean oldVal = memberUpness.put(member, serviceUp);
-            if (Objects.equal(oldVal, serviceUp)) {
-                if (log.isTraceEnabled()) log.trace("Ignoring duplicate service-up in "+CassandraDatacenterImpl.this+" for "+member+", "+serviceUp);
-            }
-            Set<Entity> seeds = getSeeds();
-            int quorum = getSeedQuorumSize();
-            boolean isViable = isViableSeed(member);
-            boolean maybeAdd = isViable && seeds.size() < quorum;
-            boolean maybeRemove = seeds.contains(member) && !isViable;
-            
-            if (log.isDebugEnabled())
-                log.debug("Considering refresh of seeds for "+CassandraDatacenterImpl.this+" because "+member+" is now "+serviceUp+" ("+isViable+" / "+maybeAdd+" / "+maybeRemove+")");
-            if (maybeAdd || maybeRemove) {
-                refreshSeeds();
-            } else {
-                if (log.isTraceEnabled()) log.trace("Seeds considered stable for cluster {} (node {} changed serviceUp {})", new Object[] {CassandraDatacenterImpl.this, member, serviceUp});
-                return;
-            }
-        }
-        protected Set<Entity> getSeeds() {
-            Set<Entity> result = getAttribute(CURRENT_SEEDS);
-            return (result == null) ? ImmutableSet.<Entity>of() : result;
-        }
-        public void refreshSeeds() {
-            Set<Entity> oldseeds = getAttribute(CURRENT_SEEDS);
-            Set<Entity> newseeds = getSeedSupplier().get();
-            if (Objects.equal(oldseeds, newseeds)) {
-                if (log.isTraceEnabled()) log.debug("Seed refresh no-op for cluster {}: still={}", new Object[] {CassandraDatacenterImpl.this, oldseeds});
-            } else {
-                if (log.isDebugEnabled()) log.debug("Refreshing seeds of cluster {}: now={}; old={}", new Object[] {this, newseeds, oldseeds});
-                sensors().set(CURRENT_SEEDS, newseeds);
-                if (newseeds != null && newseeds.size() > 0) {
-                    sensors().set(HAS_PUBLISHED_SEEDS, true);
-                }
-            }
-        }
-        public Set<Entity> gatherPotentialSeeds() {
-            Set<Entity> result = Sets.newLinkedHashSet();
-            for (Entity member : getMembers()) {
-                if (isViableSeed(member)) {
-                    result.add(member);
-                }
-            }
-            if (log.isTraceEnabled()) log.trace("Viable seeds in Cluster {}: {}", new Object[] {result});
-            return result;
-        }
-        public Set<Entity> gatherPotentialRunningSeeds() {
-            Set<Entity> result = Sets.newLinkedHashSet();
-            for (Entity member : getMembers()) {
-                if (isRunningSeed(member)) {
-                    result.add(member);
-                }
-            }
-            if (log.isTraceEnabled()) log.trace("Viable running seeds in Cluster {}: {}", new Object[] {result});
-            return result;
-        }
-        public boolean isViableSeed(Entity member) {
-            // TODO would be good to reuse the better logic in ServiceFailureDetector
-            // (e.g. if that didn't just emit a notification but set a sensor as well?)
-            boolean managed = Entities.isManaged(member);
-            String hostname = member.getAttribute(Attributes.HOSTNAME);
-            boolean serviceUp = Boolean.TRUE.equals(member.getAttribute(Attributes.SERVICE_UP));
-            Lifecycle serviceState = member.getAttribute(Attributes.SERVICE_STATE_ACTUAL);
-            boolean hasFailed = !managed || (serviceState == Lifecycle.ON_FIRE) || (serviceState == Lifecycle.RUNNING && !serviceUp) || (serviceState == Lifecycle.STOPPED);
-            boolean result = (hostname != null && !hasFailed);
-            if (log.isTraceEnabled()) log.trace("Node {} in Cluster {}: viableSeed={}; hostname={}; serviceUp={}; serviceState={}; hasFailed={}", new Object[] {member, this, result, hostname, serviceUp, serviceState, hasFailed});
-            return result;
-        }
-        public boolean isRunningSeed(Entity member) {
-            boolean viableSeed = isViableSeed(member);
-            boolean serviceUp = Boolean.TRUE.equals(member.getAttribute(Attributes.SERVICE_UP));
-            Lifecycle serviceState = member.getAttribute(Attributes.SERVICE_STATE_ACTUAL);
-            boolean result = viableSeed && serviceUp && serviceState == Lifecycle.RUNNING;
-            if (log.isTraceEnabled()) log.trace("Node {} in Cluster {}: runningSeed={}; viableSeed={}; serviceUp={}; serviceState={}", new Object[] {member, this, result, viableSeed, serviceUp, serviceState});
-            return result;
-        }
-    }
-    
-    @Override
-    public String executeScript(String commands) {
-        Entity someChild = Iterables.getFirst(getMembers(), null);
-        if (someChild==null)
-            throw new IllegalStateException("No Cassandra nodes available");
-        // FIXME cross-etntity method-style calls such as below do not set up a queueing context (DynamicSequentialTask) 
-//        return ((CassandraNode)someChild).executeScript(commands);
-        return Entities.invokeEffector(this, someChild, CassandraNode.EXECUTE_SCRIPT, MutableMap.of("commands", commands)).getUnchecked();
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraFabric.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraFabric.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraFabric.java
deleted file mode 100644
index 5d9a9ca..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraFabric.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import java.util.Set;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.annotation.Effector;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.effector.MethodEffector;
-import org.apache.brooklyn.entity.group.DynamicFabric;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Multimap;
-import com.google.common.reflect.TypeToken;
-
-/**
- * A fabric of {@link CassandraNode}s, which forms a cluster spanning multiple locations.
- * <p>
- * Each {@link CassandraDatacenter} child instance is actually just a part of the whole cluster. It consists of the
- * nodes in that single location (which normally corresponds to a "datacenter" in Cassandra terminology).
- */
-@Catalog(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")
-@ImplementedBy(CassandraFabricImpl.class)
-public interface CassandraFabric extends DynamicFabric {
-
-    ConfigKey<Integer> INITIAL_QUORUM_SIZE = ConfigKeys.newIntegerConfigKey(
-            "fabric.initial.quorumSize",
-            "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)",
-            -1);
-    
-    @SuppressWarnings("serial")
-    ConfigKey<Function<Location, String>> DATA_CENTER_NAMER = ConfigKeys.newConfigKey(new TypeToken<Function<Location, String>>(){}, 
-            "cassandra.fabric.datacenter.namer",
-            "Function used to provide the cassandra.replication.datacenterName for a given location");
-
-    int DEFAULT_SEED_QUORUM = 5;
-    
-    AttributeSensor<Multimap<String,Entity>> DATACENTER_USAGE = CassandraDatacenter.DATACENTER_USAGE;
-
-    AttributeSensor<Set<String>> DATACENTERS = CassandraDatacenter.DATACENTERS;
-
-    AttributeSensor<Set<Entity>> CURRENT_SEEDS = CassandraDatacenter.CURRENT_SEEDS;
-
-    AttributeSensor<Boolean> HAS_PUBLISHED_SEEDS = CassandraDatacenter.HAS_PUBLISHED_SEEDS;
-
-    AttributeSensor<String> HOSTNAME = CassandraDatacenter.HOSTNAME;
-
-    AttributeSensor<Integer> THRIFT_PORT = CassandraDatacenter.THRIFT_PORT;
-
-    MethodEffector<Void> UPDATE = new MethodEffector<Void>(CassandraFabric.class, "update");
-
-    @Effector(description="Updates the cluster members")
-    void update();
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraFabricImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraFabricImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraFabricImpl.java
deleted file mode 100644
index 5aa108d..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraFabricImpl.java
+++ /dev/null
@@ -1,394 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.EntityInternal;
-import org.apache.brooklyn.core.entity.EntityPredicates;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.entity.group.AbstractMembershipTrackingPolicy;
-import org.apache.brooklyn.entity.group.DynamicFabricImpl;
-import org.apache.brooklyn.entity.group.DynamicGroup;
-import org.apache.brooklyn.util.collections.CollectionFunctionals;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.collections.MutableSet;
-import org.apache.brooklyn.util.time.Time;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Function;
-import com.google.common.base.Objects;
-import com.google.common.base.Optional;
-import com.google.common.base.Supplier;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.LinkedHashMultimap;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Multimap;
-import com.google.common.collect.Sets;
-
-/**
- * Implementation of {@link CassandraDatacenter}.
- * <p>
- * Serveral subtleties to note:
- * - a node may take some time after it is running and serving JMX to actually be contactable on its thrift port
- *   (so we wait for thrift port to be contactable)
- * - sometimes new nodes take a while to peer, and/or take a while to get a consistent schema
- *   (each up to 1m; often very close to the 1m) 
- */
-public class CassandraFabricImpl extends DynamicFabricImpl implements CassandraFabric {
-
-    private static final Logger log = LoggerFactory.getLogger(CassandraFabricImpl.class);
-
-    // Mutex for synchronizing during re-size operations
-    private final Object mutex = new Object[0];
-
-    private final Supplier<Set<Entity>> defaultSeedSupplier = new Supplier<Set<Entity>>() {
-        @Override public Set<Entity> get() {
-            // TODO Remove duplication from CassandraClusterImpl.defaultSeedSupplier
-            Set<Entity> seeds = getAttribute(CURRENT_SEEDS);
-            boolean hasPublishedSeeds = Boolean.TRUE.equals(getAttribute(HAS_PUBLISHED_SEEDS));
-            int quorumSize = getSeedQuorumSize();
-            
-            // update seeds if we're not quorate; note this may not work for dynamically adding new datacenters
-            // as we do not take a new seed from the new datacenter
-            if (seeds == null || seeds.size() < quorumSize || containsDownEntity(seeds)) {
-                Set<Entity> newseeds;
-                Map<CassandraDatacenter,Set<Entity>> potentialSeeds = MutableMap.of();
-                int potentialSeedCount = 0;
-                for (CassandraDatacenter member : Iterables.filter(getMembers(), CassandraDatacenter.class)) {
-                    Set<Entity> dcPotentialSeeds = member.gatherPotentialSeeds();
-                    potentialSeeds.put(member, dcPotentialSeeds);
-                    potentialSeedCount += dcPotentialSeeds.size();
-                }
-                
-                if (hasPublishedSeeds) {
-                    Set<Entity> currentSeeds = getAttribute(CURRENT_SEEDS);
-                    Lifecycle serviceState = getAttribute(SERVICE_STATE_ACTUAL);
-                    if (serviceState == Lifecycle.STARTING) {
-                        if (Sets.intersection(currentSeeds, ImmutableSet.copyOf(Iterables.concat(potentialSeeds.values()))).isEmpty()) {
-                            log.warn("Fabric {} lost all its seeds while starting! Subsequent failure likely, but changing seeds during startup would risk split-brain: seeds={}", new Object[] {CassandraFabricImpl.this, currentSeeds});
-                        }
-                        newseeds = currentSeeds;
-                    } else if (serviceState == Lifecycle.STOPPING || serviceState == Lifecycle.STOPPED) {
-                        if (log.isTraceEnabled()) log.trace("Fabric {} ignoring any potential seed-changes, because {}: seeds={}", new Object[] {CassandraFabricImpl.this, serviceState, currentSeeds});
-                        newseeds = currentSeeds;
-                    } else if (potentialSeedCount == 0) {
-                        // TODO Could be race where nodes have only just returned from start() and are about to 
-                        // transition to serviceUp; so don't just abandon all our seeds!
-                        log.warn("Fabric {} has no seeds (after startup); leaving seeds as-is; but risks split-brain if these seeds come back up!", new Object[] {CassandraFabricImpl.this});
-                        newseeds = currentSeeds;
-                    } else if (!allNonEmpty(potentialSeeds.values())) {
-                        log.warn("Fabric {} has datacenter with no seeds (after startup); leaving seeds as-is; but risks split-brain if these seeds come back up!", new Object[] {CassandraFabricImpl.this});
-                        newseeds = currentSeeds;
-                    } else {
-                        Set<Entity> result = selectSeeds(quorumSize, potentialSeeds);
-                        if (log.isDebugEnabled() && !Objects.equal(seeds, result)) {
-                            log.debug("Fabric {} updating seeds: chosen={}; potential={}", new Object[] {CassandraFabricImpl.this, result, potentialSeeds});
-                        }
-                        newseeds = result;
-                    }
-                } else if (potentialSeedCount < quorumSize) {
-                    if (log.isDebugEnabled()) log.debug("Not setting seeds of fabric {} yet, because still waiting for quorum (need {}; have {} potentials from {} members)", new Object[] {CassandraFabricImpl.this, quorumSize, potentialSeedCount, getMembers()});
-                    newseeds = ImmutableSet.of();
-                } else if (!allNonEmpty(potentialSeeds.values())) {
-                    if (log.isDebugEnabled()) {
-                        Map<CassandraDatacenter, Integer> datacenterCounts = Maps.transformValues(potentialSeeds, CollectionFunctionals.sizeFunction());
-                        log.debug("Not setting seeds of fabric {} yet, because not all datacenters have seeds (sizes are {})", new Object[] {CassandraFabricImpl.this, datacenterCounts});
-                    }
-                    newseeds = ImmutableSet.of();
-                } else {
-                    // yay, we're quorate
-                    Set<Entity> result = selectSeeds(quorumSize, potentialSeeds);
-                    log.info("Fabric {} has reached seed quorum: seeds={}", new Object[] {CassandraFabricImpl.this, result});
-                    newseeds = result;
-                }
-                
-                if (!Objects.equal(seeds, newseeds)) {
-                    sensors().set(CURRENT_SEEDS, newseeds);
-                    
-                    if (newseeds != null && newseeds.size() > 0) {
-                        sensors().set(HAS_PUBLISHED_SEEDS, true);
-                        
-                        // Need to tell every datacenter that seeds are ready.
-                        // Otherwise a datacenter might get no more changes (e.g. to nodes' hostnames etc), 
-                        // and not call seedSupplier.get() again.
-                        for (CassandraDatacenter member : Iterables.filter(getMembers(), CassandraDatacenter.class)) {
-                            member.update();
-                        }
-                    }
-                    return newseeds;
-                } else {
-                    return seeds;
-                }
-            } else {
-                if (log.isTraceEnabled()) log.trace("Not refresheed seeds of fabric {}, because have quorum {} (of {} members), and none are down: seeds={}", 
-                        new Object[] {CassandraFabricImpl.class, quorumSize, getMembers().size(), seeds});
-                return seeds;
-            }
-        }
-        private boolean allNonEmpty(Collection<? extends Collection<Entity>> contenders) {
-            for (Collection<Entity> contender: contenders)
-                if (contender.isEmpty()) return false;
-            return true;
-        }
-        private Set<Entity> selectSeeds(int num, Map<CassandraDatacenter,? extends Collection<Entity>> contenders) {
-            // Prefer existing seeds wherever possible;
-            // otherwise prefer a seed from each sub-cluster;
-            // otherwise accept any other contenders
-            Set<Entity> currentSeeds = (getAttribute(CURRENT_SEEDS) != null) ? getAttribute(CURRENT_SEEDS) : ImmutableSet.<Entity>of();
-            MutableSet<Entity> result = MutableSet.of();
-            result.addAll(Sets.intersection(currentSeeds, ImmutableSet.copyOf(contenders.values())));
-            for (CassandraDatacenter cluster : contenders.keySet()) {
-                Set<Entity> contendersInCluster = Sets.newLinkedHashSet(contenders.get(cluster));
-                if (contendersInCluster.size() > 0 && Sets.intersection(result, contendersInCluster).isEmpty()) {
-                    result.add(Iterables.getFirst(contendersInCluster, null));
-                }
-            }
-            result.addAll(Iterables.concat(contenders.values()));
-            return ImmutableSet.copyOf(Iterables.limit(result, num));
-        }
-        private boolean containsDownEntity(Set<Entity> seeds) {
-            for (Entity seed : seeds) {
-                if (!isViableSeed(seed)) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        public boolean isViableSeed(Entity member) {
-            // TODO remove duplication from CassandraClusterImpl.SeedTracker.isViableSeed
-            boolean managed = Entities.isManaged(member);
-            String hostname = member.getAttribute(Attributes.HOSTNAME);
-            boolean serviceUp = Boolean.TRUE.equals(member.getAttribute(Attributes.SERVICE_UP));
-            Lifecycle serviceState = member.getAttribute(Attributes.SERVICE_STATE_ACTUAL);
-            boolean hasFailed = !managed || (serviceState == Lifecycle.ON_FIRE) || (serviceState == Lifecycle.RUNNING && !serviceUp) || (serviceState == Lifecycle.STOPPED);
-            boolean result = (hostname != null && !hasFailed);
-            if (log.isTraceEnabled()) log.trace("Node {} in Fabric {}: viableSeed={}; hostname={}; serviceUp={}; serviceState={}; hasFailed={}", new Object[] {member, CassandraFabricImpl.this, result, hostname, serviceUp, serviceState, hasFailed});
-            return result;
-        }
-    };
-
-    public CassandraFabricImpl() {
-    }
-
-    @Override
-    public void init() {
-        super.init();
-
-        if (!config().getRaw(CassandraDatacenter.SEED_SUPPLIER).isPresentAndNonNull())
-            config().set(CassandraDatacenter.SEED_SUPPLIER, getSeedSupplier());
-        
-        // track members
-        policies().add(PolicySpec.create(MemberTrackingPolicy.class)
-                .displayName("Cassandra Fabric Tracker")
-                .configure("group", this));
-
-        // Track first node's startup
-        subscriptions().subscribeToMembers(this, CassandraDatacenter.FIRST_NODE_STARTED_TIME_UTC, new SensorEventListener<Long>() {
-            @Override
-            public void onEvent(SensorEvent<Long> event) {
-                Long oldval = getAttribute(CassandraDatacenter.FIRST_NODE_STARTED_TIME_UTC);
-                Long newval = event.getValue();
-                if (oldval == null && newval != null) {
-                    sensors().set(CassandraDatacenter.FIRST_NODE_STARTED_TIME_UTC, newval);
-                    for (CassandraDatacenter member : Iterables.filter(getMembers(), CassandraDatacenter.class)) {
-                        ((EntityInternal)member).sensors().set(CassandraDatacenter.FIRST_NODE_STARTED_TIME_UTC, newval);
-                    }
-                }
-            }
-        });
-        
-        // Track the datacenters for this cluster
-        subscriptions().subscribeToMembers(this, CassandraDatacenter.DATACENTER_USAGE, new SensorEventListener<Multimap<String,Entity>>() {
-            @Override
-            public void onEvent(SensorEvent<Multimap<String,Entity>> event) {
-                Multimap<String, Entity> usage = calculateDatacenterUsage();
-                sensors().set(DATACENTER_USAGE, usage);
-                sensors().set(DATACENTERS, usage.keySet());
-            }
-        });
-        subscriptions().subscribe(this, DynamicGroup.MEMBER_REMOVED, new SensorEventListener<Entity>() {
-            @Override public void onEvent(SensorEvent<Entity> event) {
-                Multimap<String, Entity> usage = calculateDatacenterUsage();
-                sensors().set(DATACENTER_USAGE, usage);
-                sensors().set(DATACENTERS, usage.keySet());
-            }
-        });
-    }
-
-    public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy {
-        @Override
-        protected void onEntityChange(Entity member) {
-            if (log.isDebugEnabled()) log.debug("Location {} updated in Fabric {}", member, entity);
-            ((CassandraFabricImpl)entity).update();
-        }
-        @Override
-        protected void onEntityAdded(Entity member) {
-            if (log.isDebugEnabled()) log.debug("Location {} added to Fabric {}", member, entity);
-            ((CassandraFabricImpl)entity).update();
-        }
-        @Override
-        protected void onEntityRemoved(Entity member) {
-            if (log.isDebugEnabled()) log.debug("Location {} removed from Fabric {}", member, entity);
-            ((CassandraFabricImpl)entity).update();
-        }
-    };
-
-    protected int getSeedQuorumSize() {
-        Integer quorumSize = getConfig(INITIAL_QUORUM_SIZE);
-        if (quorumSize!=null && quorumSize>0)
-            return quorumSize;
-
-        int initialSizeSum = 0;
-        for (CassandraDatacenter cluster : Iterables.filter(getMembers(), CassandraDatacenter.class)) {
-            initialSizeSum += cluster.getConfig(CassandraDatacenter.INITIAL_SIZE);
-        }
-        if (initialSizeSum>5) initialSizeSum /= 2;
-        else if (initialSizeSum>3) initialSizeSum -= 2;
-        else if (initialSizeSum>2) initialSizeSum -= 1;
-        
-        return Math.min(Math.max(initialSizeSum, 1), CassandraFabric.DEFAULT_SEED_QUORUM);
-    }
-
-    /**
-     * Sets the default {@link #MEMBER_SPEC} to describe the Cassandra sub-clusters.
-     */
-    @Override
-    protected EntitySpec<?> getMemberSpec() {
-        // Need to set the seedSupplier, even if the caller has overridden the CassandraCluster config
-        // (unless they've explicitly overridden the seedSupplier as well!)
-        // TODO probably don't need to anymore, as it is set on the Fabric here -- just make sure there is a default!
-        EntitySpec<?> custom = getConfig(MEMBER_SPEC);
-        if (custom == null) {
-            return EntitySpec.create(CassandraDatacenter.class)
-                    .configure(CassandraDatacenter.SEED_SUPPLIER, getSeedSupplier());
-        } else if (custom.getConfig().containsKey(CassandraDatacenter.SEED_SUPPLIER) || custom.getFlags().containsKey("seedSupplier")) {
-            return custom;
-        } else {
-            return EntitySpec.create(custom)
-                    .configure(CassandraDatacenter.SEED_SUPPLIER, getSeedSupplier());
-        }
-    }
-    
-    @Override
-    protected Entity createCluster(Location location, Map flags) {
-        Function<Location, String> dataCenterNamer = getConfig(DATA_CENTER_NAMER);
-        if (dataCenterNamer != null) {
-            flags = ImmutableMap.builder()
-                .putAll(flags)
-                .put(CassandraNode.DATACENTER_NAME, dataCenterNamer.apply(location))
-                .build();
-        }
-        return super.createCluster(location, flags);
-    }
-
-    /**
-     * Prefers one node per location, and then others from anywhere.
-     * Then trims result down to the "quorumSize".
-     */
-    public Supplier<Set<Entity>> getSeedSupplier() {
-        return defaultSeedSupplier;
-    }
-
-    @Override
-    public void start(Collection<? extends Location> locations) {
-        super.start(locations);
-
-        connectSensors();
-
-        // TODO wait until all nodes which we think are up are consistent 
-        // i.e. all known nodes use the same schema, as reported by
-        // SshEffectorTasks.ssh("echo \"describe cluster;\" | /bin/cassandra-cli");
-        // once we've done that we can revert to using 2 seed nodes.
-        // see CassandraCluster.DEFAULT_SEED_QUORUM
-        Time.sleep(getConfig(CassandraDatacenter.DELAY_BEFORE_ADVERTISING_CLUSTER));
-
-        update();
-    }
-
-    protected void connectSensors() {
-        connectEnrichers();
-    }
-    
-    protected void connectEnrichers() {
-        // TODO Aggregate across sub-clusters
-
-        subscriptions().subscribeToMembers(this, SERVICE_UP, new SensorEventListener<Boolean>() {
-            @Override public void onEvent(SensorEvent<Boolean> event) {
-                sensors().set(SERVICE_UP, calculateServiceUp());
-            }
-        });
-    }
-
-    @Override
-    public void stop() {
-        disconnectSensors();
-        
-        super.stop();
-    }
-    
-    protected void disconnectSensors() {
-    }
-
-    protected boolean calculateServiceUp() {
-        Optional<Entity> upNode = Iterables.tryFind(getMembers(), EntityPredicates.attributeEqualTo(SERVICE_UP, Boolean.TRUE));
-        return upNode.isPresent();
-    }
-
-    protected Multimap<String, Entity> calculateDatacenterUsage() {
-        Multimap<String, Entity> result = LinkedHashMultimap.<String, Entity>create();
-        for (CassandraDatacenter member : Iterables.filter(getMembers(), CassandraDatacenter.class)) {
-            Multimap<String, Entity> memberUsage = member.getAttribute(CassandraDatacenter.DATACENTER_USAGE);
-            if (memberUsage != null) result.putAll(memberUsage);
-        }
-        return result;
-    }
-
-    @Override
-    public void update() {
-        synchronized (mutex) {
-            for (CassandraDatacenter member : Iterables.filter(getMembers(), CassandraDatacenter.class)) {
-                member.update();
-            }
-
-            calculateServiceUp();
-
-            // Choose the first available location to set host and port (and compute one-up)
-            Optional<Entity> upNode = Iterables.tryFind(getMembers(), EntityPredicates.attributeEqualTo(SERVICE_UP, Boolean.TRUE));
-
-            if (upNode.isPresent()) {
-                sensors().set(HOSTNAME, upNode.get().getAttribute(Attributes.HOSTNAME));
-                sensors().set(THRIFT_PORT, upNode.get().getAttribute(CassandraNode.THRIFT_PORT));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNode.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNode.java
deleted file mode 100644
index fb937ae..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNode.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import java.math.BigInteger;
-import java.util.Set;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.effector.Effector;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.BrooklynConfigKeys;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.database.DatastoreMixins;
-import org.apache.brooklyn.entity.java.UsesJavaMXBeans;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.reflect.TypeToken;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a Cassandra node in a {@link CassandraDatacenter}.
- */
-@Catalog(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")
-@ImplementedBy(CassandraNodeImpl.class)
-public interface CassandraNode extends DatastoreMixins.DatastoreCommon, SoftwareProcess, UsesJmx, UsesJavaMXBeans, DatastoreMixins.HasDatastoreUrl, DatastoreMixins.CanExecuteScript {
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "1.2.16");
-    // when this changes remember to put a copy under releng2:/var/www/developer/brooklyn/repository/ !
-    // TODO experiment with supporting 2.0.x
-
-    @SetFromFlag("downloadUrl")
-    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "${driver.mirrorUrl}/${version}/apache-cassandra-${version}-bin.tar.gz");
-
-    /** download mirror, if desired */
-    @SetFromFlag("mirrorUrl")
-    ConfigKey<String> MIRROR_URL = new BasicConfigKey<String>(String.class, "cassandra.install.mirror.url", "URL of mirror", 
-        "http://www.mirrorservice.org/sites/ftp.apache.org/cassandra"
-        // for older versions, but slower:
-//        "http://archive.apache.org/dist/cassandra/"
-        );
-
-    @SetFromFlag("tgzUrl")
-    ConfigKey<String> TGZ_URL = new BasicConfigKey<String>(String.class, "cassandra.install.tgzUrl", "URL of TGZ download file");
-
-    @SetFromFlag("clusterName")
-    BasicAttributeSensorAndConfigKey<String> CLUSTER_NAME = CassandraDatacenter.CLUSTER_NAME;
-
-    @SetFromFlag("snitchName")
-    ConfigKey<String> ENDPOINT_SNITCH_NAME = CassandraDatacenter.ENDPOINT_SNITCH_NAME;
-
-    @SetFromFlag("gossipPort")
-    PortAttributeSensorAndConfigKey GOSSIP_PORT = new PortAttributeSensorAndConfigKey("cassandra.gossip.port", "Cassandra Gossip communications port", PortRanges.fromString("7000+"));
-
-    @SetFromFlag("sslGgossipPort")
-    PortAttributeSensorAndConfigKey SSL_GOSSIP_PORT = new PortAttributeSensorAndConfigKey("cassandra.ssl-gossip.port", "Cassandra Gossip SSL communications port", PortRanges.fromString("7001+"));
-
-    @SetFromFlag("thriftPort")
-    PortAttributeSensorAndConfigKey THRIFT_PORT = new PortAttributeSensorAndConfigKey("cassandra.thrift.port", "Cassandra Thrift RPC port", PortRanges.fromString("9160+"));
-
-    @SetFromFlag("nativePort")
-    PortAttributeSensorAndConfigKey NATIVE_TRANSPORT_PORT = new PortAttributeSensorAndConfigKey("cassandra.native.port", "Cassandra Native Transport port", PortRanges.fromString("9042+"));
-
-    @SetFromFlag("rmiRegistryPort")
-    // cassandra nodetool and others want 7199 - not required, but useful
-    PortAttributeSensorAndConfigKey RMI_REGISTRY_PORT = new PortAttributeSensorAndConfigKey(UsesJmx.RMI_REGISTRY_PORT, 
-        PortRanges.fromInteger(7199));
-
-    // some of the cassandra tooing (eg nodetool) use RMI, but we want JMXMP, so do both!
-    ConfigKey<JmxAgentModes> JMX_AGENT_MODE = ConfigKeys.newConfigKeyWithDefault(UsesJmx.JMX_AGENT_MODE, JmxAgentModes.JMXMP_AND_RMI);
-    
-    // TODO the multicloud-snitch has to be built manually, it is available in the brooklyn sandbox
-    @SetFromFlag("customSnitchJarUrl")
-    ConfigKey<String> CUSTOM_SNITCH_JAR_URL = ConfigKeys.newStringConfigKey("cassandra.config.customSnitchUrl", 
-            "URL for a jar file to be uploaded (e.g. \"classpath://org/apache/brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.jar\"); defaults to null which means nothing to upload", 
-            null);
-
-    @SetFromFlag("cassandraConfigTemplateUrl")
-    ConfigKey<String> CASSANDRA_CONFIG_TEMPLATE_URL = ConfigKeys.newStringConfigKey(
-            "cassandra.config.templateUrl", "A URL (in freemarker format) for a cassandra.yaml config file (in freemarker format)", 
-            "classpath://org/apache/brooklyn/entity/nosql/cassandra/cassandra-${entity.majorMinorVersion}.yaml");
-
-    @SetFromFlag("cassandraConfigFileName")
-    ConfigKey<String> CASSANDRA_CONFIG_FILE_NAME = ConfigKeys.newStringConfigKey(
-            "cassandra.config.fileName", "Name for the copied config file", "cassandra.yaml");
-
-    @SetFromFlag("cassandraRackdcConfigTemplateUrl")
-    ConfigKey<String> CASSANDRA_RACKDC_CONFIG_TEMPLATE_URL = ConfigKeys.newStringConfigKey(
-            "cassandra.config.rackdc.templateUrl", "Template file (in freemarker format) for the cassandra-rackdc.properties config file", 
-            "classpath://org/apache/brooklyn/entity/nosql/cassandra/cassandra-rackdc.properties");
-
-    @SetFromFlag("cassandraRackdcConfigFileName")
-    ConfigKey<String> CASSANDRA_RACKDC_CONFIG_FILE_NAME = ConfigKeys.newStringConfigKey(
-            "cassandra.config.rackdc.fileName", "Name for the copied rackdc config file (used for configuring replication, when a suitable snitch is used)", "cassandra-rackdc.properties");
-    
-    @SetFromFlag("datacenterName")
-    BasicAttributeSensorAndConfigKey<String> DATACENTER_NAME = new BasicAttributeSensorAndConfigKey<String>(
-            String.class, "cassandra.replication.datacenterName", "Datacenter name (used for configuring replication, when a suitable snitch is used)", 
-            null);
-
-    @SetFromFlag("rackName")
-    BasicAttributeSensorAndConfigKey<String> RACK_NAME = new BasicAttributeSensorAndConfigKey<String>(
-            String.class, "cassandra.replication.rackName", "Rack name (used for configuring replication, when a suitable snitch is used)", 
-            null);
-
-    ConfigKey<Integer> NUM_TOKENS_PER_NODE = ConfigKeys.newIntegerConfigKey("cassandra.numTokensPerNode",
-            "Number of tokens per node; if using vnodes, should set this to a value like 256",
-            1);
-    
-    @SetFromFlag("tokens")
-    @SuppressWarnings("serial")
-    BasicAttributeSensorAndConfigKey<Set<BigInteger>> TOKENS = new BasicAttributeSensorAndConfigKey<Set<BigInteger>>(
-            new TypeToken<Set<BigInteger>>() {}, "cassandra.tokens", "Cassandra Tokens");
-
-    @SetFromFlag("useThriftMonitoring")
-    ConfigKey<Boolean> USE_THRIFT_MONITORING = ConfigKeys.newConfigKey("thriftMonitoring.enabled", "Thrift-port monitoring enabled", Boolean.TRUE);
-
-    AttributeSensor<Integer> PEERS = Sensors.newIntegerSensor( "cassandra.peers", "Number of peers in cluster");
-
-    AttributeSensor<Integer> LIVE_NODE_COUNT = Sensors.newIntegerSensor( "cassandra.liveNodeCount", "Number of live nodes in cluster");
-
-    /* Metrics for read/write performance. */
-
-    AttributeSensor<Long> READ_PENDING = Sensors.newLongSensor("cassandra.read.pending", "Current pending ReadStage tasks");
-    AttributeSensor<Integer> READ_ACTIVE = Sensors.newIntegerSensor("cassandra.read.active", "Current active ReadStage tasks");
-    AttributeSensor<Long> READ_COMPLETED = Sensors.newLongSensor("cassandra.read.completed", "Total completed ReadStage tasks");
-    AttributeSensor<Long> WRITE_PENDING = Sensors.newLongSensor("cassandra.write.pending", "Current pending MutationStage tasks");
-    AttributeSensor<Integer> WRITE_ACTIVE = Sensors.newIntegerSensor("cassandra.write.active", "Current active MutationStage tasks");
-    AttributeSensor<Long> WRITE_COMPLETED = Sensors.newLongSensor("cassandra.write.completed", "Total completed MutationStage tasks");
-    
-    AttributeSensor<Boolean> SERVICE_UP_JMX = Sensors.newBooleanSensor("cassandra.service.jmx.up", "Whether JMX is up for this service");
-    AttributeSensor<Long> THRIFT_PORT_LATENCY = Sensors.newLongSensor("cassandra.thrift.latency", "Latency for thrift port connection (ms) or null if down");
-
-    AttributeSensor<Double> READS_PER_SECOND_LAST = Sensors.newDoubleSensor("cassandra.reads.perSec.last", "Reads/sec (last datapoint)");
-    AttributeSensor<Double> WRITES_PER_SECOND_LAST = Sensors.newDoubleSensor("cassandra.write.perSec.last", "Writes/sec (last datapoint)");
-
-    AttributeSensor<Double> THRIFT_PORT_LATENCY_IN_WINDOW = Sensors.newDoubleSensor("cassandra.thrift.latency.windowed", "Latency for thrift port (ms, averaged over time window)");
-    AttributeSensor<Double> READS_PER_SECOND_IN_WINDOW = Sensors.newDoubleSensor("cassandra.reads.perSec.windowed", "Reads/sec (over time window)");
-    AttributeSensor<Double> WRITES_PER_SECOND_IN_WINDOW = Sensors.newDoubleSensor("cassandra.writes.perSec.windowed", "Writes/sec (over time window)");
-
-    @SuppressWarnings({ "rawtypes", "unchecked" })
-    ConfigKey<Set<Entity>> INITIAL_SEEDS = (ConfigKey)ConfigKeys.newConfigKey(Set.class, "cassandra.cluster.seeds.initial", 
-            "List of cluster nodes to seed this node");
-
-    ConfigKey<Duration> START_TIMEOUT = ConfigKeys.newConfigKeyWithDefault(BrooklynConfigKeys.START_TIMEOUT, Duration.FIVE_MINUTES);
-    
-    ConfigKey<String> LISTEN_ADDRESS_SENSOR = ConfigKeys.newStringConfigKey("cassandra.listenAddressSensor", "sensor name from which to take the listen address; default (null) is a smart lookup");
-    ConfigKey<String> BROADCAST_ADDRESS_SENSOR = ConfigKeys.newStringConfigKey("cassandra.broadcastAddressSensor", "sensor name from which to take the broadcast address; default (null) is a smart lookup");
-    ConfigKey<String> RPC_ADDRESS_SENSOR = ConfigKeys.newStringConfigKey("cassandra.rpcAddressSensor", "sensor name from which to take the RPC address; default (null) is 0.0.0.0");
-
-    Effector<String> EXECUTE_SCRIPT = CassandraDatacenter.EXECUTE_SCRIPT;
-
-    /* Accessors used from template */
-    
-    String getMajorMinorVersion();
-    Integer getGossipPort();
-    Integer getSslGossipPort();
-    Integer getThriftPort();
-    Integer getNativeTransportPort();
-    String getClusterName();
-    String getListenAddress();
-    String getBroadcastAddress();
-    String getRpcAddress();
-    String getSeeds();
-    
-    String getPrivateIp();
-    String getPublicIp();
-    
-    int getNumTokensPerNode();
-
-    /**
-     * Returns the set of tokens.
-     * Each is in the range 0 to (2^127)-1.
-     * Returns null if there are no tokens.
-     */
-    Set<BigInteger> getTokens();
-
-    /** string value of comma-separated tokens; or blank if none */
-    String getTokensAsString();
-
-    /* For configuration */
-    
-    void setToken(String token);
-    
-    /* Using Cassandra */
-    
-    String executeScript(String commands);
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeDriver.java
deleted file mode 100644
index 3893373..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeDriver.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper;
-
-public interface CassandraNodeDriver extends JavaSoftwareProcessDriver {
-
-    Integer getGossipPort();
-
-    Integer getSslGossipPort();
-
-    Integer getThriftPort();
-
-    Integer getNativeTransportPort();
-
-    String getClusterName();
-
-    String getCassandraConfigTemplateUrl();
-
-    String getCassandraConfigFileName();
-
-    boolean isClustered();
-
-    ProcessTaskWrapper<Integer> executeScriptAsync(String commands);
-
-    /** returns the address that the given hostname resolves to at the target */
-    String getResolvedAddress(String hostname);
-
-}


[34/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-base.css
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-base.css b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-base.css
deleted file mode 100644
index 66bc9b3..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-base.css
+++ /dev/null
@@ -1,7543 +0,0 @@
-/* FONT PATH
- * -------------------------- */
-
-@font-face {
-  font-family: 'FontAwesome';
-  src: url('../fonts/fontawesome-webfont.eot?v=4.1.0');
-  src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');
-  font-weight: normal;
-  font-style: normal;
-}
-
-.fa {
-  display: inline-block;
-  font-family: FontAwesome;
-  font-style: normal;
-  font-weight: normal;
-  line-height: 1;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-}
-
-/* makes the font 33% larger relative to the icon container */
-
-.fa-lg {
-  font-size: 1.33333333em;
-  line-height: 0.75em;
-  vertical-align: -15%;
-}
-
-.fa-2x {
-  font-size: 2em;
-}
-
-.fa-3x {
-  font-size: 3em;
-}
-
-.fa-4x {
-  font-size: 4em;
-}
-
-.fa-5x {
-  font-size: 5em;
-}
-
-.fa-fw {
-  width: 1.28571429em;
-  text-align: center;
-}
-
-.fa-ul {
-  padding-left: 0;
-  margin-left: 2.14285714em;
-  list-style-type: none;
-}
-
-.fa-ul > li {
-  position: relative;
-}
-
-.fa-li {
-  position: absolute;
-  left: -2.14285714em;
-  width: 2.14285714em;
-  top: 0.14285714em;
-  text-align: center;
-}
-
-.fa-li.fa-lg {
-  left: -1.85714286em;
-}
-
-.fa-border {
-  padding: .2em .25em .15em;
-  border: solid 0.08em #eeeeee;
-  border-radius: .1em;
-}
-
-.pull-right {
-  float: right;
-}
-
-.pull-left {
-  float: left;
-}
-
-.fa.pull-left {
-  margin-right: .3em;
-}
-
-.fa.pull-right {
-  margin-left: .3em;
-}
-
-.fa-spin {
-  -webkit-animation: spin 2s infinite linear;
-  -moz-animation: spin 2s infinite linear;
-  -o-animation: spin 2s infinite linear;
-  animation: spin 2s infinite linear;
-}
-
-@-moz-keyframes spin {
-  0% {
-    -moz-transform: rotate(0deg);
-  }
-
-  100% {
-    -moz-transform: rotate(359deg);
-  }
-}
-
-@-webkit-keyframes spin {
-  0% {
-    -webkit-transform: rotate(0deg);
-  }
-
-  100% {
-    -webkit-transform: rotate(359deg);
-  }
-}
-
-@-o-keyframes spin {
-  0% {
-    -o-transform: rotate(0deg);
-  }
-
-  100% {
-    -o-transform: rotate(359deg);
-  }
-}
-
-@keyframes spin {
-  0% {
-    -webkit-transform: rotate(0deg);
-    transform: rotate(0deg);
-  }
-
-  100% {
-    -webkit-transform: rotate(359deg);
-    transform: rotate(359deg);
-  }
-}
-
-.fa-rotate-90 {
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
-  -webkit-transform: rotate(90deg);
-  -moz-transform: rotate(90deg);
-  -ms-transform: rotate(90deg);
-  -o-transform: rotate(90deg);
-  transform: rotate(90deg);
-}
-
-.fa-rotate-180 {
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
-  -webkit-transform: rotate(180deg);
-  -moz-transform: rotate(180deg);
-  -ms-transform: rotate(180deg);
-  -o-transform: rotate(180deg);
-  transform: rotate(180deg);
-}
-
-.fa-rotate-270 {
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
-  -webkit-transform: rotate(270deg);
-  -moz-transform: rotate(270deg);
-  -ms-transform: rotate(270deg);
-  -o-transform: rotate(270deg);
-  transform: rotate(270deg);
-}
-
-.fa-flip-horizontal {
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
-  -webkit-transform: scale(-1, 1);
-  -moz-transform: scale(-1, 1);
-  -ms-transform: scale(-1, 1);
-  -o-transform: scale(-1, 1);
-  transform: scale(-1, 1);
-}
-
-.fa-flip-vertical {
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
-  -webkit-transform: scale(1, -1);
-  -moz-transform: scale(1, -1);
-  -ms-transform: scale(1, -1);
-  -o-transform: scale(1, -1);
-  transform: scale(1, -1);
-}
-
-.fa-stack {
-  position: relative;
-  display: inline-block;
-  width: 2em;
-  height: 2em;
-  line-height: 2em;
-  vertical-align: middle;
-}
-
-.fa-stack-1x,
-.fa-stack-2x {
-  position: absolute;
-  left: 0;
-  width: 100%;
-  text-align: center;
-}
-
-.fa-stack-1x {
-  line-height: inherit;
-}
-
-.fa-stack-2x {
-  font-size: 2em;
-}
-
-.fa-inverse {
-  color: #ffffff;
-}
-
-/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
-   readers do not read off random characters that represent icons */
-
-.fa-glass:before {
-  content: "\f000";
-}
-
-.fa-music:before {
-  content: "\f001";
-}
-
-.fa-search:before {
-  content: "\f002";
-}
-
-.fa-envelope-o:before {
-  content: "\f003";
-}
-
-.fa-heart:before {
-  content: "\f004";
-}
-
-.fa-star:before {
-  content: "\f005";
-}
-
-.fa-star-o:before {
-  content: "\f006";
-}
-
-.fa-user:before {
-  content: "\f007";
-}
-
-.fa-film:before {
-  content: "\f008";
-}
-
-.fa-th-large:before {
-  content: "\f009";
-}
-
-.fa-th:before {
-  content: "\f00a";
-}
-
-.fa-th-list:before {
-  content: "\f00b";
-}
-
-.fa-check:before {
-  content: "\f00c";
-}
-
-.fa-times:before {
-  content: "\f00d";
-}
-
-.fa-search-plus:before {
-  content: "\f00e";
-}
-
-.fa-search-minus:before {
-  content: "\f010";
-}
-
-.fa-power-off:before {
-  content: "\f011";
-}
-
-.fa-signal:before {
-  content: "\f012";
-}
-
-.fa-gear:before,
-.fa-cog:before {
-  content: "\f013";
-}
-
-.fa-trash-o:before {
-  content: "\f014";
-}
-
-.fa-home:before {
-  content: "\f015";
-}
-
-.fa-file-o:before {
-  content: "\f016";
-}
-
-.fa-clock-o:before {
-  content: "\f017";
-}
-
-.fa-road:before {
-  content: "\f018";
-}
-
-.fa-download:before {
-  content: "\f019";
-}
-
-.fa-arrow-circle-o-down:before {
-  content: "\f01a";
-}
-
-.fa-arrow-circle-o-up:before {
-  content: "\f01b";
-}
-
-.fa-inbox:before {
-  content: "\f01c";
-}
-
-.fa-play-circle-o:before {
-  content: "\f01d";
-}
-
-.fa-rotate-right:before,
-.fa-repeat:before {
-  content: "\f01e";
-}
-
-.fa-refresh:before {
-  content: "\f021";
-}
-
-.fa-list-alt:before {
-  content: "\f022";
-}
-
-.fa-lock:before {
-  content: "\f023";
-}
-
-.fa-flag:before {
-  content: "\f024";
-}
-
-.fa-headphones:before {
-  content: "\f025";
-}
-
-.fa-volume-off:before {
-  content: "\f026";
-}
-
-.fa-volume-down:before {
-  content: "\f027";
-}
-
-.fa-volume-up:before {
-  content: "\f028";
-}
-
-.fa-qrcode:before {
-  content: "\f029";
-}
-
-.fa-barcode:before {
-  content: "\f02a";
-}
-
-.fa-tag:before {
-  content: "\f02b";
-}
-
-.fa-tags:before {
-  content: "\f02c";
-}
-
-.fa-book:before {
-  content: "\f02d";
-}
-
-.fa-bookmark:before {
-  content: "\f02e";
-}
-
-.fa-print:before {
-  content: "\f02f";
-}
-
-.fa-camera:before {
-  content: "\f030";
-}
-
-.fa-font:before {
-  content: "\f031";
-}
-
-.fa-bold:before {
-  content: "\f032";
-}
-
-.fa-italic:before {
-  content: "\f033";
-}
-
-.fa-text-height:before {
-  content: "\f034";
-}
-
-.fa-text-width:before {
-  content: "\f035";
-}
-
-.fa-align-left:before {
-  content: "\f036";
-}
-
-.fa-align-center:before {
-  content: "\f037";
-}
-
-.fa-align-right:before {
-  content: "\f038";
-}
-
-.fa-align-justify:before {
-  content: "\f039";
-}
-
-.fa-list:before {
-  content: "\f03a";
-}
-
-.fa-dedent:before,
-.fa-outdent:before {
-  content: "\f03b";
-}
-
-.fa-indent:before {
-  content: "\f03c";
-}
-
-.fa-video-camera:before {
-  content: "\f03d";
-}
-
-.fa-photo:before,
-.fa-image:before,
-.fa-picture-o:before {
-  content: "\f03e";
-}
-
-.fa-pencil:before {
-  content: "\f040";
-}
-
-.fa-map-marker:before {
-  content: "\f041";
-}
-
-.fa-adjust:before {
-  content: "\f042";
-}
-
-.fa-tint:before {
-  content: "\f043";
-}
-
-.fa-edit:before,
-.fa-pencil-square-o:before {
-  content: "\f044";
-}
-
-.fa-share-square-o:before {
-  content: "\f045";
-}
-
-.fa-check-square-o:before {
-  content: "\f046";
-}
-
-.fa-arrows:before {
-  content: "\f047";
-}
-
-.fa-step-backward:before {
-  content: "\f048";
-}
-
-.fa-fast-backward:before {
-  content: "\f049";
-}
-
-.fa-backward:before {
-  content: "\f04a";
-}
-
-.fa-play:before {
-  content: "\f04b";
-}
-
-.fa-pause:before {
-  content: "\f04c";
-}
-
-.fa-stop:before {
-  content: "\f04d";
-}
-
-.fa-forward:before {
-  content: "\f04e";
-}
-
-.fa-fast-forward:before {
-  content: "\f050";
-}
-
-.fa-step-forward:before {
-  content: "\f051";
-}
-
-.fa-eject:before {
-  content: "\f052";
-}
-
-.fa-chevron-left:before {
-  content: "\f053";
-}
-
-.fa-chevron-right:before {
-  content: "\f054";
-}
-
-.fa-plus-circle:before {
-  content: "\f055";
-}
-
-.fa-minus-circle:before {
-  content: "\f056";
-}
-
-.fa-times-circle:before {
-  content: "\f057";
-}
-
-.fa-check-circle:before {
-  content: "\f058";
-}
-
-.fa-question-circle:before {
-  content: "\f059";
-}
-
-.fa-info-circle:before {
-  content: "\f05a";
-}
-
-.fa-crosshairs:before {
-  content: "\f05b";
-}
-
-.fa-times-circle-o:before {
-  content: "\f05c";
-}
-
-.fa-check-circle-o:before {
-  content: "\f05d";
-}
-
-.fa-ban:before {
-  content: "\f05e";
-}
-
-.fa-arrow-left:before {
-  content: "\f060";
-}
-
-.fa-arrow-right:before {
-  content: "\f061";
-}
-
-.fa-arrow-up:before {
-  content: "\f062";
-}
-
-.fa-arrow-down:before {
-  content: "\f063";
-}
-
-.fa-mail-forward:before,
-.fa-share:before {
-  content: "\f064";
-}
-
-.fa-expand:before {
-  content: "\f065";
-}
-
-.fa-compress:before {
-  content: "\f066";
-}
-
-.fa-plus:before {
-  content: "\f067";
-}
-
-.fa-minus:before {
-  content: "\f068";
-}
-
-.fa-asterisk:before {
-  content: "\f069";
-}
-
-.fa-exclamation-circle:before {
-  content: "\f06a";
-}
-
-.fa-gift:before {
-  content: "\f06b";
-}
-
-.fa-leaf:before {
-  content: "\f06c";
-}
-
-.fa-fire:before {
-  content: "\f06d";
-}
-
-.fa-eye:before {
-  content: "\f06e";
-}
-
-.fa-eye-slash:before {
-  content: "\f070";
-}
-
-.fa-warning:before,
-.fa-exclamation-triangle:before {
-  content: "\f071";
-}
-
-.fa-plane:before {
-  content: "\f072";
-}
-
-.fa-calendar:before {
-  content: "\f073";
-}
-
-.fa-random:before {
-  content: "\f074";
-}
-
-.fa-comment:before {
-  content: "\f075";
-}
-
-.fa-magnet:before {
-  content: "\f076";
-}
-
-.fa-chevron-up:before {
-  content: "\f077";
-}
-
-.fa-chevron-down:before {
-  content: "\f078";
-}
-
-.fa-retweet:before {
-  content: "\f079";
-}
-
-.fa-shopping-cart:before {
-  content: "\f07a";
-}
-
-.fa-folder:before {
-  content: "\f07b";
-}
-
-.fa-folder-open:before {
-  content: "\f07c";
-}
-
-.fa-arrows-v:before {
-  content: "\f07d";
-}
-
-.fa-arrows-h:before {
-  content: "\f07e";
-}
-
-.fa-bar-chart-o:before {
-  content: "\f080";
-}
-
-.fa-twitter-square:before {
-  content: "\f081";
-}
-
-.fa-facebook-square:before {
-  content: "\f082";
-}
-
-.fa-camera-retro:before {
-  content: "\f083";
-}
-
-.fa-key:before {
-  content: "\f084";
-}
-
-.fa-gears:before,
-.fa-cogs:before {
-  content: "\f085";
-}
-
-.fa-comments:before {
-  content: "\f086";
-}
-
-.fa-thumbs-o-up:before {
-  content: "\f087";
-}
-
-.fa-thumbs-o-down:before {
-  content: "\f088";
-}
-
-.fa-star-half:before {
-  content: "\f089";
-}
-
-.fa-heart-o:before {
-  content: "\f08a";
-}
-
-.fa-sign-out:before {
-  content: "\f08b";
-}
-
-.fa-linkedin-square:before {
-  content: "\f08c";
-}
-
-.fa-thumb-tack:before {
-  content: "\f08d";
-}
-
-.fa-external-link:before {
-  content: "\f08e";
-}
-
-.fa-sign-in:before {
-  content: "\f090";
-}
-
-.fa-trophy:before {
-  content: "\f091";
-}
-
-.fa-github-square:before {
-  content: "\f092";
-}
-
-.fa-upload:before {
-  content: "\f093";
-}
-
-.fa-lemon-o:before {
-  content: "\f094";
-}
-
-.fa-phone:before {
-  content: "\f095";
-}
-
-.fa-square-o:before {
-  content: "\f096";
-}
-
-.fa-bookmark-o:before {
-  content: "\f097";
-}
-
-.fa-phone-square:before {
-  content: "\f098";
-}
-
-.fa-twitter:before {
-  content: "\f099";
-}
-
-.fa-facebook:before {
-  content: "\f09a";
-}
-
-.fa-github:before {
-  content: "\f09b";
-}
-
-.fa-unlock:before {
-  content: "\f09c";
-}
-
-.fa-credit-card:before {
-  content: "\f09d";
-}
-
-.fa-rss:before {
-  content: "\f09e";
-}
-
-.fa-hdd-o:before {
-  content: "\f0a0";
-}
-
-.fa-bullhorn:before {
-  content: "\f0a1";
-}
-
-.fa-bell:before {
-  content: "\f0f3";
-}
-
-.fa-certificate:before {
-  content: "\f0a3";
-}
-
-.fa-hand-o-right:before {
-  content: "\f0a4";
-}
-
-.fa-hand-o-left:before {
-  content: "\f0a5";
-}
-
-.fa-hand-o-up:before {
-  content: "\f0a6";
-}
-
-.fa-hand-o-down:before {
-  content: "\f0a7";
-}
-
-.fa-arrow-circle-left:before {
-  content: "\f0a8";
-}
-
-.fa-arrow-circle-right:before {
-  content: "\f0a9";
-}
-
-.fa-arrow-circle-up:before {
-  content: "\f0aa";
-}
-
-.fa-arrow-circle-down:before {
-  content: "\f0ab";
-}
-
-.fa-globe:before {
-  content: "\f0ac";
-}
-
-.fa-wrench:before {
-  content: "\f0ad";
-}
-
-.fa-tasks:before {
-  content: "\f0ae";
-}
-
-.fa-filter:before {
-  content: "\f0b0";
-}
-
-.fa-briefcase:before {
-  content: "\f0b1";
-}
-
-.fa-arrows-alt:before {
-  content: "\f0b2";
-}
-
-.fa-group:before,
-.fa-users:before {
-  content: "\f0c0";
-}
-
-.fa-chain:before,
-.fa-link:before {
-  content: "\f0c1";
-}
-
-.fa-cloud:before {
-  content: "\f0c2";
-}
-
-.fa-flask:before {
-  content: "\f0c3";
-}
-
-.fa-cut:before,
-.fa-scissors:before {
-  content: "\f0c4";
-}
-
-.fa-copy:before,
-.fa-files-o:before {
-  content: "\f0c5";
-}
-
-.fa-paperclip:before {
-  content: "\f0c6";
-}
-
-.fa-save:before,
-.fa-floppy-o:before {
-  content: "\f0c7";
-}
-
-.fa-square:before {
-  content: "\f0c8";
-}
-
-.fa-navicon:before,
-.fa-reorder:before,
-.fa-bars:before {
-  content: "\f0c9";
-}
-
-.fa-list-ul:before {
-  content: "\f0ca";
-}
-
-.fa-list-ol:before {
-  content: "\f0cb";
-}
-
-.fa-strikethrough:before {
-  content: "\f0cc";
-}
-
-.fa-underline:before {
-  content: "\f0cd";
-}
-
-.fa-table:before {
-  content: "\f0ce";
-}
-
-.fa-magic:before {
-  content: "\f0d0";
-}
-
-.fa-truck:before {
-  content: "\f0d1";
-}
-
-.fa-pinterest:before {
-  content: "\f0d2";
-}
-
-.fa-pinterest-square:before {
-  content: "\f0d3";
-}
-
-.fa-google-plus-square:before {
-  content: "\f0d4";
-}
-
-.fa-google-plus:before {
-  content: "\f0d5";
-}
-
-.fa-money:before {
-  content: "\f0d6";
-}
-
-.fa-caret-down:before {
-  content: "\f0d7";
-}
-
-.fa-caret-up:before {
-  content: "\f0d8";
-}
-
-.fa-caret-left:before {
-  content: "\f0d9";
-}
-
-.fa-caret-right:before {
-  content: "\f0da";
-}
-
-.fa-columns:before {
-  content: "\f0db";
-}
-
-.fa-unsorted:before,
-.fa-sort:before {
-  content: "\f0dc";
-}
-
-.fa-sort-down:before,
-.fa-sort-desc:before {
-  content: "\f0dd";
-}
-
-.fa-sort-up:before,
-.fa-sort-asc:before {
-  content: "\f0de";
-}
-
-.fa-envelope:before {
-  content: "\f0e0";
-}
-
-.fa-linkedin:before {
-  content: "\f0e1";
-}
-
-.fa-rotate-left:before,
-.fa-undo:before {
-  content: "\f0e2";
-}
-
-.fa-legal:before,
-.fa-gavel:before {
-  content: "\f0e3";
-}
-
-.fa-dashboard:before,
-.fa-tachometer:before {
-  content: "\f0e4";
-}
-
-.fa-comment-o:before {
-  content: "\f0e5";
-}
-
-.fa-comments-o:before {
-  content: "\f0e6";
-}
-
-.fa-flash:before,
-.fa-bolt:before {
-  content: "\f0e7";
-}
-
-.fa-sitemap:before {
-  content: "\f0e8";
-}
-
-.fa-umbrella:before {
-  content: "\f0e9";
-}
-
-.fa-paste:before,
-.fa-clipboard:before {
-  content: "\f0ea";
-}
-
-.fa-lightbulb-o:before {
-  content: "\f0eb";
-}
-
-.fa-exchange:before {
-  content: "\f0ec";
-}
-
-.fa-cloud-download:before {
-  content: "\f0ed";
-}
-
-.fa-cloud-upload:before {
-  content: "\f0ee";
-}
-
-.fa-user-md:before {
-  content: "\f0f0";
-}
-
-.fa-stethoscope:before {
-  content: "\f0f1";
-}
-
-.fa-suitcase:before {
-  content: "\f0f2";
-}
-
-.fa-bell-o:before {
-  content: "\f0a2";
-}
-
-.fa-coffee:before {
-  content: "\f0f4";
-}
-
-.fa-cutlery:before {
-  content: "\f0f5";
-}
-
-.fa-file-text-o:before {
-  content: "\f0f6";
-}
-
-.fa-building-o:before {
-  content: "\f0f7";
-}
-
-.fa-hospital-o:before {
-  content: "\f0f8";
-}
-
-.fa-ambulance:before {
-  content: "\f0f9";
-}
-
-.fa-medkit:before {
-  content: "\f0fa";
-}
-
-.fa-fighter-jet:before {
-  content: "\f0fb";
-}
-
-.fa-beer:before {
-  content: "\f0fc";
-}
-
-.fa-h-square:before {
-  content: "\f0fd";
-}
-
-.fa-plus-square:before {
-  content: "\f0fe";
-}
-
-.fa-angle-double-left:before {
-  content: "\f100";
-}
-
-.fa-angle-double-right:before {
-  content: "\f101";
-}
-
-.fa-angle-double-up:before {
-  content: "\f102";
-}
-
-.fa-angle-double-down:before {
-  content: "\f103";
-}
-
-.fa-angle-left:before {
-  content: "\f104";
-}
-
-.fa-angle-right:before {
-  content: "\f105";
-}
-
-.fa-angle-up:before {
-  content: "\f106";
-}
-
-.fa-angle-down:before {
-  content: "\f107";
-}
-
-.fa-desktop:before {
-  content: "\f108";
-}
-
-.fa-laptop:before {
-  content: "\f109";
-}
-
-.fa-tablet:before {
-  content: "\f10a";
-}
-
-.fa-mobile-phone:before,
-.fa-mobile:before {
-  content: "\f10b";
-}
-
-.fa-circle-o:before {
-  content: "\f10c";
-}
-
-.fa-quote-left:before {
-  content: "\f10d";
-}
-
-.fa-quote-right:before {
-  content: "\f10e";
-}
-
-.fa-spinner:before {
-  content: "\f110";
-}
-
-.fa-circle:before {
-  content: "\f111";
-}
-
-.fa-mail-reply:before,
-.fa-reply:before {
-  content: "\f112";
-}
-
-.fa-github-alt:before {
-  content: "\f113";
-}
-
-.fa-folder-o:before {
-  content: "\f114";
-}
-
-.fa-folder-open-o:before {
-  content: "\f115";
-}
-
-.fa-smile-o:before {
-  content: "\f118";
-}
-
-.fa-frown-o:before {
-  content: "\f119";
-}
-
-.fa-meh-o:before {
-  content: "\f11a";
-}
-
-.fa-gamepad:before {
-  content: "\f11b";
-}
-
-.fa-keyboard-o:before {
-  content: "\f11c";
-}
-
-.fa-flag-o:before {
-  content: "\f11d";
-}
-
-.fa-flag-checkered:before {
-  content: "\f11e";
-}
-
-.fa-terminal:before {
-  content: "\f120";
-}
-
-.fa-code:before {
-  content: "\f121";
-}
-
-.fa-mail-reply-all:before,
-.fa-reply-all:before {
-  content: "\f122";
-}
-
-.fa-star-half-empty:before,
-.fa-star-half-full:before,
-.fa-star-half-o:before {
-  content: "\f123";
-}
-
-.fa-location-arrow:before {
-  content: "\f124";
-}
-
-.fa-crop:before {
-  content: "\f125";
-}
-
-.fa-code-fork:before {
-  content: "\f126";
-}
-
-.fa-unlink:before,
-.fa-chain-broken:before {
-  content: "\f127";
-}
-
-.fa-question:before {
-  content: "\f128";
-}
-
-.fa-info:before {
-  content: "\f129";
-}
-
-.fa-exclamation:before {
-  content: "\f12a";
-}
-
-.fa-superscript:before {
-  content: "\f12b";
-}
-
-.fa-subscript:before {
-  content: "\f12c";
-}
-
-.fa-eraser:before {
-  content: "\f12d";
-}
-
-.fa-puzzle-piece:before {
-  content: "\f12e";
-}
-
-.fa-microphone:before {
-  content: "\f130";
-}
-
-.fa-microphone-slash:before {
-  content: "\f131";
-}
-
-.fa-shield:before {
-  content: "\f132";
-}
-
-.fa-calendar-o:before {
-  content: "\f133";
-}
-
-.fa-fire-extinguisher:before {
-  content: "\f134";
-}
-
-.fa-rocket:before {
-  content: "\f135";
-}
-
-.fa-maxcdn:before {
-  content: "\f136";
-}
-
-.fa-chevron-circle-left:before {
-  content: "\f137";
-}
-
-.fa-chevron-circle-right:before {
-  content: "\f138";
-}
-
-.fa-chevron-circle-up:before {
-  content: "\f139";
-}
-
-.fa-chevron-circle-down:before {
-  content: "\f13a";
-}
-
-.fa-html5:before {
-  content: "\f13b";
-}
-
-.fa-css3:before {
-  content: "\f13c";
-}
-
-.fa-anchor:before {
-  content: "\f13d";
-}
-
-.fa-unlock-alt:before {
-  content: "\f13e";
-}
-
-.fa-bullseye:before {
-  content: "\f140";
-}
-
-.fa-ellipsis-h:before {
-  content: "\f141";
-}
-
-.fa-ellipsis-v:before {
-  content: "\f142";
-}
-
-.fa-rss-square:before {
-  content: "\f143";
-}
-
-.fa-play-circle:before {
-  content: "\f144";
-}
-
-.fa-ticket:before {
-  content: "\f145";
-}
-
-.fa-minus-square:before {
-  content: "\f146";
-}
-
-.fa-minus-square-o:before {
-  content: "\f147";
-}
-
-.fa-level-up:before {
-  content: "\f148";
-}
-
-.fa-level-down:before {
-  content: "\f149";
-}
-
-.fa-check-square:before {
-  content: "\f14a";
-}
-
-.fa-pencil-square:before {
-  content: "\f14b";
-}
-
-.fa-external-link-square:before {
-  content: "\f14c";
-}
-
-.fa-share-square:before {
-  content: "\f14d";
-}
-
-.fa-compass:before {
-  content: "\f14e";
-}
-
-.fa-toggle-down:before,
-.fa-caret-square-o-down:before {
-  content: "\f150";
-}
-
-.fa-toggle-up:before,
-.fa-caret-square-o-up:before {
-  content: "\f151";
-}
-
-.fa-toggle-right:before,
-.fa-caret-square-o-right:before {
-  content: "\f152";
-}
-
-.fa-euro:before,
-.fa-eur:before {
-  content: "\f153";
-}
-
-.fa-gbp:before {
-  content: "\f154";
-}
-
-.fa-dollar:before,
-.fa-usd:before {
-  content: "\f155";
-}
-
-.fa-rupee:before,
-.fa-inr:before {
-  content: "\f156";
-}
-
-.fa-cny:before,
-.fa-rmb:before,
-.fa-yen:before,
-.fa-jpy:before {
-  content: "\f157";
-}
-
-.fa-ruble:before,
-.fa-rouble:before,
-.fa-rub:before {
-  content: "\f158";
-}
-
-.fa-won:before,
-.fa-krw:before {
-  content: "\f159";
-}
-
-.fa-bitcoin:before,
-.fa-btc:before {
-  content: "\f15a";
-}
-
-.fa-file:before {
-  content: "\f15b";
-}
-
-.fa-file-text:before {
-  content: "\f15c";
-}
-
-.fa-sort-alpha-asc:before {
-  content: "\f15d";
-}
-
-.fa-sort-alpha-desc:before {
-  content: "\f15e";
-}
-
-.fa-sort-amount-asc:before {
-  content: "\f160";
-}
-
-.fa-sort-amount-desc:before {
-  content: "\f161";
-}
-
-.fa-sort-numeric-asc:before {
-  content: "\f162";
-}
-
-.fa-sort-numeric-desc:before {
-  content: "\f163";
-}
-
-.fa-thumbs-up:before {
-  content: "\f164";
-}
-
-.fa-thumbs-down:before {
-  content: "\f165";
-}
-
-.fa-youtube-square:before {
-  content: "\f166";
-}
-
-.fa-youtube:before {
-  content: "\f167";
-}
-
-.fa-xing:before {
-  content: "\f168";
-}
-
-.fa-xing-square:before {
-  content: "\f169";
-}
-
-.fa-youtube-play:before {
-  content: "\f16a";
-}
-
-.fa-dropbox:before {
-  content: "\f16b";
-}
-
-.fa-stack-overflow:before {
-  content: "\f16c";
-}
-
-.fa-instagram:before {
-  content: "\f16d";
-}
-
-.fa-flickr:before {
-  content: "\f16e";
-}
-
-.fa-adn:before {
-  content: "\f170";
-}
-
-.fa-bitbucket:before {
-  content: "\f171";
-}
-
-.fa-bitbucket-square:before {
-  content: "\f172";
-}
-
-.fa-tumblr:before {
-  content: "\f173";
-}
-
-.fa-tumblr-square:before {
-  content: "\f174";
-}
-
-.fa-long-arrow-down:before {
-  content: "\f175";
-}
-
-.fa-long-arrow-up:before {
-  content: "\f176";
-}
-
-.fa-long-arrow-left:before {
-  content: "\f177";
-}
-
-.fa-long-arrow-right:before {
-  content: "\f178";
-}
-
-.fa-apple:before {
-  content: "\f179";
-}
-
-.fa-windows:before {
-  content: "\f17a";
-}
-
-.fa-android:before {
-  content: "\f17b";
-}
-
-.fa-linux:before {
-  content: "\f17c";
-}
-
-.fa-dribbble:before {
-  content: "\f17d";
-}
-
-.fa-skype:before {
-  content: "\f17e";
-}
-
-.fa-foursquare:before {
-  content: "\f180";
-}
-
-.fa-trello:before {
-  content: "\f181";
-}
-
-.fa-female:before {
-  content: "\f182";
-}
-
-.fa-male:before {
-  content: "\f183";
-}
-
-.fa-gittip:before {
-  content: "\f184";
-}
-
-.fa-sun-o:before {
-  content: "\f185";
-}
-
-.fa-moon-o:before {
-  content: "\f186";
-}
-
-.fa-archive:before {
-  content: "\f187";
-}
-
-.fa-bug:before {
-  content: "\f188";
-}
-
-.fa-vk:before {
-  content: "\f189";
-}
-
-.fa-weibo:before {
-  content: "\f18a";
-}
-
-.fa-renren:before {
-  content: "\f18b";
-}
-
-.fa-pagelines:before {
-  content: "\f18c";
-}
-
-.fa-stack-exchange:before {
-  content: "\f18d";
-}
-
-.fa-arrow-circle-o-right:before {
-  content: "\f18e";
-}
-
-.fa-arrow-circle-o-left:before {
-  content: "\f190";
-}
-
-.fa-toggle-left:before,
-.fa-caret-square-o-left:before {
-  content: "\f191";
-}
-
-.fa-dot-circle-o:before {
-  content: "\f192";
-}
-
-.fa-wheelchair:before {
-  content: "\f193";
-}
-
-.fa-vimeo-square:before {
-  content: "\f194";
-}
-
-.fa-turkish-lira:before,
-.fa-try:before {
-  content: "\f195";
-}
-
-.fa-plus-square-o:before {
-  content: "\f196";
-}
-
-.fa-space-shuttle:before {
-  content: "\f197";
-}
-
-.fa-slack:before {
-  content: "\f198";
-}
-
-.fa-envelope-square:before {
-  content: "\f199";
-}
-
-.fa-wordpress:before {
-  content: "\f19a";
-}
-
-.fa-openid:before {
-  content: "\f19b";
-}
-
-.fa-institution:before,
-.fa-bank:before,
-.fa-university:before {
-  content: "\f19c";
-}
-
-.fa-mortar-board:before,
-.fa-graduation-cap:before {
-  content: "\f19d";
-}
-
-.fa-yahoo:before {
-  content: "\f19e";
-}
-
-.fa-google:before {
-  content: "\f1a0";
-}
-
-.fa-reddit:before {
-  content: "\f1a1";
-}
-
-.fa-reddit-square:before {
-  content: "\f1a2";
-}
-
-.fa-stumbleupon-circle:before {
-  content: "\f1a3";
-}
-
-.fa-stumbleupon:before {
-  content: "\f1a4";
-}
-
-.fa-delicious:before {
-  content: "\f1a5";
-}
-
-.fa-digg:before {
-  content: "\f1a6";
-}
-
-.fa-pied-piper-square:before,
-.fa-pied-piper:before {
-  content: "\f1a7";
-}
-
-.fa-pied-piper-alt:before {
-  content: "\f1a8";
-}
-
-.fa-drupal:before {
-  content: "\f1a9";
-}
-
-.fa-joomla:before {
-  content: "\f1aa";
-}
-
-.fa-language:before {
-  content: "\f1ab";
-}
-
-.fa-fax:before {
-  content: "\f1ac";
-}
-
-.fa-building:before {
-  content: "\f1ad";
-}
-
-.fa-child:before {
-  content: "\f1ae";
-}
-
-.fa-paw:before {
-  content: "\f1b0";
-}
-
-.fa-spoon:before {
-  content: "\f1b1";
-}
-
-.fa-cube:before {
-  content: "\f1b2";
-}
-
-.fa-cubes:before {
-  content: "\f1b3";
-}
-
-.fa-behance:before {
-  content: "\f1b4";
-}
-
-.fa-behance-square:before {
-  content: "\f1b5";
-}
-
-.fa-steam:before {
-  content: "\f1b6";
-}
-
-.fa-steam-square:before {
-  content: "\f1b7";
-}
-
-.fa-recycle:before {
-  content: "\f1b8";
-}
-
-.fa-automobile:before,
-.fa-car:before {
-  content: "\f1b9";
-}
-
-.fa-cab:before,
-.fa-taxi:before {
-  content: "\f1ba";
-}
-
-.fa-tree:before {
-  content: "\f1bb";
-}
-
-.fa-spotify:before {
-  content: "\f1bc";
-}
-
-.fa-deviantart:before {
-  content: "\f1bd";
-}
-
-.fa-soundcloud:before {
-  content: "\f1be";
-}
-
-.fa-database:before {
-  content: "\f1c0";
-}
-
-.fa-file-pdf-o:before {
-  content: "\f1c1";
-}
-
-.fa-file-word-o:before {
-  content: "\f1c2";
-}
-
-.fa-file-excel-o:before {
-  content: "\f1c3";
-}
-
-.fa-file-powerpoint-o:before {
-  content: "\f1c4";
-}
-
-.fa-file-photo-o:before,
-.fa-file-picture-o:before,
-.fa-file-image-o:before {
-  content: "\f1c5";
-}
-
-.fa-file-zip-o:before,
-.fa-file-archive-o:before {
-  content: "\f1c6";
-}
-
-.fa-file-sound-o:before,
-.fa-file-audio-o:before {
-  content: "\f1c7";
-}
-
-.fa-file-movie-o:before,
-.fa-file-video-o:before {
-  content: "\f1c8";
-}
-
-.fa-file-code-o:before {
-  content: "\f1c9";
-}
-
-.fa-vine:before {
-  content: "\f1ca";
-}
-
-.fa-codepen:before {
-  content: "\f1cb";
-}
-
-.fa-jsfiddle:before {
-  content: "\f1cc";
-}
-
-.fa-life-bouy:before,
-.fa-life-saver:before,
-.fa-support:before,
-.fa-life-ring:before {
-  content: "\f1cd";
-}
-
-.fa-circle-o-notch:before {
-  content: "\f1ce";
-}
-
-.fa-ra:before,
-.fa-rebel:before {
-  content: "\f1d0";
-}
-
-.fa-ge:before,
-.fa-empire:before {
-  content: "\f1d1";
-}
-
-.fa-git-square:before {
-  content: "\f1d2";
-}
-
-.fa-git:before {
-  content: "\f1d3";
-}
-
-.fa-hacker-news:before {
-  content: "\f1d4";
-}
-
-.fa-tencent-weibo:before {
-  content: "\f1d5";
-}
-
-.fa-qq:before {
-  content: "\f1d6";
-}
-
-.fa-wechat:before,
-.fa-weixin:before {
-  content: "\f1d7";
-}
-
-.fa-send:before,
-.fa-paper-plane:before {
-  content: "\f1d8";
-}
-
-.fa-send-o:before,
-.fa-paper-plane-o:before {
-  content: "\f1d9";
-}
-
-.fa-history:before {
-  content: "\f1da";
-}
-
-.fa-circle-thin:before {
-  content: "\f1db";
-}
-
-.fa-header:before {
-  content: "\f1dc";
-}
-
-.fa-paragraph:before {
-  content: "\f1dd";
-}
-
-.fa-sliders:before {
-  content: "\f1de";
-}
-
-.fa-share-alt:before {
-  content: "\f1e0";
-}
-
-.fa-share-alt-square:before {
-  content: "\f1e1";
-}
-
-.fa-bomb:before {
-  content: "\f1e2";
-}
-
-/*! normalize.css v3.0.0 | MIT License | git.io/normalize */
-
-html {
-  font-family: sans-serif;
-  -ms-text-size-adjust: 100%;
-  -webkit-text-size-adjust: 100%;
-}
-
-body {
-  margin: 0;
-}
-
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-main,
-nav,
-section,
-summary {
-  display: block;
-}
-
-audio,
-canvas,
-progress,
-video {
-  display: inline-block;
-  vertical-align: baseline;
-}
-
-audio:not([controls]) {
-  display: none;
-  height: 0;
-}
-
-[hidden],
-template {
-  display: none;
-}
-
-a {
-  background: transparent;
-}
-
-a:active {
-  outline: 0;
-}
-
-abbr[title] {
-  border-bottom: 1px dotted;
-}
-
-b,
-strong {
-  font-weight: bold;
-}
-
-dfn {
-  font-style: italic;
-}
-
-h1 {
-  font-size: 2em;
-  margin: 0.67em 0;
-}
-
-mark {
-  background: #ff0;
-  color: #000;
-}
-
-small {
-  font-size: 80%;
-}
-
-sub,
-sup {
-  font-size: 75%;
-  line-height: 0;
-  position: relative;
-  vertical-align: baseline;
-}
-
-sup {
-  top: -0.5em;
-}
-
-sub {
-  bottom: -0.25em;
-}
-
-img {
-  border: 0;
-}
-
-svg:not(:root) {
-  overflow: hidden;
-}
-
-figure {
-  margin: 1em 40px;
-}
-
-hr {
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-  height: 0;
-}
-
-pre {
-  overflow: auto;
-}
-
-code,
-kbd,
-pre,
-samp {
-  font-family: monospace, monospace;
-  font-size: 1em;
-}
-
-button,
-input,
-optgroup,
-select,
-textarea {
-  color: inherit;
-  font: inherit;
-  margin: 0;
-}
-
-button {
-  overflow: visible;
-}
-
-button,
-select {
-  text-transform: none;
-}
-
-button,
-html input[type="button"],
-input[type="reset"],
-input[type="submit"] {
-  -webkit-appearance: button;
-  cursor: pointer;
-}
-
-button[disabled],
-html input[disabled] {
-  cursor: default;
-}
-
-button::-moz-focus-inner,
-input::-moz-focus-inner {
-  border: 0;
-  padding: 0;
-}
-
-input {
-  line-height: normal;
-}
-
-input[type="checkbox"],
-input[type="radio"] {
-  box-sizing: border-box;
-  padding: 0;
-}
-
-input[type="number"]::-webkit-inner-spin-button,
-input[type="number"]::-webkit-outer-spin-button {
-  height: auto;
-}
-
-input[type="search"] {
-  -webkit-appearance: textfield;
-  -moz-box-sizing: content-box;
-  -webkit-box-sizing: content-box;
-  box-sizing: content-box;
-}
-
-input[type="search"]::-webkit-search-cancel-button,
-input[type="search"]::-webkit-search-decoration {
-  -webkit-appearance: none;
-}
-
-fieldset {
-  border: 1px solid #c0c0c0;
-  margin: 0 2px;
-  padding: 0.35em 0.625em 0.75em;
-}
-
-legend {
-  border: 0;
-  padding: 0;
-}
-
-textarea {
-  overflow: auto;
-}
-
-optgroup {
-  font-weight: bold;
-}
-
-table {
-  border-collapse: collapse;
-  border-spacing: 0;
-}
-
-td,
-th {
-  padding: 0;
-}
-
-* {
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-
-*:before,
-*:after {
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-
-html {
-  font-size: 62.5%;
-  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-}
-
-body {
-  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-  font-size: 14px;
-  line-height: 1.42857143;
-  color: #333333;
-  background-color: #ffffff;
-}
-
-input,
-button,
-select,
-textarea {
-  font-family: inherit;
-  font-size: inherit;
-  line-height: inherit;
-}
-
-a {
-  color: #007aff;
-  text-decoration: none;
-}
-
-a:focus {
-  color: #0055b3;
-  text-decoration: underline;
-}
-
-a:focus {
-  outline: thin dotted;
-  outline: 5px auto -webkit-focus-ring-color;
-  outline-offset: -2px;
-}
-
-figure {
-  margin: 0;
-}
-
-img {
-  vertical-align: middle;
-}
-
-.img-responsive,
-.thumbnail > img,
-.thumbnail a > img,
-.carousel-inner > .item > img,
-.carousel-inner > .item > a > img {
-  display: block;
-  max-width: 100%;
-  height: auto;
-}
-
-.img-rounded {
-  border-radius: 6px;
-}
-
-.img-thumbnail {
-  padding: 4px;
-  line-height: 1.42857143;
-  background-color: #ffffff;
-  border: 1px solid #dddddd;
-  border-radius: 4px;
-  -webkit-transition: all 0.2s ease-in-out;
-  transition: all 0.2s ease-in-out;
-  display: inline-block;
-  max-width: 100%;
-  height: auto;
-}
-
-.img-circle {
-  border-radius: 50%;
-}
-
-hr {
-  margin-top: 20px;
-  margin-bottom: 20px;
-  border: 0;
-  border-top: 1px solid #eeeeee;
-}
-
-.sr-only {
-  position: absolute;
-  width: 1px;
-  height: 1px;
-  margin: -1px;
-  padding: 0;
-  overflow: hidden;
-  clip: rect(0, 0, 0, 0);
-  border: 0;
-}
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-.h1,
-.h2,
-.h3,
-.h4,
-.h5,
-.h6 {
-  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-  font-weight: normal;
-  line-height: 1.1;
-  color: inherit;
-}
-
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small,
-.h1 small,
-.h2 small,
-.h3 small,
-.h4 small,
-.h5 small,
-.h6 small,
-h1 .small,
-h2 .small,
-h3 .small,
-h4 .small,
-h5 .small,
-h6 .small,
-.h1 .small,
-.h2 .small,
-.h3 .small,
-.h4 .small,
-.h5 .small,
-.h6 .small {
-  font-weight: normal;
-  line-height: 1;
-  color: #999999;
-}
-
-h1,
-.h1,
-h2,
-.h2,
-h3,
-.h3 {
-  margin-top: 20px;
-  margin-bottom: 10px;
-}
-
-h1 small,
-.h1 small,
-h2 small,
-.h2 small,
-h3 small,
-.h3 small,
-h1 .small,
-.h1 .small,
-h2 .small,
-.h2 .small,
-h3 .small,
-.h3 .small {
-  font-size: 65%;
-}
-
-h4,
-.h4,
-h5,
-.h5,
-h6,
-.h6 {
-  margin-top: 10px;
-  margin-bottom: 10px;
-}
-
-h4 small,
-.h4 small,
-h5 small,
-.h5 small,
-h6 small,
-.h6 small,
-h4 .small,
-.h4 .small,
-h5 .small,
-.h5 .small,
-h6 .small,
-.h6 .small {
-  font-size: 75%;
-}
-
-h1,
-.h1 {
-  font-size: 36px;
-}
-
-h2,
-.h2 {
-  font-size: 30px;
-}
-
-h3,
-.h3 {
-  font-size: 24px;
-}
-
-h4,
-.h4 {
-  font-size: 18px;
-}
-
-h5,
-.h5 {
-  font-size: 14px;
-}
-
-h6,
-.h6 {
-  font-size: 12px;
-}
-
-p {
-  margin: 0 0 10px;
-}
-
-.lead {
-  margin-bottom: 20px;
-  font-size: 16px;
-  font-weight: 200;
-  line-height: 1.4;
-}
-
-small,
-.small {
-  font-size: 85%;
-}
-
-cite {
-  font-style: normal;
-}
-
-.text-left {
-  text-align: left;
-}
-
-.text-right {
-  text-align: right;
-}
-
-.text-center {
-  text-align: center;
-}
-
-.text-justify {
-  text-align: justify;
-}
-
-.text-muted {
-  color: #999999;
-}
-
-.text-primary {
-  color: #007aff;
-}
-
- {
-  color: #0062cc;
-}
-
-.text-success {
-  color: #3c763d;
-}
-
- {
-  color: #2b542c;
-}
-
-.text-info {
-  color: #31708f;
-}
-
- {
-  color: #245269;
-}
-
-.text-warning {
-  color: #8a6d3b;
-}
-
- {
-  color: #66512c;
-}
-
-.text-danger {
-  color: #a94442;
-}
-
- {
-  color: #843534;
-}
-
-.bg-primary {
-  color: #fff;
-  background-color: #007aff;
-}
-
- {
-  background-color: #0062cc;
-}
-
-.bg-success {
-  background-color: #dff0d8;
-}
-
- {
-  background-color: #c1e2b3;
-}
-
-.bg-info {
-  background-color: #d9edf7;
-}
-
- {
-  background-color: #afd9ee;
-}
-
-.bg-warning {
-  background-color: #fcf8e3;
-}
-
- {
-  background-color: #f7ecb5;
-}
-
-.bg-danger {
-  background-color: #f2dede;
-}
-
- {
-  background-color: #e4b9b9;
-}
-
-.page-header {
-  padding-bottom: 9px;
-  margin: 40px 0 20px;
-  border-bottom: 1px solid #eeeeee;
-}
-
-ul,
-ol {
-  margin-top: 0;
-  margin-bottom: 10px;
-}
-
-ul ul,
-ol ul,
-ul ol,
-ol ol {
-  margin-bottom: 0;
-}
-
-.list-unstyled {
-  padding-left: 0;
-  list-style: none;
-}
-
-.list-inline {
-  padding-left: 0;
-  list-style: none;
-  margin-left: -5px;
-}
-
-.list-inline > li {
-  display: inline-block;
-  padding-left: 5px;
-  padding-right: 5px;
-}
-
-dl {
-  margin-top: 0;
-  margin-bottom: 20px;
-}
-
-dt,
-dd {
-  line-height: 1.42857143;
-}
-
-dt {
-  font-weight: bold;
-}
-
-dd {
-  margin-left: 0;
-}
-
-abbr[title],
-abbr[data-original-title] {
-  cursor: help;
-  border-bottom: 1px dotted #999999;
-}
-
-.initialism {
-  font-size: 90%;
-  text-transform: uppercase;
-}
-
-blockquote {
-  padding: 10px 20px;
-  margin: 0 0 20px;
-  font-size: 17.5px;
-  border-left: 5px solid #eeeeee;
-}
-
-blockquote p:last-child,
-blockquote ul:last-child,
-blockquote ol:last-child {
-  margin-bottom: 0;
-}
-
-blockquote footer,
-blockquote small,
-blockquote .small {
-  display: block;
-  font-size: 80%;
-  line-height: 1.42857143;
-  color: #999999;
-}
-
-blockquote footer:before,
-blockquote small:before,
-blockquote .small:before {
-  content: '\2014 \00A0';
-}
-
-.blockquote-reverse,
-blockquote.pull-right {
-  padding-right: 15px;
-  padding-left: 0;
-  border-right: 5px solid #eeeeee;
-  border-left: 0;
-  text-align: right;
-}
-
-.blockquote-reverse footer:before,
-blockquote.pull-right footer:before,
-.blockquote-reverse small:before,
-blockquote.pull-right small:before,
-.blockquote-reverse .small:before,
-blockquote.pull-right .small:before {
-  content: '';
-}
-
-.blockquote-reverse footer:after,
-blockquote.pull-right footer:after,
-.blockquote-reverse small:after,
-blockquote.pull-right small:after,
-.blockquote-reverse .small:after,
-blockquote.pull-right .small:after {
-  content: '\00A0 \2014';
-}
-
-blockquote:before,
-blockquote:after {
-  content: "";
-}
-
-address {
-  margin-bottom: 20px;
-  font-style: normal;
-  line-height: 1.42857143;
-}
-
-code,
-kbd,
-pre,
-samp {
-  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
-}
-
-code {
-  padding: 2px 4px;
-  font-size: 90%;
-  color: #c7254e;
-  background-color: #f9f2f4;
-  white-space: nowrap;
-  border-radius: 4px;
-}
-
-kbd {
-  padding: 2px 4px;
-  font-size: 90%;
-  color: #ffffff;
-  background-color: #333333;
-  border-radius: 3px;
-  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
-}
-
-pre {
-  display: block;
-  padding: 9.5px;
-  margin: 0 0 10px;
-  font-size: 13px;
-  line-height: 1.42857143;
-  word-break: break-all;
-  word-wrap: break-word;
-  color: #333333;
-  background-color: #f5f5f5;
-  border: 1px solid #cccccc;
-  border-radius: 4px;
-}
-
-pre code {
-  padding: 0;
-  font-size: inherit;
-  color: inherit;
-  white-space: pre-wrap;
-  background-color: transparent;
-  border-radius: 0;
-}
-
-.pre-scrollable {
-  max-height: 340px;
-  overflow-y: scroll;
-}
-
-.container {
-  margin-right: auto;
-  margin-left: auto;
-  padding-left: 15px;
-  padding-right: 15px;
-}
-
-.container-fluid {
-  margin-right: auto;
-  margin-left: auto;
-  padding-left: 15px;
-  padding-right: 15px;
-}
-
-.row {
-  margin-left: -15px;
-  margin-right: -15px;
-}
-
-.col-xs-1,
-.col-sm-1,
-.col-md-1,
-.col-lg-1,
-.col-xs-2,
-.col-sm-2,
-.col-md-2,
-.col-lg-2,
-.col-xs-3,
-.col-sm-3,
-.col-md-3,
-.col-lg-3,
-.col-xs-4,
-.col-sm-4,
-.col-md-4,
-.col-lg-4,
-.col-xs-5,
-.col-sm-5,
-.col-md-5,
-.col-lg-5,
-.col-xs-6,
-.col-sm-6,
-.col-md-6,
-.col-lg-6,
-.col-xs-7,
-.col-sm-7,
-.col-md-7,
-.col-lg-7,
-.col-xs-8,
-.col-sm-8,
-.col-md-8,
-.col-lg-8,
-.col-xs-9,
-.col-sm-9,
-.col-md-9,
-.col-lg-9,
-.col-xs-10,
-.col-sm-10,
-.col-md-10,
-.col-lg-10,
-.col-xs-11,
-.col-sm-11,
-.col-md-11,
-.col-lg-11,
-.col-xs-12,
-.col-sm-12,
-.col-md-12,
-.col-lg-12 {
-  position: relative;
-  min-height: 1px;
-  padding-left: 15px;
-  padding-right: 15px;
-}
-
-.col-xs-1,
-.col-xs-2,
-.col-xs-3,
-.col-xs-4,
-.col-xs-5,
-.col-xs-6,
-.col-xs-7,
-.col-xs-8,
-.col-xs-9,
-.col-xs-10,
-.col-xs-11,
-.col-xs-12 {
-  float: left;
-}
-
-.col-xs-12 {
-  width: 100%;
-}
-
-.col-xs-11 {
-  width: 91.66666667%;
-}
-
-.col-xs-10 {
-  width: 83.33333333%;
-}
-
-.col-xs-9 {
-  width: 75%;
-}
-
-.col-xs-8 {
-  width: 66.66666667%;
-}
-
-.col-xs-7 {
-  width: 58.33333333%;
-}
-
-.col-xs-6 {
-  width: 50%;
-}
-
-.col-xs-5 {
-  width: 41.66666667%;
-}
-
-.col-xs-4 {
-  width: 33.33333333%;
-}
-
-.col-xs-3 {
-  width: 25%;
-}
-
-.col-xs-2 {
-  width: 16.66666667%;
-}
-
-.col-xs-1 {
-  width: 8.33333333%;
-}
-
-.col-xs-pull-12 {
-  right: 100%;
-}
-
-.col-xs-pull-11 {
-  right: 91.66666667%;
-}
-
-.col-xs-pull-10 {
-  right: 83.33333333%;
-}
-
-.col-xs-pull-9 {
-  right: 75%;
-}
-
-.col-xs-pull-8 {
-  right: 66.66666667%;
-}
-
-.col-xs-pull-7 {
-  right: 58.33333333%;
-}
-
-.col-xs-pull-6 {
-  right: 50%;
-}
-
-.col-xs-pull-5 {
-  right: 41.66666667%;
-}
-
-.col-xs-pull-4 {
-  right: 33.33333333%;
-}
-
-.col-xs-pull-3 {
-  right: 25%;
-}
-
-.col-xs-pull-2 {
-  right: 16.66666667%;
-}
-
-.col-xs-pull-1 {
-  right: 8.33333333%;
-}
-
-.col-xs-pull-0 {
-  right: 0%;
-}
-
-.col-xs-push-12 {
-  left: 100%;
-}
-
-.col-xs-push-11 {
-  left: 91.66666667%;
-}
-
-.col-xs-push-10 {
-  left: 83.33333333%;
-}
-
-.col-xs-push-9 {
-  left: 75%;
-}
-
-.col-xs-push-8 {
-  left: 66.66666667%;
-}
-
-.col-xs-push-7 {
-  left: 58.33333333%;
-}
-
-.col-xs-push-6 {
-  left: 50%;
-}
-
-.col-xs-push-5 {
-  left: 41.66666667%;
-}
-
-.col-xs-push-4 {
-  left: 33.33333333%;
-}
-
-.col-xs-push-3 {
-  left: 25%;
-}
-
-.col-xs-push-2 {
-  left: 16.66666667%;
-}
-
-.col-xs-push-1 {
-  left: 8.33333333%;
-}
-
-.col-xs-push-0 {
-  left: 0%;
-}
-
-.col-xs-offset-12 {
-  margin-left: 100%;
-}
-
-.col-xs-offset-11 {
-  margin-left: 91.66666667%;
-}
-
-.col-xs-offset-10 {
-  margin-left: 83.33333333%;
-}
-
-.col-xs-offset-9 {
-  margin-left: 75%;
-}
-
-.col-xs-offset-8 {
-  margin-left: 66.66666667%;
-}
-
-.col-xs-offset-7 {
-  margin-left: 58.33333333%;
-}
-
-.col-xs-offset-6 {
-  margin-left: 50%;
-}
-
-.col-xs-offset-5 {
-  margin-left: 41.66666667%;
-}
-
-.col-xs-offset-4 {
-  margin-left: 33.33333333%;
-}
-
-.col-xs-offset-3 {
-  margin-left: 25%;
-}
-
-.col-xs-offset-2 {
-  margin-left: 16.66666667%;
-}
-
-.col-xs-offset-1 {
-  margin-left: 8.33333333%;
-}
-
-.col-xs-offset-0 {
-  margin-left: 0%;
-}
-
-table {
-  max-width: 100%;
-  background-color: transparent;
-}
-
-th {
-  text-align: left;
-}
-
-.table {
-  width: 100%;
-  margin-bottom: 20px;
-}
-
-.table > thead > tr > th,
-.table > tbody > tr > th,
-.table > tfoot > tr > th,
-.table > thead > tr > td,
-.table > tbody > tr > td,
-.table > tfoot > tr > td {
-  padding: 8px;
-  line-height: 1.42857143;
-  vertical-align: top;
-  border-top: 1px solid #dddddd;
-}
-
-.table > thead > tr > th {
-  vertical-align: bottom;
-  border-bottom: 2px solid #dddddd;
-}
-
-.table > caption + thead > tr:first-child > th,
-.table > colgroup + thead > tr:first-child > th,
-.table > thead:first-child > tr:first-child > th,
-.table > caption + thead > tr:first-child > td,
-.table > colgroup + thead > tr:first-child > td,
-.table > thead:first-child > tr:first-child > td {
-  border-top: 0;
-}
-
-.table > tbody + tbody {
-  border-top: 2px solid #dddddd;
-}
-
-.table .table {
-  background-color: #ffffff;
-}
-
-.table-condensed > thead > tr > th,
-.table-condensed > tbody > tr > th,
-.table-condensed > tfoot > tr > th,
-.table-condensed > thead > tr > td,
-.table-condensed > tbody > tr > td,
-.table-condensed > tfoot > tr > td {
-  padding: 5px;
-}
-
-.table-bordered {
-  border: 1px solid #dddddd;
-}
-
-.table-bordered > thead > tr > th,
-.table-bordered > tbody > tr > th,
-.table-bordered > tfoot > tr > th,
-.table-bordered > thead > tr > td,
-.table-bordered > tbody > tr > td,
-.table-bordered > tfoot > tr > td {
-  border: 1px solid #dddddd;
-}
-
-.table-bordered > thead > tr > th,
-.table-bordered > thead > tr > td {
-  border-bottom-width: 2px;
-}
-
-.table-striped > tbody > tr:nth-child(odd) > td,
-.table-striped > tbody > tr:nth-child(odd) > th {
-  background-color: #f9f9f9;
-}
-
- {
-  background-color: #f5f5f5;
-}
-
-table col[class*="col-"] {
-  position: static;
-  float: none;
-  display: table-column;
-}
-
-table td[class*="col-"],
-table th[class*="col-"] {
-  position: static;
-  float: none;
-  display: table-cell;
-}
-
-.table > thead > tr > td.active,
-.table > tbody > tr > td.active,
-.table > tfoot > tr > td.active,
-.table > thead > tr > th.active,
-.table > tbody > tr > th.active,
-.table > tfoot > tr > th.active,
-.table > thead > tr.active > td,
-.table > tbody > tr.active > td,
-.table > tfoot > tr.active > td,
-.table > thead > tr.active > th,
-.table > tbody > tr.active > th,
-.table > tfoot > tr.active > th {
-  background-color: #f5f5f5;
-}
-
- {
-  background-color: #e8e8e8;
-}
-
-.table > thead > tr > td.success,
-.table > tbody > tr > td.success,
-.table > tfoot > tr > td.success,
-.table > thead > tr > th.success,
-.table > tbody > tr > th.success,
-.table > tfoot > tr > th.success,
-.table > thead > tr.success > td,
-.table > tbody > tr.success > td,
-.table > tfoot > tr.success > td,
-.table > thead > tr.success > th,
-.table > tbody > tr.success > th,
-.table > tfoot > tr.success > th {
-  background-color: #dff0d8;
-}
-
- {
-  background-color: #d0e9c6;
-}
-
-.table > thead > tr > td.info,
-.table > tbody > tr > td.info,
-.table > tfoot > tr > td.info,
-.table > thead > tr > th.info,
-.table > tbody > tr > th.info,
-.table > tfoot > tr > th.info,
-.table > thead > tr.info > td,
-.table > tbody > tr.info > td,
-.table > tfoot > tr.info > td,
-.table > thead > tr.info > th,
-.table > tbody > tr.info > th,
-.table > tfoot > tr.info > th {
-  background-color: #d9edf7;
-}
-
- {
-  background-color: #c4e3f3;
-}
-
-.table > thead > tr > td.warning,
-.table > tbody > tr > td.warning,
-.table > tfoot > tr > td.warning,
-.table > thead > tr > th.warning,
-.table > tbody > tr > th.warning,
-.table > tfoot > tr > th.warning,
-.table > thead > tr.warning > td,
-.table > tbody > tr.warning > td,
-.table > tfoot > tr.warning > td,
-.table > thead > tr.warning > th,
-.table > tbody > tr.warning > th,
-.table > tfoot > tr.warning > th {
-  background-color: #fcf8e3;
-}
-
- {
-  background-color: #faf2cc;
-}
-
-.table > thead > tr > td.danger,
-.table > tbody > tr > td.danger,
-.table > tfoot > tr > td.danger,
-.table > thead > tr > th.danger,
-.table > tbody > tr > th.danger,
-.table > tfoot > tr > th.danger,
-.table > thead > tr.danger > td,
-.table > tbody > tr.danger > td,
-.table > tfoot > tr.danger > td,
-.table > thead > tr.danger > th,
-.table > tbody > tr.danger > th,
-.table > tfoot > tr.danger > th {
-  background-color: #f2dede;
-}
-
- {
-  background-color: #ebcccc;
-}
-
-fieldset {
-  padding: 0;
-  margin: 0;
-  border: 0;
-  min-width: 0;
-}
-
-legend {
-  display: block;
-  width: 100%;
-  padding: 0;
-  margin-bottom: 20px;
-  font-size: 21px;
-  line-height: inherit;
-  color: #333333;
-  border: 0;
-  border-bottom: 1px solid #e5e5e5;
-}
-
-label {
-  display: inline-block;
-  margin-bottom: 5px;
-  font-weight: bold;
-}
-
-input[type="search"] {
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-
-input[type="radio"],
-input[type="checkbox"] {
-  margin: 4px 0 0;
-  margin-top: 1px \9;
-  /* IE8-9 */
-  line-height: normal;
-}
-
-input[type="file"] {
-  display: block;
-}
-
-input[type="range"] {
-  display: block;
-  width: 100%;
-}
-
-select[multiple],
-select[size] {
-  height: auto;
-}
-
-input[type="file"]:focus,
-input[type="radio"]:focus,
-input[type="checkbox"]:focus {
-  outline: thin dotted;
-  outline: 5px auto -webkit-focus-ring-color;
-  outline-offset: -2px;
-}
-
-output {
-  display: block;
-  padding-top: 7px;
-  font-size: 14px;
-  line-height: 1.42857143;
-  color: #555555;
-}
-
-.form-control {
-  display: block;
-  width: 100%;
-  height: 34px;
-  padding: 6px 12px;
-  font-size: 14px;
-  line-height: 1.42857143;
-  color: #555555;
-  background-color: #ffffff;
-  background-image: none;
-  border: 1px solid #cccccc;
-  border-radius: 4px;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-}
-
-.form-control:focus {
-  border-color: #66afe9;
-  outline: 0;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
-  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
-}
-
-.form-control::-moz-placeholder {
-  color: #999999;
-  opacity: 1;
-}
-
-.form-control:-ms-input-placeholder {
-  color: #999999;
-}
-
-.form-control::-webkit-input-placeholder {
-  color: #999999;
-}
-
-.form-control[disabled],
-.form-control[readonly],
-fieldset[disabled] .form-control {
-  cursor: not-allowed;
-  background-color: #eeeeee;
-  opacity: 1;
-}
-
-textarea.form-control {
-  height: auto;
-}
-
-input[type="search"] {
-  -webkit-appearance: none;
-}
-
-input[type="date"] {
-  line-height: 34px;
-}
-
-.form-group {
-  margin-bottom: 15px;
-}
-
-.radio,
-.checkbox {
-  display: block;
-  min-height: 20px;
-  margin-top: 10px;
-  margin-bottom: 10px;
-  padding-left: 20px;
-}
-
-.radio label,
-.checkbox label {
-  display: inline;
-  font-weight: normal;
-  cursor: pointer;
-}
-
-.radio input[type="radio"],
-.radio-inline input[type="radio"],
-.checkbox input[type="checkbox"],
-.checkbox-inline input[type="checkbox"] {
-  float: left;
-  margin-left: -20px;
-}
-
-.radio + .radio,
-.checkbox + .checkbox {
-  margin-top: -5px;
-}
-
-.radio-inline,
-.checkbox-inline {
-  display: inline-block;
-  padding-left: 20px;
-  margin-bottom: 0;
-  vertical-align: middle;
-  font-weight: normal;
-  cursor: pointer;
-}
-
-.radio-inline + .radio-inline,
-.checkbox-inline + .checkbox-inline {
-  margin-top: 0;
-  margin-left: 10px;
-}
-
-input[type="radio"][disabled],
-input[type="checkbox"][disabled],
-.radio[disabled],
-.radio-inline[disabled],
-.checkbox[disabled],
-.checkbox-inline[disabled],
-fieldset[disabled] input[type="radio"],
-fieldset[disabled] input[type="checkbox"],
-fieldset[disabled] .radio,
-fieldset[disabled] .radio-inline,
-fieldset[disabled] .checkbox,
-fieldset[disabled] .checkbox-inline {
-  cursor: not-allowed;
-}
-
-.input-sm {
-  height: 30px;
-  padding: 5px 10px;
-  font-size: 12px;
-  line-height: 1.5;
-  border-radius: 3px;
-}
-
-select.input-sm {
-  height: 30px;
-  line-height: 30px;
-}
-
-textarea.input-sm,
-select[multiple].input-sm {
-  height: auto;
-}
-
-.input-lg {
-  height: 46px;
-  padding: 10px 16px;
-  font-size: 18px;
-  line-height: 1.33;
-  border-radius: 6px;
-}
-
-select.input-lg {
-  height: 46px;
-  line-height: 46px;
-}
-
-textarea.input-lg,
-select[multiple].input-lg {
-  height: auto;
-}
-
-.has-feedback {
-  position: relative;
-}
-
-.has-feedback .form-control {
-  padding-right: 42.5px;
-}
-
-.has-feedback .form-control-feedback {
-  position: absolute;
-  top: 25px;
-  right: 0;
-  display: block;
-  width: 34px;
-  height: 34px;
-  line-height: 34px;
-  text-align: center;
-}
-
-.has-success .help-block,
-.has-success .control-label,
-.has-success .radio,
-.has-success .checkbox,
-.has-success .radio-inline,
-.has-success .checkbox-inline {
-  color: #3c763d;
-}
-
-.has-success .form-control {
-  border-color: #3c763d;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-
-.has-success .form-control:focus {
-  border-color: #2b542c;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
-}
-
-.has-success .input-group-addon {
-  color: #3c763d;
-  border-color: #3c763d;
-  background-color: #dff0d8;
-}
-
-.has-success .form-control-feedback {
-  color: #3c763d;
-}
-
-.has-warning .help-block,
-.has-warning .control-label,
-.has-warning .radio,
-.has-warning .checkbox,
-.has-warning .radio-inline,
-.has-warning .checkbox-inline {
-  color: #8a6d3b;
-}
-
-.has-warning .form-control {
-  border-color: #8a6d3b;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-
-.has-warning .form-control:focus {
-  border-color: #66512c;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
-}
-
-.has-warning .input-group-addon {
-  color: #8a6d3b;
-  border-color: #8a6d3b;
-  background-color: #fcf8e3;
-}
-
-.has-warning .form-control-feedback {
-  color: #8a6d3b;
-}
-
-.has-error .help-block,
-.has-error .control-label,
-.has-error .radio,
-.has-error .checkbox,
-.has-error .radio-inline,
-.has-error .checkbox-inline {
-  color: #a94442;
-}
-
-.has-error .form-control {
-  border-color: #a94442;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-
-.has-error .form-control:focus {
-  border-color: #843534;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
-}
-
-.has-error .input-group-addon {
-  color: #a94442;
-  border-color: #a94442;
-  background-color: #f2dede;
-}
-
-.has-error .form-control-feedback {
-  color: #a94442;
-}
-
-.form-control-static {
-  margin-bottom: 0;
-}
-
-.help-block {
-  display: block;
-  margin-top: 5px;
-  margin-bottom: 10px;
-  color: #737373;
-}
-
-.form-horizontal .control-label,
-.form-horizontal .radio,
-.form-horizontal .checkbox,
-.form-horizontal .radio-inline,
-.form-horizontal .checkbox-inline {
-  margin-top: 0;
-  margin-bottom: 0;
-  padding-top: 7px;
-}
-
-.form-horizontal .radio,
-.form-horizontal .checkbox {
-  min-height: 27px;
-}
-
-.form-horizontal .form-group {
-  margin-left: -15px;
-  margin-right: -15px;
-}
-
-.form-horizontal .form-control-static {
-  padding-top: 7px;
-}
-
-.form-horizontal .has-feedback .form-control-feedback {
-  top: 0;
-  right: 15px;
-}
-
-.btn {
-  display: inline-block;
-  margin-bottom: 0;
-  font-weight: normal;
-  text-align: center;
-  vertical-align: middle;
-  cursor: pointer;
-  background-image: none;
-  border: 1px solid transparent;
-  white-space: nowrap;
-  padding: 6px 12px;
-  font-size: 14px;
-  line-height: 1.42857143;
-  border-radius: 4px;
-  -webkit-user-select: none;
-  -moz-user-select: none;
-  -ms-user-select: none;
-  user-select: none;
-}
-
-.btn:focus,
-.btn:active:focus,
-.btn.active:focus {
-  outline: thin dotted;
-  outline: 5px auto -webkit-focus-ring-color;
-  outline-offset: -2px;
-}
-
-.btn:focus {
-  color: #333333;
-  text-decoration: none;
-}
-
-.btn:active,
-.btn.active {
-  outline: 0;
-  background-image: none;
-  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
-  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
-}
-
-.btn.disabled,
-.btn[disabled],
-fieldset[disabled] .btn {
-  cursor: not-allowed;
-  pointer-events: none;
-  opacity: 0.65;
-  filter: alpha(opacity=65);
-  -webkit-box-shadow: none;
-  box-shadow: none;
-}
-
-.btn-default {
-  color: #333333;
-  background-color: #ffffff;
-  border-color: #cccccc;
-}
-
-.btn-default:focus,
-.btn-default:active,
-.btn-default.active,
-.open .dropdown-toggle.btn-default {
-  color: #333333;
-  background-color: #ebebeb;
-  border-color: #adadad;
-}
-
-.btn-default:active,
-.btn-default.active,
-.open .dropdown-toggle.btn-default {
-  background-image: none;
-}
-
-.btn-default.disabled,
-.btn-default[disabled],
-fieldset[disabled] .btn-default,
-.btn-default.disabled:focus,
-.btn-default[disabled]:focus,
-fieldset[disabled] .btn-default:focus,
-.btn-default.disabled:active,
-.btn-default[disabled]:active,
-fieldset[disabled] .btn-default:active,
-.btn-default.disabled.active,
-.btn-default[disabled].active,
-fieldset[disabled] .btn-default.active {
-  background-color: #ffffff;
-  border-color: #cccccc;
-}
-
-.btn-default .badge {
-  color: #ffffff;
-  background-color: #333333;
-}
-
-.btn-primary {
-  color: #ffffff;
-  background-color: #007aff;
-  border-color: #006ee6;
-}
-
-.btn-primary:focus,
-.btn-primary:active,
-.btn-primary.active,
-.open .dropdown-toggle.btn-primary {
-  color: #ffffff;
-  background-color: #0066d6;
-  border-color: #0051a8;
-}
-
-.btn-primary:active,
-.btn-primary.active,
-.open .dropdown-toggle.btn-primary {
-  background-image: none;
-}
-
-.btn-primary.disabled,
-.btn-primary[disabled],
-fieldset[disabled] .btn-primary,
-.btn-primary.disabled:focus,
-.btn-primary[disabled]:focus,
-fieldset[disabled] .btn-primary:focus,
-.btn-primary.disabled:active,
-.btn-primary[disabled]:active,
-fieldset[disabled] .btn-primary:active,
-.btn-primary.disabled.active,
-.btn-primary[disabled].active,
-fieldset[disabled] .btn-primary.active {
-  background-color: #007aff;
-  border-color: #006ee6;
-}
-
-.btn-primary .badge {
-  color: #007aff;
-  background-color: #ffffff;
-}
-
-.btn-success {
-  color: #ffffff;
-  background-color: #4cd964;
-  border-color: #37d552;
-}
-
-.btn-success:focus,
-.btn-success:active,
-.btn-success.active,
-.open .dropdown-toggle.btn-success {
-  color: #ffffff;
-  background-color: #2cd048;
-  border-color: #24aa3b;
-}
-
-.btn-success:active,
-.btn-success.active,
-.open .dropdown-toggle.btn-success {
-  background-image: none;
-}
-
-.btn-success.disabled,
-.btn-success[disabled],
-fieldset[disabled] .btn-success,
-.btn-success.disabled:focus,
-.btn-success[disabled]:focus,
-fieldset[disabled] .btn-success:focus,
-.btn-success.disabled:active,
-.btn-success[disabled]:active,
-fieldset[disabled] .btn-success:active,
-.btn-success.disabled.active,
-.btn-success[disabled].active,
-fieldset[disabled] .btn-success.active {
-  background-color: #4cd964;
-  border-color: #37d552;
-}
-
-.btn-success .badge {
-  color: #4cd964;
-  background-color: #ffffff;
-}
-
-.btn-info {
-  color: #ffffff;
-  background-color: #34aadc;
-  border-color: #249ed2;
-}
-
-.btn-info:focus,
-.btn-info:active,
-.btn-info.active,
-.open .dropdown-toggle.btn-info {
-  color: #ffffff;
-  background-color: #2295c5;
-  border-color: #1b779e;
-}
-
-.btn-info:active,
-.btn-info.active,
-.open .dropdown-toggle.btn-info {
-  background-image: none;
-}
-
-.btn-info.disabled,
-.btn-info[disabled],
-fieldset[disabled] .btn-info,
-.btn-info.disabled:focus,
-.btn-info[disabled]:focus,
-fieldset[disabled] .btn-info:focus,
-.btn-info.disabled:active,
-.btn-info[disabled]:active,
-fieldset[disabled] .btn-info:active,
-.btn-info.disabled.active,
-.btn-info[disabled].active,
-fieldset[disabled] .btn-info.active {
-  background-color: #34aadc;
-  border-color: #249ed2;
-}
-
-.btn-info .badge {
-  color: #34aadc;
-  background-color: #ffffff;
-}
-
-.btn-warning {
-  color: #ffffff;
-  background-color: #ffcc00;
-  border-color: #e6b800;
-}
-
-.btn-warning:focus,
-.btn-warning:active,
-.btn-warning.active,
-.open .dropdown-toggle.btn-warning {
-  color: #ffffff;
-  background-color: #d6ab00;
-  border-color: #a88700;
-}
-
-.btn-warning:active,
-.btn-warning.active,
-.open .dropdown-toggle.btn-warning {
-  background-image: none;
-}
-
-.btn-warning.disabled,
-.btn-warning[disabled],
-fieldset[disabled] .btn-warning,
-.btn-warning.disabled:focus,
-.btn-warning[disabled]:focus,
-fieldset[disabled] .btn-warning:focus,
-.btn-warning.disabled:active,
-.btn-warning[disabled]:active,
-fieldset[disabled] .btn-warning:active,
-.btn-warning.disabled.active,
-.btn-warning[disabled].active,
-fieldset[disabled] .btn-warning.active {
-  background-color: #ffcc00;
-  border-color: #e6b800;
-}
-
-.btn-warning .badge {
-  color: #ffcc00;
-  background-color: #ffffff;
-}
-
-.btn-danger {
-  color: #ffffff;
-  background-color: #ff3b30;
-  border-color: #ff2317;
-}
-
-.btn-danger:focus,
-.btn-danger:active,
-.btn-danger.active,
-.open .dropdown-toggle.btn-danger {
-  color: #ffffff;
-  background-color: #ff1407;
-  border-color: #d80b00;
-}
-
-.btn-danger:active,
-.btn-danger.active,
-.open .dropdown-toggle.btn-danger {
-  background-image: none;
-}
-
-.btn-danger.disabled,
-.btn-danger[disabled],
-fieldset[disabled] .btn-danger,
-.btn-danger.disabled:focus,
-.btn-danger[disabled]:focus,
-fieldset[disabled] .btn-danger:focus,
-.btn-danger.disabled:active,
-.btn-danger[disabled]:active,
-fieldset[disabled] .btn-danger:active,
-.btn-danger.disabled.active,
-.btn-danger[disabled].active,
-fieldset[disabled] .btn-danger.active {
-  background-color: #ff3b30;
-  border-color: #ff2317;
-}
-
-.btn-danger .badge {
-  color: #ff3b30;
-  background-color: #ffffff;
-}
-
-.btn-link {
-  color: #007aff;
-  font-weight: normal;
-  cursor: pointer;
-  border-radius: 0;
-}
-
-.btn-link,
-.btn-link:active,
-.btn-link[disabled],
-fieldset[disabled] .btn-link {
-  background-color: transparent;
-  -webkit-box-shadow: none;
-  box-shadow: none;
-}
-
-.btn-link,
-.btn-link:focus,
-.btn-link:active {
-  border-color: transparent;
-}
-
-.btn-link:focus {
-  color: #0055b3;
-  text-decoration: underline;
-  background-color: transparent;
-}
-
-.btn-link[disabled]:focus,
-fieldset[disabled] .btn-link:focus {
-  color: #999999;
-  text-decoration: none;
-}
-
-.btn-lg,
-.btn-group-lg > .btn {
-  padding: 10px 16px;
-  font-size: 18px;
-  line-height: 1.33;
-  border-radius: 6px;
-}
-
-.btn-sm,
-.btn-group-sm > .btn {
-  padding: 5px 10px;
-  font-size: 12px;
-  line-height: 1.5;
-  border-radius: 3px;
-}
-
-.btn-xs,
-.btn-group-xs > .btn {
-  padding: 1px 5px;
-  font-size: 12px;
-  line-height: 1.5;
-  border-radius: 3px;
-}
-
-.btn-block {
-  display: block;
-  width: 100%;
-  padding-left: 0;
-  padding-right: 0;
-}
-
-.btn-block + .btn-block {
-  margin-top: 5px;
-}
-
-input[type="submit"].btn-block,
-input[type="reset"].btn-block,
-input[type="button"].btn-block {
-  width: 100%;
-}
-
-.fade {
-  opacity: 0;
-  -webkit-transition: opacity 0.15s linear;
-  transition: opacity 0.15s linear;
-}
-
-.fade.in {
-  opacity: 1;
-}
-
-.collapse {
-  display: none;
-}
-
-.collapse.in {
-  display: block;
-}
-
-.collapsing {
-  position: relative;
-  height: 0;
-  overflow: hidden;
-  -webkit-transition: height 0.35s ease;
-  transition: height 0.35s ease;
-}
-
-.caret {
-  display: inline-block;
-  width: 0;
-  height: 0;
-  margin-left: 2px;
-  vertical-align: middle;
-  border-top: 4px solid;
-  border-right: 4px solid transparent;
-  border-left: 4px solid transparent;
-}
-
-.dropdown {
-  position: relative;
-}
-
-.dropdown-toggle:focus {
-  outline: 0;
-}
-
-.dropdown-menu {
-  position: absolute;
-  top: 100%;
-  left: 0;
-  z-index: 1000;
-  display: none;
-  float: left;
-  min-width: 160px;
-  padding: 5px 0;
-  margin: 2px 0 0;
-  list-style: none;
-  font-size: 14px;
-  background-color: #ffffff;
-  border: 1px solid #cccccc;
-  border: 1px solid rgba(0, 0, 0, 0.15);
-  border-radius: 4px;
-  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
-  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
-  background-clip: padding-box;
-}
-
-.dropdown-menu.pull-right {
-  right: 0;
-  left: auto;
-}
-
-.dropdown-menu .divider {
-  height: 1px;
-  margin: 9px 0;
-  overflow: hidden;
-  background-color: #e5e5e5;
-}
-
-.dropdown-menu > li > a {
-  display: block;
-  padding: 3px 20px;
-  clear: both;
-  font-weight: normal;
-  line-height: 1.42857143;
-  color: #333333;
-  white-space: nowrap;
-}
-
-.dropdown-menu > li > a:focus {
-  text-decoration: none;
-  color: #262626;
-  background-color: #f5f5f5;
-}
-
-.dropdown-menu > .active > a,
-.dropdown-menu > .active > a:focus {
-  color: #ffffff;
-  text-decoration: none;
-  outline: 0;
-  background-color: #007aff;
-}
-
-.dropdown-menu > .disabled > a,
-.dropdown-menu > .disabled > a:focus {
-  color: #999999;
-}
-
-.dropdown-menu > .disabled > a:focus {
-  text-decoration: none;
-  background-color: transparent;
-  background-image: none;
-  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-  cursor: not-allowed;
-}
-
-.open > .dropdown-menu {
-  display: block;
-}
-
-.open > a {
-  outline: 0;
-}
-
-.dropdown-menu-right {
-  left: auto;
-  right: 0;
-}
-
-.dropdown-menu-left {
-  left: 0;
-  right: auto;
-}
-
-.dropdown-header {
-  display: block;
-  padding: 3px 20px;
-  font-size: 12px;
-  line-height: 1.42857143;
-  color: #999999;
-}
-
-.dropdown-backdrop {
-  position: fixed;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  top: 0;
-  z-index: 990;
-}
-
-.pull-right > .dropdown-menu {
-  right: 0;
-  left: auto;
-}
-
-.dropup .caret,
-.navbar-fixed-bottom .dropdown .caret {
-  border-top: 0;
-  border-bottom: 4px solid;
-  content: "";
-}
-
-.dropup .dropdown-menu,
-.navbar-fixed-bottom .dropdown .dropdown-menu {
-  top: auto;
-  bottom: 100%;
-  margin-bottom: 1px;
-}
-
-.btn-group,
-.btn-group-vertical {
-  position: relative;
-  display: inline-block;
-  vertical-align: middle;
-}
-
-.btn-group > .btn,
-.btn-group-vertical > .btn {
-  position: relative;
-  float: left;
-}
-
-.btn-group > .btn:focus,
-.btn-group-vertical > .btn:focus,
-.btn-group > .btn:active,
-.btn-group-vertical > .btn:active,
-.btn-group > .btn.active,
-.btn-group-vertical > .btn.active {
-  z-index: 2;
-}
-
-.btn-group > .btn:focus,
-.btn-group-vertical > .btn:focus {
-  outline: none;
-}
-
-.btn-group .btn + .btn,
-.btn-group .btn + .btn-group,
-.btn-group .btn-group + .btn,
-.btn-group .btn-group + .btn-group {
-  margin-left: -1px;
-}
-
-.btn-toolbar {
-  margin-left: -5px;
-}
-
-.btn-toolbar .btn-group,
-.btn-toolbar .input-group {
-  float: left;
-}
-
-.btn-toolbar > .btn,
-.btn-toolbar > .btn-group,
-.btn-toolbar > .input-group {
-  margin-left: 5px;
-}
-
-.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
-  border-radius: 0;
-}
-
-.btn-group > .btn:first-child {
-  margin-left: 0;
-}
-
-.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
-  border-bottom-right-radius: 0;
-  border-top-right-radius: 0;
-}
-
-.btn-group > .btn:last-child:not(:first-child),
-.btn-group > .dropdown-toggle:not(:first-child) {
-  border-bottom-left-radius: 0;
-  border-top-left-radius: 0;
-}
-
-.btn-group > .btn-group {
-  float: left;
-}
-
-.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
-  border-radius: 0;
-}
-
-.btn-group > .btn-group:first-child > .btn:last-child,
-.btn-group > .btn-group:first-child > .dropdown-toggle {
-  border-bottom-right-radius: 0;
-  border-top-right-radius: 0;
-}
-
-.btn-group > .btn-group:last-child > .btn:first-child {
-  border-bottom-left-radius: 0;
-  border-top-left-radius: 0;
-}
-
-.btn-group .dropdown-toggle:active,
-.btn-group.open .dropdown-toggle {
-  outline: 0;
-}
-
-.btn-group > .btn + .dropdown-toggle {
-  padding-left: 8px;
-  padding-right: 8px;
-}
-
-.btn-group > .btn-lg + .dropdown-toggle {
-  padding-left: 12px;
-  padding-right: 12px;
-}
-
-.btn-group.open .dropdown-toggle {
-  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
-  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
-}
-
-.btn-group.open .dropdown-toggle.btn-link {
-  -webkit-box-shadow: none;
-  box-shadow: none;
-}
-
-.btn .caret {
-  margin-left: 0;
-}
-
-.btn-lg .caret {
-  border-width: 5px 5px 0;
-  border-bottom-width: 0;
-}
-
-.dropup .btn-lg .caret {
-  border-width: 0 5px 5px;
-}
-
-.btn-group-vertical > .btn,
-.btn-group-vertical > .btn-group,
-.btn-group-vertical > .btn-group > .btn {
-  display: block;
-  float: none;
-  width: 100%;
-  max-width: 100%;
-}
-
-.btn-group-vertical > .btn-group > .btn {
-  float: none;
-}
-
-.btn-group-vertical > .btn + .btn,
-.btn-group-vertical > .btn + .btn-group,
-.btn-group-vertical > .btn-group + .btn,
-.btn-group-vertical > .btn-group + .btn-group {
-  margin-top: -1px;
-  margin-left: 0;
-}
-
-.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
-  border-radius: 0;
-}
-
-.btn-group-vertical > .btn:first-child:not(:last-child) {
-  border-top-right-radius: 4px;
-  border-bottom-right-radius: 0;
-  border-bottom-left-radius: 0;
-}
-
-.btn-group-vertical > .btn:last-child:not(:first-child) {
-  border-bottom-left-radius: 4px;
-  border-top-right-radius: 0;
-  border-top-left-radius: 0;
-}
-
-.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
-  border-radius: 0;
-}
-
-.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
-.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
-  border-bottom-right-radius: 0;
-  border-bottom-left-radius: 0;
-}
-
-.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
-  border-top-right-radius: 0;
-  border-top-left-radius: 0;
-}
-
-.btn-group-justified {
-  display: table;
-  width: 100%;
-  table-layout: fixed;
-  border-collapse: separate;
-}
-
-.btn-group-justified > .btn,
-.btn-group-justified > .btn-group {
-  float: none;
-  display: table-cell;
-  width: 1%;
-}
-
-.btn-group-justified > .btn-group .btn {
-  width: 100%;
-}
-
-[data-toggle="buttons"] > .btn > input[type="radio"],
-[data-toggle="buttons"] > .btn > input[type="checkbox"] {
-  display: none;
-}
-
-.input-group {
-  position: relative;
-  display: table;
-  border-collapse: separate;
-}
-
-.input-group[class*="col-"] {
-  float: none;
-  padding-left: 0;
-  padding-right: 0;
-}
-
-.input-group .form-control {
-  position: relative;
-  z-index: 2;
-  float: left;
-  width: 100%;
-  margin-bottom: 0;
-}
-
-.input-group-lg > .form-control,
-.input-group-lg > .input-group-addon,
-.input-group-lg > .input-group-btn > .btn {
-  height: 46px;
-  padding: 10px 16px;
-  font-size: 18px;
-  line-height: 1.33;
-  border-radius: 6px;
-}
-
-select.input-group-lg > .form-control,
-select.input-group-lg > .input-group-addon,
-select.input-group-lg > .input-group-btn > .btn {
-  height: 46px;
-  line-height: 46px;
-}
-
-textarea.input-group-lg > .form-control,
-textarea.input-group-lg > .input-group-addon,
-textarea.input-group-lg > .input-group-btn > .btn,
-select[multiple].input-group-lg > .form-control,
-select[multiple].input-group-lg > .input-group-addon,
-select[multiple].input-group-lg > .input-group-btn > .btn {
-  height: auto;
-}
-
-.input-group-sm > .form-control,
-.input-group-sm > .input-group-addon,
-.input-group-sm > .input-group-btn > .btn {
-  height: 30px;
-  padding: 5px 10px;
-  font-size: 12px;
-  line-height: 1.5;
-  border-radius: 3px;
-}
-
-select.input-group-sm > .form-control,
-select.input-group-sm > .input-group-addon,
-select.input-group-sm > .input-group-btn > .btn {
-  height: 30px;
-  line-height: 30px;
-}
-
-textarea.input-group-sm > .form-control,
-textarea.input-group-sm > .input-group-addon,
-textarea.input-group-sm > .input-group-btn > .btn,
-select[multiple].input-group-sm > .form-control,
-select[multiple].input-group-sm > .input-group-addon,
-select[multiple].input-group-sm > .input-group-btn > .btn {
-  height: auto;
-}
-
-.input-group-addon,
-.input-group-btn,
-.input-group .form-control {
-  display: table-cell;
-}
-
-.input-group-addon:not(:first-child):not(:last-child),
-.input-group-btn:not(:first-child):not(:last-child),
-.input-group .form-control:not(:first-child):not(:last-child) {
-  border-radius: 0;
-}
-
-.input-group-addon,
-.input-group-btn {
-  width: 1%;
-  white-space: nowrap;
-  vertical-align: middle;
-}
-
-.input-group-addon {
-  padding: 6px 12px;
-  font-size: 14px;
-  font-weight: normal;
-  line-height: 1;
-  color: #555555;
-  text-align: center;
-  background-color: #eeeeee;
-  border: 1px solid #cccccc;
-  border-radius: 4px;
-}
-
-.input-group-addon.input-sm {
-  padding: 5px 10px;
-  font-size: 12px;
-  border-radius: 3px;
-}
-
-.input-group-addon.input-lg {
-  padding: 10px 16px;
-  font-size: 18px;
-  border-radius: 6px;
-}
-
-.input-group-addon input[type="radio"],
-.input-group-addon input[type="checkbox"] {
-  margin-top: 0;
-}
-
-.input-group .form-control:first-child,
-.input-group-addon:first-child,
-.input-group-btn:first-child > .btn,
-.input-group-btn:first-child > .btn-group > .btn,
-.input-group-btn:first-child > .dropdown-toggle,
-.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
-.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
-  border-bottom-right-radius: 0;
-  border-top-right-radius: 0;
-}
-
-.input-group-addon:first-child {
-  border-right: 0;
-}
-
-.input-group .form-control:last-child,
-.input-group-addon:last-child,
-.input-group-btn:last-child > .btn,
-.input-group-btn:last-child > .btn-group > .btn,
-.input-group-btn:last-child > .dropdown-toggle,
-.input-group-btn:first-child > .btn:not(:first-child),
-.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
-  border-bottom-left-radius: 0;
-  border-top-left-radius: 0;
-}
-
-.input-group-addon:last-child {
-  border-left: 0;
-}
-
-.input-group-btn {
-  position: relative;
-  font-size: 0;
-  white-space: nowrap;
-}
-
-.input-group-btn > .btn {
-  position: relative;
-}
-
-.input-group-btn > .btn + .btn {
-  margin-left: -1px;
-}
-
-.input-group-btn > .btn:focus,
-.input-group-btn > .btn:active {
-  z-index: 2;
-}
-
-.input-group-btn:first-child > .btn,
-.input-group-btn:first-child > .btn-group {
-  margin-right: -1px;
-}
-
-.input-group-btn:last-child > .btn,
-.input-group-btn:last-child > .btn-group {
-  margin-left: -1px;
-}
-
-.nav {
-  margin-bottom: 0;
-  padding-left: 0;
-  list-style: none;
-}
-
-.nav > li {
-  position: relative;
-  display: block;
-}
-
-.nav > li > a {
-  position: relative;
-  display: block;
-  padding: 10px 15px;
-}
-
-.nav > li > a:focus {
-  text-decoration: none;
-  background-color: #eeeeee;
-}
-
-.nav > li.disabled > a {
-  color: #999999;
-}
-
-.nav > li.disabled > a:focus {
-  color: #999999;
-  text-decoration: none;
-  background-color: transparent;
-  cursor: not-allowed;
-}
-
-.nav .open > a,
-.nav .open > a:focus {
-  background-color: #eeeeee;
-  border-color: #007aff;
-}
-
-.nav .nav-divider {
-  height: 1px;
-  margin: 9px 0;
-  overflow: hidden;
-  background-color: #e5e5e5;
-}
-
-.nav > li > a > img {
-  max-width: none;
-}
-
-.nav-tabs {
-  border-bottom: 1px solid #dddddd;
-}
-
-.nav-tabs > li {
-  float: left;
-  margin-bottom: -1px;
-}
-
-.nav-tabs > li > a {
-  margin-right: 2px;
-  line-height: 1.42857143;
-  border: 1px solid transparent;
-  border-radius: 4px 4px 0 0;
-}
-
- {
-  border-color: #eeeeee #eeeeee #dddddd;
-}
-
-.nav-tabs > li.active > a,
-.nav-tabs > li.active > a:focus {
-  color: #555555;
-  background-color: #ffffff;
-  border: 1px solid #dddddd;
-  border-bottom-color: transparent;
-  cursor: default;
-}
-
-.nav-tabs.nav-justified {
-  width: 100%;
-  border-bottom: 0;
-}
-
-.nav-tabs.nav-justified > li {
-  float: none;
-}
-
-.nav-tabs.nav-justified > li > a {
-  text-align: center;
-  margin-bottom: 5px;
-}
-
-.nav-tabs.nav-justified > .dropdown .dropdown-menu {
-  top: auto;
-  left: auto;
-}
-
-.nav-tabs.nav-justified > li > a {
-  margin-right: 0;
-  border-radius: 4px;
-}
-
-.nav-tabs.nav-justified > .active > a,
-.nav-tabs.nav-justified > .active > a:focus {
-  border: 1px solid #dddddd;
-}
-
-.nav-pills > li {
-  float: left;
-}
-
-.nav-pills > li > a {
-  border-radius: 4px;
-}
-
-.nav-pills > li + li {
-  margin-left: 2px;
-}
-
-.nav-pills > li.active > a,
-.nav-pills > li.active > a:focus {
-  color: #ffffff;
-  background-color: #007aff;
-}
-
-.nav-stacked > li {
-  float: none;
-}
-
-.nav-stacked > li + li {
-  margin-top: 2px;
-  margin-left: 0;
-}
-
-.nav-justified {
-  width: 100%;
-}
-
-.nav-justified > li {
-  float: none;
-}
-
-.nav-justified > li > a {
-  text-align: center;
-  margin-bottom: 5px;
-}
-
-.nav-justified > .dropdown .dropdown-menu {
-  top: auto;
-  left: auto;
-}
-
-.nav-tabs-justified {
-  border-bottom: 0;
-}
-
-.nav-tabs-justified > li > a {
-  margin-right: 0;
-  border-radius: 4px;
-}
-
-.nav-tabs-justified > .active > a,
-.nav-tabs-justified > .active > a:focus {
-  border: 1px solid #dddddd;
-}
-
-.tab-content > .tab-pane {
-  display: none;
-}
-
-.tab-content > .active {
-  display: block;
-}
-
-.nav-tabs .dropdown-menu {
-  margin-top: -1px;
-  border-top-right-radius: 0;
-  border-top-left-radius: 0;
-}
-
-.navbar {
-  position: relative;
-  min-height: 50px;
-  margin-bottom: 20px;
-  border: 1px solid transparent;
-}
-
-.navbar-collapse {
-  max-height: 340px;
-  overflow-x: visible;
-  padding-right: 15px;
-  padding-left: 15px;
-  border-top: 1px solid transparent;
-  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
-  -webkit-overflow-scrolling: touch;
-}
-
-.navbar-collapse.in {
-  overflow-y: auto;
-}
-
-.container > .navbar-header,
-.container-fluid > .navbar-header,
-.container > .navbar-collapse,
-.container-fluid > .navbar-collapse {
-  margin-right: -15px;
-  margin-left: -15px;
-}
-
-.navbar-static-top {
-  z-index: 1000;
-  border-width: 0 0 1px;
-}
-
-.navbar-fixed-top,
-.navbar-fixed-bottom {
-  position: fixed;
-  right: 0;
-  left: 0;
-  z-index: 1030;
-}
-
-.navbar-fixed-top {
-  top: 0;
-  border-width: 0 0 1px;
-}
-
-.navbar-fixed-bottom {
-  bottom: 0;
-  margin-bottom: 0;
-  border-width: 1px 0 0;
-}
-
-.navbar-brand {
-  float: left;
-  padding: 15px 15px;
-  font-size: 18px;
-  line-height: 20px;
-  height: 50px;
-}
-
-.navbar-brand:focus {
-  text-decoration: none;
-}
-
-.navbar-toggle {
-  position: relative;
-  float: right;
-  margin-right: 15px;
-  padding: 9px 10px;
-  margin-top: 8px;
-  margin-bottom: 8px;
-  background-color: transparent;
-  background-image: none;
-  border: 1px solid transparent;
-  border-radius: 4px;
-}
-
-.navbar-toggle:focus {
-  outline: none;
-}
-
-.navbar-toggle .icon-bar {
-  display: block;
-  width: 22px;
-  height: 2px;
-  border-radius: 1px;
-}
-
-.navbar-toggle .icon-bar + .icon-bar {
-  margin-top: 4px;
-}
-
-.navbar-nav {
-  margin: 7.5px -15px;
-}
-
-.navbar-nav > li > a {
-  padding-top: 10px;
-  padding-bottom: 10px;
-  line-height: 20px;
-}
-
-.navbar-form {
-  margin-left: -15px;
-  margin-right: -15px;
-  padding: 10px 15px;
-  border-top: 1px solid transparent;
-  border-bottom: 1px solid transparent;
-  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
-  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
-  margin-top: 8px;
-  margin-bottom: 8px;
-}
-
-.navbar-nav > li > .dropdown-menu {
-  margin-top: 0;
-  border-top-right-radius: 0;
-  border-top-left-radius: 0;
-}
-
-.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
-  border-bottom-right-radius: 0;
-  border-bottom-left-radius: 0;
-}
-
-.navbar-btn {
-  margin-top: 8px;
-  margin-bottom: 8px;
-}
-
-.navbar-btn.btn-sm {
-  margin-top: 10px;
-  margin-bottom: 10px;
-}
-
-.navbar-btn.btn-xs {
-  margin-top: 14px;
-  margin-bottom: 14px;
-}
-
-.navbar-text {
-  margin-top: 15px;
-  margin-bottom: 15px;
-}
-
-.navbar-default {
-  background-color: #f7f7f7;
-  border-color: #cccccc;
-}
-
-.navbar-default .navbar-brand {
-  color: #007aff;
-}
-
-.navbar-default .navbar-brand:focus {
-  color: #0062cc;
-  background-color: transparent;
-}
-
-.navbar-default .navbar-text {
-  color: #007aff;
-}
-
-.navbar-default .navbar-nav > li > a {
-  color: #007aff;
-}
-
-.navbar-default .navbar-nav > li > a:focus {
-  color: #006ee6;
-  background-color: transparent;
-}
-
-.navbar-default .navbar-nav > .active > a,
-.navbar-default .navbar-nav > .active > a:focus {
-  color: #1a87ff;
-  background-color: #e6e6e6;
-}
-
-.navbar-default .navbar-nav > .disabled > a,
-.navbar-default .navbar-nav > .disabled > a:focus {
-  color: #66afff;
-  background-color: transparent;
-}
-
-.navbar-default .navbar-toggle {
-  border-color: #dddddd;
-}
-
-.navbar-default .navbar-toggle:focus {
-  background-color: #dddddd;
-}
-
-.navbar-default .navbar-toggle .icon-bar {
-  background-color: #cccccc;
-}
-
-.navbar-default .navbar-collapse,
-.navbar-default .navbar-form {
-  border-color: #cccccc;
-}
-
-.navbar-default .navbar-nav > .open > a,
-.navbar-default .navbar-nav > .open > a:focus {
-  background-color: #e6e6e6;
-  color: #1a87ff;
-}
-
-.navbar-default .navbar-link {
-  color: #007aff;
-}
-
- {
-  color: #006ee6;
-}
-
-.navbar-inverse {
-  background-color: #222222;
-  border-color: #080808;
-}
-
-.navbar-inverse .navbar-brand {
-  color: #999999;
-}
-
-.navbar-inverse .navbar-brand:focus {
-  color: #ffffff;
-  background-color: transparent;
-}
-
-.navbar-inverse .navbar-text {
-  color: #999999;
-}
-
-.navbar-inverse .navbar-nav > li > a {
-  color: #999999;
-}
-
-.navbar-inverse .navbar-nav > li > a:focus {
-  color: #ffffff;
-  background-color: transparent;
-}
-
-.navbar-inverse .navbar-nav > .active > a,
-.navbar-inverse .navbar-nav > .active > a:focus {
-  color: #ffffff;
-  background-color: #080808;
-}
-
-.navbar-inverse .navbar-nav > .disabled > a,
-.navbar-inverse .navbar-nav > .disabled > a:focus {
-  color: #444444;
-  background-color: transparent;
-}
-
-.navbar-inverse .navbar-toggle {
-  border-color: #333333;
-}
-
-.navbar-inverse .navbar-toggle:focus {
-  background-color: #333333;
-}
-
-.navbar-inverse .navbar-toggle .icon-bar {
-  background-color: #ffffff;
-}
-
-.navbar-inverse .navbar-collapse,
-.navbar-inverse .navbar-form {
-  border-color: #101010;
-}
-
-.navbar-inverse .navbar-nav > .open > a,
-.navbar-inverse .navbar-nav > .open > a:focus {
-  background-color: #080808;
-  color: #ffffff;
-}
-
-.navbar-inverse .navbar-link {
-  color: #999999;
-}
-
- {
-  color: #ffffff;
-}
-
-.pager {
-  padding-left: 0;
-  margin: 20px 0;
-  list-style: none;
-  text-align: center;
-}
-
-.pager li {
-  display: inline;
-}
-
-.pager li > a,
-.pager li > span {
-  display: inline-block;
-  padding: 5px 14px;
-  background-color: #ffffff;
-  border: 1px solid #dddddd;
-  border-radius: 15px;
-}
-
-.pager li > a:focus {
-  text-decoration: none;
-  background-color: #eeeeee;
-}
-
-.pager .next > a,
-.pager .next > span {
-  float: right;
-}
-
-.pager .previous > a,
-.pager .previous > span {
-  float: left;
-}
-
-.pager .disabled > a,
-.pager .disabled > a:focus,
-.pager .disabled > span {
-  color: #999999;
-  background-color: #ffffff;
-  cursor: not-allowed;
-}
-
-.label {
-  display: inline;
-  padding: .2em .6em .3em;
-  font-size: 75%;
-  font-weight: bold;
-  line-height: 1;
-  color: #ffffff;
-  text-align: center;
-  white-space: nowrap;
-  vertical-align: baseline;
-  border-radius: .25em;
-}
-
-.label[href]:focus {
-  color: #ffffff;
-  text-decoration: none;
-  cursor: pointer;
-}
-
-.label:empty {
-  display: none;
-}
-
-.btn .label {
-  position: relative;
-  top: -1px;
-}
-
-.label-default {
-  background-color: #999999;
-}
-
-.label-default[href]:focus {
-  background-color: #808080;
-}
-
-.label-primary {
-  background-color: #007aff;
-}
-
-.label-primary[href]:focus {
-  background-color: #0062cc;
-}
-
-.label-success {
-  background-color: #4cd964;
-}
-
-.label-success[href]:focus {
-  background-color: #2ac845;
-}
-
-.label-info {
-  background-color: #34aadc;
-}
-
-.label-info[href]:focus {
-  background-color: #218ebd;
-}
-
-.label-warning {
-  background-color: #ffcc00;
-}
-
-.label-warning[href]:focus {
-  background-color: #cca300;
-}
-
-.label-danger {
-  background-color: #ff3b30;
-}
-
-.label-danger[href]:focus {
-  background-color: #fc0d00;
-}
-
-.badge {
-  display: inline-block;
-  min-width: 10px;
-  padding: 3px 7px;
-  font-size: 12px;
-  font-weight: normal;
-  color: #ffffff;
-  line-height: 1;
-  vertical-align: baseline;
-  white-space: nowrap;
-  text-align: center;
-  background-color: #999999;
-  border-radius: 10px;
-}
-
-.badge:empty {
-  display: none;
-}
-
-.btn .badge {
-  position: relative;
-  top: -1px;
-}
-
-.btn-xs .badge {
-  top: 0;
-  padding: 1px 5px;
-}
-
-a.badge:focus {
-  color: #ffffff;
-  text-decoration: none;
-  cursor: pointer;
-}
-
-a.list-group-item.active > .badge,
-.nav-pills > .active > a > .badge {
-  color: #007aff;
-  background-color: #ffffff;
-}
-
-.nav-pills > li > a > .badge {
-  margin-left: 3px;
-}
-
-.thumbnail {
-  display: block;
-  padding: 4px;
-  margin-bottom: 20px;
-  line-height: 1.42857143;
-  background-color: #ffffff;
-  border: 1px solid #dddddd;
-  border-radius: 4px;
-  -webkit-transition: all 0.2s ease-in-out;
-  transition: all 0.2s ease-in-out;
-}
-
-.thumbnail > img,
-.thumbnail a > img {
-  margin-left: auto;
-  margin-right: auto;
-}
-
-a.thumbnail:focus,
-a.thumbnail.active {
-  border-color: #007aff;
-}
-
-.thumbnail .caption {
-  padding: 9px;
-  color: #333333;
-}
-
-.alert {
-  padding: 15px;
-  margin-bottom: 20px;
-  border: 1px solid transparent;
-  border-radius: 4px;
-}
-
-.alert h4 {
-  margin-top: 0;
-  color: inherit;
-}
-
-.alert .alert-link {
-  font-weight: normal;
-}
-
-.alert > p,
-.alert > ul {
-  margin-bottom: 0;
-}
-
-.alert > p + p {
-  margin-top: 5px;
-}
-
-.alert-dismissable {
-  padding-right: 35px;
-}
-
-.alert-dismissable .close {
-  position: relative;
-  top: -2px;
-  right: -21px;
-  color: inherit;
-}
-
-.alert-success {
-  background-color: #dff0d8;
-  border-color: #d6e9c6;
-  color: #3c763d;
-}
-
-.alert-success hr {
-  border-top-color: #c9e2b3;
-}
-
-.alert-success .alert-link {
-  color: #2b542c;
-}
-
-.alert-info {
-  background-color: #d9edf7;
-  border-color: #bce8f1;
-  color: #31708f;
-}
-
-.alert-info hr {
-  border-top-color: #a6e1ec;
-}
-
-.alert-info .alert-link {
-  color: #245269;
-}
-
-.alert-warning {
-  background-color: #fcf8e3;
-  border-color: #faebcc;
-  color: #8a6d3b;
-}
-
-.alert-warning hr {
-  border-top-color: #f7e1b5;
-}
-
-.alert-warning .alert-link {
-  color: #66512c;
-}
-
-.alert-danger {
-  background-color: #f2dede;
-  border-color: #ebccd1;
-  color: #a94442;
-}
-
-.alert-danger hr {
-  border-top-color: #e4b9c0;
-}
-
-.alert-danger .alert-link {
-  color: #843534;
-}
-
-@-webkit-keyframes progress-bar-stripes {
-  from {
-    background-position: 40px 0;
-  }
-
-  to {
-    background-position: 0 0;
-  }
-}
-
-@keyframes progress-bar-stripes {
-  from {
-    background-position: 40px 0;
-  }
-
-  to {
-    background-position: 0 0;
-  }
-}
-
-.progress {
-  overflow: hidden;
-  height: 20px;
-  margin-bottom: 20px;
-  background-color: #f5f5f5;
-  border-radius: 4px;
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
-  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
-}
-
-.progress-bar {
-  float: left;
-  width: 0%;
-  height: 100%;
-  font-size: 12px;
-  line-height: 20px;
-  color: #ffffff;
-  text-align: center;
-  background-color: #007aff;
-  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-  -webkit-transition: width 0.6s ease;
-  transition: width 0.6s ease;
-}
-
-.progress-striped .progress-bar {
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-size: 40px 40px;
-}
-
-.progress.active .progress-bar {
-  -webkit-animation: progress-bar-stripes 2s linear infinite;
-  animation: progress-bar-stripes 2s linear infinite;
-}
-
-.progress-bar-success {
-  background-color: #4cd964;
-}
-
-.progress-striped .progress-bar-success {
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-}
-
-.progress-bar-info {
-  background-color: #34aadc;
-}
-
-.progress-striped .progress-bar-info {
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-}
-
-.progress-bar-warning {
-  background-color: #ffcc00;
-}
-
-.progress-striped .progress-bar-warning {
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-}
-
-.progress-bar-danger {
-  background-color: #ff3b30;
-}
-
-.progress-striped .progress-bar-danger {
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-}
-
-.media,
-.media-body {
-  overflow: hidden;
-  zoom: 1;
-}
-
-.media,
-.media .media {
-  margin-top: 15px;
-}
-
-.media:first-child {
-  margin-top: 0;
-}
-
-.media-object {
-  display: block;
-}
-
-.media-heading {
-  margin: 0 0 5px;
-}
-
-.media > .pull-left {
-  margin-right: 10px;
-}
-
-.media > .pull-right {
-  margin-left: 10px;
-}
-
-.media-list {
-  padding-left: 0;
-  list-style: none;
-}
-
-.list-group {
-  margin-bottom: 20px;
-  padding-left: 0;
-}
-
-.list-group-item {
-  position: relative;
-  display: block;
-  padding: 10px 15px;
-  margin-bottom: -1px;
-  background-color: #ffffff;
-  border: 1px solid #dddddd;
-}
-
-.list-group-item:first-chil

<TRUNCATED>

[45/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/load/LoadTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/load/LoadTest.java b/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/load/LoadTest.java
deleted file mode 100644
index 6a57570..0000000
--- a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/load/LoadTest.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.load;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.mgmt.ManagementContext;
-import org.apache.brooklyn.api.mgmt.ha.HighAvailabilityMode;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
-import org.apache.brooklyn.core.mgmt.persist.PersistMode;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.test.PerformanceTestUtils;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Stopwatch;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-import com.google.common.io.Files;
-import com.google.common.util.concurrent.Futures;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.common.util.concurrent.MoreExecutors;
-
-/**
- * Customers ask about the scalability of Brooklyn. These load tests investigate how many 
- * concurrent apps can be deployed and managed by a single Brooklyn management node.
- * 
- * The apps are "simulated" in that they don't create the underlying resources 
- * (we are not checking if the test machine can run 100s of app-servers simultaneously!) 
- * The install/customize/launch will instead execute ssh commands of comparable length,
- * but that just echo rather than execute the actual commands.
- * 
- * "SIMULATE_EXTERNAL_MONITORING" means that we do not poll the entities directly (over ssh, http or 
- * whatever). Instead we simulate the metrics being injected directly to be set on the entity (e.g. 
- * having been collected from a Graphite server).
- * 
- * "SKIP_SSH_ON_START" means don't do the normal install+customize+launch ssh commands. Instead, just
- * startup the entities so we can monitor their resource usage.
- */
-public class LoadTest {
-
-    // TODO Could/should issue provisioning request through REST api, rather than programmatically; 
-    // and poll to detect completion.
-    
-    /*
-     * Useful commands when investigating:
-     *     LOG_FILE=usage/qa/brooklyn-camp-tests.log
-     *     grep -E "OutOfMemoryError|[P|p]rovisioning time|sleeping before|CPU fraction|LoadTest using" $LOG_FILE | less
-     *     grep -E "OutOfMemoryError|[P|p]rovisioning time" $LOG_FILE; grep "CPU fraction" $LOG_FILE | tail -1; grep "LoadTest using" $LOG_FILE | tail -1
-     *     grep -E "OutOfMemoryError|LoadTest using" $LOG_FILE
-     */
-    private static final Logger LOG = LoggerFactory.getLogger(LoadTest.class);
-
-    private File persistenceDir;
-    private BrooklynLauncher launcher;
-    private String webServerUrl;
-    private ManagementContext managementContext;
-    private ListeningExecutorService executor;
-    private Future<?> cpuFuture;
-    
-    private Location localhost;
-    
-    List<Duration> provisioningTimes;
-
-
-    @BeforeMethod(alwaysRun=true)
-    public void setUp() throws Exception {
-        // Create management node
-        persistenceDir = Files.createTempDir();
-        launcher = BrooklynLauncher.newInstance()
-                .persistMode(PersistMode.CLEAN)
-                .highAvailabilityMode(HighAvailabilityMode.MASTER)
-                .persistenceDir(persistenceDir)
-                .start();
-        webServerUrl = launcher.getServerDetails().getWebServerUrl();
-        managementContext = launcher.getServerDetails().getManagementContext();
-
-        localhost = managementContext.getLocationRegistry().resolve("localhost");
-        
-        provisioningTimes = Collections.synchronizedList(Lists.<Duration>newArrayList());
-
-        // Create executors
-        executor = MoreExecutors.listeningDecorator(Executors.newCachedThreadPool());
-
-        // Monitor utilisation (memory/CPU) while tests run
-        executor.submit(new Callable<Void>() {
-            public Void call() {
-                try {
-                    while (true) {
-                        managementContext.getExecutionManager(); // force GC to be instantiated
-                        String usage = ((LocalManagementContext)managementContext).getGarbageCollector().getUsageString();
-                        LOG.info("LoadTest using "+usage);
-                        Thread.sleep(1000);
-                    }
-                } catch (InterruptedException e) {
-                    Thread.currentThread().interrupt(); // exit gracefully
-                } catch (Exception e) {
-                    LOG.error("Error getting usage info", e);
-                }
-                return null;
-            }});
-        
-        cpuFuture = PerformanceTestUtils.sampleProcessCpuTime(Duration.ONE_SECOND, "during testProvisionAppsConcurrently");
-
-    }
-    
-    @AfterMethod(alwaysRun=true)
-    public void tearDown() throws Exception {
-        if (cpuFuture != null) cpuFuture.cancel(true);
-        if (executor != null) executor.shutdownNow();
-        if (launcher != null) launcher.terminate();
-        if (persistenceDir != null) Os.deleteRecursively(persistenceDir);
-    }
-    
-    /**
-     * Creates multiple apps simultaneously. 
-     * 
-     * Long-term target is 50 concurrent provisioning requests (which may be issued while there are
-     * many existing applications under management). Until we reach that point, we can partition the
-     * load across multiple (separate) brooklyn management nodes.
-     *   TODO TBD: is that 50 VMs worth, or 50 apps with 4 VMs in each? 
-     * 
-     * TODO Does not measure the cost of jclouds for creating all the VMs/containers.
-     */
-    @Test(groups="Acceptance")
-    public void testLocalhostProvisioningAppsConcurrently() throws Exception {
-        final int NUM_CONCURRENT_APPS_PROVISIONING = 20; 
-        
-        List<ListenableFuture<StartableApplication>> futures = Lists.newArrayList();
-        for (int i = 0; i < NUM_CONCURRENT_APPS_PROVISIONING; i++) {
-            ListenableFuture<StartableApplication> future = executor.submit(newProvisionAppTask(managementContext, 
-                    EntitySpec.create(StartableApplication.class, SimulatedTheeTierApp.class)
-                            .configure(SimulatedTheeTierApp.SIMULATE_EXTERNAL_MONITORING, true)
-                            .displayName("Simulated app "+i)));
-            futures.add(future);
-        }
-        
-        List<StartableApplication> apps = Futures.allAsList(futures).get();
-        
-        for (StartableApplication app : apps) {
-            assertEquals(app.getAttribute(Startable.SERVICE_UP), (Boolean)true);
-        }
-    }
-    
-    /**
-     * Creates many apps, to monitor resource usage etc.
-     * 
-     * "SIMULATE_EXTERNAL_MONITORING" means that we do not poll the entities directly (over ssh, http or 
-     * whatever). Instead we simulate the metrics being injected directly to be set on the entity (e.g. 
-     * having been collected from a Graphite server).
-     * 
-     * Long-term target is 2500 VMs under management.
-     * Until we reach that point, we can partition the load across multiple (separate) brooklyn management nodes.
-     */
-    @Test(groups="Acceptance")
-    public void testLocalhostManyApps() throws Exception {
-        final int NUM_APPS = 630; // target is 2500 VMs; each blueprint has 4 (rounding up)
-        final int NUM_APPS_PER_BATCH = 10;
-        final int SLEEP_BETWEEN_BATCHES = 10*1000;
-        final boolean SKIP_SSH_ON_START = true; // getting ssh errors otherwise!
-        
-        int counter = 0;
-        
-        for (int i = 0; i < NUM_APPS / NUM_APPS_PER_BATCH; i++) {
-            List<ListenableFuture<StartableApplication>> futures = Lists.newArrayList();
-            for (int j = 0; j < NUM_APPS_PER_BATCH; j++) {
-                ListenableFuture<StartableApplication> future = executor.submit(newProvisionAppTask(
-                        managementContext, 
-                        EntitySpec.create(StartableApplication.class, SimulatedTheeTierApp.class)
-                                .configure(SimulatedTheeTierApp.SIMULATE_EXTERNAL_MONITORING, true)
-                                .configure(SimulatedTheeTierApp.SKIP_SSH_ON_START, SKIP_SSH_ON_START)
-                                .displayName("Simulated app "+(++counter))));
-                futures.add(future);
-            }
-            
-            List<StartableApplication> apps = Futures.allAsList(futures).get();
-            
-            for (StartableApplication app : apps) {
-                assertEquals(app.getAttribute(Startable.SERVICE_UP), (Boolean)true);
-            }
-
-            synchronized (provisioningTimes) {
-                LOG.info("cycle="+i+"; numApps="+counter+": provisioning times: "+provisioningTimes);
-                provisioningTimes.clear();
-            }
-
-            LOG.info("cycle="+i+"; numApps="+counter+": sleeping before next batch of apps");
-            Thread.sleep(SLEEP_BETWEEN_BATCHES);
-        }
-    }
-    
-    protected <T extends StartableApplication> Callable<T> newProvisionAppTask(final ManagementContext managementContext, final EntitySpec<T> appSpec) {
-        return new Callable<T>() {
-            public T call() {
-                Stopwatch stopwatch = Stopwatch.createStarted();
-                T app = managementContext.getEntityManager().createEntity(appSpec);
-                app.start(ImmutableList.of(localhost));
-                Duration duration = Duration.of(stopwatch.elapsed(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS);
-                LOG.info("Provisioning time: "+duration);
-                provisioningTimes.add(duration);
-
-                return app;
-            }
-        };
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/longevity/MonitorUtilsTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/longevity/MonitorUtilsTest.java b/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/longevity/MonitorUtilsTest.java
deleted file mode 100644
index f58963c..0000000
--- a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/longevity/MonitorUtilsTest.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.longevity;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.brooklyn.qa.longevity.MonitorUtils.ProcessHasStderr;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.text.Strings;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Charsets;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.io.Files;
-
-public class MonitorUtilsTest {
-
-    @Test(enabled=false, timeOut=1000) // Demonstrates that process.waitFor() hangs for big output streams
-    public void testExecuteAndWaitFor() throws Exception {
-        Process process = createDumpingProcess(false);
-        process.waitFor();
-        fail("Should block while waiting to consume process output");
-    }
-
-    @Test(enabled=false, timeOut=1000) // Demonstrates that process.waitFor() hangs for big err streams
-    public void testExecuteAndWaitForErr() throws Exception {
-        Process process = createDumpingProcess(true);
-        process.waitFor();
-        fail("Should block while waiting to consume process output");
-    }
-
-    @Test(timeOut=1000)
-    public void testExecuteAndWaitForConsumingOutputStream() throws Exception {
-        Process process = createDumpingProcess(false);
-        String out = MonitorUtils.waitFor(process);
-        assertTrue(out.length() > 100000, "out.size="+out.length());
-    }
-
-    @Test(timeOut=1000, expectedExceptions=IllegalStateException.class)
-    public void testExecuteAndWaitForConsumingErrorStream() throws Exception {
-        Process process = createDumpingProcess(true);
-        MonitorUtils.waitFor(process);
-    }
-
-    private Process createDumpingProcess(boolean writeToErr) throws IOException {
-        String errSuffix = writeToErr ? " >&2" : "";
-        //Windows limits the length of the arguments so echo multiple times instead
-        String bigstr = Strings.repeat("a", 8000);
-        String bigcmd = Strings.repeat(getSilentPrefix() + "echo " + bigstr + errSuffix + Os.LINE_SEPARATOR, 15);
-        File file = Os.newTempFile("test-consume", ".bat");
-        file.setExecutable(true);
-        Files.write(bigcmd, file, Charsets.UTF_8);
-        Process process = MonitorUtils.exec(file.getAbsolutePath());
-        return process;
-    }
-
-    @Test(groups="UNIX")
-    public void testFindOwnPid() throws Exception {
-        int ownpid = MonitorUtils.findOwnPid();
-        assertTrue(ownpid > 0, "ownpid=$ownpid");
-        assertTrue(MonitorUtils.isPidRunning(ownpid, "java"),"java is not running");
-    }
-
-    @Test(groups="UNIX")
-    public void testIsPidRunning() throws Exception {
-        int usedPid = MonitorUtils.findOwnPid();
-
-        //the child process will terminate freeing it PID
-        String[] cmd = new String[]{"bash", "-c", "echo $$"};
-        Process process = Runtime.getRuntime().exec(cmd);
-        String out = MonitorUtils.waitFor(process);
-        int unusedPid = Integer.parseInt(out.trim());
-
-        assertTrue(MonitorUtils.isPidRunning(usedPid));
-        assertFalse(MonitorUtils.isPidRunning(unusedPid));
-        
-        try {
-            assertFalse(MonitorUtils.isPidRunning(1234567)); // too large
-        } catch (ProcessHasStderr e) {
-            // expected on osx
-        }
-    }
-
-    @Test(groups="UNIX")
-    public void testGetRunningPids() throws Exception {
-        int ownpid = MonitorUtils.findOwnPid();
-
-        List<Integer> javapids = MonitorUtils.getRunningPids("java");
-
-        assertTrue(javapids.contains(ownpid), "javapids="+javapids+"; ownpid="+ownpid);
-    }
-
-    @Test
-    public void testIsUrlUp() throws Exception {
-        assertFalse(MonitorUtils.isUrlUp(new URL("http://localhost/thispathdoesnotexist")));
-    }
-
-    @Test(groups="UNIX")
-    public void testSearchLog() throws Exception {
-        String fileContents = "line1\nline2\nline3\n";
-        File file = File.createTempFile("monitorUtilsTest.testSearchLog", ".txt");
-        Files.write(fileContents, file, Charsets.UTF_8);
-
-        try {
-            assertEquals(MonitorUtils.searchLog(file, "line1"), Arrays.asList("line1"));
-            assertEquals(MonitorUtils.searchLog(file, "line1|line2"), Arrays.asList("line1", "line2"));
-            assertEquals(MonitorUtils.searchLog(file, "textnotthere"), Collections.emptyList());
-            assertEquals(MonitorUtils.searchLog(file, "line"), Arrays.asList("line1", "line2", "line3"));
-        } finally {
-            file.delete();
-        }
-    }
-
-    @Test(groups="Integration")
-    public void testMemoryUsage() throws Exception {
-        int ownpid = MonitorUtils.findOwnPid();
-
-        MonitorUtils.MemoryUsage memUsage = MonitorUtils.getMemoryUsage(ownpid);
-        assertTrue(memUsage.totalInstances > 0, memUsage.toString());
-        assertTrue(memUsage.totalMemoryBytes > 0, memUsage.toString());
-        assertEquals(memUsage.getInstanceCounts(), Collections.emptyMap());
-
-        MonitorUtils.MemoryUsage memUsage2 = MonitorUtils.getMemoryUsage(ownpid, MonitorUtilsTest.class.getCanonicalName(),0);
-        assertEquals(memUsage2.getInstanceCounts(), ImmutableMap.of(MonitorUtilsTest.class.getCanonicalName(), 1));
-
-        MonitorUtils.MemoryUsage memUsage3 = MonitorUtils.getMemoryUsage(ownpid, MonitorUtilsTest.class.getCanonicalName(), 2);
-        assertEquals(memUsage3.getInstanceCounts(), Collections.emptyMap());
-    }
-
-    private String getSilentPrefix() {
-        if (Os.isMicrosoftWindows()) {
-            return "@";
-        } else {
-            return "";
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/longevity/webcluster/SinusoidalLoadGenerator.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/longevity/webcluster/SinusoidalLoadGenerator.java b/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/longevity/webcluster/SinusoidalLoadGenerator.java
deleted file mode 100644
index a8dd8da..0000000
--- a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/longevity/webcluster/SinusoidalLoadGenerator.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.longevity.webcluster;
-
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.enricher.AbstractEnricher;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Throwables;
-import com.google.common.reflect.TypeToken;
-
-/**
- * Periodically publishes values in the range of 0 to #amplitude. 
- * The value varies sinusoidally over time.
- */
-public class SinusoidalLoadGenerator extends AbstractEnricher {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SinusoidalLoadGenerator.class);
-
-    public static final ConfigKey<AttributeSensor<Double>> TARGET = ConfigKeys.newConfigKey(new TypeToken<AttributeSensor<Double>>() {}, "target");
-    
-    public static final ConfigKey<Long> PUBLISH_PERIOD_MS = ConfigKeys.newLongConfigKey("publishPeriodMs");
-
-    public static final ConfigKey<Long> SIN_PERIOD_MS = ConfigKeys.newLongConfigKey("sinPeriodMs");
-
-    public static final ConfigKey<Double> SIN_AMPLITUDE = ConfigKeys.newDoubleConfigKey("sinAmplitude");
-
-    private final ScheduledExecutorService executor;
-    
-    public SinusoidalLoadGenerator() {
-        this.executor = Executors.newSingleThreadScheduledExecutor();
-    }
-    
-    public SinusoidalLoadGenerator(AttributeSensor<Double> target, long publishPeriodMs, long sinPeriodMs, double sinAmplitude) {
-        config().set(TARGET, target);
-        config().set(PUBLISH_PERIOD_MS, publishPeriodMs);
-        config().set(SIN_PERIOD_MS, sinPeriodMs);
-        config().set(SIN_AMPLITUDE, sinAmplitude);
-        this.executor = Executors.newSingleThreadScheduledExecutor();
-    }
-    
-    @Override
-    public void setEntity(final EntityLocal entity) {
-        super.setEntity(entity);
-        
-        executor.scheduleAtFixedRate(new Runnable() {
-            @Override public void run() {
-                try {
-                    long time = System.currentTimeMillis();
-                    double val = getRequiredConfig(SIN_AMPLITUDE) * (1 + Math.sin( (1.0*time) / getRequiredConfig(SIN_PERIOD_MS) * Math.PI * 2  - Math.PI/2 )) / 2;
-                    entity.sensors().set(getRequiredConfig(TARGET), val);
-                } catch (Throwable t) {
-                    LOG.warn("Error generating sinusoidal-load metric", t);
-                    throw Throwables.propagate(t);
-                }
-            }
-
-        }, 0, getRequiredConfig(PUBLISH_PERIOD_MS), TimeUnit.MILLISECONDS);
-    }
-    
-    @Override
-    public void destroy() {
-        executor.shutdownNow();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/longevity/webcluster/WebClusterApp.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/longevity/webcluster/WebClusterApp.java b/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/longevity/webcluster/WebClusterApp.java
deleted file mode 100644
index 7c11803..0000000
--- a/brooklyn-library/qa/src/test/java/org/apache/brooklyn/qa/longevity/webcluster/WebClusterApp.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.longevity.webcluster;
-
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.api.sensor.EnricherSpec;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.internal.BrooklynProperties;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.proxy.nginx.NginxController;
-import org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.jboss.JBoss7Server;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-public class WebClusterApp extends AbstractApplication {
-
-    static BrooklynProperties config = BrooklynProperties.Factory.newDefault();
-
-    public static final String WAR_PATH = "classpath://hello-world.war";
-
-    private static final long loadCyclePeriodMs = 2 * 60 * 1000L;
-
-    @Override
-    public void initApp() {
-        final AttributeSensor<Double> sinusoidalLoad =
-                Sensors.newDoubleSensor("brooklyn.qa.sinusoidalLoad", "Sinusoidal server load");
-        AttributeSensor<Double> averageLoad =
-                Sensors.newDoubleSensor("brooklyn.qa.averageLoad", "Average load in cluster");
-
-        NginxController nginxController = addChild(EntitySpec.create(NginxController.class)
-                // .configure("domain", "webclusterexample.brooklyn.local")
-                .configure("port", "8000+"));
-
-        EntitySpec<JBoss7Server> jbossSpec = EntitySpec.create(JBoss7Server.class)
-                .configure("httpPort", "8080+")
-                .configure("war", WAR_PATH)
-                .enricher(EnricherSpec.create(SinusoidalLoadGenerator.class)
-                        .configure(SinusoidalLoadGenerator.TARGET, sinusoidalLoad)
-                        .configure(SinusoidalLoadGenerator.PUBLISH_PERIOD_MS, 500L)
-                        .configure(SinusoidalLoadGenerator.SIN_PERIOD_MS, loadCyclePeriodMs)
-                        .configure(SinusoidalLoadGenerator.SIN_AMPLITUDE, 1d));
-
-        ControlledDynamicWebAppCluster web = addChild(EntitySpec.create(ControlledDynamicWebAppCluster.class)
-                .displayName("WebApp cluster")
-                .configure("controller", nginxController)
-                .configure("initialSize", 1)
-                .configure("memberSpec", jbossSpec));
-
-        web.getCluster().enrichers().add(Enrichers.builder()
-                .aggregating(sinusoidalLoad)
-                .publishing(averageLoad)
-                .fromMembers()
-                .computingAverage()
-                .build());
-        web.getCluster().policies().add(AutoScalerPolicy.builder()
-                .metric(averageLoad)
-                .sizeRange(1, 3)
-                .metricRange(0.3, 0.7)
-                .build());
-    }
-    
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", "localhost");
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(StartableApplication.class, WebClusterApp.class).displayName("Brooklyn WebApp Cluster example"))
-                .webconsolePort(port)
-                .location(location)
-                .start();
-         
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/projects/downstream-parent-test/README
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/projects/downstream-parent-test/README b/brooklyn-library/qa/src/test/projects/downstream-parent-test/README
deleted file mode 100644
index 3f2f574..0000000
--- a/brooklyn-library/qa/src/test/projects/downstream-parent-test/README
+++ /dev/null
@@ -1,5 +0,0 @@
-A successful build of this project (`mvn clean verify`) means that projects that
-use brooklyn-downstream-parent can be loaded into Brooklyn's catalogue by default.
-
-If the build fails there is almost certainly something wrong with the parent and
-the wider consumers of Brooklyn will probably face similar problems.

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/projects/downstream-parent-test/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/projects/downstream-parent-test/pom.xml b/brooklyn-library/qa/src/test/projects/downstream-parent-test/pom.xml
deleted file mode 100644
index 7e3c0e0..0000000
--- a/brooklyn-library/qa/src/test/projects/downstream-parent-test/pom.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>org.apache.brooklyn.downstream-parent-test</groupId>
-    <artifactId>catalogue-load-test</artifactId>
-    <version>0.9.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION -->
-    <packaging>jar</packaging>
-
-    <name>Downstream parent catalogue load test test</name>
-
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-downstream-parent</artifactId>
-        <version>0.9.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION -->
-    </parent>
-
-    <repositories>
-        <repository>
-            <id>apache-snapshots</id>
-            <url>https://repository.apache.org/content/repositories/snapshots/</url>
-            <snapshots>
-                <enabled>true</enabled>
-            </snapshots>
-        </repository>
-    </repositories>
-
-    <pluginRepositories>
-        <pluginRepository>
-            <id>sonatype-nexus-snapshots</id>
-            <name>Sonatype Nexus Snapshots</name>
-            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
-            <releases>
-                <enabled>false</enabled>
-            </releases>
-            <snapshots>
-                <enabled>true</enabled>
-            </snapshots>
-        </pluginRepository>
-    </pluginRepositories>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-all</artifactId>
-            <version>0.9.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION -->
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-                <filtering>true</filtering>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <groupId>io.brooklyn.maven</groupId>
-                <artifactId>brooklyn-maven-plugin</artifactId>
-                <version>0.3.0-SNAPSHOT</version>
-                <executions>
-                    <execution>
-                        <id>Run and deploy Brooklyn</id>
-                        <goals>
-                            <goal>start-server</goal>
-                        </goals>
-                        <configuration>
-                            <bindPort>${bindPort}</bindPort>
-                            <!--
-                            Make sure that the test entities aren't already on the classpath.
-                            -->
-                            <outputDirOnClasspath>false</outputDirOnClasspath>
-                            <arguments>
-                                <argument>--catalogInitial</argument>
-                                <argument>${project.build.outputDirectory}/catalog.bom</argument>
-                            </arguments>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>Deploy entity from catalogue</id>
-                        <phase>integration-test</phase>
-                        <goals>
-                            <goal>deploy</goal>
-                        </goals>
-                        <configuration>
-                            <blueprint>${project.build.outputDirectory}/blueprint.yaml</blueprint>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>Stop Brooklyn</id>
-                        <goals>
-                            <goal>stop-server</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/java/com/example/HelloEntity.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/java/com/example/HelloEntity.java b/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/java/com/example/HelloEntity.java
deleted file mode 100644
index 242708b..0000000
--- a/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/java/com/example/HelloEntity.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-package com.example;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-
-@ImplementedBy(HelloEntityImpl.class)
-public interface HelloEntity extends Entity {
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/java/com/example/HelloEntityImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/java/com/example/HelloEntityImpl.java b/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/java/com/example/HelloEntityImpl.java
deleted file mode 100644
index 76d9ffd..0000000
--- a/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/java/com/example/HelloEntityImpl.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.
- */
-package com.example;
-
-import org.apache.brooklyn.core.entity.AbstractEntity;
-
-public class HelloEntityImpl extends AbstractEntity implements HelloEntity {
-
-    @Override
-    public void init() {
-        super.init();
-        System.out.println("Hello from the init method of the HelloEntity");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/resources/blueprint.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/resources/blueprint.yaml b/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/resources/blueprint.yaml
deleted file mode 100644
index 76cc82e..0000000
--- a/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/resources/blueprint.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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.
-#
-services:
-- type: downstream-project

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/resources/catalog.bom
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/resources/catalog.bom b/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/resources/catalog.bom
deleted file mode 100644
index c168c72..0000000
--- a/brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/resources/catalog.bom
+++ /dev/null
@@ -1,33 +0,0 @@
-# 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.
-#
-brooklyn.catalog:
-  version: 1.0
-
-  brooklyn.libraries:
-  - "file://${project.build.directory}/${project.build.finalName}.${project.packaging}"
-
-  items:
-
-  - id: downstream-project
-    name: Downstream project
-    itemType: template
-    description: |
-      A downstream project
-    item:
-      services:
-      - type: com.example.HelloEntity

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/resources/java-web-app-and-db-with-function.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/resources/java-web-app-and-db-with-function.yaml b/brooklyn-library/qa/src/test/resources/java-web-app-and-db-with-function.yaml
deleted file mode 100644
index 0f15729..0000000
--- a/brooklyn-library/qa/src/test/resources/java-web-app-and-db-with-function.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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.
-#
-name: java-cluster-db-example
-services:
-- serviceType: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
-  name: My Web
-  location: localhost
-  brooklyn.config:
-    wars.root: http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.7.0-M1/brooklyn-example-hello-world-sql-webapp-0.7.0-M1.war
-    http.port: 9280+
-    proxy.http.port: 9210+
-    java.sysprops: 
-      brooklyn.example.db.url: $brooklyn:formatString("jdbc:%s%s?user=%s&password=%s",
-         component("db").attributeWhenReady("datastore.url"), "visitors", "brooklyn", "br00k11n")
-- serviceType: org.apache.brooklyn.entity.database.mysql.MySqlNode
-  id: db
-  name: My DB
-  location: localhost
-  brooklyn.config:
-    datastore.creation.script.url: classpath://visitors-creation-script.sql

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/resources/java-web-app-and-db-with-policy.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/resources/java-web-app-and-db-with-policy.yaml b/brooklyn-library/qa/src/test/resources/java-web-app-and-db-with-policy.yaml
deleted file mode 100644
index 10ea4e5..0000000
--- a/brooklyn-library/qa/src/test/resources/java-web-app-and-db-with-policy.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# 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.
-#
-name: java-cluster-db-policy-example
-services:
-- type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
-  name: My Web with Policy
-  location: localhost
-  brooklyn.config:
-    wars.root: http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0-M2/brooklyn-example-hello-world-sql-webapp-0.6.0-M2.war
-    http.port: 9280+
-    proxy.http.port: 9210+
-    java.sysprops: 
-      brooklyn.example.db.url: $brooklyn:formatString("jdbc:%s%s?user=%s&password=%s",
-         component("db").attributeWhenReady("datastore.url"), "visitors", "brooklyn", "br00k11n")
-  brooklyn.policies:
-  - policyType: org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy
-    brooklyn.config:
-      metric: $brooklyn:sensor("org.apache.brooklyn.entity.webapp.DynamicWebAppCluster", "webapp.reqs.perSec.windowed.perNode")
-      metricLowerBound: 10
-      metricUpperBound: 100
-      minPoolSize: 1
-      maxPoolSize: 5
-      
-- type: org.apache.brooklyn.entity.database.mysql.MySqlNode
-  id: db
-  name: My DB
-  location: localhost
-  brooklyn.config:
-    # this also uses the flag rather than the config key
-    creationScriptUrl: classpath://visitors-creation-script.sql

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/resources/java-web-app-simple.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/resources/java-web-app-simple.yaml b/brooklyn-library/qa/src/test/resources/java-web-app-simple.yaml
deleted file mode 100644
index 526e90b..0000000
--- a/brooklyn-library/qa/src/test/resources/java-web-app-simple.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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.
-#
-name: sample-single-jboss
-description: Single JBoss using Brooklyn
-origin: https://github.com/apache/incubator-brooklyn
-location: localhost
-services:
-- serviceType: org.apache.brooklyn.entity.webapp.tomcat.Tomcat8Server
-  name: tomcat1
-  brooklyn.config:
-    wars.root: http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-webapp/0.7.0-M1/brooklyn-example-hello-world-webapp-0.7.0-M1.war
-    http.port: 9280+

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/resources/test-app-with-enrichers-slightly-simpler.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/resources/test-app-with-enrichers-slightly-simpler.yaml b/brooklyn-library/qa/src/test/resources/test-app-with-enrichers-slightly-simpler.yaml
deleted file mode 100644
index 2b55237..0000000
--- a/brooklyn-library/qa/src/test/resources/test-app-with-enrichers-slightly-simpler.yaml
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# 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.
-#
-# example showing how enrichers can be set 
-#
-name: test-app-with-enrichers
-description: Testing many enrichers
-services:
-- type: org.apache.brooklyn.entity.group.DynamicCluster
-  id: cluster
-  initialSize: 3
-  location: localhost
-  memberSpec:
-    $brooklyn:entitySpec:
-      type: org.apache.brooklyn.core.test.entity.TestEntity
-      brooklyn.enrichers:
-      - type: org.apache.brooklyn.enricher.stock.Transformer
-        # transform "ip" (which we expect a feed, not shown here, to set) to a URL;
-        # you can curl an address string to the sensors/ip endpoint an entity to trigger these enrichers 
-        brooklyn.config:
-          enricher.sourceSensor: $brooklyn:sensor("ip")
-          enricher.targetSensor: $brooklyn:sensor("url")
-          enricher.targetValue: $brooklyn:formatString("http://%s/", $brooklyn:attributeWhenReady("ip"))
-      - type: org.apache.brooklyn.enricher.stock.Propagator
-        # use propagator to duplicate one sensor as another, giving the supplied sensor mapping;
-        # the other use of Propagator is where you specify a producer (using $brooklyn:entity(...) as below)
-        # from which to take sensors; in that mode you can specify `propagate` as a list of sensors whose names are unchanged,
-        # instead of (or in addition to) this map 
-        brooklyn.config:
-          sensorMapping:
-            $brooklyn:sensor("url"): $brooklyn:sensor("org.apache.brooklyn.core.entity.Attributes", "main.uri")
-  brooklyn.enrichers:
-  - type: org.apache.brooklyn.enricher.stock.Aggregator
-    # aggregate `url` sensors from children into a list
-    brooklyn.config:
-      enricher.sourceSensor: $brooklyn:sensor("url")
-      enricher.targetSensor: $brooklyn:sensor("urls.list")
-      enricher.aggregating.fromMembers: true
-  - type: org.apache.brooklyn.enricher.stock.Joiner
-    # create a string from that list, for use e.g. in bash scripts
-    brooklyn.config:
-      enricher.sourceSensor: $brooklyn:sensor("urls.list")
-      enricher.targetSensor: $brooklyn:sensor("urls.list.comma_separated.max_2")
-      maximum: 2
-      # TODO infer uniqueTag, name etc
-      uniqueTag: urls.list.comma_separated.max_2
-  - type: org.apache.brooklyn.enricher.stock.Joiner
-    # pick one uri as the main one to use
-    brooklyn.config:
-      enricher.sourceSensor: $brooklyn:sensor("urls.list")
-      enricher.targetSensor: $brooklyn:sensor("org.apache.brooklyn.core.entity.Attributes", "main.uri")
-      quote: false
-      maximum: 1
-brooklyn.enrichers:
-- type: org.apache.brooklyn.enricher.stock.Propagator
-  # if nothing specified for `propagating` or `sensorMapping` then 
-  # Propagator will do all but the usual lifecycle defaults, handy at the root!
-  brooklyn.config:
-    producer: $brooklyn:entity("cluster")

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/resources/test-tomcat-cluster.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/resources/test-tomcat-cluster.yaml b/brooklyn-library/qa/src/test/resources/test-tomcat-cluster.yaml
deleted file mode 100644
index e3087b8..0000000
--- a/brooklyn-library/qa/src/test/resources/test-tomcat-cluster.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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.
-#
-name: Test Tomcat cluster
-location: localhost
-services:
-- serviceType: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
-  name: tomcat-cluster
-  initialSize: 2
-  memberSpec:
-    $brooklyn:entitySpec:
-      type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
-      brooklyn.config:
-        dynamiccluster.quarantineFailedEntities: false
-        cluster.initial.quorumSize: 2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/test/resources/test-webapp-with-averaging-enricher.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/test/resources/test-webapp-with-averaging-enricher.yaml b/brooklyn-library/qa/src/test/resources/test-webapp-with-averaging-enricher.yaml
deleted file mode 100644
index 9a508cb..0000000
--- a/brooklyn-library/qa/src/test/resources/test-webapp-with-averaging-enricher.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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.
-#
-# example showing how enrichers can be set 
-#
-name: test-webapp-with-averaging-enricher
-description: Testing many enrichers
-services:
-- type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
-  initialSize: 3
-  location: localhost
-  
-  # define the web cluster, adding an averaging enricher to the cluster.
-  # this assumes the test fixture will set the "my.load" sensor on the member-specs in here. 
-  webClusterSpec:
-    $brooklyn:entitySpec:
-      type: org.apache.brooklyn.entity.webapp.DynamicWebAppCluster
-      id: cluster
-      brooklyn.enrichers:
-      - type: org.apache.brooklyn.enricher.stock.Aggregator
-        brooklyn.config:
-          enricher.sourceSensor: $brooklyn:sensor("my.load")
-          enricher.targetSensor: $brooklyn:sensor("my.load.averaged")
-          enricher.aggregating.fromMembers: true
-          transformation: average
-            
-  brooklyn.enrichers:
-  - type: org.apache.brooklyn.enricher.stock.Propagator
-    brooklyn.config:
-      producer: $brooklyn:entity("cluster")
-      propagating:
-      - $brooklyn:sensor("my.load.averaged")

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/start-monitor.sh
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/start-monitor.sh b/brooklyn-library/qa/start-monitor.sh
deleted file mode 100755
index 0fa8247..0000000
--- a/brooklyn-library/qa/start-monitor.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-#
-# Brooklyn Management
-#
-# Run this, then you should see the Brooklyn mgmt webapp at localhost:8081/
-#
-#set -x # debug
-
-CLASS=org.apache.brooklyn.qa.longevity.Monitor
-VERSION=0.9.0-SNAPSHOT # BROOKLYN_VERSION
-
-ROOT=$(cd $(dirname $0) && pwd)
-cd $ROOT
-
-JAVA_OPTS="-Xms256m -Xmx1g -XX:MaxPermSize=256m"
-export CP="./target/brooklyn-qa-$VERSION.jar:./target/lib/*"
-
-echo running Brooklyn Web Console using $CLASS from $CP with $*
-
-echo java $JAVA_OPTS -cp "$CP" $CLASS $*
-java $JAVA_OPTS -cp "$CP" $CLASS $*

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/start-webcluster.sh
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/start-webcluster.sh b/brooklyn-library/qa/start-webcluster.sh
deleted file mode 100755
index 7aa678a..0000000
--- a/brooklyn-library/qa/start-webcluster.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-#
-# Brooklyn Management
-#
-# Run this, then you should see the Brooklyn mgmt webapp at localhost:8081/
-#
-#set -x # debug
-
-CLASS=org.apache.brooklyn.qa.longevity.webcluster.WebClusterApp
-VERSION=0.9.0-SNAPSHOT # BROOKLYN_VERSION
-
-ROOT=$(cd $(dirname $0) && pwd)
-cd $ROOT
-
-JAVA_OPTS="-Xms256m -Xmx1g -XX:MaxPermSize=256m"
-export CP="./target/brooklyn-qa-$VERSION.jar:./target/lib/*"
-
-echo running Brooklyn Web Console using $CLASS from $CP at $LOCATIONS
-
-echo java $JAVA_OPTS -cp "$CP" $CLASS $LOCATIONS $@
-java $JAVA_OPTS -cp "$CP" $CLASS $LOCATIONS $@

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/cassandra-multicloud-snitch/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/cassandra-multicloud-snitch/pom.xml b/brooklyn-library/sandbox/cassandra-multicloud-snitch/pom.xml
deleted file mode 100644
index 0030abc..0000000
--- a/brooklyn-library/sandbox/cassandra-multicloud-snitch/pom.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>brooklyn-sandbox-cassandra-multicloud-snitch</artifactId>
-    <packaging>jar</packaging>
-    <name>Custom Cassandra MultiCloud Snitch</name>
-    <description>
-        A custom snitch for Cassandra, to run a cluster across multiple clouds
-    </description>
-
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <properties>
-        <cassandra.version>1.2.2</cassandra.version>
-    </properties>
-
-    <dependencies>
-        <!-- for cassandra custom snitch -->
-        <dependency>
-            <groupId>org.apache.cassandra</groupId>
-            <artifactId>cassandra-all</artifactId>
-            <version>${cassandra.version}</version> <!--  note astyanax 1.56.24 pulls in 1.1.1 -->
-            <!-- scope>test</scope -->
-            <exclusions>
-                <exclusion>
-                    <artifactId>slf4j-log4j12</artifactId>
-                    <groupId>org.slf4j</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>log4j</artifactId>
-                    <groupId>log4j</groupId>
-                </exclusion>
-                <exclusion>
-                <artifactId>commons-codec</artifactId>
-                    <groupId>commons-codec</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/cassandra-multicloud-snitch/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/customsnitch/MultiCloudSnitch.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/cassandra-multicloud-snitch/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/customsnitch/MultiCloudSnitch.java b/brooklyn-library/sandbox/cassandra-multicloud-snitch/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/customsnitch/MultiCloudSnitch.java
deleted file mode 100644
index 0199290..0000000
--- a/brooklyn-library/sandbox/cassandra-multicloud-snitch/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/customsnitch/MultiCloudSnitch.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra.customsnitch;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.io.InputStream;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Properties;
-
-import org.apache.cassandra.exceptions.ConfigurationException;
-import org.apache.cassandra.gms.ApplicationState;
-import org.apache.cassandra.gms.EndpointState;
-import org.apache.cassandra.gms.Gossiper;
-import org.apache.cassandra.gms.IEndpointStateChangeSubscriber;
-import org.apache.cassandra.gms.VersionedValue;
-import org.apache.cassandra.io.util.FileUtils;
-import org.apache.cassandra.locator.AbstractNetworkTopologySnitch;
-import org.apache.cassandra.net.MessagingService;
-import org.apache.cassandra.service.StorageService;
-import org.apache.cassandra.utils.FBUtilities;
-import org.apache.cassandra.utils.ResourceWatcher;
-import org.apache.cassandra.utils.WrappedRunnable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A snitch that can be configured to work across clouds. It uses and
- * extends the cassandra-rackdc.properties (which is used by the 
- * GossipingPropertyFileSnitch) to add a publicip and privateip 
- * configuration.
- * <p>
- * The code is very similar to Ec2MultiRegionSnitch, except that it uses
- * the the config file rather than querying EC2 to get the IPs.
- * <p>
- * If two nodes are in the same datacenter, they will attempt to communicate
- * using the privateip. If they are in different datacenters, they will use
- * the publicip.
- */
-public class MultiCloudSnitch extends AbstractNetworkTopologySnitch implements IEndpointStateChangeSubscriber
-{
-    // FIXME Need to submit a pull request to Cassandra (1.2.x branch) for this snitch.
-    // Or could enhance GossipingPropertyFileSnitch instead, and submit PR for that.
-    
-    protected static final Logger logger = LoggerFactory.getLogger(MultiCloudSnitch.class);
-    
-    public static final String SNITCH_PROPERTIES_FILENAME = "cassandra-rackdc.properties";
-
-    private static final String DEFAULT_DC = "UNKNOWN-DC";
-    private static final String DEFAULT_RACK = "UNKNOWN-RACK";
-    
-    protected String rack;
-    protected String datacenter;
-    protected InetAddress public_ip;
-    protected String private_ip;
-
-    private volatile boolean gossipStarted;
-
-    public MultiCloudSnitch() throws ConfigurationException
-    {
-        reloadConfiguration();
-        logger.info("CustomSnitch using datacenter: " + datacenter + ", rack: " + rack + ", publicip: " + public_ip + ", privateip: " + private_ip);
-
-        try
-        {
-            FBUtilities.resourceToFile(SNITCH_PROPERTIES_FILENAME);
-            Runnable runnable = new WrappedRunnable()
-            {
-                protected void runMayThrow() throws ConfigurationException
-                {
-                    reloadConfiguration();
-                }
-            };
-            ResourceWatcher.watch(SNITCH_PROPERTIES_FILENAME, runnable, 60 * 1000);
-        }
-        catch (ConfigurationException ex)
-        {
-            logger.debug(SNITCH_PROPERTIES_FILENAME + " found, but does not look like a plain file. Will not watch it for changes");
-        }
-    }
-
-    public void reloadConfiguration() throws ConfigurationException
-    {
-        HashMap<InetAddress, String[]> reloadedMap = new HashMap<InetAddress, String[]>();
-        String DC_PROPERTY = "dc";
-        String RACK_PROPERTY = "rack";
-        String PUBLIC_IP_PROPERTY = "publicip";
-        String PRIVATE_IP_PROPERTY = "privateip";
-
-        Properties properties = new Properties();
-        InputStream stream = null;
-        try
-        {
-            stream = getClass().getClassLoader().getResourceAsStream(SNITCH_PROPERTIES_FILENAME);
-            properties.load(stream);
-        }
-        catch (Exception e)
-        {
-            throw new ConfigurationException("Unable to read " + SNITCH_PROPERTIES_FILENAME, e);
-        }
-        finally
-        {
-            FileUtils.closeQuietly(stream);
-        }
-
-        datacenter = properties.getProperty(DC_PROPERTY);
-        rack = properties.getProperty(RACK_PROPERTY);
-        private_ip = checkNotNull(properties.getProperty(PRIVATE_IP_PROPERTY), "%s in %s", PRIVATE_IP_PROPERTY, SNITCH_PROPERTIES_FILENAME);
-        String public_ip_str = checkNotNull(properties.getProperty(PUBLIC_IP_PROPERTY), "%s in %s", PUBLIC_IP_PROPERTY, SNITCH_PROPERTIES_FILENAME);
-        try {
-            public_ip = InetAddress.getByName(public_ip_str);
-        }
-        catch (UnknownHostException e)
-        {
-            throw new ConfigurationException("Unknown host " + public_ip_str, e);
-        }
-        
-        logger.debug("CustomSnitch reloaded, using datacenter: " + datacenter + ", rack: " + rack + ", publicip: " + public_ip + ", privateip: " + private_ip);
-
-        if (StorageService.instance != null) // null check tolerates circular dependency; see CASSANDRA-4145
-            StorageService.instance.getTokenMetadata().invalidateCaches();
-
-        if (gossipStarted)
-            StorageService.instance.gossipSnitchInfo();
-    }
-
-
-    public String getRack(InetAddress endpoint)
-    {
-        if (endpoint.equals(FBUtilities.getBroadcastAddress()))
-            return rack;
-        EndpointState state = Gossiper.instance.getEndpointStateForEndpoint(endpoint);
-        if (state == null || state.getApplicationState(ApplicationState.RACK) == null)
-            return DEFAULT_RACK;
-        return state.getApplicationState(ApplicationState.RACK).value;
-    }
-
-    public String getDatacenter(InetAddress endpoint)
-    {
-        if (endpoint.equals(FBUtilities.getBroadcastAddress()))
-            return datacenter;
-        EndpointState state = Gossiper.instance.getEndpointStateForEndpoint(endpoint);
-        if (state == null || state.getApplicationState(ApplicationState.DC) == null)
-            return DEFAULT_DC;
-        return state.getApplicationState(ApplicationState.DC).value;
-    }
-    
-    public void onJoin(InetAddress endpoint, EndpointState epState)
-    {
-        if (epState.getApplicationState(ApplicationState.INTERNAL_IP) != null)
-            reConnect(endpoint, epState.getApplicationState(ApplicationState.INTERNAL_IP));
-    }
-
-    public void onChange(InetAddress endpoint, ApplicationState state, VersionedValue value)
-    {
-        if (state == ApplicationState.INTERNAL_IP)
-            reConnect(endpoint, value);
-    }
-
-    public void onAlive(InetAddress endpoint, EndpointState state)
-    {
-        if (state.getApplicationState(ApplicationState.INTERNAL_IP) != null)
-            reConnect(endpoint, state.getApplicationState(ApplicationState.INTERNAL_IP));
-    }
-
-    public void onDead(InetAddress endpoint, EndpointState state)
-    {
-        // do nothing
-    }
-
-    public void onRestart(InetAddress endpoint, EndpointState state)
-    {
-        // do nothing
-    }
-
-    public void onRemove(InetAddress endpoint)
-    {
-        // do nothing.
-    }
-
-    private void reConnect(InetAddress endpoint, VersionedValue versionedValue)
-    {
-        if (!getDatacenter(endpoint).equals(getDatacenter(public_ip)))
-            return; // do nothing return back...
-
-        try
-        {
-            InetAddress remoteIP = InetAddress.getByName(versionedValue.value);
-            MessagingService.instance().getConnectionPool(endpoint).reset(remoteIP);
-            logger.debug(String.format("Intiated reconnect to an Internal IP %s for the %s", remoteIP, endpoint));
-        } catch (UnknownHostException e)
-        {
-            logger.error("Error in getting the IP address resolved: ", e);
-        }
-    }
-
-    @Override
-    public void gossiperStarting()
-    {
-        super.gossiperStarting();
-        Gossiper.instance.addLocalApplicationState(ApplicationState.INTERNAL_IP, StorageService.instance.valueFactory.internalIP(private_ip));
-        Gossiper.instance.register(this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/database/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/database/pom.xml b/brooklyn-library/sandbox/database/pom.xml
deleted file mode 100644
index 28ef7a0..0000000
--- a/brooklyn-library/sandbox/database/pom.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.apache.brooklyn.sandbox</groupId>
-    <artifactId>brooklyn-sandbox-software-database</artifactId>
-    <packaging>jar</packaging>
-    <name>Brooklyn Database Software Entities</name>
-    <description>
-		Brooklyn entitites for database software processes
-	</description>
-
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/Database.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/Database.java b/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/Database.java
deleted file mode 100644
index fccb760..0000000
--- a/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/Database.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database;
-
-import java.util.Collection;
-import java.util.Map;
-
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-
-/**
- * Intended to represent a SQL relational database service.
- *
- * TODO work in progress
- */
-public interface Database {
-    ConfigKey<String> SQL_VERSION = ConfigKeys.newStringConfigKey("database.sql.version", "SQL version");
-
-    Collection<Schema> getSchemas();
-
-    void createSchema(String name, Map properties);
-
-    void addSchema(Schema schema);
-
-    void removeSchema(String schemaName);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/Schema.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/Schema.java b/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/Schema.java
deleted file mode 100644
index a032adc..0000000
--- a/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/Schema.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database;
-
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-
-/**
- * Intended to represent a SQL database schema.
- *
- * TODO work in progress
- */
-public interface Schema {
-    ConfigKey<String> SCHEMA_NAME = ConfigKeys.newStringConfigKey("database.schema", "Database schema name");
-
-    void create();
-
-    void remove();
-
-    String getName();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbyDatabase.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbyDatabase.java b/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbyDatabase.java
deleted file mode 100644
index 7cd3bd4..0000000
--- a/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbyDatabase.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.derby;
-
-import java.util.Collection;
-import java.util.Map;
-
-import javax.management.ObjectName;
-
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.entity.database.Database;
-import org.apache.brooklyn.entity.database.Schema;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.jmx.JmxHelper;
-import org.apache.brooklyn.entity.java.UsesJava;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.util.collections.MutableMap;
-
-import com.google.common.base.Objects.ToStringHelper;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-/**
- * An {@link Entity} that represents a single Derby SQL database server instance.
- *
- * TODO work in progress
- */
-public class DerbyDatabase extends SoftwareProcessImpl implements Database, UsesJava, UsesJmx {
-    private static final Logger log = LoggerFactory.getLogger(DerbyDatabase.class);
-
-    @SetFromFlag("version")
-    public static final ConfigKey<String> SUGGESTED_VERSION =
-            ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "10.8.1.2");
-
-    public static final PortAttributeSensorAndConfigKey JDBC_PORT = new PortAttributeSensorAndConfigKey(
-            "derby.jdbcPort", "Suggested JDBC port");
-    
-    public static final ConfigKey<String> VIRTUAL_HOST_NAME = new BasicConfigKey<String>(
-            String.class, "derby.virtualHost", "Derby virtual host name", "localhost");
-
-    public static final BasicAttributeSensorAndConfigKey<String> JMX_USER = new BasicAttributeSensorAndConfigKey<String>(
-            UsesJmx.JMX_USER, "admin");
-    
-    public static final BasicAttributeSensorAndConfigKey<String> JMX_PASSWORD = new BasicAttributeSensorAndConfigKey<String>(
-            UsesJmx.JMX_PASSWORD, "admin");
-
-    @SetFromFlag
-    protected Collection<String> schemaNames;
-    
-    @SetFromFlag
-    protected Map<String, DerbySchema> schemas;
-
-    protected transient JmxHelper jmxHelper;
-    
-    public DerbyDatabase() {
-        this(MutableMap.of(), null);
-    }
-    public DerbyDatabase(Map properties) {
-        this(properties, null);
-    }
-    public DerbyDatabase(Entity parent) {
-        this(MutableMap.of(), parent);
-    }
-    public DerbyDatabase(Map properties, Entity parent) {
-        super(properties, parent);
-
-        if (schemaNames == null) schemaNames = Lists.newArrayList();
-        if (schemas == null) schemas = Maps.newLinkedHashMap();
-    }
-
-    @Override
-    public Class<? extends DerbyDatabaseDriver> getDriverInterface() {
-        return DerbyDatabaseDriver.class;
-    }
-
-    @Override
-    public void connectSensors() {
-        super.connectSensors();
-        connectServiceUpIsRunning();
-    }
-
-    @Override
-    public void disconnectSensors() {
-        super.disconnectSensors();
-        disconnectServiceUpIsRunning();
-    }
-
-    @Override
-    public void postStart() {
-        super.postStart();
-        for (String name : schemaNames) {
-            createSchema(name);
-        }
-    }
-
-    @Override
-    public void preStop() {
-        super.preStop();
-        for (DerbySchema schema : schemas.values()) {
-            schema.destroy();
-        }
-        if (jmxHelper != null) jmxHelper.terminate();
-    }
-
-    public void createSchema(String name) {
-        createSchema(name, ImmutableMap.of());
-    }
-    
-    public void createSchema(String name, Map properties) {
-        Map allprops = MutableMap.builder().putAll(properties).put("name", name).build();
-        DerbySchema schema = new DerbySchema(allprops);
-        schema.init();
-        schema.create();
-        schemas.put(name, schema);
-    }
-
-    public Collection<Schema> getSchemas() {
-        return ImmutableList.<Schema>copyOf(schemas.values());
-    }
-    
-    public void addSchema(Schema schema) {
-        schemas.put(schema.getName(), (DerbySchema) schema);
-    }
-    
-    public void removeSchema(String schemaName) {
-        schemas.remove(schemaName);
-    }
-
-    @Override
-    protected ToStringHelper toStringHelper() {
-        return super.toStringHelper().add("jdbcPort", getAttribute(JDBC_PORT));
-    }
-
-    protected boolean computeNodeUp() {
-        // FIXME Use the JmxAdapter.reachable() stuff instead of getAttribute
-        try {
-            ObjectName serverInfoObjectName = ObjectName.getInstance("org.apache.derby:type=ServerInformation,name=ServerInformation");
-            String productVersion = (String) jmxHelper.getAttribute(serverInfoObjectName, "ProductVersion");
-            return (productVersion != null);
-        } catch (Exception e) {
-            return false;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbyDatabaseDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbyDatabaseDriver.java b/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbyDatabaseDriver.java
deleted file mode 100644
index b8594be..0000000
--- a/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbyDatabaseDriver.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.derby;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-
-public interface DerbyDatabaseDriver extends JavaSoftwareProcessDriver {
-
-}


[30/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.ttf
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.ttf b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.ttf
deleted file mode 100644
index 5cd6cff..0000000
Binary files a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.ttf and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.woff
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.woff b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.woff
deleted file mode 100644
index 9eaecb3..0000000
Binary files a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.woff and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/js/mobile-angular-ui.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/js/mobile-angular-ui.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/js/mobile-angular-ui.js
deleted file mode 100644
index c18a8e1..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/js/mobile-angular-ui.js
+++ /dev/null
@@ -1,1854 +0,0 @@
-/*! Overthrow. An overflow:auto polyfill for responsive design. (c) 2012: Scott Jehl, Filament Group, Inc. http://filamentgroup.github.com/Overthrow/license.txt */
-(function( w, undefined ){
-	
-	var doc = w.document,
-		docElem = doc.documentElement,
-		enabledClassName = "overthrow-enabled",
-
-		// Touch events are used in the polyfill, and thus are a prerequisite
-		canBeFilledWithPoly = "ontouchmove" in doc,
-		
-		// The following attempts to determine whether the browser has native overflow support
-		// so we can enable it but not polyfill
-		nativeOverflow = 
-			// Features-first. iOS5 overflow scrolling property check - no UA needed here. thanks Apple :)
-			"WebkitOverflowScrolling" in docElem.style ||
-			// Test the windows scrolling property as well
-			"msOverflowStyle" in docElem.style ||
-			// Touch events aren't supported and screen width is greater than X
-			// ...basically, this is a loose "desktop browser" check. 
-			// It may wrongly opt-in very large tablets with no touch support.
-			( !canBeFilledWithPoly && w.screen.width > 800 ) ||
-			// Hang on to your hats.
-			// Whitelist some popular, overflow-supporting mobile browsers for now and the future
-			// These browsers are known to get overlow support right, but give us no way of detecting it.
-			(function(){
-				var ua = w.navigator.userAgent,
-					// Webkit crosses platforms, and the browsers on our list run at least version 534
-					webkit = ua.match( /AppleWebKit\/([0-9]+)/ ),
-					wkversion = webkit && webkit[1],
-					wkLte534 = webkit && wkversion >= 534;
-					
-				return (
-					/* Android 3+ with webkit gte 534
-					~: Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13 */
-					ua.match( /Android ([0-9]+)/ ) && RegExp.$1 >= 3 && wkLte534 ||
-					/* Blackberry 7+ with webkit gte 534
-					~: Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0 Mobile Safari/534.11+ */
-					ua.match( / Version\/([0-9]+)/ ) && RegExp.$1 >= 0 && w.blackberry && wkLte534 ||
-					/* Blackberry Playbook with webkit gte 534
-					~: Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.8+ (KHTML, like Gecko) Version/0.0.1 Safari/534.8+ */   
-					ua.indexOf( "PlayBook" ) > -1 && wkLte534 && !ua.indexOf( "Android 2" ) === -1 ||
-					/* Firefox Mobile (Fennec) 4 and up
-					~: Mozilla/5.0 (Mobile; rv:15.0) Gecko/15.0 Firefox/15.0 */
-					ua.match(/Firefox\/([0-9]+)/) && RegExp.$1 >= 4 ||
-					/* WebOS 3 and up (TouchPad too)
-					~: Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.48 Safari/534.6 TouchPad/1.0 */
-					ua.match( /wOSBrowser\/([0-9]+)/ ) && RegExp.$1 >= 233 && wkLte534 ||
-					/* Nokia Browser N8
-					~: Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaN8-00/012.002; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.0 Mobile Safari/533.4 3gpp-gba 
-					~: Note: the N9 doesn't have native overflow with one-finger touch. wtf */
-					ua.match( /NokiaBrowser\/([0-9\.]+)/ ) && parseFloat(RegExp.$1) === 7.3 && webkit && wkversion >= 533
-				);
-			})();
-
-	// Expose overthrow API
-	w.overthrow = {};
-
-	w.overthrow.enabledClassName = enabledClassName;
-
-	w.overthrow.addClass = function(){
-		if( docElem.className.indexOf( w.overthrow.enabledClassName ) === -1 ){
-			docElem.className += " " + w.overthrow.enabledClassName;
-		}
-	};
-
-	w.overthrow.removeClass = function(){
-		docElem.className = docElem.className.replace( w.overthrow.enabledClassName, "" );
-	};
-
-	// Enable and potentially polyfill overflow
-	w.overthrow.set = function(){
-			
-		// If nativeOverflow or at least the element canBeFilledWithPoly, add a class to cue CSS that assumes overflow scrolling will work (setting height on elements and such)
-		if( nativeOverflow ){
-			w.overthrow.addClass();
-		}
-
-	};
-
-	// expose polyfillable 
-	w.overthrow.canBeFilledWithPoly = canBeFilledWithPoly;
-
-	// Destroy everything later. If you want to.
-	w.overthrow.forget = function(){
-
-		w.overthrow.removeClass();
-		
-	};
-		
-	// Expose overthrow API
-	w.overthrow.support = nativeOverflow ? "native" : "none";
-		
-})( this );
-
-/*! Overthrow. An overflow:auto polyfill for responsive design. (c) 2012: Scott Jehl, Filament Group, Inc. http://filamentgroup.github.com/Overthrow/license.txt */
-(function( w, undefined ){
-	
-	// Auto-init
-	w.overthrow.set();
-
-}( this ));
-/*! Overthrow. An overflow:auto polyfill for responsive design. (c) 2012: Scott Jehl, Filament Group, Inc. http://filamentgroup.github.com/Overthrow/license.txt */
-(function( w, o, undefined ){
-
-	// o is overthrow reference from overthrow-polyfill.js
-	if( o === undefined ){
-		return;
-	}
-
-	o.scrollIndicatorClassName = "overthrow";
-	
-	var doc = w.document,
-		docElem = doc.documentElement,
-		// o api
-		nativeOverflow = o.support === "native",
-		canBeFilledWithPoly = o.canBeFilledWithPoly,
-		configure = o.configure,
-		set = o.set,
-		forget = o.forget,
-		scrollIndicatorClassName = o.scrollIndicatorClassName;
-
-	// find closest overthrow (elem or a parent)
-	o.closest = function( target, ascend ){
-		return !ascend && target.className && target.className.indexOf( scrollIndicatorClassName ) > -1 && target || o.closest( target.parentNode );
-	};
-		
-	// polyfill overflow
-	var enabled = false;
-	o.set = function(){
-			
-		set();
-
-		// If nativeOverflow or it doesn't look like the browser canBeFilledWithPoly, our job is done here. Exit viewport left.
-		if( enabled || nativeOverflow || !canBeFilledWithPoly ){
-			return;
-		}
-
-		w.overthrow.addClass();
-
-		enabled = true;
-
-		o.support = "polyfilled";
-
-		o.forget = function(){
-			forget();
-			enabled = false;
-			// Remove touch binding (check for method support since this part isn't qualified by touch support like the rest)
-			if( doc.removeEventListener ){
-				doc.removeEventListener( "touchstart", start, false );
-			}
-		};
-
-		// Fill 'er up!
-		// From here down, all logic is associated with touch scroll handling
-			// elem references the overthrow element in use
-		var elem,
-			
-			// The last several Y values are kept here
-			lastTops = [],
-	
-			// The last several X values are kept here
-			lastLefts = [],
-			
-			// lastDown will be true if the last scroll direction was down, false if it was up
-			lastDown,
-			
-			// lastRight will be true if the last scroll direction was right, false if it was left
-			lastRight,
-			
-			// For a new gesture, or change in direction, reset the values from last scroll
-			resetVertTracking = function(){
-				lastTops = [];
-				lastDown = null;
-			},
-			
-			resetHorTracking = function(){
-				lastLefts = [];
-				lastRight = null;
-			},
-		
-			// On webkit, touch events hardly trickle through textareas and inputs
-			// Disabling CSS pointer events makes sure they do, but it also makes the controls innaccessible
-			// Toggling pointer events at the right moments seems to do the trick
-			// Thanks Thomas Bachem http://stackoverflow.com/a/5798681 for the following
-			inputs,
-			setPointers = function( val ){
-				inputs = elem.querySelectorAll( "textarea, input" );
-				for( var i = 0, il = inputs.length; i < il; i++ ) {
-					inputs[ i ].style.pointerEvents = val;
-				}
-			},
-			
-			// For nested overthrows, changeScrollTarget restarts a touch event cycle on a parent or child overthrow
-			changeScrollTarget = function( startEvent, ascend ){
-				if( doc.createEvent ){
-					var newTarget = ( !ascend || ascend === undefined ) && elem.parentNode || elem.touchchild || elem,
-						tEnd;
-							
-					if( newTarget !== elem ){
-						tEnd = doc.createEvent( "HTMLEvents" );
-						tEnd.initEvent( "touchend", true, true );
-						elem.dispatchEvent( tEnd );
-						newTarget.touchchild = elem;
-						elem = newTarget;
-						newTarget.dispatchEvent( startEvent );
-					}
-				}
-			},
-			
-			// Touchstart handler
-			// On touchstart, touchmove and touchend are freshly bound, and all three share a bunch of vars set by touchstart
-			// Touchend unbinds them again, until next time
-			start = function( e ){
-
-				// Stop any throw in progress
-				if( o.intercept ){
-					o.intercept();
-				}
-				
-				// Reset the distance and direction tracking
-				resetVertTracking();
-				resetHorTracking();
-				
-				elem = o.closest( e.target );
-					
-				if( !elem || elem === docElem || e.touches.length > 1 ){
-					return;
-				}			
-
-				setPointers( "none" );
-				var touchStartE = e,
-					scrollT = elem.scrollTop,
-					scrollL = elem.scrollLeft,
-					height = elem.offsetHeight,
-					width = elem.offsetWidth,
-					startY = e.touches[ 0 ].pageY,
-					startX = e.touches[ 0 ].pageX,
-					scrollHeight = elem.scrollHeight,
-					scrollWidth = elem.scrollWidth,
-				
-					// Touchmove handler
-					move = function( e ){
-					
-						var ty = scrollT + startY - e.touches[ 0 ].pageY,
-							tx = scrollL + startX - e.touches[ 0 ].pageX,
-							down = ty >= ( lastTops.length ? lastTops[ 0 ] : 0 ),
-							right = tx >= ( lastLefts.length ? lastLefts[ 0 ] : 0 );
-							
-						// If there's room to scroll the current container, prevent the default window scroll
-						if( ( ty > 0 && ty < scrollHeight - height ) || ( tx > 0 && tx < scrollWidth - width ) ){
-							e.preventDefault();
-						}
-						// This bubbling is dumb. Needs a rethink.
-						else {
-							changeScrollTarget( touchStartE );
-						}
-						
-						// If down and lastDown are inequal, the y scroll has changed direction. Reset tracking.
-						if( lastDown && down !== lastDown ){
-							resetVertTracking();
-						}
-						
-						// If right and lastRight are inequal, the x scroll has changed direction. Reset tracking.
-						if( lastRight && right !== lastRight ){
-							resetHorTracking();
-						}
-						
-						// remember the last direction in which we were headed
-						lastDown = down;
-						lastRight = right;							
-						
-						// set the container's scroll
-						elem.scrollTop = ty;
-						elem.scrollLeft = tx;
-					
-						lastTops.unshift( ty );
-						lastLefts.unshift( tx );
-					
-						if( lastTops.length > 3 ){
-							lastTops.pop();
-						}
-						if( lastLefts.length > 3 ){
-							lastLefts.pop();
-						}
-					},
-				
-					// Touchend handler
-					end = function( e ){
-
-						// Bring the pointers back
-						setPointers( "auto" );
-						setTimeout( function(){
-							setPointers( "none" );
-						}, 450 );
-						elem.removeEventListener( "touchmove", move, false );
-						elem.removeEventListener( "touchend", end, false );
-					};
-				
-				elem.addEventListener( "touchmove", move, false );
-				elem.addEventListener( "touchend", end, false );
-			};
-			
-		// Bind to touch, handle move and end within
-		doc.addEventListener( "touchstart", start, false );
-	};
-		
-})( this, this.overthrow );
-
-/**
- * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
- *
- * @version 1.0.2
- * @codingstandard ftlabs-jsv2
- * @copyright The Financial Times Limited [All Rights Reserved]
- * @license MIT License (see LICENSE.txt)
- */
-
-/*jslint browser:true, node:true*/
-/*global define, Event, Node*/
-
-
-/**
- * Instantiate fast-clicking listeners on the specified layer.
- *
- * @constructor
- * @param {Element} layer The layer to listen on
- * @param {Object} options The options to override the defaults
- */
-function FastClick(layer, options) {
-	'use strict';
-	var oldOnClick;
-
-	options = options || {};
-
-	/**
-	 * Whether a click is currently being tracked.
-	 *
-	 * @type boolean
-	 */
-	this.trackingClick = false;
-
-
-	/**
-	 * Timestamp for when click tracking started.
-	 *
-	 * @type number
-	 */
-	this.trackingClickStart = 0;
-
-
-	/**
-	 * The element being tracked for a click.
-	 *
-	 * @type EventTarget
-	 */
-	this.targetElement = null;
-
-
-	/**
-	 * X-coordinate of touch start event.
-	 *
-	 * @type number
-	 */
-	this.touchStartX = 0;
-
-
-	/**
-	 * Y-coordinate of touch start event.
-	 *
-	 * @type number
-	 */
-	this.touchStartY = 0;
-
-
-	/**
-	 * ID of the last touch, retrieved from Touch.identifier.
-	 *
-	 * @type number
-	 */
-	this.lastTouchIdentifier = 0;
-
-
-	/**
-	 * Touchmove boundary, beyond which a click will be cancelled.
-	 *
-	 * @type number
-	 */
-	this.touchBoundary = options.touchBoundary || 10;
-
-
-	/**
-	 * The FastClick layer.
-	 *
-	 * @type Element
-	 */
-	this.layer = layer;
-
-	/**
-	 * The minimum time between tap(touchstart and touchend) events
-	 *
-	 * @type number
-	 */
-	this.tapDelay = options.tapDelay || 200;
-
-	if (FastClick.notNeeded(layer)) {
-		return;
-	}
-
-	// Some old versions of Android don't have Function.prototype.bind
-	function bind(method, context) {
-		return function() { return method.apply(context, arguments); };
-	}
-
-
-	var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];
-	var context = this;
-	for (var i = 0, l = methods.length; i < l; i++) {
-		context[methods[i]] = bind(context[methods[i]], context);
-	}
-
-	// Set up event handlers as required
-	if (deviceIsAndroid) {
-		layer.addEventListener('mouseover', this.onMouse, true);
-		layer.addEventListener('mousedown', this.onMouse, true);
-		layer.addEventListener('mouseup', this.onMouse, true);
-	}
-
-	layer.addEventListener('click', this.onClick, true);
-	layer.addEventListener('touchstart', this.onTouchStart, false);
-	layer.addEventListener('touchmove', this.onTouchMove, false);
-	layer.addEventListener('touchend', this.onTouchEnd, false);
-	layer.addEventListener('touchcancel', this.onTouchCancel, false);
-
-	// Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
-	// which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick
-	// layer when they are cancelled.
-	if (!Event.prototype.stopImmediatePropagation) {
-		layer.removeEventListener = function(type, callback, capture) {
-			var rmv = Node.prototype.removeEventListener;
-			if (type === 'click') {
-				rmv.call(layer, type, callback.hijacked || callback, capture);
-			} else {
-				rmv.call(layer, type, callback, capture);
-			}
-		};
-
-		layer.addEventListener = function(type, callback, capture) {
-			var adv = Node.prototype.addEventListener;
-			if (type === 'click') {
-				adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) {
-					if (!event.propagationStopped) {
-						callback(event);
-					}
-				}), capture);
-			} else {
-				adv.call(layer, type, callback, capture);
-			}
-		};
-	}
-
-	// If a handler is already declared in the element's onclick attribute, it will be fired before
-	// FastClick's onClick handler. Fix this by pulling out the user-defined handler function and
-	// adding it as listener.
-	if (typeof layer.onclick === 'function') {
-
-		// Android browser on at least 3.2 requires a new reference to the function in layer.onclick
-		// - the old one won't work if passed to addEventListener directly.
-		oldOnClick = layer.onclick;
-		layer.addEventListener('click', function(event) {
-			oldOnClick(event);
-		}, false);
-		layer.onclick = null;
-	}
-}
-
-
-/**
- * Android requires exceptions.
- *
- * @type boolean
- */
-var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0;
-
-
-/**
- * iOS requires exceptions.
- *
- * @type boolean
- */
-var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent);
-
-
-/**
- * iOS 4 requires an exception for select elements.
- *
- * @type boolean
- */
-var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent);
-
-
-/**
- * iOS 6.0(+?) requires the target element to be manually derived
- *
- * @type boolean
- */
-var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS ([6-9]|\d{2})_\d/).test(navigator.userAgent);
-
-
-/**
- * Determine whether a given element requires a native click.
- *
- * @param {EventTarget|Element} target Target DOM element
- * @returns {boolean} Returns true if the element needs a native click
- */
-FastClick.prototype.needsClick = function(target) {
-	'use strict';
-	switch (target.nodeName.toLowerCase()) {
-
-	// Don't send a synthetic click to disabled inputs (issue #62)
-	case 'button':
-	case 'select':
-	case 'textarea':
-		if (target.disabled) {
-			return true;
-		}
-
-		break;
-	case 'input':
-
-		// File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
-		if ((deviceIsIOS && target.type === 'file') || target.disabled) {
-			return true;
-		}
-
-		break;
-	case 'label':
-	case 'video':
-		return true;
-	}
-
-	return (/\bneedsclick\b/).test(target.className);
-};
-
-
-/**
- * Determine whether a given element requires a call to focus to simulate click into element.
- *
- * @param {EventTarget|Element} target Target DOM element
- * @returns {boolean} Returns true if the element requires a call to focus to simulate native click.
- */
-FastClick.prototype.needsFocus = function(target) {
-	'use strict';
-	switch (target.nodeName.toLowerCase()) {
-	case 'textarea':
-		return true;
-	case 'select':
-		return !deviceIsAndroid;
-	case 'input':
-		switch (target.type) {
-		case 'button':
-		case 'checkbox':
-		case 'file':
-		case 'image':
-		case 'radio':
-		case 'submit':
-			return false;
-		}
-
-		// No point in attempting to focus disabled inputs
-		return !target.disabled && !target.readOnly;
-	default:
-		return (/\bneedsfocus\b/).test(target.className);
-	}
-};
-
-
-/**
- * Send a click event to the specified element.
- *
- * @param {EventTarget|Element} targetElement
- * @param {Event} event
- */
-FastClick.prototype.sendClick = function(targetElement, event) {
-	'use strict';
-	var clickEvent, touch;
-
-	// On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
-	if (document.activeElement && document.activeElement !== targetElement) {
-		document.activeElement.blur();
-	}
-
-	touch = event.changedTouches[0];
-
-	// Synthesise a click event, with an extra attribute so it can be tracked
-	clickEvent = document.createEvent('MouseEvents');
-	clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
-	clickEvent.forwardedTouchEvent = true;
-	targetElement.dispatchEvent(clickEvent);
-};
-
-FastClick.prototype.determineEventType = function(targetElement) {
-	'use strict';
-
-	//Issue #159: Android Chrome Select Box does not open with a synthetic click event
-	if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
-		return 'mousedown';
-	}
-
-	return 'click';
-};
-
-
-/**
- * @param {EventTarget|Element} targetElement
- */
-FastClick.prototype.focus = function(targetElement) {
-	'use strict';
-	var length;
-
-	// Issue #160: on iOS 7, some input elements (e.g. date datetime) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
-	if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time') {
-		length = targetElement.value.length;
-		targetElement.setSelectionRange(length, length);
-	} else {
-		targetElement.focus();
-	}
-};
-
-
-/**
- * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.
- *
- * @param {EventTarget|Element} targetElement
- */
-FastClick.prototype.updateScrollParent = function(targetElement) {
-	'use strict';
-	var scrollParent, parentElement;
-
-	scrollParent = targetElement.fastClickScrollParent;
-
-	// Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
-	// target element was moved to another parent.
-	if (!scrollParent || !scrollParent.contains(targetElement)) {
-		parentElement = targetElement;
-		do {
-			if (parentElement.scrollHeight > parentElement.offsetHeight) {
-				scrollParent = parentElement;
-				targetElement.fastClickScrollParent = parentElement;
-				break;
-			}
-
-			parentElement = parentElement.parentElement;
-		} while (parentElement);
-	}
-
-	// Always update the scroll top tracker if possible.
-	if (scrollParent) {
-		scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
-	}
-};
-
-
-/**
- * @param {EventTarget} targetElement
- * @returns {Element|EventTarget}
- */
-FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
-	'use strict';
-
-	// On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
-	if (eventTarget.nodeType === Node.TEXT_NODE) {
-		return eventTarget.parentNode;
-	}
-
-	return eventTarget;
-};
-
-
-/**
- * On touch start, record the position and scroll offset.
- *
- * @param {Event} event
- * @returns {boolean}
- */
-FastClick.prototype.onTouchStart = function(event) {
-	'use strict';
-	var targetElement, touch, selection;
-
-	// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
-	if (event.targetTouches.length > 1) {
-		return true;
-	}
-
-	targetElement = this.getTargetElementFromEventTarget(event.target);
-	touch = event.targetTouches[0];
-
-	if (deviceIsIOS) {
-
-		// Only trusted events will deselect text on iOS (issue #49)
-		selection = window.getSelection();
-		if (selection.rangeCount && !selection.isCollapsed) {
-			return true;
-		}
-
-		if (!deviceIsIOS4) {
-
-			// Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
-			// when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
-			// with the same identifier as the touch event that previously triggered the click that triggered the alert.
-			// Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
-			// immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
-			if (touch.identifier === this.lastTouchIdentifier) {
-				event.preventDefault();
-				return false;
-			}
-
-			this.lastTouchIdentifier = touch.identifier;
-
-			// If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
-			// 1) the user does a fling scroll on the scrollable layer
-			// 2) the user stops the fling scroll with another tap
-			// then the event.target of the last 'touchend' event will be the element that was under the user's finger
-			// when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
-			// is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
-			this.updateScrollParent(targetElement);
-		}
-	}
-
-	this.trackingClick = true;
-	this.trackingClickStart = event.timeStamp;
-	this.targetElement = targetElement;
-
-	this.touchStartX = touch.pageX;
-	this.touchStartY = touch.pageY;
-
-	// Prevent phantom clicks on fast double-tap (issue #36)
-	if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
-		event.preventDefault();
-	}
-
-	return true;
-};
-
-
-/**
- * Based on a touchmove event object, check whether the touch has moved past a boundary since it started.
- *
- * @param {Event} event
- * @returns {boolean}
- */
-FastClick.prototype.touchHasMoved = function(event) {
-	'use strict';
-	var touch = event.changedTouches[0], boundary = this.touchBoundary;
-
-	if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
-		return true;
-	}
-
-	return false;
-};
-
-
-/**
- * Update the last position.
- *
- * @param {Event} event
- * @returns {boolean}
- */
-FastClick.prototype.onTouchMove = function(event) {
-	'use strict';
-	if (!this.trackingClick) {
-		return true;
-	}
-
-	// If the touch has moved, cancel the click tracking
-	if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
-		this.trackingClick = false;
-		this.targetElement = null;
-	}
-
-	return true;
-};
-
-
-/**
- * Attempt to find the labelled control for the given label element.
- *
- * @param {EventTarget|HTMLLabelElement} labelElement
- * @returns {Element|null}
- */
-FastClick.prototype.findControl = function(labelElement) {
-	'use strict';
-
-	// Fast path for newer browsers supporting the HTML5 control attribute
-	if (labelElement.control !== undefined) {
-		return labelElement.control;
-	}
-
-	// All browsers under test that support touch events also support the HTML5 htmlFor attribute
-	if (labelElement.htmlFor) {
-		return document.getElementById(labelElement.htmlFor);
-	}
-
-	// If no for attribute exists, attempt to retrieve the first labellable descendant element
-	// the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
-	return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
-};
-
-
-/**
- * On touch end, determine whether to send a click event at once.
- *
- * @param {Event} event
- * @returns {boolean}
- */
-FastClick.prototype.onTouchEnd = function(event) {
-	'use strict';
-	var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
-
-	if (!this.trackingClick) {
-		return true;
-	}
-
-	// Prevent phantom clicks on fast double-tap (issue #36)
-	if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
-		this.cancelNextClick = true;
-		return true;
-	}
-
-	// Reset to prevent wrong click cancel on input (issue #156).
-	this.cancelNextClick = false;
-
-	this.lastClickTime = event.timeStamp;
-
-	trackingClickStart = this.trackingClickStart;
-	this.trackingClick = false;
-	this.trackingClickStart = 0;
-
-	// On some iOS devices, the targetElement supplied with the event is invalid if the layer
-	// is performing a transition or scroll, and has to be re-detected manually. Note that
-	// for this to function correctly, it must be called *after* the event target is checked!
-	// See issue #57; also filed as rdar://13048589 .
-	if (deviceIsIOSWithBadTarget) {
-		touch = event.changedTouches[0];
-
-		// In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
-		targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
-		targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
-	}
-
-	targetTagName = targetElement.tagName.toLowerCase();
-	if (targetTagName === 'label') {
-		forElement = this.findControl(targetElement);
-		if (forElement) {
-			this.focus(targetElement);
-			if (deviceIsAndroid) {
-				return false;
-			}
-
-			targetElement = forElement;
-		}
-	} else if (this.needsFocus(targetElement)) {
-
-		// Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
-		// Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
-		if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {
-			this.targetElement = null;
-			return false;
-		}
-
-		this.focus(targetElement);
-		this.sendClick(targetElement, event);
-
-		// Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
-		// Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)
-		if (!deviceIsIOS || targetTagName !== 'select') {
-			this.targetElement = null;
-			event.preventDefault();
-		}
-
-		return false;
-	}
-
-	if (deviceIsIOS && !deviceIsIOS4) {
-
-		// Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
-		// and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
-		scrollParent = targetElement.fastClickScrollParent;
-		if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
-			return true;
-		}
-	}
-
-	// Prevent the actual click from going though - unless the target node is marked as requiring
-	// real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
-	if (!this.needsClick(targetElement)) {
-		event.preventDefault();
-		this.sendClick(targetElement, event);
-	}
-
-	return false;
-};
-
-
-/**
- * On touch cancel, stop tracking the click.
- *
- * @returns {void}
- */
-FastClick.prototype.onTouchCancel = function() {
-	'use strict';
-	this.trackingClick = false;
-	this.targetElement = null;
-};
-
-
-/**
- * Determine mouse events which should be permitted.
- *
- * @param {Event} event
- * @returns {boolean}
- */
-FastClick.prototype.onMouse = function(event) {
-	'use strict';
-
-	// If a target element was never set (because a touch event was never fired) allow the event
-	if (!this.targetElement) {
-		return true;
-	}
-
-	if (event.forwardedTouchEvent) {
-		return true;
-	}
-
-	// Programmatically generated events targeting a specific element should be permitted
-	if (!event.cancelable) {
-		return true;
-	}
-
-	// Derive and check the target element to see whether the mouse event needs to be permitted;
-	// unless explicitly enabled, prevent non-touch click events from triggering actions,
-	// to prevent ghost/doubleclicks.
-	if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
-
-		// Prevent any user-added listeners declared on FastClick element from being fired.
-		if (event.stopImmediatePropagation) {
-			event.stopImmediatePropagation();
-		} else {
-
-			// Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
-			event.propagationStopped = true;
-		}
-
-		// Cancel the event
-		event.stopPropagation();
-		event.preventDefault();
-
-		return false;
-	}
-
-	// If the mouse event is permitted, return true for the action to go through.
-	return true;
-};
-
-
-/**
- * On actual clicks, determine whether this is a touch-generated click, a click action occurring
- * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or
- * an actual click which should be permitted.
- *
- * @param {Event} event
- * @returns {boolean}
- */
-FastClick.prototype.onClick = function(event) {
-	'use strict';
-	var permitted;
-
-	// It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
-	if (this.trackingClick) {
-		this.targetElement = null;
-		this.trackingClick = false;
-		return true;
-	}
-
-	// Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
-	if (event.target.type === 'submit' && event.detail === 0) {
-		return true;
-	}
-
-	permitted = this.onMouse(event);
-
-	// Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
-	if (!permitted) {
-		this.targetElement = null;
-	}
-
-	// If clicks are permitted, return true for the action to go through.
-	return permitted;
-};
-
-
-/**
- * Remove all FastClick's event listeners.
- *
- * @returns {void}
- */
-FastClick.prototype.destroy = function() {
-	'use strict';
-	var layer = this.layer;
-
-	if (deviceIsAndroid) {
-		layer.removeEventListener('mouseover', this.onMouse, true);
-		layer.removeEventListener('mousedown', this.onMouse, true);
-		layer.removeEventListener('mouseup', this.onMouse, true);
-	}
-
-	layer.removeEventListener('click', this.onClick, true);
-	layer.removeEventListener('touchstart', this.onTouchStart, false);
-	layer.removeEventListener('touchmove', this.onTouchMove, false);
-	layer.removeEventListener('touchend', this.onTouchEnd, false);
-	layer.removeEventListener('touchcancel', this.onTouchCancel, false);
-};
-
-
-/**
- * Check whether FastClick is needed.
- *
- * @param {Element} layer The layer to listen on
- */
-FastClick.notNeeded = function(layer) {
-	'use strict';
-	var metaViewport;
-	var chromeVersion;
-
-	// Devices that don't support touch don't need FastClick
-	if (typeof window.ontouchstart === 'undefined') {
-		return true;
-	}
-
-	// Chrome version - zero for other browsers
-	chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
-
-	if (chromeVersion) {
-
-		if (deviceIsAndroid) {
-			metaViewport = document.querySelector('meta[name=viewport]');
-
-			if (metaViewport) {
-				// Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
-				if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
-					return true;
-				}
-				// Chrome 32 and above with width=device-width or less don't need FastClick
-				if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
-					return true;
-				}
-			}
-
-		// Chrome desktop doesn't need FastClick (issue #15)
-		} else {
-			return true;
-		}
-	}
-
-	// IE10 with -ms-touch-action: none, which disables double-tap-to-zoom (issue #97)
-	if (layer.style.msTouchAction === 'none') {
-		return true;
-	}
-
-	return false;
-};
-
-
-/**
- * Factory method for creating a FastClick object
- *
- * @param {Element} layer The layer to listen on
- * @param {Object} options The options to override the defaults
- */
-FastClick.attach = function(layer, options) {
-	'use strict';
-	return new FastClick(layer, options);
-};
-
-
-if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
-
-	// AMD. Register as an anonymous module.
-	define(function() {
-		'use strict';
-		return FastClick;
-	});
-} else if (typeof module !== 'undefined' && module.exports) {
-	module.exports = FastClick.attach;
-	module.exports.FastClick = FastClick;
-} else {
-	window.FastClick = FastClick;
-}
-
-angular.module("mobile-angular-ui.active-links", []).run([
-  "$rootScope", function($rootScope) {
-    return angular.forEach(["$locationChangeSuccess", "$includeContentLoaded"], function(evtName) {
-      return $rootScope.$on(evtName, function() {
-        var newPath;
-        newPath = window.location.href;
-        angular.forEach(document.links, function(domLink) {
-          var link;
-          link = angular.element(domLink);
-          if (domLink.href === newPath) {
-            link.addClass("active");
-          } else {
-            link.removeClass("active");
-          }
-          return link = null;
-        });
-        return newPath = null;
-      });
-    });
-  }
-]);
-
-angular.module("mobile-angular-ui.directives.capture", [])
-
-.run([
-  "CaptureService", "$rootScope", function(CaptureService, $rootScope) {
-    $rootScope.$on('$routeChangeStart', function() {
-      CaptureService.resetAll();
-    });
-  }
-])
-
-.factory("CaptureService", [
-  "$compile", function($compile) {
-    var yielders = {};
-
-    return {
-      resetAll: function() {
-        for (name in yielders) {
-          this.resetYielder(name);
-        }
-      },
-      
-      resetYielder: function(name) {
-        var b = yielders[name];
-        this.setContentFor(name, b.defaultContent, b.defaultScope);
-      },
-
-      putYielder: function(name, element, defaultScope, defaultContent) {
-        var yielder = {};
-        yielder.name = name;
-        yielder.element = element;
-        yielder.defaultContent = defaultContent || "";
-        yielder.defaultScope = defaultScope;
-        yielders[name] = yielder;
-      },
-
-      getYielder: function(name) {
-        return yielders[name];
-      },
-
-      removeYielder: function(name) {
-        delete yielders[name];
-      },
-      
-      setContentFor: function(name, content, scope) {
-        var b = yielders[name];
-        if (!b) {
-          return;
-        }
-        b.element.html(content);
-        $compile(b.element.contents())(scope);
-      }
-
-    };
-  }
-])
-
-.directive("contentFor", [
-  "CaptureService", function(CaptureService) {
-    return {
-      compile: function(tElem, tAttrs) {
-        var rawContent = tElem.html();
-        if(tAttrs.duplicate == null) {
-          // no need to compile anything!
-          tElem.html("");
-        }
-        return function postLink(scope, elem, attrs) {
-          CaptureService.setContentFor(attrs.contentFor, rawContent, scope);
-          if (attrs.duplicate == null) {
-            elem.remove();
-          }
-        }
-      }
-    };
-  }
-])
-
-.directive("yieldTo", [
-  "$compile", "CaptureService", function($compile, CaptureService) {
-    return {
-      link: function(scope, element, attr) {
-        CaptureService.putYielder(attr.yieldTo, element, scope, element.html());
-        element.contents().remove();
-
-        scope.$on('$destroy', function(){
-          CaptureService.removeYielder(attr.yieldTo);
-        });
-      }
-    };
-  }
-]);
-
-angular.module('mobile-angular-ui.directives.carousel', [])
-
-.run(["$rootScope", function($rootScope) {
-    
-    $rootScope.carouselPrev = function(id) {
-      $rootScope.$emit("mobile-angular-ui.carousel.prev", id);
-    };
-    
-    $rootScope.carouselNext = function(id) {
-      $rootScope.$emit("mobile-angular-ui.carousel.next", id);
-    };
-    
-    var carouselItems = function(id) {
-      var elem = angular.element(document.getElementById(id));
-      var res = angular.element(elem.children()[0]).children();
-      elem = null;
-      return res;
-    };
-
-    var findActiveItemIndex = function(items) {
-      var idx = -1;
-      var found = false;
-
-      for (var _i = 0; _i < items.length; _i++) {
-        item = items[_i];
-        idx += 1;
-        if (angular.element(item).hasClass('active')) {
-          found = true;
-          break;
-        }
-      }
-
-      if (found) {
-        return idx;
-      } else {
-        return -1;
-      }
-
-    };
-
-    $rootScope.$on("mobile-angular-ui.carousel.prev", function(e, id) {
-      var items = carouselItems(id);
-      var idx = findActiveItemIndex(items);
-      var lastIdx = items.length - 1;
-
-      if (idx !== -1) {
-        angular.element(items[idx]).removeClass("active");
-      }
-
-      if (idx <= 0) {
-        angular.element(items[lastIdx]).addClass("active");
-      } else {
-        angular.element(items[idx - 1]).addClass("active");
-      }
-
-      items = null;
-      idx = null;
-      lastIdx = null;
-    });
-
-    $rootScope.$on("mobile-angular-ui.carousel.next", function(e, id) {
-      var items = carouselItems(id);
-      var idx = findActiveItemIndex(items);
-      var lastIdx = items.length - 1;
-      
-      if (idx !== -1) {
-        angular.element(items[idx]).removeClass("active");
-      }
-      
-      if (idx === lastIdx) {
-        angular.element(items[0]).addClass("active");
-      } else {
-        angular.element(items[idx + 1]).addClass("active");
-      }
-      
-      items = null;
-      idx = null;
-      lastIdx = null;
-    });
-  }
-]);
-
-// Provides touch events via fastclick.js
-angular.module('mobile-angular-ui.fastclick', [])
-
-.run([
-  '$window', '$document', function($window, $document) {
-    $window.addEventListener("load", (function() {
-       FastClick.attach($document[0].body);
-    }), false);
-  }
-])
-
-.directive("select", function() {
-  return {
-    replace: false,
-    restrict: "E",
-    link: function(scope, element, attr) {
-      element.addClass("needsclick");
-    }
-  };
-})
-
-.directive("input", function() {
-  return {
-    replace: false,
-    restrict: "E",
-    link: function(scope, element, attr) {
-      element.addClass("needsclick");
-    }
-  };
-})
-
-.directive("textarea", function() {
-  return {
-    replace: false,
-    restrict: "E",
-    link: function(scope, element, attr) {
-      element.addClass("needsclick");
-    }
-  };
-})
-
-angular.module('mobile-angular-ui.directives.forms', [])
-
-.directive("bsFormControl", function() {
-  var bs_col_classes = {};
-  var bs_col_sizes = ['xs', 'sm', 'md', 'lg'];
-  
-  for (var i = 0; i < bs_col_sizes.length; i++) {
-    for (var j = 1; j <= 12; j++) {
-      bs_col_classes['col-' + bs_col_sizes[i] + "-" + j] = true;
-    }
-  };
-  
-  function separeBsColClasses(clss) {
-    var intersection = "";
-    var difference = "";
-
-    for (var i = 0; i < clss.length; i++) {
-        var v = clss[i];
-        if (v in bs_col_classes) { 
-          intersection += (v + " "); 
-        } else {
-          difference += (v + " ");
-        }
-    }
-
-    return {i: intersection.trim(), d: difference.trim()};
-  }
-
-  return {
-    replace: true,
-    require: "ngModel",
-    link: function(scope, elem, attrs) {
-
-      if (attrs.labelClass == null) {
-        attrs.labelClass = "";
-      }
-
-      if (attrs.id == null) {
-        attrs.id = attrs.ngModel.replace(".", "_") + "_input";
-      }
-      
-      if ((elem[0].tagName == "SELECT") || ((elem[0].tagName == "INPUT" || elem[0].tagName == "TEXTAREA") && (attrs.type != "checkbox" && attrs.type != "radio"))) {
-        elem.addClass("form-control");
-      }
-      
-      var label = angular.element("<label for=\"" + attrs.id + "\" class=\"control-label\">" + attrs.label + "</label>");
-      var w1 = angular.element("<div class=\"form-group row\"></div>"); 
-      var w2 = angular.element("<div class=\"form-control-wrapper\"></div>");
-      
-      var labelColClasses = separeBsColClasses(attrs.labelClass.split(/\s+/));
-      if (labelColClasses.i == "") {
-        label.addClass("col-xs-12");
-      }
-      label.addClass(attrs.labelClass);
-
-      var elemColClasses = separeBsColClasses(elem[0].className.split(/\s+/));
-      elem.removeClass(elemColClasses.i);
-      w2.addClass(elemColClasses.i);
-      if (elemColClasses.i == "") {
-        w2.addClass("col-xs-12");
-      }
-      elem.wrap(w1).wrap(w2);
-      elem.parent().parent().prepend(label);
-      elem.attr('id', attrs.id);
-
-      label = w1 = w2 = labelColClasses = elemColClasses = null;
-    }
-  };
-})
-
-.directive("switch", function() {
-  return {
-    restrict: "EA",
-    replace: true,
-    scope: {
-      model: "=ngModel",
-      changeExpr: "@ngChange",
-      disabled: "@"
-    },
-    template: "<div class='switch' ng-class='{active: model}'><div class='switch-handle'></div></div>",
-    link: function(scope, elem, attrs) {
-
-      elem.on('click tap', function(){
-        if (attrs.disabled == null) {
-          scope.model = !scope.model;
-          scope.$apply();
-
-          if (scope.changeExpr != null) {
-            scope.$parent.$eval(scope.changeExpr);
-          };
-        }
-      });
-
-      elem.addClass('switch-transition-enabled');
-    }
-  };
-});
-angular.module('mobile-angular-ui.directives.navbars', [])
-
-.directive('navbarAbsoluteTop', function() {
-  return {
-    replace: false,
-    restrict: "C",
-    link: function(scope, elem, attrs) {
-      elem.parent().addClass('has-navbar-top');
-    }
-  };
-})
-
-.directive('navbarAbsoluteBottom', function() {
-  return {
-    replace: false,
-    restrict: "C",
-    link: function(scope, elem, attrs) {
-      elem.parent().addClass('has-navbar-bottom');
-    }
-  };
-});
-angular.module('mobile-angular-ui.directives.overlay', []).directive('overlay', [
-  "$compile", function($compile) {
-    return {
-        compile: function(tElem, tAttrs) {
-            var rawContent = tElem.html();
-            return function postLink(scope, elem, attrs) {
-                var active = "";
-                var body = rawContent;
-                var id = attrs.overlay;
-
-                if (attrs["default"] != null) {
-                  var active = "default='" + attrs["default"] + "'";
-                }
-
-                var html = "<div class=\"overlay\" id=\"" + id + "\" toggleable " + active + " parent-active-class=\"overlay-in\" active-class=\"overlay-show\">\n  <div class=\"overlay-inner\">\n    <div class=\"overlay-background\"></div>\n    <a href=\"#" + id + "\" toggle=\"off\" class=\"overlay-dismiss\">\n      <i class=\"fa fa-times-circle-o\"></i>\n    </a>\n    <div class=\"overlay-content\">\n      <div class=\"overlay-body\">\n        " + body + "\n      </div>\n    </div>\n  </div>\n</div>";
-                elem.remove();
-
-                var sameId = angular.element(document.getElementById(id));
-
-                if (sameId.length > 0 && sameId.hasClass('overlay')) {
-                  sameId.remove();
-                }
-
-                body = angular.element(document.body);
-                body.prepend($compile(html)(scope));
-
-                if (attrs["default"] === "active") {
-                   body.addClass('overlay-in');
-                }
-            }
-        }
-    };
-  }
-]);
-
-angular.module("mobile-angular-ui.directives.panels", [])
-
-.directive("bsPanel", function() {
-  return {
-    restrict: 'EA',
-    replace: true,
-    scope: false,
-    transclude: true,
-    link: function(scope, elem, attrs) {
-      elem.removeAttr('title');
-    },
-    template: function(elems, attrs) {
-      var heading = "";
-      if (attrs.title) {
-        heading = "<div class=\"panel-heading\">\n  <h2 class=\"panel-title\">\n    " + attrs.title + "\n  </h2>\n</div>";
-      }
-      return "<div class=\"panel\">\n  " + heading + "\n  <div class=\"panel-body\">\n     <div ng-transclude></div>\n  </div>\n</div>";
-    }
-  };
-});
-angular.module('mobile-angular-ui.pointer-events', []).run([
-  '$document', function($document) {
-    return angular.element($document).on("click tap", function(e) {
-      var target;
-      target = angular.element(e.target);
-      if (target.hasClass("disabled")) {
-        e.preventDefault();
-        e.stopPropagation();
-        target = null;
-        return false;
-      } else {
-        target = null;
-        return true;
-      }
-    });
-  }
-]);
-
- // Provides a scrollable implementation based on Overthrow
- // Many thanks to pavei (https://github.com/pavei) to submit
- // basic implementation
-
-angular.module("mobile-angular-ui.scrollable", [])
-
-.directive("scrollableContent", [
-  function() {
-    return {
-      replace: false,
-      restrict: "C",
-      link: function(scope, element, attr) {
-        if (overthrow.support !== "native") {
-          element.addClass("overthrow");
-          overthrow.forget();
-          return overthrow.set();
-        }
-      }
-    };
-  }
-]);
-angular.module('mobile-angular-ui.directives.sidebars', [])
-
-.directive('sidebar', ['$document', '$rootScope', function($document, $rootScope) {
-  return {
-    replace: false,
-    restrict: "C",
-    link: function(scope, elem, attrs) {
-      var shouldCloseOnOuterClicks = true;
-      
-      if( attrs.closeOnOuterClicks == 'false' || attrs.closeOnOuterClicks == '0') {
-        shouldCloseOnOuterClicks = false;
-      }
-
-      if (elem.hasClass('sidebar-left')) {
-        elem.parent().addClass('has-sidebar-left');
-      }
-
-      if (elem.hasClass('sidebar-right')) {
-        elem.parent().addClass('has-sidebar-right');
-      }
-
-      var isAncestorOrSelf = function(element, target) {
-        var parent = element;
-
-        while (parent.length > 0) {
-            if (parent[0] === target[0]) {
-                parent = null;     
-                return true;
-            }
-            parent = parent.parent();
-        }
-
-        parent = null;
-        return false;
-      };
-
-      var closeOnOuterClicks = function(e) {
-        if(! isAncestorOrSelf(angular.element(e.target), elem)) {
-            $rootScope.toggle(attrs.id, 'off');
-            e.preventDefault()
-            return false;
-        }
-      }
-      
-      var clearCb1 = angular.noop();
-      
-      if (shouldCloseOnOuterClicks) {
-        clearCb1 = $rootScope.$on('mobile-angular-ui.toggle.toggled', function(e, id, active){
-          if(id == attrs.id) {
-            if(active) {
-              setTimeout(function(){
-                $document.on('click tap', closeOnOuterClicks);
-              }, 300);
-            } else {
-              $document.unbind('click tap', closeOnOuterClicks);
-            }
-          }
-        });
-      }
-
-      scope.$on('$destroy', function(){
-        clearCb1();
-        $document.unbind('click tap', closeOnOuterClicks);
-      });
-
-    }
-  };
-}]);
-
-angular.module('mobile-angular-ui.directives.toggle', [])
-
-.factory('ToggleHelper', [
-  '$rootScope', function($rootScope) {
-    return {
-      
-      events: {
-        toggle: "mobile-angular-ui.toggle.toggle",
-        toggleByClass: "mobile-angular-ui.toggle.toggleByClass",
-        togglerLinked: "mobile-angular-ui.toggle.linked",
-        toggleableToggled: "mobile-angular-ui.toggle.toggled"
-      },
-
-      commands: {
-        alternate: "toggle",
-        activate: "on",
-        deactivate: "off"
-      },
-
-      toggle: function(target, command) {
-        if (command == null) {
-          command = "toggle";
-        }
-        $rootScope.$emit(this.events.toggle, target, command);
-      },
-
-      toggleByClass: function(targetClass, command) {
-        if (command == null) {
-          command = "toggle";
-        }
-        $rootScope.$emit(this.events.toggleByClass, targetClass, command);
-      },
-
-      notifyToggleState: function(elem, attrs, toggleState) {
-        $rootScope.$emit(this.events.toggleableToggled, attrs.id, toggleState, attrs.exclusionGroup);
-      },
-
-      toggleStateChanged: function(elem, attrs, toggleState) {
-        this.updateElemClasses(elem, attrs, toggleState);
-        this.notifyToggleState(elem, attrs, toggleState);
-      },
-
-      applyCommand: function(command, oldState) {
-        switch (command) {
-          case this.commands.activate:
-            return true;
-          case this.commands.deactivate:
-            return false;
-          case this.commands.alternate:
-            return !oldState;
-        }
-      },
-
-      updateElemClasses: function(elem, attrs, active) {
-
-        if (active) {
-          if (attrs.activeClass) {
-            elem.addClass(attrs.activeClass);
-          }
-          if (attrs.inactiveClass) {
-            elem.removeClass(attrs.inactiveClass);
-          }
-          var parent = elem.parent();
-          if (attrs.parentActiveClass) {
-            parent.addClass(attrs.parentActiveClass);
-          }
-          if (attrs.parentInactiveClass) {
-             parent.removeClass(attrs.parentInactiveClass);
-          }
-        } else {
-          if (attrs.inactiveClass) {
-            elem.addClass(attrs.inactiveClass);
-          }
-          if (attrs.activeClass) {
-            elem.removeClass(attrs.activeClass);
-          }
-          var parent = elem.parent();
-          if (attrs.parentInactiveClass) {
-            parent.addClass(attrs.parentInactiveClass);
-          }
-          if (attrs.parentActiveClass) {
-             parent.removeClass(attrs.parentActiveClass);
-          }
-        }
-      }
-    };
-  }
-])
-
-.run([
-  "$rootScope", "ToggleHelper", function($rootScope, ToggleHelper) {
-    
-    $rootScope.toggle = function(target, command) {
-      if (command == null) {
-        command = "toggle";
-      }
-      ToggleHelper.toggle(target, command);
-    };
-
-    $rootScope.toggleByClass = function(targetClass, command) {
-      if (command == null) {
-        command = "toggle";
-      }
-      ToggleHelper.toggleByClass(targetClass, command);
-    };
-  }
-])
-
-.directive('toggle', [
-  "$rootScope", "ToggleHelper", function($rootScope, ToggleHelper) {
-    return {
-      restrict: "A",
-      link: function(scope, elem, attrs) {
-        var command = attrs.toggle || ToggleHelper.commands.alternate;
-        var target = attrs.target;
-        var targetClass = attrs.targetClass;
-        var bubble = attrs.bubble === "true" || attrs.bubble === "1" || attrs.bubble === 1 || attrs.bubble === "" || attrs.bubble === "bubble";
-        
-        if ((!target) && attrs.href) {
-          target = attrs.href.slice(1);
-        }
-        
-        if (!(target || targetClass)) {
-          throw "'target' or 'target-class' attribute required with 'toggle'";
-        }
-        
-        elem.on("click tap", function(e) {
-          var angularElem = angular.element(e.target);
-          if (!angularElem.hasClass("disabled")) {
-            if (target != null) {
-              ToggleHelper.toggle(target, command);
-            }
-            if (targetClass != null) {
-              ToggleHelper.toggleByClass(targetClass, command);
-            }
-            if (!bubble) {
-              e.preventDefault();
-              return false;
-            } else {
-              return true;
-            }
-          }
-        });
-
-        var unbindUpdateElemClasses = $rootScope.$on(ToggleHelper.events.toggleableToggled, function(e, id, newState) {
-          if (id === target) {
-            ToggleHelper.updateElemClasses(elem, attrs, newState);
-          }
-        });
-
-        if (target != null) {
-          $rootScope.$emit(ToggleHelper.events.togglerLinked, target);
-        }
-
-        scope.$on('$destroy', unbindUpdateElemClasses);
-      }
-    };
-  }
-])
-
-.directive('toggleable', [
-  "$rootScope", "ToggleHelper", function($rootScope, ToggleHelper) {
-    return {
-      restrict: "A",
-      link: function(scope, elem, attrs) {        
-        var toggleState = false;
-        
-        if (attrs["default"]) {
-          switch (attrs["default"]) {
-            case "active":
-              toggleState = true;
-              break;
-            case "inactive":
-              toggleState = false;
-          }
-          ToggleHelper.toggleStateChanged(elem, attrs, toggleState);
-        }
-        
-        var unbindToggle = $rootScope.$on(ToggleHelper.events.toggle, function(e, target, command) {
-          var oldState;
-          if (target === attrs.id) {
-            oldState = toggleState;
-            toggleState = ToggleHelper.applyCommand(command, oldState);
-            if (oldState !== toggleState) {
-              ToggleHelper.toggleStateChanged(elem, attrs, toggleState);
-            }
-          }
-        });
-        
-        var unbindToggleByClass = $rootScope.$on(ToggleHelper.events.toggleByClass, function(e, targetClass, command) {
-          var oldState;
-          if (elem.hasClass(targetClass)) {
-            oldState = toggleState;
-            toggleState = ToggleHelper.applyCommand(command, oldState);
-            if (oldState !== toggleState) {
-              ToggleHelper.toggleStateChanged(elem, attrs, toggleState);
-            }
-          }
-        });
-        
-        var unbindToggleableToggled = $rootScope.$on(ToggleHelper.events.toggleableToggled, function(e, target, newState, sameGroup) {
-          if (newState && (attrs.id !== target) && (attrs.exclusionGroup === sameGroup) && (attrs.exclusionGroup != null)) {
-            toggleState = false;
-            ToggleHelper.toggleStateChanged(elem, attrs, toggleState);
-          }
-        });
-        
-        var unbindTogglerLinked = $rootScope.$on(ToggleHelper.events.togglerLinked, function(e, target) {
-          if (attrs.id === target) {
-            ToggleHelper.notifyToggleState(elem, attrs, toggleState);
-          }
-        });
-        
-        scope.$on('$destroy', function() {
-          unbindToggle();
-          unbindToggleByClass();
-          unbindToggleableToggled();
-          unbindTogglerLinked();
-        });
-      }
-    };
-  }
-]);
-
-angular.module("mobile-angular-ui", [
-  'mobile-angular-ui.pointer-events',
-  'mobile-angular-ui.active-links',
-  'mobile-angular-ui.fastclick',
-  'mobile-angular-ui.scrollable',
-  'mobile-angular-ui.directives.toggle',
-  'mobile-angular-ui.directives.overlay',
-  'mobile-angular-ui.directives.forms',
-  'mobile-angular-ui.directives.panels',
-  'mobile-angular-ui.directives.capture',
-  'mobile-angular-ui.directives.sidebars',
-  'mobile-angular-ui.directives.navbars',
-  'mobile-angular-ui.directives.carousel'
- ]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/js/mobile-angular-ui.min.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/js/mobile-angular-ui.min.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/js/mobile-angular-ui.min.js
deleted file mode 100644
index f073953..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/js/mobile-angular-ui.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function FastClick(a,b){"use strict";function c(a,b){return function(){return a.apply(b,arguments)}}var d;if(b=b||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=b.touchBoundary||10,this.layer=a,this.tapDelay=b.tapDelay||200,!FastClick.notNeeded(a)){for(var e=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],f=this,g=0,h=e.length;h>g;g++)f[e[g]]=c(f[e[g]],f);deviceIsAndroid&&(a.addEventListener("mouseover",this.onMouse,!0),a.addEventListener("mousedown",this.onMouse,!0),a.addEventListener("mouseup",this.onMouse,!0)),a.addEventListener("click",this.onClick,!0),a.addEventListener("touchstart",this.onTouchStart,!1),a.addEventListener("touchmove",this.onTouchMove,!1),a.addEventListener("touchend",this.onTouchEnd,!1),a.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(a.removeEventListener=function(b,c,
 d){var e=Node.prototype.removeEventListener;"click"===b?e.call(a,b,c.hijacked||c,d):e.call(a,b,c,d)},a.addEventListener=function(b,c,d){var e=Node.prototype.addEventListener;"click"===b?e.call(a,b,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(a,b,c,d)}),"function"==typeof a.onclick&&(d=a.onclick,a.addEventListener("click",function(a){d(a)},!1),a.onclick=null)}}!function(a){var b=a.document,c=b.documentElement,d="overthrow-enabled",e="ontouchmove"in b,f="WebkitOverflowScrolling"in c.style||"msOverflowStyle"in c.style||!e&&a.screen.width>800||function(){var b=a.navigator.userAgent,c=b.match(/AppleWebKit\/([0-9]+)/),d=c&&c[1],e=c&&d>=534;return b.match(/Android ([0-9]+)/)&&RegExp.$1>=3&&e||b.match(/ Version\/([0-9]+)/)&&RegExp.$1>=0&&a.blackberry&&e||b.indexOf("PlayBook")>-1&&e&&-1===!b.indexOf("Android 2")||b.match(/Firefox\/([0-9]+)/)&&RegExp.$1>=4||b.match(/wOSBrowser\/([0-9]+)/)&&RegExp.$1>=233&&e||b.match(/NokiaBrowser\/([0-9\.]+)/)&&7.3===parseFloat(R
 egExp.$1)&&c&&d>=533}();a.overthrow={},a.overthrow.enabledClassName=d,a.overthrow.addClass=function(){-1===c.className.indexOf(a.overthrow.enabledClassName)&&(c.className+=" "+a.overthrow.enabledClassName)},a.overthrow.removeClass=function(){c.className=c.className.replace(a.overthrow.enabledClassName,"")},a.overthrow.set=function(){f&&a.overthrow.addClass()},a.overthrow.canBeFilledWithPoly=e,a.overthrow.forget=function(){a.overthrow.removeClass()},a.overthrow.support=f?"native":"none"}(this),function(a){a.overthrow.set()}(this),function(a,b,c){if(b!==c){b.scrollIndicatorClassName="overthrow";var d=a.document,e=d.documentElement,f="native"===b.support,g=b.canBeFilledWithPoly,h=(b.configure,b.set),i=b.forget,j=b.scrollIndicatorClassName;b.closest=function(a,c){return!c&&a.className&&a.className.indexOf(j)>-1&&a||b.closest(a.parentNode)};var k=!1;b.set=function(){if(h(),!k&&!f&&g){a.overthrow.addClass(),k=!0,b.support="polyfilled",b.forget=function(){i(),k=!1,d.removeEventListener&&d.
 removeEventListener("touchstart",u,!1)};var j,l,m,n,o=[],p=[],q=function(){o=[],l=null},r=function(){p=[],m=null},s=function(a){n=j.querySelectorAll("textarea, input");for(var b=0,c=n.length;c>b;b++)n[b].style.pointerEvents=a},t=function(a,b){if(d.createEvent){var e,f=(!b||b===c)&&j.parentNode||j.touchchild||j;f!==j&&(e=d.createEvent("HTMLEvents"),e.initEvent("touchend",!0,!0),j.dispatchEvent(e),f.touchchild=j,j=f,f.dispatchEvent(a))}},u=function(a){if(b.intercept&&b.intercept(),q(),r(),j=b.closest(a.target),j&&j!==e&&!(a.touches.length>1)){s("none");var c=a,d=j.scrollTop,f=j.scrollLeft,g=j.offsetHeight,h=j.offsetWidth,i=a.touches[0].pageY,k=a.touches[0].pageX,n=j.scrollHeight,u=j.scrollWidth,v=function(a){var b=d+i-a.touches[0].pageY,e=f+k-a.touches[0].pageX,s=b>=(o.length?o[0]:0),v=e>=(p.length?p[0]:0);b>0&&n-g>b||e>0&&u-h>e?a.preventDefault():t(c),l&&s!==l&&q(),m&&v!==m&&r(),l=s,m=v,j.scrollTop=b,j.scrollLeft=e,o.unshift(b),p.unshift(e),o.length>3&&o.pop(),p.length>3&&p.pop()},w=
 function(){s("auto"),setTimeout(function(){s("none")},450),j.removeEventListener("touchmove",v,!1),j.removeEventListener("touchend",w,!1)};j.addEventListener("touchmove",v,!1),j.addEventListener("touchend",w,!1)}};d.addEventListener("touchstart",u,!1)}}}}(this,this.overthrow);var deviceIsAndroid=navigator.userAgent.indexOf("Android")>0,deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent),deviceIsIOS4=deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),deviceIsIOSWithBadTarget=deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent);FastClick.prototype.needsClick=function(a){"use strict";switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(deviceIsIOS&&"file"===a.type||a.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(a.className)},FastClick.prototype.needsFocus=function(a){"use strict";switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!deviceIsAndr
 oid;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},FastClick.prototype.sendClick=function(a,b){"use strict";var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},FastClick.prototype.determineEventType=function(a){"use strict";return deviceIsAndroid&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},FastClick.prototype.focus=function(a){"use strict";var b;deviceIsIOS&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},FastClick.prototype.updateScrollParent=function(a){"use strict";var b,c;if(b=a.fastClickScroll
 Parent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},FastClick.prototype.getTargetElementFromEventTarget=function(a){"use strict";return a.nodeType===Node.TEXT_NODE?a.parentNode:a},FastClick.prototype.onTouchStart=function(a){"use strict";var b,c,d;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],deviceIsIOS){if(d=window.getSelection(),d.rangeCount&&!d.isCollapsed)return!0;if(!deviceIsIOS4){if(c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTime<this.tapDelay&&a.preventDefault(),!0},FastClick.prototype.touchHasMoved=function(a){"use strict";var b=a.changedTouc
 hes[0],c=this.touchBoundary;return Math.abs(b.pageX-this.touchStartX)>c||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},FastClick.prototype.onTouchMove=function(a){"use strict";return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},FastClick.prototype.findControl=function(a){"use strict";return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},FastClick.prototype.onTouchEnd=function(a){"use strict";var b,c,d,e,f,g=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,c=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,deviceIsIOSWithBadTarget&&(f=a.changedTouches[0],g=document.element
 FromPoint(f.pageX-window.pageXOffset,f.pageY-window.pageYOffset)||g,g.fastClickScrollParent=this.targetElement.fastClickScrollParent),d=g.tagName.toLowerCase(),"label"===d){if(b=this.findControl(g)){if(this.focus(g),deviceIsAndroid)return!1;g=b}}else if(this.needsFocus(g))return a.timeStamp-c>100||deviceIsIOS&&window.top!==window&&"input"===d?(this.targetElement=null,!1):(this.focus(g),this.sendClick(g,a),deviceIsIOS&&"select"===d||(this.targetElement=null,a.preventDefault()),!1);return deviceIsIOS&&!deviceIsIOS4&&(e=g.fastClickScrollParent,e&&e.fastClickLastScrollTop!==e.scrollTop)?!0:(this.needsClick(g)||(a.preventDefault(),this.sendClick(g,a)),!1)},FastClick.prototype.onTouchCancel=function(){"use strict";this.trackingClick=!1,this.targetElement=null},FastClick.prototype.onMouse=function(a){"use strict";return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagatio
 n():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},FastClick.prototype.onClick=function(a){"use strict";var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},FastClick.prototype.destroy=function(){"use strict";var a=this.layer;deviceIsAndroid&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},FastClick.notNeeded=function(a){"use strict";var b,c;if("undefined"==typeof window.ontouchstart)return!0;if(c=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!device
 IsAndroid)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(c>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}return"none"===a.style.msTouchAction?!0:!1},FastClick.attach=function(a,b){"use strict";return new FastClick(a,b)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){"use strict";return FastClick}):"undefined"!=typeof module&&module.exports?(module.exports=FastClick.attach,module.exports.FastClick=FastClick):window.FastClick=FastClick,angular.module("mobile-angular-ui.active-links",[]).run(["$rootScope",function(a){return angular.forEach(["$locationChangeSuccess","$includeContentLoaded"],function(b){return a.$on(b,function(){var a;return a=window.location.href,angular.forEach(document.links,function(b){var c;return c=angular.element(b),b.href===a?c.addClass("active"):c.removeClass("active"),c=null}),a=null})})}]),angular.module("mobile-angular-ui.direc
 tives.capture",[]).run(["CaptureService","$rootScope",function(a,b){b.$on("$routeChangeStart",function(){a.resetAll()})}]).factory("CaptureService",["$compile",function(a){var b={};return{resetAll:function(){for(name in b)this.resetYielder(name)},resetYielder:function(a){var c=b[a];this.setContentFor(a,c.defaultContent,c.defaultScope)},putYielder:function(a,c,d,e){var f={};f.name=a,f.element=c,f.defaultContent=e||"",f.defaultScope=d,b[a]=f},getYielder:function(a){return b[a]},removeYielder:function(a){delete b[a]},setContentFor:function(c,d,e){var f=b[c];f&&(f.element.html(d),a(f.element.contents())(e))}}}]).directive("contentFor",["CaptureService",function(a){return{compile:function(b,c){var d=b.html();return null==c.duplicate&&b.html(""),function(b,c,e){a.setContentFor(e.contentFor,d,b),null==e.duplicate&&c.remove()}}}}]).directive("yieldTo",["$compile","CaptureService",function(a,b){return{link:function(a,c,d){b.putYielder(d.yieldTo,c,a,c.html()),c.contents().remove(),a.$on("$des
 troy",function(){b.removeYielder(d.yieldTo)})}}}]),angular.module("mobile-angular-ui.directives.carousel",[]).run(["$rootScope",function(a){a.carouselPrev=function(b){a.$emit("mobile-angular-ui.carousel.prev",b)},a.carouselNext=function(b){a.$emit("mobile-angular-ui.carousel.next",b)};var b=function(a){var b=angular.element(document.getElementById(a)),c=angular.element(b.children()[0]).children();return b=null,c},c=function(a){for(var b=-1,c=!1,d=0;d<a.length;d++)if(item=a[d],b+=1,angular.element(item).hasClass("active")){c=!0;break}return c?b:-1};a.$on("mobile-angular-ui.carousel.prev",function(a,d){var e=b(d),f=c(e),g=e.length-1;-1!==f&&angular.element(e[f]).removeClass("active"),0>=f?angular.element(e[g]).addClass("active"):angular.element(e[f-1]).addClass("active"),e=null,f=null,g=null}),a.$on("mobile-angular-ui.carousel.next",function(a,d){var e=b(d),f=c(e),g=e.length-1;-1!==f&&angular.element(e[f]).removeClass("active"),f===g?angular.element(e[0]).addClass("active"):angular.el
 ement(e[f+1]).addClass("active"),e=null,f=null,g=null})}]),angular.module("mobile-angular-ui.fastclick",[]).run(["$window","$document",function(a,b){a.addEventListener("load",function(){FastClick.attach(b[0].body)},!1)}]).directive("select",function(){return{replace:!1,restrict:"E",link:function(a,b){b.addClass("needsclick")}}}).directive("input",function(){return{replace:!1,restrict:"E",link:function(a,b){b.addClass("needsclick")}}}).directive("textarea",function(){return{replace:!1,restrict:"E",link:function(a,b){b.addClass("needsclick")}}}),angular.module("mobile-angular-ui.directives.forms",[]).directive("bsFormControl",function(){function a(a){for(var c="",d="",e=0;e<a.length;e++){var f=a[e];f in b?c+=f+" ":d+=f+" "}return{i:c.trim(),d:d.trim()}}for(var b={},c=["xs","sm","md","lg"],d=0;d<c.length;d++)for(var e=1;12>=e;e++)b["col-"+c[d]+"-"+e]=!0;return{replace:!0,require:"ngModel",link:function(b,c,d){null==d.labelClass&&(d.labelClass=""),null==d.id&&(d.id=d.ngModel.replace("."
 ,"_")+"_input"),("SELECT"==c[0].tagName||("INPUT"==c[0].tagName||"TEXTAREA"==c[0].tagName)&&"checkbox"!=d.type&&"radio"!=d.type)&&c.addClass("form-control");var e=angular.element('<label for="'+d.id+'" class="control-label">'+d.label+"</label>"),f=angular.element('<div class="form-group row"></div>'),g=angular.element('<div class="form-control-wrapper"></div>'),h=a(d.labelClass.split(/\s+/));""==h.i&&e.addClass("col-xs-12"),e.addClass(d.labelClass);var i=a(c[0].className.split(/\s+/));c.removeClass(i.i),g.addClass(i.i),""==i.i&&g.addClass("col-xs-12"),c.wrap(f).wrap(g),c.parent().parent().prepend(e),c.attr("id",d.id),e=f=g=h=i=null}}}).directive("switch",function(){return{restrict:"EA",replace:!0,scope:{model:"=ngModel",changeExpr:"@ngChange",disabled:"@"},template:"<div class='switch' ng-class='{active: model}'><div class='switch-handle'></div></div>",link:function(a,b,c){b.on("click tap",function(){null==c.disabled&&(a.model=!a.model,a.$apply(),null!=a.changeExpr&&a.$parent.$eval(
 a.changeExpr))}),b.addClass("switch-transition-enabled")}}}),angular.module("mobile-angular-ui.directives.navbars",[]).directive("navbarAbsoluteTop",function(){return{replace:!1,restrict:"C",link:function(a,b){b.parent().addClass("has-navbar-top")}}}).directive("navbarAbsoluteBottom",function(){return{replace:!1,restrict:"C",link:function(a,b){b.parent().addClass("has-navbar-bottom")}}}),angular.module("mobile-angular-ui.directives.overlay",[]).directive("overlay",["$compile",function(a){return{compile:function(b){var c=b.html();return function(b,d,e){var f="",g=c,h=e.overlay;if(null!=e["default"])var f="default='"+e["default"]+"'";var i='<div class="overlay" id="'+h+'" toggleable '+f+' parent-active-class="overlay-in" active-class="overlay-show">\n  <div class="overlay-inner">\n    <div class="overlay-background"></div>\n    <a href="#'+h+'" toggle="off" class="overlay-dismiss">\n      <i class="fa fa-times-circle-o"></i>\n    </a>\n    <div class="overlay-content">\n      <div cla
 ss="overlay-body">\n        '+g+"\n      </div>\n    </div>\n  </div>\n</div>";d.remove();var j=angular.element(document.getElementById(h));j.length>0&&j.hasClass("overlay")&&j.remove(),g=angular.element(document.body),g.prepend(a(i)(b)),"active"===e["default"]&&g.addClass("overlay-in")}}}}]),angular.module("mobile-angular-ui.directives.panels",[]).directive("bsPanel",function(){return{restrict:"EA",replace:!0,scope:!1,transclude:!0,link:function(a,b){b.removeAttr("title")},template:function(a,b){var c="";return b.title&&(c='<div class="panel-heading">\n  <h2 class="panel-title">\n    '+b.title+"\n  </h2>\n</div>"),'<div class="panel">\n  '+c+'\n  <div class="panel-body">\n     <div ng-transclude></div>\n  </div>\n</div>'}}}),angular.module("mobile-angular-ui.pointer-events",[]).run(["$document",function(a){return angular.element(a).on("click tap",function(a){var b;return b=angular.element(a.target),b.hasClass("disabled")?(a.preventDefault(),a.stopPropagation(),b=null,!1):(b=null,!0
 )})}]),angular.module("mobile-angular-ui.scrollable",[]).directive("scrollableContent",[function(){return{replace:!1,restrict:"C",link:function(a,b){return"native"!==overthrow.support?(b.addClass("overthrow"),overthrow.forget(),overthrow.set()):void 0}}}]),angular.module("mobile-angular-ui.directives.sidebars",[]).directive("sidebar",["$document","$rootScope",function(a,b){return{replace:!1,restrict:"C",link:function(c,d,e){var f=!0;("false"==e.closeOnOuterClicks||"0"==e.closeOnOuterClicks)&&(f=!1),d.hasClass("sidebar-left")&&d.parent().addClass("has-sidebar-left"),d.hasClass("sidebar-right")&&d.parent().addClass("has-sidebar-right");var g=function(a,b){for(var c=a;c.length>0;){if(c[0]===b[0])return c=null,!0;c=c.parent()}return c=null,!1},h=function(a){return g(angular.element(a.target),d)?void 0:(b.toggle(e.id,"off"),a.preventDefault(),!1)},i=angular.noop();f&&(i=b.$on("mobile-angular-ui.toggle.toggled",function(b,c,d){c==e.id&&(d?setTimeout(function(){a.on("click tap",h)},300):a.
 unbind("click tap",h))})),c.$on("$destroy",function(){i(),a.unbind("click tap",h)})}}}]),angular.module("mobile-angular-ui.directives.toggle",[]).factory("ToggleHelper",["$rootScope",function(a){return{events:{toggle:"mobile-angular-ui.toggle.toggle",toggleByClass:"mobile-angular-ui.toggle.toggleByClass",togglerLinked:"mobile-angular-ui.toggle.linked",toggleableToggled:"mobile-angular-ui.toggle.toggled"},commands:{alternate:"toggle",activate:"on",deactivate:"off"},toggle:function(b,c){null==c&&(c="toggle"),a.$emit(this.events.toggle,b,c)},toggleByClass:function(b,c){null==c&&(c="toggle"),a.$emit(this.events.toggleByClass,b,c)},notifyToggleState:function(b,c,d){a.$emit(this.events.toggleableToggled,c.id,d,c.exclusionGroup)},toggleStateChanged:function(a,b,c){this.updateElemClasses(a,b,c),this.notifyToggleState(a,b,c)},applyCommand:function(a,b){switch(a){case this.commands.activate:return!0;case this.commands.deactivate:return!1;case this.commands.alternate:return!b}},updateElemClass
 es:function(a,b,c){if(c){b.activeClass&&a.addClass(b.activeClass),b.inactiveClass&&a.removeClass(b.inactiveClass);var d=a.parent();b.parentActiveClass&&d.addClass(b.parentActiveClass),b.parentInactiveClass&&d.removeClass(b.parentInactiveClass)}else{b.inactiveClass&&a.addClass(b.inactiveClass),b.activeClass&&a.removeClass(b.activeClass);var d=a.parent();b.parentInactiveClass&&d.addClass(b.parentInactiveClass),b.parentActiveClass&&d.removeClass(b.parentActiveClass)}}}}]).run(["$rootScope","ToggleHelper",function(a,b){a.toggle=function(a,c){null==c&&(c="toggle"),b.toggle(a,c)},a.toggleByClass=function(a,c){null==c&&(c="toggle"),b.toggleByClass(a,c)}}]).directive("toggle",["$rootScope","ToggleHelper",function(a,b){return{restrict:"A",link:function(c,d,e){var f=e.toggle||b.commands.alternate,g=e.target,h=e.targetClass,i="true"===e.bubble||"1"===e.bubble||1===e.bubble||""===e.bubble||"bubble"===e.bubble;if(!g&&e.href&&(g=e.href.slice(1)),!g&&!h)throw"'target' or 'target-class' attribute r
 equired with 'toggle'";d.on("click tap",function(a){var c=angular.element(a.target);return c.hasClass("disabled")?void 0:(null!=g&&b.toggle(g,f),null!=h&&b.toggleByClass(h,f),i?!0:(a.preventDefault(),!1))});var j=a.$on(b.events.toggleableToggled,function(a,c,f){c===g&&b.updateElemClasses(d,e,f)});null!=g&&a.$emit(b.events.togglerLinked,g),c.$on("$destroy",j)}}}]).directive("toggleable",["$rootScope","ToggleHelper",function(a,b){return{restrict:"A",link:function(c,d,e){var f=!1;if(e["default"]){switch(e["default"]){case"active":f=!0;break;case"inactive":f=!1}b.toggleStateChanged(d,e,f)}var g=a.$on(b.events.toggle,function(a,c,g){var h;c===e.id&&(h=f,f=b.applyCommand(g,h),h!==f&&b.toggleStateChanged(d,e,f))}),h=a.$on(b.events.toggleByClass,function(a,c,g){var h;d.hasClass(c)&&(h=f,f=b.applyCommand(g,h),h!==f&&b.toggleStateChanged(d,e,f))}),i=a.$on(b.events.toggleableToggled,function(a,c,g,h){g&&e.id!==c&&e.exclusionGroup===h&&null!=e.exclusionGroup&&(f=!1,b.toggleStateChanged(d,e,f))}
 ),j=a.$on(b.events.togglerLinked,function(a,c){e.id===c&&b.notifyToggleState(d,e,f)});c.$on("$destroy",function(){g(),h(),i(),j()})}}}]),angular.module("mobile-angular-ui",["mobile-angular-ui.pointer-events","mobile-angular-ui.active-links","mobile-angular-ui.fastclick","mobile-angular-ui.scrollable","mobile-angular-ui.directives.toggle","mobile-angular-ui.directives.overlay","mobile-angular-ui.directives.forms","mobile-angular-ui.directives.panels","mobile-angular-ui.directives.capture","mobile-angular-ui.directives.sidebars","mobile-angular-ui.directives.navbars","mobile-angular-ui.directives.carousel"]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/index.m.html
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/index.m.html b/brooklyn-library/sandbox/mobile-app/src/main/webapp/index.m.html
deleted file mode 100644
index 9c7ff35..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/index.m.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!DOCTYPE html>
-<!--
-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.
--->
-<html ng-app="BrooklynMobile" ng-controller="MainController">
-<head title="{{'TITLE' | translate}}">
-    <meta charset='utf-8'/>
-
-    <title>{{'TITLE' | translate}}</title>
-    <meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimal-ui"/>
-    <link rel="stylesheet" href="assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-base.min.css"/>
-    <link rel="stylesheet" href="assets/mobile/css/mobile.css"/>
-
-    <script src="assets/mobile/libs/angular-1.2.19/angular.min.js"></script>
-    <script src="assets/mobile/libs/angular-1.2.19/angular-route.min.js"></script>
-    <script src="assets/mobile/libs/angular-1.2.19/angular-touch.min.js"></script>
-    <script src="assets/mobile/libs/angular-1.2.19/angular-resource.min.js"></script>
-    <script src="assets/mobile/libs/angular-1.2.19/angular-cookies.min.js"></script>
-    <script src="assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/js/mobile-angular-ui.min.js"></script>
-    <!-- NLS related -->
-    <script src="assets/mobile/libs/angular-translate/angular-translate.min.js"></script>
-    <script src="assets/mobile/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js"></script>
-    <script src="assets/mobile/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.min.js"></script>
-    <script src="assets/mobile/libs/angular-translate-storage-local/angular-translate-storage-local.min.js"></script>
-    <script src="assets/mobile/js/services.js"></script>
-    <script src="assets/mobile/js/controllers.js"></script>
-    <script src="assets/mobile/js/filters.js"></script>
-    <script src="assets/mobile/js/app.js"></script>
-
-</head>
-<body>
-
-<!-- Sidebars -->
-<div class="sidebar sidebar-left" toggleable parent-active-class="sidebar-left-in" id="mainSidebar" yield-to="left-control-nav">
-    <h2 class="app-name">{{'APP_NAME_SHORT' | translate}}</h2>
-
-    <div class="scrollable sidebar-scrollable">
-        <div class="scrollable-content">
-            <div class="list-group" toggle="off" bubble target="mainSidebar">
-                <a class="list-group-item" href="#/v1/applications">{{'M_MENU_APPS' | translate}}</a>
-                <a class="list-group-item" href="https://brooklyn.incubator.apache.org/documentation/">{{'M_MENU_HELP' |
-                    translate}}</a>
-            </div>
-        </div>
-    </div>
-
-    <div class="navbar navbar-app navbar-footer navbar-absolute-bottom">
-        <img class="poweredLogo" alt="{{M_MENU_POWERED_BY}}"/>
-    </div>
-</div>
-<div class="sidebar sidebar-right" toggleable parent-active-class="sidebar-right-in" id="rightSidebar" yield-to="right-control-nav">
-    &nbsp;
-</div>
-<div class="app">
-
-    <!-- Navbars -->
-
-    <div class="navbar navbar-app navbar-absolute-top">
-        <div class="navbar-brand navbar-brand-center" yield-to="title">
-            <span>{{'APP_NAME_LONG' | translate}}</span>
-        </div>
-        <div class="btn-group pull-left" style="z-index:100;" yield-to="left-control-nav-icon-left">
-            <div ng-click="toggle('mainSidebar')" class="btn btn-navbar sidebar-toggle">
-                <i class="fa fa-bars"></i>
-            </div>
-        </div>
-        <div class="btn-group pull-right" style="z-index:100;" yield-to="right-control-nav-icon-right">
-            &nbsp;
-        </div>
-
-    </div>
-
-    <!-- App Body -->
-    <div class="app-body" ng-class="{loading: loading}">
-        <div ng-show="loading" class="app-content-loading">
-            <i class="fa fa-spinner fa-spin fa-2x loading-spinner"></i>&nbsp;<span>{{'LOADING' | translate}}</span>
-        </div>
-
-        <ng-view class="app-content" ng-hide="loading"></ng-view>
-    </div>
-
-</div>
-</body>
-</html>


[37/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular.min.js.map
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular.min.js.map b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular.min.js.map
deleted file mode 100644
index 381d6de..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular.min.js",
-"lineCount":213,
-"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAmBC,CAAnB,CAA8B,CA8BvCC,QAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,SAAAA,EAAAA,CAAAA,IAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,GAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,EAAAA,EAAAA,CAAAA,CAAAA,uCAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,EAAAA,EAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,OAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,EAAAA,CAAAA,CAAAA,GAAAA,CAAAA,GAAAA,EAAAA,GAAAA,EAAAA,CAAAA,CAAAA,CAAAA,EAAAA,GAAAA,CAAAA,kBAAAA,CAAAA,UAAAA,EAAAA,MAAAA,UAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,SAAAA,EAAAA,QAAAA,CAAAA,aAAAA,CAAAA,EAAAA,CAAAA,CAAAA,WAAAA,EAAAA,MAAAA,UAAAA,CAAAA,CAAAA,CAAAA,CAAAA,WAAAA,CAAAA,QAAAA,EAAAA,MAAAA,UAAAA,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,UAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAyOAC,QAASA,GAAW,CAACC,CAAD,CAAM,CACxB,GAAW,IAAX,EAAIA,CAAJ,EAAmBC,EAAA,CAASD,CAAT,CAAnB,CACE,M
 AAO,CAAA,CAGT;IAAIE,EAASF,CAAAE,OAEb,OAAqB,EAArB,GAAIF,CAAAG,SAAJ,EAA0BD,CAA1B,CACS,CAAA,CADT,CAIOE,CAAA,CAASJ,CAAT,CAJP,EAIwBK,CAAA,CAAQL,CAAR,CAJxB,EAImD,CAJnD,GAIwCE,CAJxC,EAKyB,QALzB,GAKO,MAAOA,EALd,EAK8C,CAL9C,CAKqCA,CALrC,EAKoDA,CALpD,CAK6D,CAL7D,GAKmEF,EAZ3C,CA4C1BM,QAASA,EAAO,CAACN,CAAD,CAAMO,CAAN,CAAgBC,CAAhB,CAAyB,CACvC,IAAIC,CACJ,IAAIT,CAAJ,CACE,GAAIU,CAAA,CAAWV,CAAX,CAAJ,CACE,IAAKS,CAAL,GAAYT,EAAZ,CAGa,WAAX,EAAIS,CAAJ,GAAiC,QAAjC,EAA0BA,CAA1B,EAAoD,MAApD,EAA6CA,CAA7C,EAAgET,CAAAW,eAAhE,EAAsF,CAAAX,CAAAW,eAAA,CAAmBF,CAAnB,CAAtF,GACEF,CAAAK,KAAA,CAAcJ,CAAd,CAAuBR,CAAA,CAAIS,CAAJ,CAAvB,CAAiCA,CAAjC,CALN,KAQO,IAAIT,CAAAM,QAAJ,EAAmBN,CAAAM,QAAnB,GAAmCA,CAAnC,CACLN,CAAAM,QAAA,CAAYC,CAAZ,CAAsBC,CAAtB,CADK,KAEA,IAAIT,EAAA,CAAYC,CAAZ,CAAJ,CACL,IAAKS,CAAL,CAAW,CAAX,CAAcA,CAAd,CAAoBT,CAAAE,OAApB,CAAgCO,CAAA,EAAhC,CACEF,CAAAK,KAAA,CAAcJ,CAAd,CAAuBR,CAAA,CAAIS,CAAJ,CAAvB,CAAiCA,CAAjC,CAFG,KAIL,KAAKA,CAAL,GAAYT,EAAZ,CACMA,CAAAW,eAAA,CAAmBF,CAAnB,CAAJ,EACEF,CAAAK,KAAA,CAAcJ,CAAd,CAAuBR
 ,CAAA,CAAIS,CAAJ,CAAvB,CAAiCA,CAAjC,CAKR,OAAOT,EAxBgC,CA2BzCa,QAASA,GAAU,CAACb,CAAD,CAAM,CACvB,IAAIc,EAAO,EAAX,CACSL,CAAT,KAASA,CAAT,GAAgBT,EAAhB,CACMA,CAAAW,eAAA,CAAmBF,CAAnB,CAAJ,EACEK,CAAAC,KAAA,CAAUN,CAAV,CAGJ,OAAOK,EAAAE,KAAA,EAPgB,CAUzBC,QAASA,GAAa,CAACjB,CAAD;AAAMO,CAAN,CAAgBC,CAAhB,CAAyB,CAE7C,IADA,IAAIM,EAAOD,EAAA,CAAWb,CAAX,CAAX,CACUkB,EAAI,CAAd,CAAiBA,CAAjB,CAAqBJ,CAAAZ,OAArB,CAAkCgB,CAAA,EAAlC,CACEX,CAAAK,KAAA,CAAcJ,CAAd,CAAuBR,CAAA,CAAIc,CAAA,CAAKI,CAAL,CAAJ,CAAvB,CAAqCJ,CAAA,CAAKI,CAAL,CAArC,CAEF,OAAOJ,EALsC,CAc/CK,QAASA,GAAa,CAACC,CAAD,CAAa,CACjC,MAAO,SAAQ,CAACC,CAAD,CAAQZ,CAAR,CAAa,CAAEW,CAAA,CAAWX,CAAX,CAAgBY,CAAhB,CAAF,CADK,CAYnCC,QAASA,GAAO,EAAG,CAIjB,IAHA,IAAIC,EAAQC,EAAAtB,OAAZ,CACIuB,CAEJ,CAAMF,CAAN,CAAA,CAAa,CACXA,CAAA,EACAE,EAAA,CAAQD,EAAA,CAAID,CAAJ,CAAAG,WAAA,CAAsB,CAAtB,CACR,IAAa,EAAb,EAAID,CAAJ,CAEE,MADAD,GAAA,CAAID,CAAJ,CACO,CADM,GACN,CAAAC,EAAAG,KAAA,CAAS,EAAT,CAET,IAAa,EAAb,EAAIF,CAAJ,CACED,EAAA,CAAID,CAAJ,CAAA,CAAa,GADf,KAIE,OADAC,GAAA,CAAID,CAAJ,CACO
 ,CADMK,MAAAC,aAAA,CAAoBJ,CAApB,CAA4B,CAA5B,CACN,CAAAD,EAAAG,KAAA,CAAS,EAAT,CAXE,CAcbH,EAAAM,QAAA,CAAY,GAAZ,CACA,OAAON,GAAAG,KAAA,CAAS,EAAT,CAnBU,CA4BnBI,QAASA,GAAU,CAAC/B,CAAD,CAAMgC,CAAN,CAAS,CACtBA,CAAJ,CACEhC,CAAAiC,UADF,CACkBD,CADlB,CAIE,OAAOhC,CAAAiC,UALiB,CAuB5BC,QAASA,EAAM,CAACC,CAAD,CAAM,CACnB,IAAIH,EAAIG,CAAAF,UACR3B,EAAA,CAAQ8B,SAAR,CAAmB,QAAQ,CAACpC,CAAD,CAAM,CAC3BA,CAAJ,GAAYmC,CAAZ,EACE7B,CAAA,CAAQN,CAAR,CAAa,QAAQ,CAACqB,CAAD,CAAQZ,CAAR,CAAa,CAChC0B,CAAA,CAAI1B,CAAJ,CAAA,CAAWY,CADqB,CAAlC,CAF6B,CAAjC,CAQAU,GAAA,CAAWI,CAAX,CAAeH,CAAf,CACA,OAAOG,EAXY,CAcrBE,QAASA,EAAG,CAACC,CAAD,CAAM,CAChB,MAAOC,SAAA,CAASD,CAAT;AAAc,EAAd,CADS,CAKlBE,QAASA,GAAO,CAACC,CAAD,CAASC,CAAT,CAAgB,CAC9B,MAAOR,EAAA,CAAO,KAAKA,CAAA,CAAO,QAAQ,EAAG,EAAlB,CAAsB,WAAWO,CAAX,CAAtB,CAAL,CAAP,CAA0DC,CAA1D,CADuB,CAoBhCC,QAASA,EAAI,EAAG,EAoBhBC,QAASA,GAAQ,CAACC,CAAD,CAAI,CAAC,MAAOA,EAAR,CAIrBC,QAASA,EAAO,CAACzB,CAAD,CAAQ,CAAC,MAAO,SAAQ,EAAG,CAAC,MAAOA,EAAR,CAAnB,CAcxB0B,QAASA,EAAW,CAAC1B,CAAD,CAAO,CAAC,MAAwB,WA
 AxB,GAAO,MAAOA,EAAf,CAe3B2B,QAASA,EAAS,CAAC3B,CAAD,CAAO,CAAC,MAAwB,WAAxB,GAAO,MAAOA,EAAf,CAgBzB4B,QAASA,EAAQ,CAAC5B,CAAD,CAAO,CAAC,MAAgB,KAAhB,EAAOA,CAAP,EAAyC,QAAzC,GAAwB,MAAOA,EAAhC,CAexBjB,QAASA,EAAQ,CAACiB,CAAD,CAAO,CAAC,MAAwB,QAAxB,GAAO,MAAOA,EAAf,CAexB6B,QAASA,GAAQ,CAAC7B,CAAD,CAAO,CAAC,MAAwB,QAAxB,GAAO,MAAOA,EAAf,CAexB8B,QAASA,GAAM,CAAC9B,CAAD,CAAQ,CACrB,MAAgC,eAAhC,GAAO+B,EAAAxC,KAAA,CAAcS,CAAd,CADc,CAsCvBX,QAASA,EAAU,CAACW,CAAD,CAAO,CAAC,MAAwB,UAAxB,GAAO,MAAOA,EAAf,CAU1BgC,QAASA,GAAQ,CAAChC,CAAD,CAAQ,CACvB,MAAgC,iBAAhC,GAAO+B,EAAAxC,KAAA,CAAcS,CAAd,CADgB,CA9mBc;AA0nBvCpB,QAASA,GAAQ,CAACD,CAAD,CAAM,CACrB,MAAOA,EAAP,EAAcA,CAAAJ,SAAd,EAA8BI,CAAAsD,SAA9B,EAA8CtD,CAAAuD,MAA9C,EAA2DvD,CAAAwD,YADtC,CAoDvBC,QAASA,GAAS,CAACC,CAAD,CAAO,CACvB,MAAO,EAAGA,CAAAA,CAAH,EACJ,EAAAA,CAAAC,SAAA,EACGD,CAAAE,KADH,EACgBF,CAAAG,KADhB,EAC6BH,CAAAI,KAD7B,CADI,CADgB,CA+BzBC,QAASA,GAAG,CAAC/D,CAAD,CAAMO,CAAN,CAAgBC,CAAhB,CAAyB,CACnC,IAAIwD,EAAU,EACd1D,EAAA,CAAQN,CAAR,CAAa,QAAQ,CAACqB,CAAD,CAAQE,CAAR,C
 AAe0C,CAAf,CAAqB,CACxCD,CAAAjD,KAAA,CAAaR,CAAAK,KAAA,CAAcJ,CAAd,CAAuBa,CAAvB,CAA8BE,CAA9B,CAAqC0C,CAArC,CAAb,CADwC,CAA1C,CAGA,OAAOD,EAL4B,CAwCrCE,QAASA,GAAO,CAACC,CAAD,CAAQnE,CAAR,CAAa,CAC3B,GAAImE,CAAAD,QAAJ,CAAmB,MAAOC,EAAAD,QAAA,CAAclE,CAAd,CAE1B,KAAK,IAAIkB,EAAI,CAAb,CAAgBA,CAAhB,CAAoBiD,CAAAjE,OAApB,CAAkCgB,CAAA,EAAlC,CACE,GAAIlB,CAAJ,GAAYmE,CAAA,CAAMjD,CAAN,CAAZ,CAAsB,MAAOA,EAE/B,OAAQ,EANmB,CAS7BkD,QAASA,GAAW,CAACD,CAAD,CAAQ9C,CAAR,CAAe,CACjC,IAAIE,EAAQ2C,EAAA,CAAQC,CAAR,CAAe9C,CAAf,CACA,EAAZ,EAAIE,CAAJ,EACE4C,CAAAE,OAAA,CAAa9C,CAAb,CAAoB,CAApB,CACF,OAAOF,EAJ0B,CA4EnCiD,QAASA,GAAI,CAACC,CAAD,CAASC,CAAT,CAAsBC,CAAtB,CAAmCC,CAAnC,CAA8C,CACzD,GAAIzE,EAAA,CAASsE,CAAT,CAAJ,EAAgCA,CAAhC,EAAgCA,CA3MlBI,WA2Md,EAAgCJ,CA3MAK,OA2MhC,CACE,KAAMC,GAAA,CAAS,MAAT,CAAN,CAIF,GAAKL,CAAL,CAaO,CACL,GAAID,CAAJ,GAAeC,CAAf,CAA4B,KAAMK,GAAA,CAAS,KAAT,CAAN,CAG5BJ,CAAA,CAAcA,CAAd,EAA6B,EAC7BC;CAAA,CAAYA,CAAZ,EAAyB,EAEzB,IAAIzB,CAAA,CAASsB,CAAT,CAAJ,CAAsB,CACpB,IAAIhD,EAAQ2C,EAAA,CAAQO,CAAR,CAAqBF,CAArB,
 CACZ,IAAe,EAAf,GAAIhD,CAAJ,CAAkB,MAAOmD,EAAA,CAAUnD,CAAV,CAEzBkD,EAAA1D,KAAA,CAAiBwD,CAAjB,CACAG,EAAA3D,KAAA,CAAeyD,CAAf,CALoB,CAStB,GAAInE,CAAA,CAAQkE,CAAR,CAAJ,CAEE,IAAM,IAAIrD,EADVsD,CAAAtE,OACUgB,CADW,CACrB,CAAiBA,CAAjB,CAAqBqD,CAAArE,OAArB,CAAoCgB,CAAA,EAApC,CACE4D,CAKA,CALSR,EAAA,CAAKC,CAAA,CAAOrD,CAAP,CAAL,CAAgB,IAAhB,CAAsBuD,CAAtB,CAAmCC,CAAnC,CAKT,CAJIzB,CAAA,CAASsB,CAAA,CAAOrD,CAAP,CAAT,CAIJ,GAHEuD,CAAA1D,KAAA,CAAiBwD,CAAA,CAAOrD,CAAP,CAAjB,CACA,CAAAwD,CAAA3D,KAAA,CAAe+D,CAAf,CAEF,EAAAN,CAAAzD,KAAA,CAAiB+D,CAAjB,CARJ,KAUO,CACL,IAAI9C,EAAIwC,CAAAvC,UACR3B,EAAA,CAAQkE,CAAR,CAAqB,QAAQ,CAACnD,CAAD,CAAQZ,CAAR,CAAa,CACxC,OAAO+D,CAAA,CAAY/D,CAAZ,CADiC,CAA1C,CAGA,KAAUA,CAAV,GAAiB8D,EAAjB,CACEO,CAKA,CALSR,EAAA,CAAKC,CAAA,CAAO9D,CAAP,CAAL,CAAkB,IAAlB,CAAwBgE,CAAxB,CAAqCC,CAArC,CAKT,CAJIzB,CAAA,CAASsB,CAAA,CAAO9D,CAAP,CAAT,CAIJ,GAHEgE,CAAA1D,KAAA,CAAiBwD,CAAA,CAAO9D,CAAP,CAAjB,CACA,CAAAiE,CAAA3D,KAAA,CAAe+D,CAAf,CAEF,EAAAN,CAAA,CAAY/D,CAAZ,CAAA,CAAmBqE,CAErB/C,GAAA,CAAWyC,CAAX,CAAuBx
 C,CAAvB,CAbK,CA1BF,CAbP,IAEE,CADAwC,CACA,CADcD,CACd,IACMlE,CAAA,CAAQkE,CAAR,CAAJ,CACEC,CADF,CACgBF,EAAA,CAAKC,CAAL,CAAa,EAAb,CAAiBE,CAAjB,CAA8BC,CAA9B,CADhB,CAEWvB,EAAA,CAAOoB,CAAP,CAAJ,CACLC,CADK,CACS,IAAIO,IAAJ,CAASR,CAAAS,QAAA,EAAT,CADT,CAEI3B,EAAA,CAASkB,CAAT,CAAJ,CACLC,CADK,CACaS,MAAJ,CAAWV,CAAAA,OAAX,CADT,CAEItB,CAAA,CAASsB,CAAT,CAFJ,GAGLC,CAHK,CAGSF,EAAA,CAAKC,CAAL,CAAa,EAAb,CAAiBE,CAAjB,CAA8BC,CAA9B,CAHT,CALT,CAsDF,OAAOF,EA9DkD,CAoE3DU,QAASA,GAAW,CAACC,CAAD,CAAMhD,CAAN,CAAW,CAC7B,GAAI9B,CAAA,CAAQ8E,CAAR,CAAJ,CAAkB,CAChBhD,CAAA,CAAMA,CAAN,EAAa,EAEb,KAAM,IAAIjB,EAAI,CAAd,CAAiBA,CAAjB,CAAqBiE,CAAAjF,OAArB,CAAiCgB,CAAA,EAAjC,CACEiB,CAAA,CAAIjB,CAAJ,CAAA;AAASiE,CAAA,CAAIjE,CAAJ,CAJK,CAAlB,IAMO,IAAI+B,CAAA,CAASkC,CAAT,CAAJ,CAGL,IAAS1E,CAAT,GAFA0B,EAEgBgD,CAFVhD,CAEUgD,EAFH,EAEGA,CAAAA,CAAhB,CACM,CAAAxE,EAAAC,KAAA,CAAoBuE,CAApB,CAAyB1E,CAAzB,CAAJ,EAAyD,GAAzD,GAAuCA,CAAA2E,OAAA,CAAW,CAAX,CAAvC,EAAkF,GAAlF,GAAgE3E,CAAA2E,OAAA,CAAW,CAAX,CAAhE,GACEjD,CAAA,CAAI1B,CAAJ,CADF,CACa0E,CAAA,C
 AAI1E,CAAJ,CADb,CAMJ,OAAO0B,EAAP,EAAcgD,CAjBe,CAkD/BE,QAASA,GAAM,CAACC,CAAD,CAAKC,CAAL,CAAS,CACtB,GAAID,CAAJ,GAAWC,CAAX,CAAe,MAAO,CAAA,CACtB,IAAW,IAAX,GAAID,CAAJ,EAA0B,IAA1B,GAAmBC,CAAnB,CAAgC,MAAO,CAAA,CACvC,IAAID,CAAJ,GAAWA,CAAX,EAAiBC,CAAjB,GAAwBA,CAAxB,CAA4B,MAAO,CAAA,CAHb,KAIlBC,EAAK,MAAOF,EAJM,CAIsB7E,CAC5C,IAAI+E,CAAJ,EADyBC,MAAOF,EAChC,EACY,QADZ,EACMC,CADN,CAEI,GAAInF,CAAA,CAAQiF,CAAR,CAAJ,CAAiB,CACf,GAAI,CAACjF,CAAA,CAAQkF,CAAR,CAAL,CAAkB,MAAO,CAAA,CACzB,KAAKrF,CAAL,CAAcoF,CAAApF,OAAd,GAA4BqF,CAAArF,OAA5B,CAAuC,CACrC,IAAIO,CAAJ,CAAQ,CAAR,CAAWA,CAAX,CAAeP,CAAf,CAAuBO,CAAA,EAAvB,CACE,GAAI,CAAC4E,EAAA,CAAOC,CAAA,CAAG7E,CAAH,CAAP,CAAgB8E,CAAA,CAAG9E,CAAH,CAAhB,CAAL,CAA+B,MAAO,CAAA,CAExC,OAAO,CAAA,CAJ8B,CAFxB,CAAjB,IAQO,CAAA,GAAI0C,EAAA,CAAOmC,CAAP,CAAJ,CACL,MAAOnC,GAAA,CAAOoC,CAAP,CAAP,EAAqBD,CAAAN,QAAA,EAArB,EAAqCO,CAAAP,QAAA,EAChC,IAAI3B,EAAA,CAASiC,CAAT,CAAJ,EAAoBjC,EAAA,CAASkC,CAAT,CAApB,CACL,MAAOD,EAAAlC,SAAA,EAAP,EAAwBmC,CAAAnC,SAAA,EAExB,IAAYkC,CAAZ,EAAYA,CApVJX,WAoVR,EA
 AYW,CApVcV,OAoV1B,EAA2BW,CAA3B,EAA2BA,CApVnBZ,WAoVR;AAA2BY,CApVDX,OAoV1B,EAAkC3E,EAAA,CAASqF,CAAT,CAAlC,EAAkDrF,EAAA,CAASsF,CAAT,CAAlD,EAAkElF,CAAA,CAAQkF,CAAR,CAAlE,CAA+E,MAAO,CAAA,CACtFG,EAAA,CAAS,EACT,KAAIjF,CAAJ,GAAW6E,EAAX,CACE,GAAsB,GAAtB,GAAI7E,CAAA2E,OAAA,CAAW,CAAX,CAAJ,EAA6B,CAAA1E,CAAA,CAAW4E,CAAA,CAAG7E,CAAH,CAAX,CAA7B,CAAA,CACA,GAAI,CAAC4E,EAAA,CAAOC,CAAA,CAAG7E,CAAH,CAAP,CAAgB8E,CAAA,CAAG9E,CAAH,CAAhB,CAAL,CAA+B,MAAO,CAAA,CACtCiF,EAAA,CAAOjF,CAAP,CAAA,CAAc,CAAA,CAFd,CAIF,IAAIA,CAAJ,GAAW8E,EAAX,CACE,GAAI,CAACG,CAAA/E,eAAA,CAAsBF,CAAtB,CAAL,EACsB,GADtB,GACIA,CAAA2E,OAAA,CAAW,CAAX,CADJ,EAEIG,CAAA,CAAG9E,CAAH,CAFJ,GAEgBZ,CAFhB,EAGI,CAACa,CAAA,CAAW6E,CAAA,CAAG9E,CAAH,CAAX,CAHL,CAG0B,MAAO,CAAA,CAEnC,OAAO,CAAA,CAlBF,CAsBX,MAAO,CAAA,CArCe,CAyCxBkF,QAASA,GAAG,EAAG,CACb,MAAQ/F,EAAAgG,eAAR,EAAmChG,CAAAgG,eAAAC,SAAnC,EACKjG,CAAAkG,cADL,EAEI,EAAG,CAAAlG,CAAAkG,cAAA,CAAuB,UAAvB,CAAH,EAAyC,CAAAlG,CAAAkG,cAAA,CAAuB,eAAvB,CAAzC,CAHS,CAmCfC,QAASA,GAAI,CAACC,CAAD,CAAOC,CAAP,CAAW,CACtB,IAA
 IC,EAA+B,CAAnB,CAAA9D,SAAAlC,OAAA,CAxBTiG,EAAAvF,KAAA,CAwB0CwB,SAxB1C,CAwBqDgE,CAxBrD,CAwBS,CAAiD,EACjE,OAAI,CAAA1F,CAAA,CAAWuF,CAAX,CAAJ,EAAwBA,CAAxB,WAAsChB,OAAtC,CAcSgB,CAdT,CACSC,CAAAhG,OACA,CAAH,QAAQ,EAAG,CACT,MAAOkC,UAAAlC,OACA;AAAH+F,CAAAI,MAAA,CAASL,CAAT,CAAeE,CAAAI,OAAA,CAAiBH,EAAAvF,KAAA,CAAWwB,SAAX,CAAsB,CAAtB,CAAjB,CAAf,CAAG,CACH6D,CAAAI,MAAA,CAASL,CAAT,CAAeE,CAAf,CAHK,CAAR,CAKH,QAAQ,EAAG,CACT,MAAO9D,UAAAlC,OACA,CAAH+F,CAAAI,MAAA,CAASL,CAAT,CAAe5D,SAAf,CAAG,CACH6D,CAAArF,KAAA,CAAQoF,CAAR,CAHK,CATK,CAqBxBO,QAASA,GAAc,CAAC9F,CAAD,CAAMY,CAAN,CAAa,CAClC,IAAImF,EAAMnF,CAES,SAAnB,GAAI,MAAOZ,EAAX,EAAiD,GAAjD,GAA+BA,CAAA2E,OAAA,CAAW,CAAX,CAA/B,CACEoB,CADF,CACQ3G,CADR,CAEWI,EAAA,CAASoB,CAAT,CAAJ,CACLmF,CADK,CACC,SADD,CAEInF,CAAJ,EAAczB,CAAd,GAA2ByB,CAA3B,CACLmF,CADK,CACC,WADD,CAEYnF,CAFZ,GAEYA,CA1aLsD,WAwaP,EAEYtD,CA1aauD,OAwazB,IAGL4B,CAHK,CAGC,QAHD,CAMP,OAAOA,EAb2B,CA+BpCC,QAASA,GAAM,CAACzG,CAAD,CAAM0G,CAAN,CAAc,CAC3B,MAAmB,WAAnB,GAAI,MAAO1G,EAAX,CAAuCH,CAAvC,CACO8G,IAAAC,UAAA,
 CAAe5G,CAAf,CAAoBuG,EAApB,CAAoCG,CAAA,CAAS,IAAT,CAAgB,IAApD,CAFoB,CAkB7BG,QAASA,GAAQ,CAACC,CAAD,CAAO,CACtB,MAAO1G,EAAA,CAAS0G,CAAT,CACA,CAADH,IAAAI,MAAA,CAAWD,CAAX,CAAC,CACDA,CAHgB,CAOxBE,QAASA,GAAS,CAAC3F,CAAD,CAAQ,CACH,UAArB,GAAI,MAAOA,EAAX,CACEA,CADF,CACU,CAAA,CADV,CAEWA,CAAJ,EAA8B,CAA9B,GAAaA,CAAAnB,OAAb,EACD+G,CACJ,CADQC,CAAA,CAAU,EAAV,CAAe7F,CAAf,CACR,CAAAA,CAAA,CAAQ,EAAO,GAAP,EAAE4F,CAAF,EAAmB,GAAnB,EAAcA,CAAd,EAA+B,OAA/B;AAA0BA,CAA1B,EAA+C,IAA/C,EAA0CA,CAA1C,EAA4D,GAA5D,EAAuDA,CAAvD,EAAwE,IAAxE,EAAmEA,CAAnE,CAFH,EAIL5F,CAJK,CAIG,CAAA,CAEV,OAAOA,EATiB,CAe1B8F,QAASA,GAAW,CAACC,CAAD,CAAU,CAC5BA,CAAA,CAAUC,CAAA,CAAOD,CAAP,CAAAE,MAAA,EACV,IAAI,CAGFF,CAAAG,MAAA,EAHE,CAIF,MAAMC,CAAN,CAAS,EAGX,IAAIC,EAAWJ,CAAA,CAAO,OAAP,CAAAK,OAAA,CAAuBN,CAAvB,CAAAO,KAAA,EACf,IAAI,CACF,MAHcC,EAGP,GAAAR,CAAA,CAAQ,CAAR,CAAAjH,SAAA,CAAoC+G,CAAA,CAAUO,CAAV,CAApC,CACHA,CAAAI,MAAA,CACQ,YADR,CACA,CAAsB,CAAtB,CAAAC,QAAA,CACU,aADV,CACyB,QAAQ,CAACD,CAAD,CAAQlE,CAAR,CAAkB,CAAE,MAAO,GAAP,CAAauD,CAAA,CAAUvD,CAAV
 ,CAAf,CADnD,CAHF,CAKF,MAAM6D,CAAN,CAAS,CACT,MAAON,EAAA,CAAUO,CAAV,CADE,CAfiB,CAgC9BM,QAASA,GAAqB,CAAC1G,CAAD,CAAQ,CACpC,GAAI,CACF,MAAO2G,mBAAA,CAAmB3G,CAAnB,CADL,CAEF,MAAMmG,CAAN,CAAS,EAHyB,CAatCS,QAASA,GAAa,CAAYC,CAAZ,CAAsB,CAAA,IACtClI,EAAM,EADgC,CAC5BmI,CAD4B,CACjB1H,CACzBH,EAAA,CAAS8H,CAAAF,CAAAE,EAAY,EAAZA,OAAA,CAAsB,GAAtB,CAAT,CAAqC,QAAQ,CAACF,CAAD,CAAW,CACjDA,CAAL,GACEC,CAEA,CAFYD,CAAAE,MAAA,CAAe,GAAf,CAEZ,CADA3H,CACA,CADMsH,EAAA,CAAsBI,CAAA,CAAU,CAAV,CAAtB,CACN,CAAKnF,CAAA,CAAUvC,CAAV,CAAL,GACM+F,CACJ,CADUxD,CAAA,CAAUmF,CAAA,CAAU,CAAV,CAAV,CAAA,CAA0BJ,EAAA,CAAsBI,CAAA,CAAU,CAAV,CAAtB,CAA1B,CAAgE,CAAA,CAC1E,CAAKnI,CAAA,CAAIS,CAAJ,CAAL,CAEUJ,CAAA,CAAQL,CAAA,CAAIS,CAAJ,CAAR,CAAH,CACLT,CAAA,CAAIS,CAAJ,CAAAM,KAAA,CAAcyF,CAAd,CADK,CAGLxG,CAAA,CAAIS,CAAJ,CAHK,CAGM,CAACT,CAAA,CAAIS,CAAJ,CAAD,CAAU+F,CAAV,CALb,CACExG,CAAA,CAAIS,CAAJ,CADF,CACa+F,CAHf,CAHF,CADsD,CAAxD,CAgBA,OAAOxG,EAlBmC,CArpCL;AA0qCvCqI,QAASA,GAAU,CAACrI,CAAD,CAAM,CACvB,IAAIsI,EAAQ,EACZhI,EAAA,CAAQN,CAAR,CAAa,QAAQ,CAAC
 qB,CAAD,CAAQZ,CAAR,CAAa,CAC5BJ,CAAA,CAAQgB,CAAR,CAAJ,CACEf,CAAA,CAAQe,CAAR,CAAe,QAAQ,CAACkH,CAAD,CAAa,CAClCD,CAAAvH,KAAA,CAAWyH,EAAA,CAAe/H,CAAf,CAAoB,CAAA,CAApB,CAAX,EAC2B,CAAA,CAAf,GAAA8H,CAAA,CAAsB,EAAtB,CAA2B,GAA3B,CAAiCC,EAAA,CAAeD,CAAf,CAA2B,CAAA,CAA3B,CAD7C,EADkC,CAApC,CADF,CAMAD,CAAAvH,KAAA,CAAWyH,EAAA,CAAe/H,CAAf,CAAoB,CAAA,CAApB,CAAX,EACsB,CAAA,CAAV,GAAAY,CAAA,CAAiB,EAAjB,CAAsB,GAAtB,CAA4BmH,EAAA,CAAenH,CAAf,CAAsB,CAAA,CAAtB,CADxC,EAPgC,CAAlC,CAWA,OAAOiH,EAAApI,OAAA,CAAeoI,CAAA3G,KAAA,CAAW,GAAX,CAAf,CAAiC,EAbjB,CA4BzB8G,QAASA,GAAgB,CAACjC,CAAD,CAAM,CAC7B,MAAOgC,GAAA,CAAehC,CAAf,CAAoB,CAAA,CAApB,CAAAsB,QAAA,CACY,OADZ,CACqB,GADrB,CAAAA,QAAA,CAEY,OAFZ,CAEqB,GAFrB,CAAAA,QAAA,CAGY,OAHZ,CAGqB,GAHrB,CADsB,CAmB/BU,QAASA,GAAc,CAAChC,CAAD,CAAMkC,CAAN,CAAuB,CAC5C,MAAOC,mBAAA,CAAmBnC,CAAnB,CAAAsB,QAAA,CACY,OADZ,CACqB,GADrB,CAAAA,QAAA,CAEY,OAFZ,CAEqB,GAFrB,CAAAA,QAAA,CAGY,MAHZ,CAGoB,GAHpB,CAAAA,QAAA,CAIY,OAJZ,CAIqB,GAJrB,CAAAA,QAAA,CAKY,MALZ,CAKqBY,CAAA,CAAkB,KAAlB,CAA0B,GAL/C,CADqC,CA
 wD9CE,QAASA,GAAW,CAACxB,CAAD,CAAUyB,CAAV,CAAqB,CAOvCnB,QAASA,EAAM,CAACN,CAAD,CAAU,CACvBA,CAAA,EAAW0B,CAAA/H,KAAA,CAAcqG,CAAd,CADY,CAPc,IACnC0B,EAAW,CAAC1B,CAAD,CADwB,CAEnC2B,CAFmC,CAGnCC,CAHmC,CAInCC,EAAQ,CAAC,QAAD;AAAW,QAAX,CAAqB,UAArB,CAAiC,aAAjC,CAJ2B,CAKnCC,EAAsB,mCAM1B5I,EAAA,CAAQ2I,CAAR,CAAe,QAAQ,CAACE,CAAD,CAAO,CAC5BF,CAAA,CAAME,CAAN,CAAA,CAAc,CAAA,CACdzB,EAAA,CAAO9H,CAAAwJ,eAAA,CAAwBD,CAAxB,CAAP,CACAA,EAAA,CAAOA,CAAArB,QAAA,CAAa,GAAb,CAAkB,KAAlB,CACHV,EAAAiC,iBAAJ,GACE/I,CAAA,CAAQ8G,CAAAiC,iBAAA,CAAyB,GAAzB,CAA+BF,CAA/B,CAAR,CAA8CzB,CAA9C,CAEA,CADApH,CAAA,CAAQ8G,CAAAiC,iBAAA,CAAyB,GAAzB,CAA+BF,CAA/B,CAAsC,KAAtC,CAAR,CAAsDzB,CAAtD,CACA,CAAApH,CAAA,CAAQ8G,CAAAiC,iBAAA,CAAyB,GAAzB,CAA+BF,CAA/B,CAAsC,GAAtC,CAAR,CAAoDzB,CAApD,CAHF,CAJ4B,CAA9B,CAWApH,EAAA,CAAQwI,CAAR,CAAkB,QAAQ,CAAC1B,CAAD,CAAU,CAClC,GAAI,CAAC2B,CAAL,CAAiB,CAEf,IAAIlB,EAAQqB,CAAAI,KAAA,CADI,GACJ,CADUlC,CAAAmC,UACV,CAD8B,GAC9B,CACR1B,EAAJ,EACEkB,CACA,CADa3B,CACb,CAAA4B,CAAA,CAAUlB,CAAAD,CAAA,CAAM,CAAN,CAAAC,EAAY,EA
 AZA,SAAA,CAAwB,MAAxB,CAAgC,GAAhC,CAFZ,EAIExH,CAAA,CAAQ8G,CAAAoC,WAAR,CAA4B,QAAQ,CAAC3F,CAAD,CAAO,CACpCkF,CAAAA,CAAL,EAAmBE,CAAA,CAAMpF,CAAAsF,KAAN,CAAnB,GACEJ,CACA,CADa3B,CACb,CAAA4B,CAAA,CAASnF,CAAAxC,MAFX,CADyC,CAA3C,CAPa,CADiB,CAApC,CAiBI0H,EAAJ,EACEF,CAAA,CAAUE,CAAV,CAAsBC,CAAA,CAAS,CAACA,CAAD,CAAT,CAAoB,EAA1C,CAxCqC,CAkGzCH,QAASA,GAAS,CAACzB,CAAD,CAAUqC,CAAV,CAAmB,CACnC,IAAIC,EAAcA,QAAQ,EAAG,CAC3BtC,CAAA,CAAUC,CAAA,CAAOD,CAAP,CAEV,IAAIA,CAAAuC,SAAA,EAAJ,CAAwB,CACtB,IAAIC;AAAOxC,CAAA,CAAQ,CAAR,CAAD,GAAgBxH,CAAhB,CAA4B,UAA5B,CAAyCuH,EAAA,CAAYC,CAAZ,CACnD,MAAMvC,GAAA,CAAS,SAAT,CAAwE+E,CAAxE,CAAN,CAFsB,CAKxBH,CAAA,CAAUA,CAAV,EAAqB,EACrBA,EAAA3H,QAAA,CAAgB,CAAC,UAAD,CAAa,QAAQ,CAAC+H,CAAD,CAAW,CAC9CA,CAAAxI,MAAA,CAAe,cAAf,CAA+B+F,CAA/B,CAD8C,CAAhC,CAAhB,CAGAqC,EAAA3H,QAAA,CAAgB,IAAhB,CACI6H,EAAAA,CAAWG,EAAA,CAAeL,CAAf,CACfE,EAAAI,OAAA,CAAgB,CAAC,YAAD,CAAe,cAAf,CAA+B,UAA/B,CAA2C,WAA3C,CAAwD,UAAxD,CACb,QAAQ,CAACC,CAAD,CAAQ5C,CAAR,CAAiB6C,CAAjB,CAA0BN,CAA1B,CAAoCO,CAApC,CAA6C,CACpDF,CAA
 AG,OAAA,CAAa,QAAQ,EAAG,CACtB/C,CAAAgD,KAAA,CAAa,WAAb,CAA0BT,CAA1B,CACAM,EAAA,CAAQ7C,CAAR,CAAA,CAAiB4C,CAAjB,CAFsB,CAAxB,CADoD,CADxC,CAAhB,CAQA,OAAOL,EAtBoB,CAA7B,CAyBIU,EAAqB,sBAEzB,IAAI1K,CAAJ,EAAc,CAAC0K,CAAAC,KAAA,CAAwB3K,CAAAwJ,KAAxB,CAAf,CACE,MAAOO,EAAA,EAGT/J,EAAAwJ,KAAA,CAAcxJ,CAAAwJ,KAAArB,QAAA,CAAoBuC,CAApB,CAAwC,EAAxC,CACdE,GAAAC,gBAAA,CAA0BC,QAAQ,CAACC,CAAD,CAAe,CAC/CpK,CAAA,CAAQoK,CAAR,CAAsB,QAAQ,CAAC1B,CAAD,CAAS,CACrCS,CAAA1I,KAAA,CAAaiI,CAAb,CADqC,CAAvC,CAGAU,EAAA,EAJ+C,CAjCd,CA0CrCiB,QAASA,GAAU,CAACxB,CAAD,CAAOyB,CAAP,CAAkB,CACnCA,CAAA,CAAYA,CAAZ,EAAyB,GACzB,OAAOzB,EAAArB,QAAA,CAAa+C,EAAb,CAAgC,QAAQ,CAACC,CAAD;AAASC,CAAT,CAAc,CAC3D,OAAQA,CAAA,CAAMH,CAAN,CAAkB,EAA1B,EAAgCE,CAAAE,YAAA,EAD2B,CAAtD,CAF4B,CAmCrCC,QAASA,GAAS,CAACC,CAAD,CAAM/B,CAAN,CAAYgC,CAAZ,CAAoB,CACpC,GAAI,CAACD,CAAL,CACE,KAAMrG,GAAA,CAAS,MAAT,CAA2CsE,CAA3C,EAAmD,GAAnD,CAA0DgC,CAA1D,EAAoE,UAApE,CAAN,CAEF,MAAOD,EAJ6B,CAOtCE,QAASA,GAAW,CAACF,CAAD,CAAM/B,CAAN,CAAYkC,CAAZ,CAAmC,CACjDA,CAAJ,EAA6BhL,CAAA,CAAQ6
 K,CAAR,CAA7B,GACIA,CADJ,CACUA,CAAA,CAAIA,CAAAhL,OAAJ,CAAiB,CAAjB,CADV,CAIA+K,GAAA,CAAUvK,CAAA,CAAWwK,CAAX,CAAV,CAA2B/B,CAA3B,CAAiC,sBAAjC,EACK+B,CAAA,EAAsB,QAAtB,GAAO,MAAOA,EAAd,CAAiCA,CAAAI,YAAAnC,KAAjC,EAAyD,QAAzD,CAAoE,MAAO+B,EADhF,EAEA,OAAOA,EAP8C,CAevDK,QAASA,GAAuB,CAACpC,CAAD,CAAO3I,CAAP,CAAgB,CAC9C,GAAa,gBAAb,GAAI2I,CAAJ,CACE,KAAMtE,GAAA,CAAS,SAAT,CAA8DrE,CAA9D,CAAN,CAF4C,CAchDgL,QAASA,GAAM,CAACxL,CAAD,CAAMyL,CAAN,CAAYC,CAAZ,CAA2B,CACxC,GAAI,CAACD,CAAL,CAAW,MAAOzL,EACdc,EAAAA,CAAO2K,CAAArD,MAAA,CAAW,GAAX,CAKX,KAJA,IAAI3H,CAAJ,CACIkL,EAAe3L,CADnB,CAEI4L,EAAM9K,CAAAZ,OAFV,CAISgB,EAAI,CAAb,CAAgBA,CAAhB,CAAoB0K,CAApB,CAAyB1K,CAAA,EAAzB,CACET,CACA,CADMK,CAAA,CAAKI,CAAL,CACN,CAAIlB,CAAJ,GACEA,CADF,CACQ,CAAC2L,CAAD,CAAgB3L,CAAhB,EAAqBS,CAArB,CADR,CAIF,OAAI,CAACiL,CAAL,EAAsBhL,CAAA,CAAWV,CAAX,CAAtB,CACS+F,EAAA,CAAK4F,CAAL,CAAmB3L,CAAnB,CADT,CAGOA,CAhBiC,CAwB1C6L,QAASA,GAAgB,CAACC,CAAD,CAAQ,CAAA,IAC3BC,EAAYD,CAAA,CAAM,CAAN,CACZE,EAAAA,CAAUF,CAAA,CAAMA,CAAA5L,OAAN,CAAqB,CAArB,CACd,IAAI
 6L,CAAJ;AAAkBC,CAAlB,CACE,MAAO3E,EAAA,CAAO0E,CAAP,CAIT,KAAIjD,EAAW,CAAC1B,CAAD,CAEf,GAAG,CACDA,CAAA,CAAUA,CAAA6E,YACV,IAAI,CAAC7E,CAAL,CAAc,KACd0B,EAAA/H,KAAA,CAAcqG,CAAd,CAHC,CAAH,MAISA,CAJT,GAIqB4E,CAJrB,CAMA,OAAO3E,EAAA,CAAOyB,CAAP,CAhBwB,CA4BjCoD,QAASA,GAAiB,CAACvM,CAAD,CAAS,CAEjC,IAAIwM,EAAkBrM,CAAA,CAAO,WAAP,CAAtB,CACI+E,EAAW/E,CAAA,CAAO,IAAP,CAMXyK,EAAAA,CAAiB5K,CAHZ,QAGL4K,GAAiB5K,CAHE,QAGnB4K,CAH+B,EAG/BA,CAGJA,EAAA6B,SAAA,CAAmB7B,CAAA6B,SAAnB,EAAuCtM,CAEvC,OAAcyK,EARL,OAQT,GAAcA,CARS,OAQvB,CAAiC8B,QAAQ,EAAG,CAE1C,IAAI5C,EAAU,EAqDd,OAAOT,SAAe,CAACG,CAAD,CAAOmD,CAAP,CAAiBC,CAAjB,CAA2B,CAE7C,GAAa,gBAAb,GAKsBpD,CALtB,CACE,KAAMtE,EAAA,CAAS,SAAT,CAIoBrE,QAJpB,CAAN,CAKA8L,CAAJ,EAAgB7C,CAAA9I,eAAA,CAAuBwI,CAAvB,CAAhB,GACEM,CAAA,CAAQN,CAAR,CADF,CACkB,IADlB,CAGA,OAAcM,EA1ET,CA0EkBN,CA1ElB,CA0EL,GAAcM,CA1EK,CA0EIN,CA1EJ,CA0EnB,CAA6BkD,QAAQ,EAAG,CAkNtCG,QAASA,EAAW,CAACC,CAAD,CAAWC,CAAX,CAAmBC,CAAnB,CAAiC,CACnD,MAAO,SAAQ,EAAG,CAChBC,CAAA,CAAYD,CAAZ,EAA4B,MAA5B,CAAA,CAAoC,CAACF,CAAD,CAA
 WC,CAAX,CAAmBtK,SAAnB,CAApC,CACA,OAAOyK,EAFS,CADiC,CAjNrD,GAAI,CAACP,CAAL,CACE,KAAMH,EAAA,CAAgB,OAAhB,CAEiDhD,CAFjD,CAAN,CAMF,IAAIyD,EAAc,EAAlB,CAGIE,EAAY,EAHhB,CAKIC,EAASP,CAAA,CAAY,WAAZ;AAAyB,QAAzB,CALb,CAQIK,EAAiB,cAELD,CAFK,YAGPE,CAHO,UAcTR,CAdS,MAuBbnD,CAvBa,UAoCTqD,CAAA,CAAY,UAAZ,CAAwB,UAAxB,CApCS,SA+CVA,CAAA,CAAY,UAAZ,CAAwB,SAAxB,CA/CU,SA0DVA,CAAA,CAAY,UAAZ,CAAwB,SAAxB,CA1DU,OAqEZA,CAAA,CAAY,UAAZ,CAAwB,OAAxB,CArEY,UAiFTA,CAAA,CAAY,UAAZ,CAAwB,UAAxB,CAAoC,SAApC,CAjFS,WAmHRA,CAAA,CAAY,kBAAZ,CAAgC,UAAhC,CAnHQ,QA8HXA,CAAA,CAAY,iBAAZ,CAA+B,UAA/B,CA9HW,YA0IPA,CAAA,CAAY,qBAAZ,CAAmC,UAAnC,CA1IO,WAuJRA,CAAA,CAAY,kBAAZ,CAAgC,WAAhC,CAvJQ,QAoKXO,CApKW,KAgLdC,QAAQ,CAACC,CAAD,CAAQ,CACnBH,CAAA/L,KAAA,CAAekM,CAAf,CACA,OAAO,KAFY,CAhLF,CAsLjBV,EAAJ,EACEQ,CAAA,CAAOR,CAAP,CAGF,OAAQM,EA1M8B,CA1ET,EA0E/B,CAX+C,CAvDP,CART,EAQnC,CAdiC,CAmZnCK,QAASA,GAAkB,CAAC3C,CAAD,CAAS,CAClCrI,CAAA,CAAOqI,CAAP,CAAgB,WACD1B,EADC;KAENvE,EAFM,QAGJpC,CAHI,QAIJmD,EAJI,SAKHgC,CALG,SAMH/G,CANG,UAOFwJ,EAPE,MAQPnH,CARO,MASP
 oD,EATO,QAUJU,EAVI,UAWFI,EAXE,UAYHjE,EAZG,aAaCG,CAbD,WAcDC,CAdC,UAeF5C,CAfE,YAgBAM,CAhBA,UAiBFuC,CAjBE,UAkBFC,EAlBE,WAmBDO,EAnBC,SAoBHpD,CApBG,SAqBH8M,EArBG,QAsBJhK,EAtBI,WAuBD+D,CAvBC,WAwBDkG,EAxBC,WAyBD,SAAU,CAAV,CAzBC,UA0BFtN,CA1BE,OA2BL6F,EA3BK,CAAhB,CA8BA0H,GAAA,CAAgBnB,EAAA,CAAkBvM,CAAlB,CAChB,IAAI,CACF0N,EAAA,CAAc,UAAd,CADE,CAEF,MAAO7F,CAAP,CAAU,CACV6F,EAAA,CAAc,UAAd,CAA0B,EAA1B,CAAAZ,SAAA,CAAuC,SAAvC,CAAkDa,EAAlD,CADU,CAIZD,EAAA,CAAc,IAAd,CAAoB,CAAC,UAAD,CAApB,CAAkC,CAAC,UAAD,CAChCE,QAAiB,CAAC1D,CAAD,CAAW,CAE1BA,CAAA4C,SAAA,CAAkB,eACDe,EADC,CAAlB,CAGA3D,EAAA4C,SAAA,CAAkB,UAAlB,CAA8BgB,EAA9B,CAAAC,UAAA,CACY,GACHC,EADG,OAECC,EAFD,UAGIA,EAHJ;KAIAC,EAJA,QAKEC,EALF,QAMEC,EANF,OAOCC,EAPD,QAQEC,EARF,QASEC,EATF,YAUMC,EAVN,gBAWUC,EAXV,SAYGC,EAZH,aAaOC,EAbP,YAcMC,EAdN,SAeGC,EAfH,cAgBQC,EAhBR,QAiBEC,EAjBF,QAkBEC,EAlBF,MAmBAC,EAnBA,WAoBKC,EApBL,QAqBEC,EArBF,eAsBSC,EAtBT,aAuBOC,EAvBP,UAwBIC,EAxBJ,QAyBEC,EAzBF,SA0BGC,EA1BH,UA2BIC,EA3BJ,cA4BQC,EA5BR,iBA6BWC,EA7BX,WA8BKC,EA9BL,cA+BQC,EA/BR,
 SAgCGC,EAhCH,QAiCEC,EAjCF,UAkCIC,EAlCJ,UAmCIC,EAnCJ,YAoCMA,EApCN,SAqCGC,EArCH,CADZ,CAAAnC,UAAA,CAwCY,WACGoC,EADH,CAxCZ,CAAApC,UAAA,CA2CYqC,EA3CZ,CAAArC,UAAA,CA4CYsC,EA5CZ,CA6CAnG,EAAA4C,SAAA,CAAkB,eACDwD,EADC;SAENC,EAFM,UAGNC,EAHM,eAIDC,EAJC,aAKHC,EALG,WAMLC,EANK,mBAOGC,EAPH,SAQPC,EARO,cASFC,EATE,WAULC,EAVK,OAWTC,EAXS,cAYFC,EAZE,WAaLC,EAbK,MAcVC,EAdU,QAeRC,EAfQ,YAgBJC,EAhBI,IAiBZC,EAjBY,MAkBVC,EAlBU,cAmBFC,EAnBE,UAoBNC,EApBM,gBAqBAC,EArBA,UAsBNC,EAtBM,SAuBPC,EAvBO,OAwBTC,EAxBS,iBAyBEC,EAzBF,CAAlB,CAlD0B,CADI,CAAlC,CAtCkC,CAyPpCC,QAASA,GAAS,CAACvI,CAAD,CAAO,CACvB,MAAOA,EAAArB,QAAA,CACG6J,EADH,CACyB,QAAQ,CAACC,CAAD,CAAIhH,CAAJ,CAAeE,CAAf,CAAuB+G,CAAvB,CAA+B,CACnE,MAAOA,EAAA,CAAS/G,CAAAgH,YAAA,EAAT,CAAgChH,CAD4B,CADhE,CAAAhD,QAAA,CAIGiK,EAJH,CAIoB,OAJpB,CADgB,CAgBzBC,QAASA,GAAuB,CAAC7I,CAAD,CAAO8I,CAAP,CAAqBC,CAArB,CAAkCC,CAAlC,CAAuD,CAMrFC,QAASA,EAAW,CAACC,CAAD,CAAQ,CAAA,IAEtBpO,EAAOiO,CAAA,EAAeG,CAAf,CAAuB,CAAC,IAAAC,OAAA,CAAYD,CAAZ,CAAD,CAAvB,CAA8C,CAAC,IAAD,CAF/B,CAGtBE,EAAYN,CAHU,
 CAItBO,CAJsB,CAIjBC,CAJiB,CAIPC,CAJO,CAKtBtL,CALsB,CAKbuL,CALa;AAKYC,CAEtC,IAAI,CAACT,CAAL,EAAqC,IAArC,EAA4BE,CAA5B,CACE,IAAA,CAAMpO,CAAA/D,OAAN,CAAA,CAEE,IADAsS,CACkB,CADZvO,CAAA4O,MAAA,EACY,CAAdJ,CAAc,CAAH,CAAG,CAAAC,CAAA,CAAYF,CAAAtS,OAA9B,CAA0CuS,CAA1C,CAAqDC,CAArD,CAAgED,CAAA,EAAhE,CAOE,IANArL,CAMoB,CANVC,CAAA,CAAOmL,CAAA,CAAIC,CAAJ,CAAP,CAMU,CALhBF,CAAJ,CACEnL,CAAA0L,eAAA,CAAuB,UAAvB,CADF,CAGEP,CAHF,CAGc,CAACA,CAEK,CAAhBI,CAAgB,CAAH,CAAG,CAAAI,CAAA,CAAe7S,CAAA0S,CAAA1S,CAAWkH,CAAAwL,SAAA,EAAX1S,QAAnC,CACIyS,CADJ,CACiBI,CADjB,CAEIJ,CAAA,EAFJ,CAGE1O,CAAAlD,KAAA,CAAUiS,EAAA,CAAOJ,CAAA,CAASD,CAAT,CAAP,CAAV,CAKR,OAAOM,EAAA5M,MAAA,CAAmB,IAAnB,CAAyBjE,SAAzB,CAzBmB,CAL5B,IAAI6Q,EAAeD,EAAA/M,GAAA,CAAUkD,CAAV,CAAnB,CACA8J,EAAeA,CAAAC,UAAfD,EAAyCA,CACzCb,EAAAc,UAAA,CAAwBD,CACxBD,GAAA/M,GAAA,CAAUkD,CAAV,CAAA,CAAkBiJ,CAJmE,CAyGvFe,QAASA,EAAM,CAAC/L,CAAD,CAAU,CACvB,GAAIA,CAAJ,WAAuB+L,EAAvB,CACE,MAAO/L,EAELhH,EAAA,CAASgH,CAAT,CAAJ,GACEA,CADF,CACYgM,EAAA,CAAKhM,CAAL,CADZ,CAGA,IAAI,EAAE,IAAF,W
 AAkB+L,EAAlB,CAAJ,CAA+B,CAC7B,GAAI/S,CAAA,CAASgH,CAAT,CAAJ,EAA8C,GAA9C,EAAyBA,CAAAhC,OAAA,CAAe,CAAf,CAAzB,CACE,KAAMiO,GAAA,CAAa,OAAb,CAAN,CAEF,MAAO,KAAIF,CAAJ,CAAW/L,CAAX,CAJsB,CAO/B,GAAIhH,CAAA,CAASgH,CAAT,CAAJ,CAAuB,CACgBA,IAAAA,EAAAA,CA1BvC5G,EAAA,CAAqBZ,CACrB,KAAI0T,CAEJ,IAAKA,CAAL,CAAcC,EAAAjK,KAAA,CAAuB3B,CAAvB,CAAd,CACS,CAAA,CAAA,CAAA,CAAA,cAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CADT,KAAA,CAIO,IAAA,EAAA,CAAA,CA1CQiC,CACX4J,EAAAA,CAAWhT,CAAAiT,uBAAA,EACX3H;CAAAA,CAAQ,EAEZ,IARQ4H,EAAApJ,KAAA,CA8CD3C,CA9CC,CAQR,CAGO,CACLgM,CAAA,CAAMH,CAAAI,YAAA,CAAqBpT,CAAAqT,cAAA,CAAsB,KAAtB,CAArB,CAENjK,EAAA,CAAM,CAACkK,EAAAxK,KAAA,CAgCF3B,CAhCE,CAAD,EAA+B,CAAC,EAAD,CAAK,EAAL,CAA/B,EAAyC,CAAzC,CAAAqD,YAAA,EACN+I,EAAA,CAAOC,EAAA,CAAQpK,CAAR,CAAP,EAAuBoK,EAAAC,SACvBN,EAAAO,UAAA,CAAgB,mBAAhB,CACEH,CAAA,CAAK,CAAL,CADF,CA8BKpM,CA7BOG,QAAA,CAAaqM,EAAb,CAA+B,WAA/B,CADZ,CAC0DJ,CAAA,CAAK,CAAL,CAC1DJ,EAAAS,YAAA,CAAgBT,CAAAU,WAAhB,CAIA,KADAnT,CACA,CADI6S,CAAA,CAAK,CAAL,CACJ,CAAO7S,CAAA,EAAP,CAAA,CACEyS,CAAA,C
 AAMA,CAAAW,UAGHC,EAAA,CAAE,CAAP,KAAUC,CAAV,CAAab,CAAAc,WAAAvU,OAAb,CAAoCqU,CAApC,CAAsCC,CAAtC,CAA0C,EAAED,CAA5C,CAA+CzI,CAAA/K,KAAA,CAAW4S,CAAAc,WAAA,CAAeF,CAAf,CAAX,CAE/CZ,EAAA,CAAMH,CAAAa,WACNV,EAAAe,YAAA,CAAkB,EAlBb,CAHP,IAEE5I,EAAA/K,KAAA,CAAWP,CAAAmU,eAAA,CAoCNhN,CApCM,CAAX,CAuBF6L,EAAAkB,YAAA,CAAuB,EACvBlB,EAAAU,UAAA,CAAqB,EACrB,EAAA,CAAOpI,CAOP,CAuBE8I,EAAA,CAAe,IAAf,CAvBF,CAuBE,CACevN,EAAAmM,CAAO5T,CAAA6T,uBAAA,EAAPD,CACf9L,OAAA,CAAgB,IAAhB,CAHqB,CAAvB,IAKEkN,GAAA,CAAe,IAAf,CAAqBxN,CAArB,CAnBqB,CAuBzByN,QAASA,GAAW,CAACzN,CAAD,CAAU,CAC5B,MAAOA,EAAA0N,UAAA,CAAkB,CAAA,CAAlB,CADqB,CApzES;AAwzEvCC,QAASA,GAAY,CAAC3N,CAAD,CAAS,CAC5B4N,EAAA,CAAiB5N,CAAjB,CAD4B,KAElBlG,EAAI,CAAd,KAAiB0R,CAAjB,CAA4BxL,CAAAqN,WAA5B,EAAkD,EAAlD,CAAsDvT,CAAtD,CAA0D0R,CAAA1S,OAA1D,CAA2EgB,CAAA,EAA3E,CACE6T,EAAA,CAAanC,CAAA,CAAS1R,CAAT,CAAb,CAH0B,CAO9B+T,QAASA,GAAS,CAAC7N,CAAD,CAAU8N,CAAV,CAAgBjP,CAAhB,CAAoBkP,CAApB,CAAiC,CACjD,GAAInS,CAAA,CAAUmS,CAAV,CAAJ,CAA4B,KAAM9B,GAAA,CAAa,SAAb,CAAN,CADqB,IAG7C+B,EAA
 SC,EAAA,CAAmBjO,CAAnB,CAA4B,QAA5B,CACAiO,GAAAC,CAAmBlO,CAAnBkO,CAA4B,QAA5BA,CAEb,GAEIvS,CAAA,CAAYmS,CAAZ,CAAJ,CACE5U,CAAA,CAAQ8U,CAAR,CAAgB,QAAQ,CAACG,CAAD,CAAeL,CAAf,CAAqB,CAC3CM,EAAA,CAAsBpO,CAAtB,CAA+B8N,CAA/B,CAAqCK,CAArC,CACA,QAAOH,CAAA,CAAOF,CAAP,CAFoC,CAA7C,CADF,CAME5U,CAAA,CAAQ4U,CAAA9M,MAAA,CAAW,GAAX,CAAR,CAAyB,QAAQ,CAAC8M,CAAD,CAAO,CAClCnS,CAAA,CAAYkD,CAAZ,CAAJ,EACEuP,EAAA,CAAsBpO,CAAtB,CAA+B8N,CAA/B,CAAqCE,CAAA,CAAOF,CAAP,CAArC,CACA,CAAA,OAAOE,CAAA,CAAOF,CAAP,CAFT,EAIE9Q,EAAA,CAAYgR,CAAA,CAAOF,CAAP,CAAZ,EAA4B,EAA5B,CAAgCjP,CAAhC,CALoC,CAAxC,CARF,CANiD,CAyBnD+O,QAASA,GAAgB,CAAC5N,CAAD,CAAU+B,CAAV,CAAgB,CAAA,IACnCsM,EAAYrO,CAAAsO,MADuB,CAEnCC,EAAeC,EAAA,CAAQH,CAAR,CAEfE,EAAJ,GACMxM,CAAJ,CACE,OAAOyM,EAAA,CAAQH,CAAR,CAAArL,KAAA,CAAwBjB,CAAxB,CADT,EAKIwM,CAAAL,OAKJ,GAJEK,CAAAP,OAAAS,SACA,EADgCF,CAAAL,OAAA,CAAoB,EAApB,CAAwB,UAAxB,CAChC,CAAAL,EAAA,CAAU7N,CAAV,CAGF,EADA,OAAOwO,EAAA,CAAQH,CAAR,CACP,CAAArO,CAAAsO,MAAA,CAAgB7V,CAVhB,CADF,CAJuC,CAmBzCwV,QAASA,GAAkB,CAACjO,CAAD,CAAU3G
 ,CAAV,CAAeY,CAAf,CAAsB,CAAA,IAC3CoU,EAAYrO,CAAAsO,MAD+B,CAE3CC,EAAeC,EAAA,CAAQH,CAAR,EAAsB,EAAtB,CAEnB,IAAIzS,CAAA,CAAU3B,CAAV,CAAJ,CACOsU,CAIL,GAHEvO,CAAAsO,MACA;AADgBD,CAChB,CA1NuB,EAAEK,EA0NzB,CAAAH,CAAA,CAAeC,EAAA,CAAQH,CAAR,CAAf,CAAoC,EAEtC,EAAAE,CAAA,CAAalV,CAAb,CAAA,CAAoBY,CALtB,KAOE,OAAOsU,EAAP,EAAuBA,CAAA,CAAalV,CAAb,CAXsB,CAejDsV,QAASA,GAAU,CAAC3O,CAAD,CAAU3G,CAAV,CAAeY,CAAf,CAAsB,CAAA,IACnC+I,EAAOiL,EAAA,CAAmBjO,CAAnB,CAA4B,MAA5B,CAD4B,CAEnC4O,EAAWhT,CAAA,CAAU3B,CAAV,CAFwB,CAGnC4U,EAAa,CAACD,CAAdC,EAA0BjT,CAAA,CAAUvC,CAAV,CAHS,CAInCyV,EAAiBD,CAAjBC,EAA+B,CAACjT,CAAA,CAASxC,CAAT,CAE/B2J,EAAL,EAAc8L,CAAd,EACEb,EAAA,CAAmBjO,CAAnB,CAA4B,MAA5B,CAAoCgD,CAApC,CAA2C,EAA3C,CAGF,IAAI4L,CAAJ,CACE5L,CAAA,CAAK3J,CAAL,CAAA,CAAYY,CADd,KAGE,IAAI4U,CAAJ,CAAgB,CACd,GAAIC,CAAJ,CAEE,MAAO9L,EAAP,EAAeA,CAAA,CAAK3J,CAAL,CAEfyB,EAAA,CAAOkI,CAAP,CAAa3J,CAAb,CALY,CAAhB,IAQE,OAAO2J,EArB4B,CA0BzC+L,QAASA,GAAc,CAAC/O,CAAD,CAAUgP,CAAV,CAAoB,CACzC,MAAKhP,EAAAiP,aAAL,CAEuC,EAFvC,CACSvO,CAAA,GAAAA,EAAOV,
 CAAAiP,aAAA,CAAqB,OAArB,CAAPvO,EAAwC,EAAxCA,EAA8C,GAA9CA,SAAA,CAA2D,SAA3D,CAAsE,GAAtE,CAAA5D,QAAA,CACI,GADJ,CACUkS,CADV,CACqB,GADrB,CADT,CAAkC,CAAA,CADO,CAM3CE,QAASA,GAAiB,CAAClP,CAAD,CAAUmP,CAAV,CAAsB,CAC1CA,CAAJ,EAAkBnP,CAAAoP,aAAlB,EACElW,CAAA,CAAQiW,CAAAnO,MAAA,CAAiB,GAAjB,CAAR,CAA+B,QAAQ,CAACqO,CAAD,CAAW,CAChDrP,CAAAoP,aAAA,CAAqB,OAArB,CAA8BpD,EAAA,CACzBtL,CAAA,GAAAA,EAAOV,CAAAiP,aAAA,CAAqB,OAArB,CAAPvO,EAAwC,EAAxCA,EAA8C,GAA9CA,SAAA,CACQ,SADR,CACmB,GADnB,CAAAA,QAAA,CAEQ,GAFR,CAEcsL,EAAA,CAAKqD,CAAL,CAFd,CAE+B,GAF/B;AAEoC,GAFpC,CADyB,CAA9B,CADgD,CAAlD,CAF4C,CAYhDC,QAASA,GAAc,CAACtP,CAAD,CAAUmP,CAAV,CAAsB,CAC3C,GAAIA,CAAJ,EAAkBnP,CAAAoP,aAAlB,CAAwC,CACtC,IAAIG,EAAmB7O,CAAA,GAAAA,EAAOV,CAAAiP,aAAA,CAAqB,OAArB,CAAPvO,EAAwC,EAAxCA,EAA8C,GAA9CA,SAAA,CACU,SADV,CACqB,GADrB,CAGvBxH,EAAA,CAAQiW,CAAAnO,MAAA,CAAiB,GAAjB,CAAR,CAA+B,QAAQ,CAACqO,CAAD,CAAW,CAChDA,CAAA,CAAWrD,EAAA,CAAKqD,CAAL,CAC4C,GAAvD,GAAIE,CAAAzS,QAAA,CAAwB,GAAxB,CAA8BuS,CAA9B,CAAyC,GAAzC,CAAJ,GACEE,CADF,EACqBF,CADrB,CACgC
 ,GADhC,CAFgD,CAAlD,CAOArP,EAAAoP,aAAA,CAAqB,OAArB,CAA8BpD,EAAA,CAAKuD,CAAL,CAA9B,CAXsC,CADG,CAgB7C/B,QAASA,GAAc,CAACgC,CAAD,CAAO9N,CAAP,CAAiB,CACtC,GAAIA,CAAJ,CAAc,CACZA,CAAA,CAAaA,CAAAnF,SACF,EADuB,CAAAX,CAAA,CAAU8F,CAAA5I,OAAV,CACvB,EADsDD,EAAA,CAAS6I,CAAT,CACtD,CACP,CAAEA,CAAF,CADO,CAAPA,CAEJ,KAAI,IAAI5H,EAAE,CAAV,CAAaA,CAAb,CAAiB4H,CAAA5I,OAAjB,CAAkCgB,CAAA,EAAlC,CACE0V,CAAA7V,KAAA,CAAU+H,CAAA,CAAS5H,CAAT,CAAV,CALU,CADwB,CAWxC2V,QAASA,GAAgB,CAACzP,CAAD,CAAU+B,CAAV,CAAgB,CACvC,MAAO2N,GAAA,CAAoB1P,CAApB,CAA6B,GAA7B,EAAoC+B,CAApC,EAA4C,cAA5C,EAA+D,YAA/D,CADgC,CAIzC2N,QAASA,GAAmB,CAAC1P,CAAD,CAAU+B,CAAV,CAAgB9H,CAAhB,CAAuB,CACjD+F,CAAA,CAAUC,CAAA,CAAOD,CAAP,CAIgB,EAA1B,EAAGA,CAAA,CAAQ,CAAR,CAAAjH,SAAH,GACEiH,CADF,CACYA,CAAAtD,KAAA,CAAa,MAAb,CADZ,CAKA,KAFImF,CAEJ,CAFY5I,CAAA,CAAQ8I,CAAR,CAAA,CAAgBA,CAAhB,CAAuB,CAACA,CAAD,CAEnC,CAAO/B,CAAAlH,OAAP,CAAA,CAAuB,CAErB,IADA,IAAIwD,EAAO0D,CAAA,CAAQ,CAAR,CAAX,CACSlG;AAAI,CADb,CACgB6V,EAAK9N,CAAA/I,OAArB,CAAmCgB,CAAnC,CAAuC6V,CAAvC,CAA2C7V,CAA
 A,EAA3C,CACE,IAAKG,CAAL,CAAa+F,CAAAgD,KAAA,CAAanB,CAAA,CAAM/H,CAAN,CAAb,CAAb,IAAyCrB,CAAzC,CAAoD,MAAOwB,EAM7D+F,EAAA,CAAUC,CAAA,CAAO3D,CAAAsT,WAAP,EAA6C,EAA7C,GAA2BtT,CAAAvD,SAA3B,EAAmDuD,CAAAuT,KAAnD,CATW,CAV0B,CAuBnDC,QAASA,GAAW,CAAC9P,CAAD,CAAU,CAC5B,IAD4B,IACnBlG,EAAI,CADe,CACZuT,EAAarN,CAAAqN,WAA7B,CAAiDvT,CAAjD,CAAqDuT,CAAAvU,OAArD,CAAwEgB,CAAA,EAAxE,CACE6T,EAAA,CAAaN,CAAA,CAAWvT,CAAX,CAAb,CAEF,KAAA,CAAOkG,CAAAiN,WAAP,CAAA,CACEjN,CAAAgN,YAAA,CAAoBhN,CAAAiN,WAApB,CAL0B,CA+D9B8C,QAASA,GAAkB,CAAC/P,CAAD,CAAU+B,CAAV,CAAgB,CAEzC,IAAIiO,EAAcC,EAAA,CAAalO,CAAA6B,YAAA,EAAb,CAGlB,OAAOoM,EAAP,EAAsBE,EAAA,CAAiBlQ,CAAAzD,SAAjB,CAAtB,EAA4DyT,CALnB,CAkM3CG,QAASA,GAAkB,CAACnQ,CAAD,CAAUgO,CAAV,CAAkB,CAC3C,IAAIG,EAAeA,QAAS,CAACiC,CAAD,CAAQtC,CAAR,CAAc,CACnCsC,CAAAC,eAAL,GACED,CAAAC,eADF,CACyBC,QAAQ,EAAG,CAChCF,CAAAG,YAAA,CAAoB,CAAA,CADY,CADpC,CAMKH,EAAAI,gBAAL,GACEJ,CAAAI,gBADF,CAC0BC,QAAQ,EAAG,CACjCL,CAAAM,aAAA,CAAqB,CAAA,CADY,CADrC,CAMKN,EAAAO,OAAL,GACEP,CAAAO,OADF,CACiBP,CAAAQ,WADjB,EACqCpY
 ,CADrC,CAIA,IAAImD,CAAA,CAAYyU,CAAAS,iBAAZ,CAAJ,CAAyC,CACvC,IAAIC;AAAUV,CAAAC,eACdD,EAAAC,eAAA,CAAuBC,QAAQ,EAAG,CAChCF,CAAAS,iBAAA,CAAyB,CAAA,CACzBC,EAAAtX,KAAA,CAAa4W,CAAb,CAFgC,CAIlCA,EAAAS,iBAAA,CAAyB,CAAA,CANc,CASzCT,CAAAW,mBAAA,CAA2BC,QAAQ,EAAG,CACpC,MAAOZ,EAAAS,iBAAP,EAAuD,CAAA,CAAvD,GAAiCT,CAAAG,YADG,CAKtC,KAAIU,EAAoBnT,EAAA,CAAYkQ,CAAA,CAAOF,CAAP,EAAesC,CAAAtC,KAAf,CAAZ,EAA0C,EAA1C,CAExB5U,EAAA,CAAQ+X,CAAR,CAA2B,QAAQ,CAACpS,CAAD,CAAK,CACtCA,CAAArF,KAAA,CAAQwG,CAAR,CAAiBoQ,CAAjB,CADsC,CAAxC,CAMY,EAAZ,EAAIc,CAAJ,EAEEd,CAAAC,eAEA,CAFuB,IAEvB,CADAD,CAAAI,gBACA,CADwB,IACxB,CAAAJ,CAAAW,mBAAA,CAA2B,IAJ7B,GAOE,OAAOX,CAAAC,eAEP,CADA,OAAOD,CAAAI,gBACP,CAAA,OAAOJ,CAAAW,mBATT,CAvCwC,CAmD1C5C,EAAAgD,KAAA,CAAoBnR,CACpB,OAAOmO,EArDoC,CA+S7CiD,QAASA,GAAO,CAACxY,CAAD,CAAMyY,CAAN,CAAiB,CAAA,IAC3BC,EAAU,MAAO1Y,EADU,CAE3BS,CAEW,WAAf,EAAIiY,CAAJ,EAAyC,QAAzC,EAA8BA,CAA9B,EAA6D,IAA7D,GAAqD1Y,CAArD,CACsC,UAApC,EAAI,OAAQS,CAAR;AAAcT,CAAAiC,UAAd,CAAJ,CAEExB,CAFF,CAEQT,CAAAiC,UAAA,EAFR,CAGWxB,CAHX,GAG
 mBZ,CAHnB,GAIEY,CAJF,CAIQT,CAAAiC,UAJR,CAIyB,CAAAwW,CAAA,EAAanX,EAAb,GAJzB,CADF,CAQEb,CARF,CAQQT,CAGR,OAAO0Y,EAAP,CAAiB,GAAjB,CAAuBjY,CAfQ,CAqBjCkY,QAASA,GAAO,CAACxU,CAAD,CAAQyU,CAAR,CAAqB,CACnC,GAAIA,CAAJ,CAAiB,CACf,IAAIpX,EAAM,CACV,KAAAF,QAAA,CAAeuX,QAAQ,EAAG,CACxB,MAAO,EAAErX,CADe,CAFX,CAMjBlB,CAAA,CAAQ6D,CAAR,CAAe,IAAA2U,IAAf,CAAyB,IAAzB,CAPmC,CAwGrCC,QAASA,GAAQ,CAAC9S,CAAD,CAAK,CAAA,IAChB+S,CADgB,CAEhBC,CAIc,WAAlB,GAAI,MAAOhT,EAAX,EACQ+S,CADR,CACkB/S,CAAA+S,QADlB,IAEIA,CAUA,CAVU,EAUV,CATI/S,CAAA/F,OASJ,GARE+Y,CAEA,CAFShT,CAAA7C,SAAA,EAAA0E,QAAA,CAAsBoR,EAAtB,CAAsC,EAAtC,CAET,CADAC,CACA,CADUF,CAAApR,MAAA,CAAauR,EAAb,CACV,CAAA9Y,CAAA,CAAQ6Y,CAAA,CAAQ,CAAR,CAAA/Q,MAAA,CAAiBiR,EAAjB,CAAR,CAAwC,QAAQ,CAACnO,CAAD,CAAK,CACnDA,CAAApD,QAAA,CAAYwR,EAAZ,CAAoB,QAAQ,CAACC,CAAD,CAAMC,CAAN,CAAkBrQ,CAAlB,CAAuB,CACjD6P,CAAAjY,KAAA,CAAaoI,CAAb,CADiD,CAAnD,CADmD,CAArD,CAMF,EAAAlD,CAAA+S,QAAA,CAAaA,CAZjB,EAcW3Y,CAAA,CAAQ4F,CAAR,CAAJ,EACLwT,CAEA,CAFOxT,CAAA/F,OAEP,CAFmB,CAEnB,CADAkL,EAAA,CAAYnF,CAAA
 ,CAAGwT,CAAH,CAAZ,CAAsB,IAAtB,CACA,CAAAT,CAAA,CAAU/S,CAAAE,MAAA,CAAS,CAAT,CAAYsT,CAAZ,CAHL,EAKLrO,EAAA,CAAYnF,CAAZ,CAAgB,IAAhB,CAAsB,CAAA,CAAtB,CAEF,OAAO+S,EA3Ba,CAygBtBlP,QAASA,GAAc,CAAC4P,CAAD,CAAgB,CAmCrCC,QAASA,EAAa,CAACC,CAAD,CAAW,CAC/B,MAAO,SAAQ,CAACnZ,CAAD,CAAMY,CAAN,CAAa,CAC1B,GAAI4B,CAAA,CAASxC,CAAT,CAAJ,CACEH,CAAA,CAAQG,CAAR;AAAaU,EAAA,CAAcyY,CAAd,CAAb,CADF,KAGE,OAAOA,EAAA,CAASnZ,CAAT,CAAcY,CAAd,CAJiB,CADG,CAUjCoL,QAASA,EAAQ,CAACtD,CAAD,CAAO0Q,CAAP,CAAkB,CACjCtO,EAAA,CAAwBpC,CAAxB,CAA8B,SAA9B,CACA,IAAIzI,CAAA,CAAWmZ,CAAX,CAAJ,EAA6BxZ,CAAA,CAAQwZ,CAAR,CAA7B,CACEA,CAAA,CAAYC,CAAAC,YAAA,CAA6BF,CAA7B,CAEd,IAAI,CAACA,CAAAG,KAAL,CACE,KAAM7N,GAAA,CAAgB,MAAhB,CAA2EhD,CAA3E,CAAN,CAEF,MAAO8Q,EAAA,CAAc9Q,CAAd,CAAqB+Q,CAArB,CAAP,CAA8CL,CARb,CAWnCxN,QAASA,EAAO,CAAClD,CAAD,CAAOgR,CAAP,CAAkB,CAAE,MAAO1N,EAAA,CAAStD,CAAT,CAAe,MAAQgR,CAAR,CAAf,CAAT,CA6BlCC,QAASA,EAAW,CAACV,CAAD,CAAe,CAAA,IAC7B5M,EAAY,EADiB,CACbuN,CADa,CACHzN,CADG,CACU1L,CADV,CACa6V,CAC9CzW,EAAA,CAAQoZ,CAAR,CAAuB,QAAQ,CAAC1
 Q,CAAD,CAAS,CACtC,GAAI,CAAAsR,CAAAC,IAAA,CAAkBvR,CAAlB,CAAJ,CAAA,CACAsR,CAAAxB,IAAA,CAAkB9P,CAAlB,CAA0B,CAAA,CAA1B,CAEA,IAAI,CACF,GAAI5I,CAAA,CAAS4I,CAAT,CAAJ,CAIE,IAHAqR,CAGgD,CAHrChN,EAAA,CAAcrE,CAAd,CAGqC,CAFhD8D,CAEgD,CAFpCA,CAAAxG,OAAA,CAAiB8T,CAAA,CAAYC,CAAA/N,SAAZ,CAAjB,CAAAhG,OAAA,CAAwD+T,CAAAG,WAAxD,CAEoC,CAA5C5N,CAA4C,CAA9ByN,CAAAI,aAA8B,CAAPvZ,CAAO,CAAH,CAAG,CAAA6V,CAAA,CAAKnK,CAAA1M,OAArD,CAAyEgB,CAAzE,CAA6E6V,CAA7E,CAAiF7V,CAAA,EAAjF,CAAsF,CAAA,IAChFwZ,EAAa9N,CAAA,CAAY1L,CAAZ,CADmE,CAEhFuL,EAAWqN,CAAAS,IAAA,CAAqBG,CAAA,CAAW,CAAX,CAArB,CAEfjO,EAAA,CAASiO,CAAA,CAAW,CAAX,CAAT,CAAArU,MAAA,CAA8BoG,CAA9B,CAAwCiO,CAAA,CAAW,CAAX,CAAxC,CAJoF,CAJxF,IAUWha,EAAA,CAAWsI,CAAX,CAAJ,CACH8D,CAAA/L,KAAA,CAAe+Y,CAAA/P,OAAA,CAAwBf,CAAxB,CAAf,CADG,CAEI3I,CAAA,CAAQ2I,CAAR,CAAJ,CACH8D,CAAA/L,KAAA,CAAe+Y,CAAA/P,OAAA,CAAwBf,CAAxB,CAAf,CADG,CAGLoC,EAAA,CAAYpC,CAAZ,CAAoB,QAApB,CAhBA,CAkBF,MAAOxB,CAAP,CAAU,CAYV,KAXInH,EAAA,CAAQ2I,CAAR,CAWE,GAVJA,CAUI;AAVKA,CAAA,CAAOA,CAAA9I,OAAP,CAAuB,CAAvB,CAUL,E
 ARFsH,CAAAmT,QAQE,GARWnT,CAAAoT,MAQX,EARqD,EAQrD,EARsBpT,CAAAoT,MAAA1W,QAAA,CAAgBsD,CAAAmT,QAAhB,CAQtB,IAFJnT,CAEI,CAFAA,CAAAmT,QAEA,CAFY,IAEZ,CAFmBnT,CAAAoT,MAEnB,EAAAzO,EAAA,CAAgB,UAAhB,CACInD,CADJ,CACYxB,CAAAoT,MADZ,EACuBpT,CAAAmT,QADvB,EACoCnT,CADpC,CAAN,CAZU,CArBZ,CADsC,CAAxC,CAsCA,OAAOsF,EAxC0B,CA+CnC+N,QAASA,EAAsB,CAACC,CAAD,CAAQzO,CAAR,CAAiB,CAE9C0O,QAASA,EAAU,CAACC,CAAD,CAAc,CAC/B,GAAIF,CAAAna,eAAA,CAAqBqa,CAArB,CAAJ,CAAuC,CACrC,GAAIF,CAAA,CAAME,CAAN,CAAJ,GAA2BC,CAA3B,CACE,KAAM9O,GAAA,CAAgB,MAAhB,CACI6O,CADJ,CACkB,MADlB,CAC2BvP,CAAA9J,KAAA,CAAU,MAAV,CAD3B,CAAN,CAGF,MAAOmZ,EAAA,CAAME,CAAN,CAL8B,CAOrC,GAAI,CAGF,MAFAvP,EAAA3J,QAAA,CAAakZ,CAAb,CAEO,CADPF,CAAA,CAAME,CAAN,CACO,CADcC,CACd,CAAAH,CAAA,CAAME,CAAN,CAAA,CAAqB3O,CAAA,CAAQ2O,CAAR,CAH1B,CAIF,MAAOE,CAAP,CAAY,CAIZ,KAHIJ,EAAA,CAAME,CAAN,CAGEE,GAHqBD,CAGrBC,EAFJ,OAAOJ,CAAA,CAAME,CAAN,CAEHE,CAAAA,CAAN,CAJY,CAJd,OASU,CACRzP,CAAAoH,MAAA,EADQ,CAjBmB,CAuBjC9I,QAASA,EAAM,CAAC9D,CAAD,CAAKD,CAAL,CAAWmV,CAAX,CAAkB,CAAA,IAC3BC,EAAO,EAD
 oB,CAE3BpC,EAAUD,EAAA,CAAS9S,CAAT,CAFiB,CAG3B/F,CAH2B,CAGnBgB,CAHmB,CAI3BT,CAEAS,EAAA,CAAI,CAAR,KAAWhB,CAAX,CAAoB8Y,CAAA9Y,OAApB,CAAoCgB,CAApC,CAAwChB,CAAxC,CAAgDgB,CAAA,EAAhD,CAAqD,CACnDT,CAAA,CAAMuY,CAAA,CAAQ9X,CAAR,CACN,IAAmB,QAAnB,GAAI,MAAOT,EAAX,CACE,KAAM0L,GAAA,CAAgB,MAAhB,CACyE1L,CADzE,CAAN,CAGF2a,CAAAra,KAAA,CACEoa,CACA,EADUA,CAAAxa,eAAA,CAAsBF,CAAtB,CACV;AAAE0a,CAAA,CAAO1a,CAAP,CAAF,CACEsa,CAAA,CAAWta,CAAX,CAHJ,CANmD,CAYjDJ,CAAA,CAAQ4F,CAAR,CAAJ,GACEA,CADF,CACOA,CAAA,CAAG/F,CAAH,CADP,CAMA,OAAO+F,EAAAI,MAAA,CAASL,CAAT,CAAeoV,CAAf,CAxBwB,CAwCjC,MAAO,QACGrR,CADH,aAbPgQ,QAAoB,CAACsB,CAAD,CAAOF,CAAP,CAAe,CAAA,IAC7BG,EAAcA,QAAQ,EAAG,EADI,CAEnBC,CAIdD,EAAAE,UAAA,CAAyBA,CAAAnb,CAAA,CAAQgb,CAAR,CAAA,CAAgBA,CAAA,CAAKA,CAAAnb,OAAL,CAAmB,CAAnB,CAAhB,CAAwCmb,CAAxCG,WACzBC,EAAA,CAAW,IAAIH,CACfC,EAAA,CAAgBxR,CAAA,CAAOsR,CAAP,CAAaI,CAAb,CAAuBN,CAAvB,CAEhB,OAAOlY,EAAA,CAASsY,CAAT,CAAA,EAA2B7a,CAAA,CAAW6a,CAAX,CAA3B,CAAuDA,CAAvD,CAAuEE,CAV7C,CAa5B,KAGAV,CAHA,UAIKhC,EAJL,KAKA2C,QAAQ,CAACvS,CA
 AD,CAAO,CAClB,MAAO8Q,EAAAtZ,eAAA,CAA6BwI,CAA7B,CAAoC+Q,CAApC,CAAP,EAA8DY,CAAAna,eAAA,CAAqBwI,CAArB,CAD5C,CALf,CAjEuC,CApIX,IACjC8R,EAAgB,EADiB,CAEjCf,EAAiB,UAFgB,CAGjCzO,EAAO,EAH0B,CAIjC6O,EAAgB,IAAI3B,EAAJ,CAAY,EAAZ,CAAgB,CAAA,CAAhB,CAJiB,CAKjCsB,EAAgB,UACJ,UACIN,CAAA,CAAclN,CAAd,CADJ,SAEGkN,CAAA,CAActN,CAAd,CAFH,SAGGsN,CAAA,CAiDnBgC,QAAgB,CAACxS,CAAD,CAAOmC,CAAP,CAAoB,CAClC,MAAOe,EAAA,CAAQlD,CAAR,CAAc,CAAC,WAAD,CAAc,QAAQ,CAACyS,CAAD,CAAY,CACrD,MAAOA,EAAA7B,YAAA,CAAsBzO,CAAtB,CAD8C,CAAlC,CAAd,CAD2B,CAjDjB,CAHH,OAICqO,CAAA,CAsDjBtY,QAAc,CAAC8H,CAAD,CAAO3C,CAAP,CAAY,CAAE,MAAO6F,EAAA,CAAQlD,CAAR,CAAcrG,CAAA,CAAQ0D,CAAR,CAAd,CAAT,CAtDT,CAJD,UAKImT,CAAA,CAuDpBkC,QAAiB,CAAC1S,CAAD;AAAO9H,CAAP,CAAc,CAC7BkK,EAAA,CAAwBpC,CAAxB,CAA8B,UAA9B,CACA8Q,EAAA,CAAc9Q,CAAd,CAAA,CAAsB9H,CACtBya,EAAA,CAAc3S,CAAd,CAAA,CAAsB9H,CAHO,CAvDX,CALJ,WAkEhB0a,QAAkB,CAACf,CAAD,CAAcgB,CAAd,CAAuB,CAAA,IACnCC,EAAenC,CAAAS,IAAA,CAAqBS,CAArB,CAAmCd,CAAnC,CADoB,CAEnCgC,EAAWD,CAAAjC,KAEfiC,EAAAjC,KAAA,CAAoBmC,QAAQ,EAAG,C
 AC7B,IAAIC,EAAeC,CAAAtS,OAAA,CAAwBmS,CAAxB,CAAkCD,CAAlC,CACnB,OAAOI,EAAAtS,OAAA,CAAwBiS,CAAxB,CAAiC,IAAjC,CAAuC,WAAYI,CAAZ,CAAvC,CAFsB,CAJQ,CAlEzB,CADI,CALiB,CAejCtC,EAAoBG,CAAA2B,UAApB9B,CACIe,CAAA,CAAuBZ,CAAvB,CAAsC,QAAQ,EAAG,CAC/C,KAAM9N,GAAA,CAAgB,MAAhB,CAAiDV,CAAA9J,KAAA,CAAU,MAAV,CAAjD,CAAN,CAD+C,CAAjD,CAhB6B,CAmBjCma,EAAgB,EAnBiB,CAoBjCO,EAAoBP,CAAAF,UAApBS,CACIxB,CAAA,CAAuBiB,CAAvB,CAAsC,QAAQ,CAACQ,CAAD,CAAc,CACtD7P,CAAAA,CAAWqN,CAAAS,IAAA,CAAqB+B,CAArB,CAAmCpC,CAAnC,CACf,OAAOmC,EAAAtS,OAAA,CAAwB0C,CAAAuN,KAAxB,CAAuCvN,CAAvC,CAFmD,CAA5D,CAMRnM,EAAA,CAAQ8Z,CAAA,CAAYV,CAAZ,CAAR,CAAoC,QAAQ,CAACzT,CAAD,CAAK,CAAEoW,CAAAtS,OAAA,CAAwB9D,CAAxB,EAA8BtD,CAA9B,CAAF,CAAjD,CAEA,OAAO0Z,EA7B8B,CAkQvCpM,QAASA,GAAqB,EAAG,CAE/B,IAAIsM,EAAuB,CAAA,CAE3B,KAAAC,qBAAA,CAA4BC,QAAQ,EAAG,CACrCF,CAAA,CAAuB,CAAA,CADc,CAIvC,KAAAvC,KAAA,CAAY,CAAC,SAAD,CAAY,WAAZ,CAAyB,YAAzB,CAAuC,QAAQ,CAAC0C,CAAD,CAAUC,CAAV,CAAqBC,CAArB,CAAiC,CAO1FC,QAASA,EAAc,CAAC5Y,CAAD,CAAO,CAC5B,IAAIa,EAAS,IACbxE;CAAA,CAAQ2D,CAAR,CAAc
 ,QAAQ,CAACmD,CAAD,CAAU,CACzBtC,CAAL,EAA+C,GAA/C,GAAeoC,CAAA,CAAUE,CAAAzD,SAAV,CAAf,GAAoDmB,CAApD,CAA6DsC,CAA7D,CAD8B,CAAhC,CAGA,OAAOtC,EALqB,CAQ9BgY,QAASA,EAAM,EAAG,CAAA,IACZC,EAAOJ,CAAAI,KAAA,EADK,CACaC,CAGxBD,EAAL,CAGK,CAAKC,CAAL,CAAWpd,CAAAwJ,eAAA,CAAwB2T,CAAxB,CAAX,EAA2CC,CAAAC,eAAA,EAA3C,CAGA,CAAKD,CAAL,CAAWH,CAAA,CAAejd,CAAAsd,kBAAA,CAA2BH,CAA3B,CAAf,CAAX,EAA8DC,CAAAC,eAAA,EAA9D,CAGa,KAHb,GAGIF,CAHJ,EAGoBL,CAAAS,SAAA,CAAiB,CAAjB,CAAoB,CAApB,CATzB,CAAWT,CAAAS,SAAA,CAAiB,CAAjB,CAAoB,CAApB,CAJK,CAdlB,IAAIvd,EAAW8c,CAAA9c,SAgCX2c,EAAJ,EACEK,CAAAhY,OAAA,CAAkBwY,QAAwB,EAAG,CAAC,MAAOT,EAAAI,KAAA,EAAR,CAA7C,CACEM,QAA8B,EAAG,CAC/BT,CAAAjY,WAAA,CAAsBmY,CAAtB,CAD+B,CADnC,CAMF,OAAOA,EAxCmF,CAAhF,CARmB,CA0SjCrL,QAASA,GAAuB,EAAE,CAChC,IAAAuI,KAAA,CAAY,CAAC,OAAD,CAAU,UAAV,CAAsB,QAAQ,CAACsD,CAAD,CAAQC,CAAR,CAAkB,CAC1D,MAAOD,EAAAE,UACA,CAAH,QAAQ,CAACvX,CAAD,CAAK,CAAE,MAAOqX,EAAA,CAAMrX,CAAN,CAAT,CAAV,CACH,QAAQ,CAACA,CAAD,CAAK,CACb,MAAOsX,EAAA,CAAStX,CAAT,CAAa,CAAb,CAAgB,CAAA,CAAhB,CADM,CAHyC,C
 AAhD,CADoB,CAgClCwX,QAASA,GAAO,CAAC9d,CAAD,CAASC,CAAT,CAAmB8d,CAAnB,CAAyBC,CAAzB,CAAmC,CAsBjDC,QAASA,EAA0B,CAAC3X,CAAD,CAAK,CACtC,GAAI,CACFA,CAAAI,MAAA,CAAS,IAAT;AAjwGGF,EAAAvF,KAAA,CAiwGsBwB,SAjwGtB,CAiwGiCgE,CAjwGjC,CAiwGH,CADE,CAAJ,OAEU,CAER,GADAyX,CAAA,EACI,CAA4B,CAA5B,GAAAA,CAAJ,CACE,IAAA,CAAMC,CAAA5d,OAAN,CAAA,CACE,GAAI,CACF4d,CAAAC,IAAA,EAAA,EADE,CAEF,MAAOvW,CAAP,CAAU,CACVkW,CAAAM,MAAA,CAAWxW,CAAX,CADU,CANR,CAH4B,CAmExCyW,QAASA,EAAW,CAACC,CAAD,CAAWC,CAAX,CAAuB,CACxCC,SAASA,GAAK,EAAG,CAChB9d,CAAA,CAAQ+d,CAAR,CAAiB,QAAQ,CAACC,CAAD,CAAQ,CAAEA,CAAA,EAAF,CAAjC,CACAC,EAAA,CAAcJ,CAAA,CAAWC,EAAX,CAAkBF,CAAlB,CAFE,CAAjBE,CAAA,EADwC,CAuE3CI,QAASA,EAAa,EAAG,CACvBC,CAAA,CAAc,IACVC,EAAJ,EAAsB1Y,CAAA2Y,IAAA,EAAtB,GAEAD,CACA,CADiB1Y,CAAA2Y,IAAA,EACjB,CAAAre,CAAA,CAAQse,EAAR,CAA4B,QAAQ,CAACC,CAAD,CAAW,CAC7CA,CAAA,CAAS7Y,CAAA2Y,IAAA,EAAT,CAD6C,CAA/C,CAHA,CAFuB,CAhKwB,IAC7C3Y,EAAO,IADsC,CAE7C8Y,EAAclf,CAAA,CAAS,CAAT,CAF+B,CAG7C0D,EAAW3D,CAAA2D,SAHkC,CAI7Cyb,EAAUpf,CAAAof,QAJmC,CAK7CZ,EAAaxe,CA
 AAwe,WALgC,CAM7Ca,EAAerf,CAAAqf,aAN8B,CAO7CC,EAAkB,EAEtBjZ,EAAAkZ,OAAA,CAAc,CAAA,CAEd,KAAIrB,EAA0B,CAA9B,CACIC,EAA8B,EAGlC9X,EAAAmZ,6BAAA,CAAoCvB,CACpC5X,EAAAoZ,6BAAA,CAAoCC,QAAQ,EAAG,CAAExB,CAAA,EAAF,CA6B/C7X,EAAAsZ,gCAAA,CAAuCC,QAAQ,CAACC,CAAD,CAAW,CAIxDlf,CAAA,CAAQ+d,CAAR,CAAiB,QAAQ,CAACC,CAAD,CAAQ,CAAEA,CAAA,EAAF,CAAjC,CAEgC,EAAhC,GAAIT,CAAJ,CACE2B,CAAA,EADF,CAGE1B,CAAA/c,KAAA,CAAiCye,CAAjC,CATsD,CA7CT;IA6D7CnB,EAAU,EA7DmC,CA8D7CE,CAaJvY,EAAAyZ,UAAA,CAAiBC,QAAQ,CAACzZ,CAAD,CAAK,CACxBlD,CAAA,CAAYwb,CAAZ,CAAJ,EAA8BN,CAAA,CAAY,GAAZ,CAAiBE,CAAjB,CAC9BE,EAAAtd,KAAA,CAAakF,CAAb,CACA,OAAOA,EAHqB,CA3EmB,KAoG7CyY,EAAiBpb,CAAAqc,KApG4B,CAqG7CC,EAAchgB,CAAAkE,KAAA,CAAc,MAAd,CArG+B,CAsG7C2a,EAAc,IAqBlBzY,EAAA2Y,IAAA,CAAWkB,QAAQ,CAAClB,CAAD,CAAM7W,CAAN,CAAe,CAE5BxE,CAAJ,GAAiB3D,CAAA2D,SAAjB,GAAkCA,CAAlC,CAA6C3D,CAAA2D,SAA7C,CACIyb,EAAJ,GAAgBpf,CAAAof,QAAhB,GAAgCA,CAAhC,CAA0Cpf,CAAAof,QAA1C,CAGA,IAAIJ,CAAJ,CACE,IAAID,CAAJ,EAAsBC,CAAtB,CAiBA,MAhBAD,EAgBO1Y,CAhBU2Y,CAgBV3Y,CAfH2X,CAAAoB,QAAJ,CA
 CMjX,CAAJ,CAAaiX,CAAAe,aAAA,CAAqB,IAArB,CAA2B,EAA3B,CAA+BnB,CAA/B,CAAb,EAEEI,CAAAgB,UAAA,CAAkB,IAAlB,CAAwB,EAAxB,CAA4BpB,CAA5B,CAEA,CAAAiB,CAAA/b,KAAA,CAAiB,MAAjB,CAAyB+b,CAAA/b,KAAA,CAAiB,MAAjB,CAAzB,CAJF,CADF,EAQE4a,CACA,CADcE,CACd,CAAI7W,CAAJ,CACExE,CAAAwE,QAAA,CAAiB6W,CAAjB,CADF,CAGErb,CAAAqc,KAHF,CAGkBhB,CAZpB,CAeO3Y,CAAAA,CAjBP,CADF,IAwBE,OAAOyY,EAAP,EAAsBnb,CAAAqc,KAAA7X,QAAA,CAAsB,MAAtB,CAA6B,GAA7B,CA9BQ,CA3He,KA6J7C8W,GAAqB,EA7JwB,CA8J7CoB,EAAgB,CAAA,CAiCpBha,EAAAia,YAAA,CAAmBC,QAAQ,CAACV,CAAD,CAAW,CAEpC,GAAI,CAACQ,CAAL,CAAoB,CAMlB,GAAIrC,CAAAoB,QAAJ,CAAsB1X,CAAA,CAAO1H,CAAP,CAAAwgB,GAAA,CAAkB,UAAlB,CAA8B3B,CAA9B,CAEtB,IAAIb,CAAAyC,WAAJ,CAAyB/Y,CAAA,CAAO1H,CAAP,CAAAwgB,GAAA,CAAkB,YAAlB,CAAgC3B,CAAhC,CAAzB;IAEKxY,EAAAyZ,UAAA,CAAejB,CAAf,CAELwB,EAAA,CAAgB,CAAA,CAZE,CAepBpB,EAAA7d,KAAA,CAAwBye,CAAxB,CACA,OAAOA,EAlB6B,CAkCtCxZ,EAAAqa,SAAA,CAAgBC,QAAQ,EAAG,CACzB,IAAIX,EAAOC,CAAA/b,KAAA,CAAiB,MAAjB,CACX,OAAO8b,EAAA,CAAOA,CAAA7X,QAAA,CAAa,wBAAb,CAAuC,EAAvC,CAAP,CAAoD,EAFlC,CAQ3B,K
 AAIyY,EAAc,EAAlB,CACIC,GAAmB,EADvB,CAEIC,EAAaza,CAAAqa,SAAA,EAsBjBra,EAAA0a,QAAA,CAAeC,QAAQ,CAACxX,CAAD,CAAO9H,CAAP,CAAc,CAAA,IAE/Buf,CAF+B,CAEJC,CAFI,CAEI3f,CAFJ,CAEOK,CAE1C,IAAI4H,CAAJ,CACM9H,CAAJ,GAAcxB,CAAd,CACEif,CAAA+B,OADF,CACuBC,MAAA,CAAO3X,CAAP,CADvB,CACsC,SADtC,CACkDsX,CADlD,CAE0B,wCAF1B,CAIMrgB,CAAA,CAASiB,CAAT,CAJN,GAKIuf,CAOA,CAPgB1gB,CAAA4e,CAAA+B,OAAA3gB,CAAqB4gB,MAAA,CAAO3X,CAAP,CAArBjJ,CAAoC,GAApCA,CAA0C4gB,MAAA,CAAOzf,CAAP,CAA1CnB,CACM,QADNA,CACiBugB,CADjBvgB,QAOhB,CANsD,CAMtD,CAAmB,IAAnB,CAAI0gB,CAAJ,EACElD,CAAAqD,KAAA,CAAU,UAAV,CAAsB5X,CAAtB,CACE,6DADF,CAEEyX,CAFF,CAEiB,iBAFjB,CAbN,CADF,KAoBO,CACL,GAAI9B,CAAA+B,OAAJ,GAA2BL,EAA3B,CAKE,IAJAA,EAIK,CAJc1B,CAAA+B,OAId;AAHLG,CAGK,CAHSR,EAAApY,MAAA,CAAuB,IAAvB,CAGT,CAFLmY,CAEK,CAFS,EAET,CAAArf,CAAA,CAAI,CAAT,CAAYA,CAAZ,CAAgB8f,CAAA9gB,OAAhB,CAAoCgB,CAAA,EAApC,CACE2f,CAEA,CAFSG,CAAA,CAAY9f,CAAZ,CAET,CADAK,CACA,CADQsf,CAAA3c,QAAA,CAAe,GAAf,CACR,CAAY,CAAZ,CAAI3C,CAAJ,GACE4H,CAIA,CAJO8X,QAAA,CAASJ,CAAAK,UAAA,CAAiB,CAAjB,CAA
 oB3f,CAApB,CAAT,CAIP,CAAIgf,CAAA,CAAYpX,CAAZ,CAAJ,GAA0BtJ,CAA1B,GACE0gB,CAAA,CAAYpX,CAAZ,CADF,CACsB8X,QAAA,CAASJ,CAAAK,UAAA,CAAiB3f,CAAjB,CAAyB,CAAzB,CAAT,CADtB,CALF,CAWJ,OAAOgf,EApBF,CAxB4B,CA+DrCva,EAAAmb,MAAA,CAAaC,QAAQ,CAACnb,CAAD,CAAKob,CAAL,CAAY,CAC/B,IAAIC,CACJzD,EAAA,EACAyD,EAAA,CAAYnD,CAAA,CAAW,QAAQ,EAAG,CAChC,OAAOc,CAAA,CAAgBqC,CAAhB,CACP1D,EAAA,CAA2B3X,CAA3B,CAFgC,CAAtB,CAGTob,CAHS,EAGA,CAHA,CAIZpC,EAAA,CAAgBqC,CAAhB,CAAA,CAA6B,CAAA,CAC7B,OAAOA,EARwB,CAsBjCtb,EAAAmb,MAAAI,OAAA,CAAoBC,QAAQ,CAACC,CAAD,CAAU,CACpC,MAAIxC,EAAA,CAAgBwC,CAAhB,CAAJ,EACE,OAAOxC,CAAA,CAAgBwC,CAAhB,CAGA,CAFPzC,CAAA,CAAayC,CAAb,CAEO,CADP7D,CAAA,CAA2Bjb,CAA3B,CACO,CAAA,CAAA,CAJT,EAMO,CAAA,CAP6B,CAtVW,CAkWnDwN,QAASA,GAAgB,EAAE,CACzB,IAAA6J,KAAA,CAAY,CAAC,SAAD,CAAY,MAAZ,CAAoB,UAApB,CAAgC,WAAhC,CACR,QAAQ,CAAE0C,CAAF,CAAagB,CAAb,CAAqBC,CAArB,CAAiC+D,CAAjC,CAA2C,CACjD,MAAO,KAAIjE,EAAJ,CAAYf,CAAZ,CAAqBgF,CAArB,CAAgChE,CAAhC,CAAsCC,CAAtC,CAD0C,CAD3C,CADa,CAsF3BvN,QAASA,GAAqB,EAAG,CAE/B,IAAA4J,KAAA,CAAY2H,QAA
 Q,EAAG,CAGrBC,QAASA,EAAY,CAACC,CAAD,CAAUC,CAAV,CAAmB,CAwMtCC,QAASA,EAAO,CAACC,CAAD,CAAQ,CAClBA,CAAJ,EAAaC,CAAb,GACOC,CAAL,CAEWA,CAFX,EAEuBF,CAFvB;CAGEE,CAHF,CAGaF,CAAAG,EAHb,EACED,CADF,CACaF,CAQb,CAHAI,CAAA,CAAKJ,CAAAG,EAAL,CAAcH,CAAAK,EAAd,CAGA,CAFAD,CAAA,CAAKJ,CAAL,CAAYC,CAAZ,CAEA,CADAA,CACA,CADWD,CACX,CAAAC,CAAAE,EAAA,CAAa,IAVf,CADsB,CAmBxBC,QAASA,EAAI,CAACE,CAAD,CAAYC,CAAZ,CAAuB,CAC9BD,CAAJ,EAAiBC,CAAjB,GACMD,CACJ,GADeA,CAAAD,EACf,CAD6BE,CAC7B,EAAIA,CAAJ,GAAeA,CAAAJ,EAAf,CAA6BG,CAA7B,CAFF,CADkC,CA1NpC,GAAIT,CAAJ,GAAeW,EAAf,CACE,KAAM1iB,EAAA,CAAO,eAAP,CAAA,CAAwB,KAAxB,CAAkE+hB,CAAlE,CAAN,CAFoC,IAKlCY,EAAO,CAL2B,CAMlCC,EAAQxgB,CAAA,CAAO,EAAP,CAAW4f,CAAX,CAAoB,IAAKD,CAAL,CAApB,CAN0B,CAOlCzX,EAAO,EAP2B,CAQlCuY,EAAYb,CAAZa,EAAuBb,CAAAa,SAAvBA,EAA4CC,MAAAC,UARV,CASlCC,EAAU,EATwB,CAUlCb,EAAW,IAVuB,CAWlCC,EAAW,IAyCf,OAAOM,EAAA,CAAOX,CAAP,CAAP,CAAyB,KAoBlB/I,QAAQ,CAACrY,CAAD,CAAMY,CAAN,CAAa,CACxB,GAAIshB,CAAJ,CAAeC,MAAAC,UAAf,CAAiC,CAC/B,IAAIE,EAAWD,CAAA,CAAQriB,CAAR,CAAXsiB,GAA4BD,CAAA,
 CAAQriB,CAAR,CAA5BsiB,CAA2C,KAAMtiB,CAAN,CAA3CsiB,CAEJhB,EAAA,CAAQgB,CAAR,CAH+B,CAMjC,GAAI,CAAAhgB,CAAA,CAAY1B,CAAZ,CAAJ,CAQA,MAPMZ,EAOCY,GAPM+I,EAON/I,EAPaohB,CAAA,EAObphB,CANP+I,CAAA,CAAK3J,CAAL,CAMOY,CANKA,CAMLA,CAJHohB,CAIGphB,CAJIshB,CAIJthB,EAHL,IAAA2hB,OAAA,CAAYd,CAAAzhB,IAAZ,CAGKY,CAAAA,CAfiB,CApBH,KAiDlBkZ,QAAQ,CAAC9Z,CAAD,CAAM,CACjB,GAAIkiB,CAAJ,CAAeC,MAAAC,UAAf,CAAiC,CAC/B,IAAIE,EAAWD,CAAA,CAAQriB,CAAR,CAEf,IAAI,CAACsiB,CAAL,CAAe,MAEfhB,EAAA,CAAQgB,CAAR,CAL+B,CAQjC,MAAO3Y,EAAA,CAAK3J,CAAL,CATU,CAjDI,QAwEfuiB,QAAQ,CAACviB,CAAD,CAAM,CACpB,GAAIkiB,CAAJ,CAAeC,MAAAC,UAAf,CAAiC,CAC/B,IAAIE,EAAWD,CAAA,CAAQriB,CAAR,CAEf,IAAI,CAACsiB,CAAL,CAAe,MAEXA;CAAJ,EAAgBd,CAAhB,GAA0BA,CAA1B,CAAqCc,CAAAV,EAArC,CACIU,EAAJ,EAAgBb,CAAhB,GAA0BA,CAA1B,CAAqCa,CAAAZ,EAArC,CACAC,EAAA,CAAKW,CAAAZ,EAAL,CAAgBY,CAAAV,EAAhB,CAEA,QAAOS,CAAA,CAAQriB,CAAR,CATwB,CAYjC,OAAO2J,CAAA,CAAK3J,CAAL,CACPgiB,EAAA,EAdoB,CAxEC,WAkGZQ,QAAQ,EAAG,CACpB7Y,CAAA,CAAO,EACPqY,EAAA,CAAO,CACPK,EAAA,CAAU,EACVb,EAAA,CAAWC,CAAX,CAAs
 B,IAJF,CAlGC,SAmHdgB,QAAQ,EAAG,CAGlBJ,CAAA,CADAJ,CACA,CAFAtY,CAEA,CAFO,IAGP,QAAOoY,CAAA,CAAOX,CAAP,CAJW,CAnHG,MA2IjBsB,QAAQ,EAAG,CACf,MAAOjhB,EAAA,CAAO,EAAP,CAAWwgB,CAAX,CAAkB,MAAOD,CAAP,CAAlB,CADQ,CA3IM,CApDa,CAFxC,IAAID,EAAS,EA+ObZ,EAAAuB,KAAA,CAAoBC,QAAQ,EAAG,CAC7B,IAAID,EAAO,EACX7iB,EAAA,CAAQkiB,CAAR,CAAgB,QAAQ,CAAC1H,CAAD,CAAQ+G,CAAR,CAAiB,CACvCsB,CAAA,CAAKtB,CAAL,CAAA,CAAgB/G,CAAAqI,KAAA,EADuB,CAAzC,CAGA,OAAOA,EALsB,CAmB/BvB,EAAArH,IAAA,CAAmB8I,QAAQ,CAACxB,CAAD,CAAU,CACnC,MAAOW,EAAA,CAAOX,CAAP,CAD4B,CAKrC,OAAOD,EAxQc,CAFQ,CAwTjCvQ,QAASA,GAAsB,EAAG,CAChC,IAAA2I,KAAA,CAAY,CAAC,eAAD,CAAkB,QAAQ,CAACsJ,CAAD,CAAgB,CACpD,MAAOA,EAAA,CAAc,WAAd,CAD6C,CAA1C,CADoB,CA8flC7V,QAASA,GAAgB,CAAC5D,CAAD,CAAW0Z,CAAX,CAAkC,CAAA,IACrDC,EAAgB,EADqC,CAErDC,EAAS,WAF4C,CAGrDC,EAA2B,wCAH0B,CAIrDC,EAAyB,gCAJ4B;AASrDC,EAA4B,yBAiB/B,KAAAlW,UAAA,CAAiBmW,QAASC,EAAiB,CAAC3a,CAAD,CAAO4a,CAAP,CAAyB,CACnExY,EAAA,CAAwBpC,CAAxB,CAA8B,WAA9B,CACI/I,EAAA,CAAS+I,CAAT,CAAJ,EACE8B,EAAA,CAAU8Y,CAAV,CAA4B,kBAA5B,CA2BA,CA1
 BKP,CAAA7iB,eAAA,CAA6BwI,CAA7B,CA0BL,GAzBEqa,CAAA,CAAcra,CAAd,CACA,CADsB,EACtB,CAAAU,CAAAwC,QAAA,CAAiBlD,CAAjB,CAAwBsa,CAAxB,CAAgC,CAAC,WAAD,CAAc,mBAAd,CAC9B,QAAQ,CAAC7H,CAAD,CAAYoI,CAAZ,CAA+B,CACrC,IAAIC,EAAa,EACjB3jB,EAAA,CAAQkjB,CAAA,CAAcra,CAAd,CAAR,CAA6B,QAAQ,CAAC4a,CAAD,CAAmBxiB,CAAnB,CAA0B,CAC7D,GAAI,CACF,IAAImM,EAAYkO,CAAA7R,OAAA,CAAiBga,CAAjB,CACZrjB,EAAA,CAAWgN,CAAX,CAAJ,CACEA,CADF,CACc,SAAW5K,CAAA,CAAQ4K,CAAR,CAAX,CADd,CAEYzD,CAAAyD,CAAAzD,QAFZ,EAEiCyD,CAAA0U,KAFjC,GAGE1U,CAAAzD,QAHF,CAGsBnH,CAAA,CAAQ4K,CAAA0U,KAAR,CAHtB,CAKA1U,EAAAwW,SAAA,CAAqBxW,CAAAwW,SAArB,EAA2C,CAC3CxW,EAAAnM,MAAA,CAAkBA,CAClBmM,EAAAvE,KAAA,CAAiBuE,CAAAvE,KAAjB,EAAmCA,CACnCuE,EAAAyW,QAAA,CAAoBzW,CAAAyW,QAApB,EAA0CzW,CAAA0W,WAA1C,EAAkE1W,CAAAvE,KAClEuE,EAAA2W,SAAA,CAAqB3W,CAAA2W,SAArB,EAA2C,GAC3CJ,EAAAljB,KAAA,CAAgB2M,CAAhB,CAZE,CAaF,MAAOlG,CAAP,CAAU,CACVwc,CAAA,CAAkBxc,CAAlB,CADU,CAdiD,CAA/D,CAkBA,OAAOyc,EApB8B,CADT,CAAhC,CAwBF,EAAAT,CAAA,CAAcra,CAAd,CAAApI,KAAA,CAAyBgjB,CAAzB,CA5BF,EA8BEzjB,CAAA,CAA
 Q6I,CAAR,CAAchI,EAAA,CAAc2iB,CAAd,CAAd,CAEF;MAAO,KAlC4D,CA0DrE,KAAAQ,2BAAA,CAAkCC,QAAQ,CAACC,CAAD,CAAS,CACjD,MAAIxhB,EAAA,CAAUwhB,CAAV,CAAJ,EACEjB,CAAAe,2BAAA,CAAiDE,CAAjD,CACO,CAAA,IAFT,EAISjB,CAAAe,2BAAA,EALwC,CA8BnD,KAAAG,4BAAA,CAAmCC,QAAQ,CAACF,CAAD,CAAS,CAClD,MAAIxhB,EAAA,CAAUwhB,CAAV,CAAJ,EACEjB,CAAAkB,4BAAA,CAAkDD,CAAlD,CACO,CAAA,IAFT,EAISjB,CAAAkB,4BAAA,EALyC,CASpD,KAAAzK,KAAA,CAAY,CACF,WADE,CACW,cADX,CAC2B,mBAD3B,CACgD,OADhD,CACyD,gBADzD,CAC2E,QAD3E,CAEF,aAFE,CAEa,YAFb,CAE2B,WAF3B,CAEwC,MAFxC,CAEgD,UAFhD,CAE4D,eAF5D,CAGV,QAAQ,CAAC4B,CAAD,CAAc+I,CAAd,CAA8BX,CAA9B,CAAmDY,CAAnD,CAA4DC,CAA5D,CAA8EC,CAA9E,CACCC,CADD,CACgBnI,CADhB,CAC8B8E,CAD9B,CAC2CsD,CAD3C,CACmDC,CADnD,CAC+DC,CAD/D,CAC8E,CAqLtFjb,QAASA,EAAO,CAACkb,CAAD,CAAgBC,CAAhB,CAA8BC,CAA9B,CAA2CC,CAA3C,CACIC,CADJ,CAC4B,CACpCJ,CAAN;AAA+B9d,CAA/B,GAGE8d,CAHF,CAGkB9d,CAAA,CAAO8d,CAAP,CAHlB,CAOA7kB,EAAA,CAAQ6kB,CAAR,CAAuB,QAAQ,CAACzhB,CAAD,CAAOnC,CAAP,CAAa,CACrB,CAArB,EAAImC,CAAAvD,SAAJ,EAA0CuD,CAAA8hB,UAAA3d,MAAA,CAAqB,KAArB,
 CAA1C,GACEsd,CAAA,CAAc5jB,CAAd,CADF,CACgC8F,CAAA,CAAO3D,CAAP,CAAAqQ,KAAA,CAAkB,eAAlB,CAAAtR,OAAA,EAAA,CAA4C,CAA5C,CADhC,CAD0C,CAA5C,CAKA,KAAIgjB,EACIC,CAAA,CAAaP,CAAb,CAA4BC,CAA5B,CAA0CD,CAA1C,CACaE,CADb,CAC0BC,CAD1B,CAC2CC,CAD3C,CAERI,GAAA,CAAaR,CAAb,CAA4B,UAA5B,CACA,OAAOS,SAAqB,CAAC5b,CAAD,CAAQ6b,CAAR,CAAwBC,CAAxB,CAA+CC,CAA/C,CAAuE,CACjG9a,EAAA,CAAUjB,CAAV,CAAiB,OAAjB,CAGA,KAAIgc,EAAYH,CACA,CAAZI,EAAA3e,MAAA1G,KAAA,CAA2BukB,CAA3B,CAAY,CACZA,CAEJ7kB,EAAA,CAAQwlB,CAAR,CAA+B,QAAQ,CAACrK,CAAD,CAAWtS,CAAX,CAAiB,CACtD6c,CAAA5b,KAAA,CAAe,GAAf,CAAqBjB,CAArB,CAA4B,YAA5B,CAA0CsS,CAA1C,CADsD,CAAxD,CAKQva,EAAAA,CAAI,CAAZ,KAAI,IAAW6V,EAAKiP,CAAA9lB,OAApB,CAAsCgB,CAAtC,CAAwC6V,CAAxC,CAA4C7V,CAAA,EAA5C,CAAiD,CAC/C,IACIf,EADO6lB,CAAAtiB,CAAUxC,CAAVwC,CACIvD,SACE,EAAjB,GAAIA,CAAJ,EAAiD,CAAjD,GAAoCA,CAApC,EACE6lB,CAAAE,GAAA,CAAahlB,CAAb,CAAAkJ,KAAA,CAAqB,QAArB,CAA+BJ,CAA/B,CAJ6C,CAQ7C6b,CAAJ,EAAoBA,CAAA,CAAeG,CAAf,CAA0Bhc,CAA1B,CAChByb,EAAJ,EAAqBA,CAAA,CAAgBzb,CAAhB,CAAuBgc,CAAvB,CAAkCA,CAAlC,CAA6
 CD,CAA7C,CACrB,OAAOC,EAvB0F,CAjBzD,CA4C5CL,QAASA,GAAY,CAACQ,CAAD,CAAW5c,CAAX,CAAsB,CACzC,GAAI,CACF4c,CAAAC,SAAA,CAAkB7c,CAAlB,CADE,CAEF,MAAM/B,CAAN,CAAS,EAH8B,CAwB3Cke,QAASA,EAAY,CAACW,CAAD,CAAWjB,CAAX,CAAyBkB,CAAzB,CAAuCjB,CAAvC,CAAoDC,CAApD,CACGC,CADH,CAC2B,CAsC9CE,QAASA,EAAe,CAACzb,CAAD,CAAQqc,CAAR,CAAkBC,CAAlB,CAAgCP,CAAhC,CAAyD,CAAA,IAC/DQ,CAD+D,CAClD7iB,CADkD,CAC5C8iB,CAD4C,CACrCC,CADqC,CACzBvlB,CADyB;AACtB6V,CADsB,CAClBoL,CAGzDuE,EAAAA,CAAiBL,CAAAnmB,OAArB,KACIymB,EAAqBC,KAAJ,CAAUF,CAAV,CACrB,KAAKxlB,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgBwlB,CAAhB,CAAgCxlB,CAAA,EAAhC,CACEylB,CAAA,CAAezlB,CAAf,CAAA,CAAoBmlB,CAAA,CAASnlB,CAAT,CAGXihB,EAAP,CAAAjhB,CAAA,CAAI,CAAR,KAAkB6V,CAAlB,CAAuB8P,CAAA3mB,OAAvB,CAAuCgB,CAAvC,CAA2C6V,CAA3C,CAA+CoL,CAAA,EAA/C,CACEze,CAKA,CALOijB,CAAA,CAAexE,CAAf,CAKP,CAJA2E,CAIA,CAJaD,CAAA,CAAQ3lB,CAAA,EAAR,CAIb,CAHAqlB,CAGA,CAHcM,CAAA,CAAQ3lB,CAAA,EAAR,CAGd,CAFAslB,CAEA,CAFQnf,CAAA,CAAO3D,CAAP,CAER,CAAIojB,CAAJ,EACMA,CAAA9c,MAAJ,EACEyc,CACA,CADazc,CAAA+c,KAAA,EACb,CA
 AAP,CAAApc,KAAA,CAAW,QAAX,CAAqBqc,CAArB,CAFF,EAIEA,CAJF,CAIezc,CAgBf,CAZEgd,CAYF,CAbKF,CAAAG,wBAAL,CAC2BC,CAAA,CAAwBld,CAAxB,CAA+B8c,CAAAK,WAA/B,CAAsDpB,CAAtD,CAD3B,CAGYqB,CAAAN,CAAAM,sBAAL,EAAyCrB,CAAzC,CACoBA,CADpB,CAGKA,CAAAA,CAAL,EAAgCX,CAAhC,CACoB8B,CAAA,CAAwBld,CAAxB,CAA+Bob,CAA/B,CADpB,CAIoB,IAG3B,CAAA0B,CAAA,CAAWP,CAAX,CAAwBE,CAAxB,CAAoC/iB,CAApC,CAA0C4iB,CAA1C,CAAwDU,CAAxD,CArBF,EAuBWT,CAvBX,EAwBEA,CAAA,CAAYvc,CAAZ,CAAmBtG,CAAA+Q,WAAnB,CAAoC5U,CAApC,CAA+CkmB,CAA/C,CAxC2E,CAlCjF,IAJ8C,IAC1Cc,EAAU,EADgC,CAE1CQ,CAF0C,CAEnCpD,CAFmC,CAEXxP,CAFW,CAEc6S,CAFd,CAIrCpmB,EAAI,CAAb,CAAgBA,CAAhB,CAAoBmlB,CAAAnmB,OAApB,CAAqCgB,CAAA,EAArC,CACEmmB,CA2BA,CA3BQ,IAAIE,EA2BZ,CAxBAtD,CAwBA,CAxBauD,EAAA,CAAkBnB,CAAA,CAASnlB,CAAT,CAAlB,CAA+B,EAA/B,CAAmCmmB,CAAnC,CAAgD,CAAN,GAAAnmB,CAAA,CAAUmkB,CAAV,CAAwBxlB,CAAlE,CACmBylB,CADnB,CAwBb,EArBAwB,CAqBA,CArBc7C,CAAA/jB,OACD,CAAPunB,CAAA,CAAsBxD,CAAtB,CAAkCoC,CAAA,CAASnlB,CAAT,CAAlC,CAA+CmmB,CAA/C,CAAsDjC,CAAtD,CAAoEkB,CAApE,CACwB,IADxB,CAC8B,EAD9B,CACk
 C,EADlC,CACsCf,CADtC,CAAO,CAEP,IAkBN,GAhBkBuB,CAAA9c,MAgBlB,EAfE2b,EAAA,CAAate,CAAA,CAAOgf,CAAA,CAASnlB,CAAT,CAAP,CAAb,CAAkC,UAAlC,CAeF,CAZAqlB,CAYA,CAZeO,CAGD,EAHeA,CAAAY,SAGf,EAFA,EAAEjT,CAAF,CAAe4R,CAAA,CAASnlB,CAAT,CAAAuT,WAAf,CAEA,EADA,CAACA,CAAAvU,OACD;AAAR,IAAQ,CACRwlB,CAAA,CAAajR,CAAb,CACGqS,CAAA,EACEA,CAAAG,wBADF,EACwC,CAACH,CAAAM,sBADzC,GAEON,CAAAK,WAFP,CAEgC/B,CAHnC,CAQN,CAHAyB,CAAA9lB,KAAA,CAAa+lB,CAAb,CAAyBP,CAAzB,CAGA,CAFAe,CAEA,CAFcA,CAEd,EAF6BR,CAE7B,EAF2CP,CAE3C,CAAAhB,CAAA,CAAyB,IAI3B,OAAO+B,EAAA,CAAc7B,CAAd,CAAgC,IApCO,CAoFhDyB,QAASA,EAAuB,CAACld,CAAD,CAAQob,CAAR,CAAsBuC,CAAtB,CAAiD,CAkB/E,MAhBwBC,SAAQ,CAACC,CAAD,CAAmBC,CAAnB,CAA4BC,CAA5B,CAAyC,CACvE,IAAIC,EAAe,CAAA,CAEdH,EAAL,GACEA,CAEA,CAFmB7d,CAAA+c,KAAA,EAEnB,CAAAiB,CAAA,CADAH,CAAAI,cACA,CADiC,CAAA,CAFnC,CAMI3gB,EAAAA,CAAQ8d,CAAA,CAAayC,CAAb,CAA+BC,CAA/B,CAAwCC,CAAxC,CAAqDJ,CAArD,CACZ,IAAIK,CAAJ,CACE1gB,CAAA6Y,GAAA,CAAS,UAAT,CAAqB,QAAQ,EAAG,CAAE0H,CAAAhS,SAAA,EAAF,CAAhC,CAEF,OAAOvO,EAbgE,CAFM,CA+BjFkgB,QAASA,G
 AAiB,CAAC9jB,CAAD,CAAOugB,CAAP,CAAmBoD,CAAnB,CAA0BhC,CAA1B,CAAuCC,CAAvC,CAAwD,CAAA,IAE5E4C,EAAWb,CAAAc,MAFiE,CAG5EtgB,CAGJ,QALenE,CAAAvD,SAKf,EACE,KAAK,CAAL,CAEEioB,EAAA,CAAanE,CAAb,CACIoE,EAAA,CAAmBC,EAAA,CAAU5kB,CAAV,CAAAsH,YAAA,EAAnB,CADJ,CACuD,GADvD,CAC4Dqa,CAD5D,CACyEC,CADzE,CAIA,KANF,IAMWzhB,CANX,CAM0CxC,CAN1C,CAMiDknB,CANjD,CAM2DC,EAAS9kB,CAAA8F,WANpE,CAOW+K,EAAI,CAPf,CAOkBC,EAAKgU,CAALhU,EAAegU,CAAAtoB,OAD/B,CAC8CqU,CAD9C,CACkDC,CADlD,CACsDD,CAAA,EADtD,CAC2D,CACzD,IAAIkU,EAAgB,CAAA,CAApB,CACIC,EAAc,CAAA,CAElB7kB,EAAA,CAAO2kB,CAAA,CAAOjU,CAAP,CACP,IAAI,CAAC+D,CAAL,EAAqB,CAArB,EAAaA,CAAb,EAA0BzU,CAAA8kB,UAA1B,CAA0C,CACxCxf,CAAA,CAAOtF,CAAAsF,KACP9H,EAAA;AAAQ+R,EAAA,CAAKvP,CAAAxC,MAAL,CAGRunB,EAAA,CAAaP,EAAA,CAAmBlf,CAAnB,CACb,IAAIof,CAAJ,CAAeM,CAAAve,KAAA,CAAqBse,CAArB,CAAf,CACEzf,CAAA,CAAOwB,EAAA,CAAWie,CAAAE,OAAA,CAAkB,CAAlB,CAAX,CAAiC,GAAjC,CAGT,KAAIC,EAAiBH,CAAA9gB,QAAA,CAAmB,cAAnB,CAAmC,EAAnC,CACjB8gB,EAAJ,GAAmBG,CAAnB,CAAoC,OAApC,GACEN,CAEA,CAFgBtf,CAEhB,CADAuf,CACA,CADc
 vf,CAAA2f,OAAA,CAAY,CAAZ,CAAe3f,CAAAjJ,OAAf,CAA6B,CAA7B,CACd,CADgD,KAChD,CAAAiJ,CAAA,CAAOA,CAAA2f,OAAA,CAAY,CAAZ,CAAe3f,CAAAjJ,OAAf,CAA6B,CAA7B,CAHT,CAMA8oB,EAAA,CAAQX,EAAA,CAAmBlf,CAAA6B,YAAA,EAAnB,CACRkd,EAAA,CAASc,CAAT,CAAA,CAAkB7f,CAClB,IAAIof,CAAJ,EAAgB,CAAClB,CAAA1mB,eAAA,CAAqBqoB,CAArB,CAAjB,CACI3B,CAAA,CAAM2B,CAAN,CACA,CADe3nB,CACf,CAAI8V,EAAA,CAAmBzT,CAAnB,CAAyBslB,CAAzB,CAAJ,GACE3B,CAAA,CAAM2B,CAAN,CADF,CACiB,CAAA,CADjB,CAIJC,EAAA,CAA4BvlB,CAA5B,CAAkCugB,CAAlC,CAA8C5iB,CAA9C,CAAqD2nB,CAArD,CACAZ,GAAA,CAAanE,CAAb,CAAyB+E,CAAzB,CAAgC,GAAhC,CAAqC3D,CAArC,CAAkDC,CAAlD,CAAmEmD,CAAnE,CACcC,CADd,CA1BwC,CALe,CAqC3Dnf,CAAA,CAAY7F,CAAA6F,UACZ,IAAInJ,CAAA,CAASmJ,CAAT,CAAJ,EAAyC,EAAzC,GAA2BA,CAA3B,CACE,IAAA,CAAO1B,CAAP,CAAe8b,CAAAra,KAAA,CAA4BC,CAA5B,CAAf,CAAA,CACEyf,CAIA,CAJQX,EAAA,CAAmBxgB,CAAA,CAAM,CAAN,CAAnB,CAIR,CAHIugB,EAAA,CAAanE,CAAb,CAAyB+E,CAAzB,CAAgC,GAAhC,CAAqC3D,CAArC,CAAkDC,CAAlD,CAGJ,GAFE+B,CAAA,CAAM2B,CAAN,CAEF,CAFiB5V,EAAA,CAAKvL,CAAA,CAAM,CAAN,CAAL,CAEjB,EAAA0B,CAAA,
 CAAYA,CAAAuf,OAAA,CAAiBjhB,CAAAtG,MAAjB,CAA+BsG,CAAA,CAAM,CAAN,CAAA3H,OAA/B,CAGhB,MACF,MAAK,CAAL,CACEgpB,CAAA,CAA4BjF,CAA5B,CAAwCvgB,CAAA8hB,UAAxC,CACA,MACF,MAAK,CAAL,CACE,GAAI,CAEF,GADA3d,CACA,CADQ6b,CAAApa,KAAA,CAA8B5F,CAAA8hB,UAA9B,CACR,CACEwD,CACA,CADQX,EAAA,CAAmBxgB,CAAA,CAAM,CAAN,CAAnB,CACR,CAAIugB,EAAA,CAAanE,CAAb,CAAyB+E,CAAzB,CAAgC,GAAhC;AAAqC3D,CAArC,CAAkDC,CAAlD,CAAJ,GACE+B,CAAA,CAAM2B,CAAN,CADF,CACiB5V,EAAA,CAAKvL,CAAA,CAAM,CAAN,CAAL,CADjB,CAJA,CAQF,MAAOL,CAAP,CAAU,EApEhB,CA4EAyc,CAAAjjB,KAAA,CAAgBmoB,CAAhB,CACA,OAAOlF,EAnFyE,CA8FlFmF,QAASA,EAAS,CAAC1lB,CAAD,CAAO2lB,CAAP,CAAkBC,CAAlB,CAA2B,CAC3C,IAAIxd,EAAQ,EAAZ,CACIyd,EAAQ,CACZ,IAAIF,CAAJ,EAAiB3lB,CAAA8lB,aAAjB,EAAsC9lB,CAAA8lB,aAAA,CAAkBH,CAAlB,CAAtC,EAEE,EAAG,CACD,GAAI,CAAC3lB,CAAL,CACE,KAAM+lB,GAAA,CAAe,SAAf,CAEIJ,CAFJ,CAEeC,CAFf,CAAN,CAImB,CAArB,EAAI5lB,CAAAvD,SAAJ,GACMuD,CAAA8lB,aAAA,CAAkBH,CAAlB,CACJ,EADkCE,CAAA,EAClC,CAAI7lB,CAAA8lB,aAAA,CAAkBF,CAAlB,CAAJ,EAAgCC,CAAA,EAFlC,CAIAzd,EAAA/K,KAAA,CAAW2C,CAAX,CACAA,EAA
 A,CAAOA,CAAAuI,YAXN,CAAH,MAYiB,CAZjB,CAYSsd,CAZT,CAFF,KAgBEzd,EAAA/K,KAAA,CAAW2C,CAAX,CAGF,OAAO2D,EAAA,CAAOyE,CAAP,CAtBoC,CAiC7C4d,QAASA,EAA0B,CAACC,CAAD,CAASN,CAAT,CAAoBC,CAApB,CAA6B,CAC9D,MAAO,SAAQ,CAACtf,CAAD,CAAQ5C,CAAR,CAAiBigB,CAAjB,CAAwBU,CAAxB,CAAqC3C,CAArC,CAAmD,CAChEhe,CAAA,CAAUgiB,CAAA,CAAUhiB,CAAA,CAAQ,CAAR,CAAV,CAAsBiiB,CAAtB,CAAiCC,CAAjC,CACV,OAAOK,EAAA,CAAO3f,CAAP,CAAc5C,CAAd,CAAuBigB,CAAvB,CAA8BU,CAA9B,CAA2C3C,CAA3C,CAFyD,CADJ,CA8BhEqC,QAASA,EAAqB,CAACxD,CAAD,CAAa2F,CAAb,CAA0BC,CAA1B,CAAyCzE,CAAzC,CACC0E,CADD,CACeC,CADf,CACyCC,CADzC,CACqDC,CADrD,CAEC1E,CAFD,CAEyB,CAuMrD2E,QAASA,EAAU,CAACC,CAAD,CAAMC,CAAN,CAAYf,CAAZ,CAAuBC,CAAvB,CAAgC,CACjD,GAAIa,CAAJ,CAAS,CACHd,CAAJ,GAAec,CAAf,CAAqBT,CAAA,CAA2BS,CAA3B,CAAgCd,CAAhC,CAA2CC,CAA3C,CAArB,CACAa,EAAAhG,QAAA,CAAczW,CAAAyW,QACdgG,EAAAE,cAAA,CAAoBA,EACpB,IAAIC,CAAJ,GAAiC5c,CAAjC,EAA8CA,CAAA6c,eAA9C,CACEJ,CAAA;AAAMK,EAAA,CAAmBL,CAAnB,CAAwB,cAAe,CAAA,CAAf,CAAxB,CAERH,EAAAjpB,KAAA,CAAgBopB,CAAhB,CAPO,CAST,GAAIC,CAAJ,CAAU,CACJf,CA
 AJ,GAAee,CAAf,CAAsBV,CAAA,CAA2BU,CAA3B,CAAiCf,CAAjC,CAA4CC,CAA5C,CAAtB,CACAc,EAAAjG,QAAA,CAAezW,CAAAyW,QACfiG,EAAAC,cAAA,CAAqBA,EACrB,IAAIC,CAAJ,GAAiC5c,CAAjC,EAA8CA,CAAA6c,eAA9C,CACEH,CAAA,CAAOI,EAAA,CAAmBJ,CAAnB,CAAyB,cAAe,CAAA,CAAf,CAAzB,CAETH,EAAAlpB,KAAA,CAAiBqpB,CAAjB,CAPQ,CAVuC,CAsBnDK,QAASA,EAAc,CAACJ,CAAD,CAAgBlG,CAAhB,CAAyBgC,CAAzB,CAAmCuE,CAAnC,CAAuD,CAAA,IACxErpB,CADwE,CACjEspB,EAAkB,MAD+C,CACvCC,EAAW,CAAA,CAChD,IAAIxqB,CAAA,CAAS+jB,CAAT,CAAJ,CAAuB,CACrB,IAAA,CAAqC,GAArC,GAAO9iB,CAAP,CAAe8iB,CAAA/e,OAAA,CAAe,CAAf,CAAf,GAAqD,GAArD,EAA4C/D,CAA5C,CAAA,CACE8iB,CAIA,CAJUA,CAAA2E,OAAA,CAAe,CAAf,CAIV,CAHa,GAGb,EAHIznB,CAGJ,GAFEspB,CAEF,CAFoB,eAEpB,EAAAC,CAAA,CAAWA,CAAX,EAAgC,GAAhC,EAAuBvpB,CAEzBA,EAAA,CAAQ,IAEJqpB,EAAJ,EAA8C,MAA9C,GAA0BC,CAA1B,GACEtpB,CADF,CACUqpB,CAAA,CAAmBvG,CAAnB,CADV,CAGA9iB,EAAA,CAAQA,CAAR,EAAiB8kB,CAAA,CAASwE,CAAT,CAAA,CAA0B,GAA1B,CAAgCxG,CAAhC,CAA0C,YAA1C,CAEjB,IAAI,CAAC9iB,CAAL,EAAc,CAACupB,CAAf,CACE,KAAMnB,GAAA,CAAe,OAAf,CAEFtF,CAFE,CAEOkG,CAFP,CAAN,CA
 hBmB,CAAvB,IAqBWhqB,EAAA,CAAQ8jB,CAAR,CAAJ,GACL9iB,CACA,CADQ,EACR,CAAAf,CAAA,CAAQ6jB,CAAR,CAAiB,QAAQ,CAACA,CAAD,CAAU,CACjC9iB,CAAAN,KAAA,CAAW0pB,CAAA,CAAeJ,CAAf,CAA8BlG,CAA9B,CAAuCgC,CAAvC,CAAiDuE,CAAjD,CAAX,CADiC,CAAnC,CAFK,CAMP,OAAOrpB,EA7BqE,CAiC9EylB,QAASA,EAAU,CAACP,CAAD,CAAcvc,CAAd,CAAqB6gB,CAArB,CAA+BvE,CAA/B,CAA6CsB,CAA7C,CAAgE,CAoKjFkD,QAASA,EAA0B,CAAC9gB,CAAD,CAAQ+gB,CAAR,CAAuB,CACxD,IAAIjF,CAGmB,EAAvB;AAAI1jB,SAAAlC,OAAJ,GACE6qB,CACA,CADgB/gB,CAChB,CAAAA,CAAA,CAAQnK,CAFV,CAKImrB,GAAJ,GACElF,CADF,CAC0B4E,EAD1B,CAIA,OAAO9C,EAAA,CAAkB5d,CAAlB,CAAyB+gB,CAAzB,CAAwCjF,CAAxC,CAbiD,CApKuB,IAC7EuB,CAD6E,CACtElB,CADsE,CACzDpP,CADyD,CACrD4S,CADqD,CAC7CvF,CAD6C,CACjC6G,CADiC,CACnBP,GAAqB,EADF,CACMtF,EAGrFiC,EAAA,CADEuC,CAAJ,GAAoBiB,CAApB,CACUhB,CADV,CAGU3kB,EAAA,CAAY2kB,CAAZ,CAA2B,IAAItC,EAAJ,CAAelgB,CAAA,CAAOwjB,CAAP,CAAf,CAAiChB,CAAA1B,MAAjC,CAA3B,CAEVhC,EAAA,CAAWkB,CAAA6D,UAEX,IAAIZ,CAAJ,CAA8B,CAC5B,IAAIa,GAAe,8BACfnF,EAAAA,CAAY3e,CAAA,CAAOwjB,CAAP,CAEhBI,EAAA,CAAejhB,CAAA+c,KAAA,
 CAAW,CAAA,CAAX,CAEXqE,EAAAA,CAAJ,EAA0BA,CAA1B,GAAgDd,CAAhD,EACIc,CADJ,GAC0Bd,CAAAe,oBAD1B,CAIErF,CAAA5b,KAAA,CAAe,yBAAf,CAA0C6gB,CAA1C,CAJF,CAEEjF,CAAA5b,KAAA,CAAe,eAAf,CAAgC6gB,CAAhC,CAOFtF,GAAA,CAAaK,CAAb,CAAwB,kBAAxB,CAEA1lB,EAAA,CAAQgqB,CAAAtgB,MAAR,CAAwC,QAAQ,CAACshB,CAAD,CAAaC,CAAb,CAAwB,CAAA,IAClE1jB,EAAQyjB,CAAAzjB,MAAA,CAAiBsjB,EAAjB,CAARtjB,EAA0C,EADwB,CAElE2jB,EAAW3jB,CAAA,CAAM,CAAN,CAAX2jB,EAAuBD,CAF2C,CAGlEX,EAAwB,GAAxBA,EAAY/iB,CAAA,CAAM,CAAN,CAHsD,CAIlE4jB,EAAO5jB,CAAA,CAAM,CAAN,CAJ2D,CAKlE6jB,CALkE,CAMlEC,CANkE,CAMvDC,CANuD,CAM5CC,CAE1BZ,EAAAa,kBAAA,CAA+BP,CAA/B,CAAA,CAA4CE,CAA5C,CAAmDD,CAEnD,QAAQC,CAAR,EAEE,KAAK,GAAL,CACEpE,CAAA0E,SAAA,CAAeP,CAAf,CAAyB,QAAQ,CAACnqB,CAAD,CAAQ,CACvC4pB,CAAA,CAAaM,CAAb,CAAA,CAA0BlqB,CADa,CAAzC,CAGAgmB,EAAA2E,YAAA,CAAkBR,CAAlB,CAAAS,QAAA;AAAsCjiB,CAClCqd,EAAA,CAAMmE,CAAN,CAAJ,GAGEP,CAAA,CAAaM,CAAb,CAHF,CAG4B5G,CAAA,CAAa0C,CAAA,CAAMmE,CAAN,CAAb,CAAA,CAA8BxhB,CAA9B,CAH5B,CAKA,MAEF,MAAK,GAAL,CACE,GAAI4gB,CAAJ,EAAgB,CAACvD,CAAA,CAAMmE,CAAN,
 CAAjB,CACE,KAEFG,EAAA,CAAY7G,CAAA,CAAOuC,CAAA,CAAMmE,CAAN,CAAP,CAEVK,EAAA,CADEF,CAAAO,QAAJ,CACY7mB,EADZ,CAGYwmB,QAAQ,CAACM,CAAD,CAAGC,CAAH,CAAM,CAAE,MAAOD,EAAP,GAAaC,CAAf,CAE1BR,EAAA,CAAYD,CAAAU,OAAZ,EAAgC,QAAQ,EAAG,CAEzCX,CAAA,CAAYT,CAAA,CAAaM,CAAb,CAAZ,CAAsCI,CAAA,CAAU3hB,CAAV,CACtC,MAAMyf,GAAA,CAAe,WAAf,CAEFpC,CAAA,CAAMmE,CAAN,CAFE,CAEelB,CAAAnhB,KAFf,CAAN,CAHyC,CAO3CuiB,EAAA,CAAYT,CAAA,CAAaM,CAAb,CAAZ,CAAsCI,CAAA,CAAU3hB,CAAV,CACtCihB,EAAArmB,OAAA,CAAoB0nB,QAAyB,EAAG,CAC9C,IAAIC,EAAcZ,CAAA,CAAU3hB,CAAV,CACb6hB,EAAA,CAAQU,CAAR,CAAqBtB,CAAA,CAAaM,CAAb,CAArB,CAAL,GAEOM,CAAA,CAAQU,CAAR,CAAqBb,CAArB,CAAL,CAKEE,CAAA,CAAU5hB,CAAV,CAAiBuiB,CAAjB,CAA+BtB,CAAA,CAAaM,CAAb,CAA/B,CALF,CAEEN,CAAA,CAAaM,CAAb,CAFF,CAE4BgB,CAJ9B,CAUA,OAAOb,EAAP,CAAmBa,CAZ2B,CAAhD,CAaG,IAbH,CAaSZ,CAAAO,QAbT,CAcA,MAEF,MAAK,GAAL,CACEP,CAAA,CAAY7G,CAAA,CAAOuC,CAAA,CAAMmE,CAAN,CAAP,CACZP,EAAA,CAAaM,CAAb,CAAA,CAA0B,QAAQ,CAACpQ,CAAD,CAAS,CACzC,MAAOwQ,EAAA,CAAU3hB,CAAV,CAAiBmR,CAAjB,CADkC,CAG3C,MAEF,SACE,KAAMsO,GAAA,CAA
 e,MAAf,CAGFa,CAAAnhB,KAHE,CAG6BoiB,CAH7B,CAGwCD,CAHxC,CAAN,CAxDJ,CAVsE,CAAxE,CAjB4B,CA0F9BlG,EAAA,CAAewC,CAAf,EAAoCkD,CAChC0B,EAAJ,EACElsB,CAAA,CAAQksB,CAAR,CAA8B,QAAQ,CAAC9e,CAAD,CAAY,CAAA,IAC5CyN,EAAS,QACHzN,CAAA,GAAc4c,CAAd,EAA0C5c,CAAA6c,eAA1C,CAAqEU,CAArE,CAAoFjhB,CADjF,UAEDmc,CAFC,QAGHkB,CAHG,aAIEjC,EAJF,CADmC;AAM7CqH,CAEHrI,EAAA,CAAa1W,CAAA0W,WACK,IAAlB,EAAIA,CAAJ,GACEA,CADF,CACeiD,CAAA,CAAM3Z,CAAAvE,KAAN,CADf,CAIAsjB,EAAA,CAAqB1H,CAAA,CAAYX,CAAZ,CAAwBjJ,CAAxB,CAMrBuP,GAAA,CAAmBhd,CAAAvE,KAAnB,CAAA,CAAqCsjB,CAChCzB,GAAL,EACE7E,CAAA/b,KAAA,CAAc,GAAd,CAAoBsD,CAAAvE,KAApB,CAAqC,YAArC,CAAmDsjB,CAAnD,CAGE/e,EAAAgf,aAAJ,GACEvR,CAAAwR,OAAA,CAAcjf,CAAAgf,aAAd,CADF,CAC0CD,CAD1C,CAxBgD,CAAlD,CA+BEvrB,EAAA,CAAI,CAAR,KAAW6V,CAAX,CAAgBiT,CAAA9pB,OAAhB,CAAmCgB,CAAnC,CAAuC6V,CAAvC,CAA2C7V,CAAA,EAA3C,CACE,GAAI,CACFyoB,CACA,CADSK,CAAA,CAAW9oB,CAAX,CACT,CAAAyoB,CAAA,CAAOA,CAAAsB,aAAA,CAAsBA,CAAtB,CAAqCjhB,CAA5C,CAAmDmc,CAAnD,CAA6DkB,CAA7D,CACIsC,CAAAxF,QADJ,EACsBsG,CAAA,CAAed,CAAAU,cAAf,CAAqCV
 ,CAAAxF,QAArC,CAAqDgC,CAArD,CAA+DuE,EAA/D,CADtB,CAC0GtF,EAD1G,CAFE,CAIF,MAAO5d,CAAP,CAAU,CACVwc,CAAA,CAAkBxc,CAAlB,CAAqBL,EAAA,CAAYgf,CAAZ,CAArB,CADU,CAQVyG,CAAAA,CAAe5iB,CACfsgB,EAAJ,GAAiCA,CAAAuC,SAAjC,EAA+G,IAA/G,GAAsEvC,CAAAwC,YAAtE,IACEF,CADF,CACiB3B,CADjB,CAGA1E,EAAA,EAAeA,CAAA,CAAYqG,CAAZ,CAA0B/B,CAAApW,WAA1B,CAA+C5U,CAA/C,CAA0D+nB,CAA1D,CAGf,KAAI1mB,CAAJ,CAAQ+oB,CAAA/pB,OAAR,CAA6B,CAA7B,CAAqC,CAArC,EAAgCgB,CAAhC,CAAwCA,CAAA,EAAxC,CACE,GAAI,CACFyoB,CACA,CADSM,CAAA,CAAY/oB,CAAZ,CACT,CAAAyoB,CAAA,CAAOA,CAAAsB,aAAA,CAAsBA,CAAtB,CAAqCjhB,CAA5C,CAAmDmc,CAAnD,CAA6DkB,CAA7D,CACIsC,CAAAxF,QADJ,EACsBsG,CAAA,CAAed,CAAAU,cAAf,CAAqCV,CAAAxF,QAArC,CAAqDgC,CAArD,CAA+DuE,EAA/D,CADtB,CAC0GtF,EAD1G,CAFE,CAIF,MAAO5d,CAAP,CAAU,CACVwc,CAAA,CAAkBxc,CAAlB,CAAqBL,EAAA,CAAYgf,CAAZ,CAArB,CADU,CA9JmE,CA7PnFZ,CAAA,CAAyBA,CAAzB,EAAmD,EAqBnD,KAtBqD,IAGjDwH;AAAmB,CAACnK,MAAAC,UAH6B,CAIjDmK,CAJiD,CAKjDR,EAAuBjH,CAAAiH,qBAL0B,CAMjDlC,EAA2B/E,CAAA+E,yBANsB,CAOjDc,EAAoB7F,CAAA6F,kBAP6B,CAQjD6B,GAA4B1H,CAAA0H,
 0BARqB,CASjDC,EAAyB,CAAA,CATwB,CAUjDC,EAAc,CAAA,CAVmC,CAWjDnC,GAAgCzF,CAAAyF,8BAXiB,CAYjDoC,EAAevD,CAAAqB,UAAfkC,CAAyC/lB,CAAA,CAAOuiB,CAAP,CAZQ,CAajDlc,CAbiD,CAcjD2c,EAdiD,CAejDgD,CAfiD,CAiBjDC,EAAoBlI,CAjB6B,CAkBjDuE,CAlBiD,CAsB7CzoB,EAAI,CAtByC,CAsBtC6V,GAAKkN,CAAA/jB,OAApB,CAAuCgB,CAAvC,CAA2C6V,EAA3C,CAA+C7V,CAAA,EAA/C,CAAoD,CAClDwM,CAAA,CAAYuW,CAAA,CAAW/iB,CAAX,CACZ,KAAImoB,EAAY3b,CAAA6f,QAAhB,CACIjE,EAAU5b,CAAA8f,MAGVnE,EAAJ,GACE+D,CADF,CACiBhE,CAAA,CAAUQ,CAAV,CAAuBP,CAAvB,CAAkCC,CAAlC,CADjB,CAGA+D,EAAA,CAAYxtB,CAEZ,IAAIktB,CAAJ,CAAuBrf,CAAAwW,SAAvB,CACE,KAGF,IAAIuJ,CAAJ,CAAqB/f,CAAA1D,MAArB,CACEgjB,CAIA,CAJoBA,CAIpB,EAJyCtf,CAIzC,CAAKA,CAAAof,YAAL,GACEY,CAAA,CAAkB,oBAAlB,CAAwCpD,CAAxC,CAAkE5c,CAAlE,CACkB0f,CADlB,CAEA,CAAInqB,CAAA,CAASwqB,CAAT,CAAJ,GACEnD,CADF,CAC6B5c,CAD7B,CAHF,CASF2c,GAAA,CAAgB3c,CAAAvE,KAEX2jB,EAAApf,CAAAof,YAAL,EAA8Bpf,CAAA0W,WAA9B,GACEqJ,CAIA,CAJiB/f,CAAA0W,WAIjB,CAHAoI,CAGA,CAHuBA,CAGvB,EAH+C,EAG/C,CAFAkB,CAAA,CAAkB,GAAlB,CAAwBrD,EAAxB,CAAwC,cAAxC,CACImC
 ,CAAA,CAAqBnC,EAArB,CADJ,CACyC3c,CADzC,CACoD0f,CADpD,CAEA,CAAAZ,CAAA,CAAqBnC,EAArB,CAAA,CAAsC3c,CALxC,CAQA,IAAI+f,CAAJ,CAAqB/f,CAAAyZ,WAArB,CACE+F,CAUA;AAVyB,CAAA,CAUzB,CALKxf,CAAAigB,MAKL,GAJED,CAAA,CAAkB,cAAlB,CAAkCT,EAAlC,CAA6Dvf,CAA7D,CAAwE0f,CAAxE,CACA,CAAAH,EAAA,CAA4Bvf,CAG9B,EAAsB,SAAtB,EAAI+f,CAAJ,EACEzC,EASA,CATgC,CAAA,CAShC,CARA+B,CAQA,CARmBrf,CAAAwW,SAQnB,CAPAmJ,CAOA,CAPYjE,CAAA,CAAUQ,CAAV,CAAuBP,CAAvB,CAAkCC,CAAlC,CAOZ,CANA8D,CAMA,CANevD,CAAAqB,UAMf,CALI7jB,CAAA,CAAOzH,CAAAguB,cAAA,CAAuB,GAAvB,CAA6BvD,EAA7B,CAA6C,IAA7C,CACuBR,CAAA,CAAcQ,EAAd,CADvB,CACsD,GADtD,CAAP,CAKJ,CAHAT,CAGA,CAHcwD,CAAA,CAAa,CAAb,CAGd,CAFAS,EAAA,CAAY/D,CAAZ,CAA0BziB,CAAA,CAnrK7BlB,EAAAvF,KAAA,CAmrK8CysB,CAnrK9C,CAA+B,CAA/B,CAmrK6B,CAA1B,CAAwDzD,CAAxD,CAEA,CAAA0D,CAAA,CAAoBrjB,CAAA,CAAQojB,CAAR,CAAmBjI,CAAnB,CAAiC2H,CAAjC,CACQe,CADR,EAC4BA,CAAA3kB,KAD5B,CACmD,2BAQd8jB,EARc,CADnD,CAVtB,GAsBEI,CAEA,CAFYhmB,CAAA,CAAOwN,EAAA,CAAY+U,CAAZ,CAAP,CAAAmE,SAAA,EAEZ,CADAX,CAAA7lB,MAAA,EACA,CAAA+lB,CAAA,CAAoBrjB,
 CAAA,CAAQojB,CAAR,CAAmBjI,CAAnB,CAxBtB,CA4BF,IAAI1X,CAAAmf,SAAJ,CAWE,GAVAM,CAUIrlB,CAVU,CAAA,CAUVA,CATJ4lB,CAAA,CAAkB,UAAlB,CAA8BtC,CAA9B,CAAiD1d,CAAjD,CAA4D0f,CAA5D,CASItlB,CARJsjB,CAQItjB,CARgB4F,CAQhB5F,CANJ2lB,CAMI3lB,CANcpH,CAAA,CAAWgN,CAAAmf,SAAX,CACD,CAAXnf,CAAAmf,SAAA,CAAmBO,CAAnB,CAAiCvD,CAAjC,CAAW,CACXnc,CAAAmf,SAIF/kB,CAFJ2lB,CAEI3lB,CAFakmB,CAAA,CAAoBP,CAApB,CAEb3lB,CAAA4F,CAAA5F,QAAJ,CAAuB,CACrBgmB,CAAA,CAAmBpgB,CAEjB2f,EAAA,CA/9HJ3Z,EAAApJ,KAAA,CA89HuBmjB,CA99HvB,CA89HE,CAGcpmB,CAAA,CAAO+L,EAAA,CAAKqa,CAAL,CAAP,CAHd,CACc,EAId7D,EAAA,CAAcyD,CAAA,CAAU,CAAV,CAEd,IAAwB,CAAxB,EAAIA,CAAAntB,OAAJ,EAAsD,CAAtD,GAA6B0pB,CAAAzpB,SAA7B,CACE,KAAMspB,GAAA,CAAe,OAAf,CAEFY,EAFE,CAEa,EAFb,CAAN,CAKFwD,EAAA,CAAY/D,CAAZ,CAA0BsD,CAA1B,CAAwCxD,CAAxC,CAEIqE,GAAAA,CAAmB,OAAQ,EAAR,CAOnBC,EAAAA,CAAqB1G,EAAA,CAAkBoC,CAAlB,CAA+B,EAA/B;AAAmCqE,EAAnC,CACzB,KAAIE,GAAwBlK,CAAA5f,OAAA,CAAkBnD,CAAlB,CAAsB,CAAtB,CAAyB+iB,CAAA/jB,OAAzB,EAA8CgB,CAA9C,CAAkD,CAAlD,EAExBopB,EAAJ,EACE8D,EAAA,CAAwBF,CAAxB,CAEF
 jK,EAAA,CAAaA,CAAA3d,OAAA,CAAkB4nB,CAAlB,CAAA5nB,OAAA,CAA6C6nB,EAA7C,CACbE,EAAA,CAAwBxE,CAAxB,CAAuCoE,EAAvC,CAEAlX,GAAA,CAAKkN,CAAA/jB,OAjCgB,CAAvB,IAmCEktB,EAAAzlB,KAAA,CAAkB8lB,CAAlB,CAIJ,IAAI/f,CAAAof,YAAJ,CACEK,CAeA,CAfc,CAAA,CAed,CAdAO,CAAA,CAAkB,UAAlB,CAA8BtC,CAA9B,CAAiD1d,CAAjD,CAA4D0f,CAA5D,CAcA,CAbAhC,CAaA,CAboB1d,CAapB,CAXIA,CAAA5F,QAWJ,GAVEgmB,CAUF,CAVqBpgB,CAUrB,EAPAoZ,CAOA,CAPawH,CAAA,CAAmBrK,CAAA5f,OAAA,CAAkBnD,CAAlB,CAAqB+iB,CAAA/jB,OAArB,CAAyCgB,CAAzC,CAAnB,CAAgEksB,CAAhE,CACTvD,CADS,CACMC,CADN,CACoBoD,CADpB,EAC8CI,CAD9C,CACiEtD,CADjE,CAC6EC,CAD7E,CAC0F,sBAC3EuC,CAD2E,0BAEvElC,CAFuE,mBAG9Ec,CAH8E,2BAItE6B,EAJsE,CAD1F,CAOb,CAAAlW,EAAA,CAAKkN,CAAA/jB,OAhBP,KAiBO,IAAIwN,CAAAzD,QAAJ,CACL,GAAI,CACF0f,CACA,CADSjc,CAAAzD,QAAA,CAAkBmjB,CAAlB,CAAgCvD,CAAhC,CAA+CyD,CAA/C,CACT,CAAI5sB,CAAA,CAAWipB,CAAX,CAAJ,CACEO,CAAA,CAAW,IAAX,CAAiBP,CAAjB,CAAyBN,CAAzB,CAAoCC,CAApC,CADF,CAEWK,CAFX,EAGEO,CAAA,CAAWP,CAAAQ,IAAX,CAAuBR,CAAAS,KAAvB,CAAoCf,CAApC,CAA+CC,CAA/C,CALA,CAOF,MAAO9hB,CAAP,C
 AAU,CACVwc,CAAA,CAAkBxc,CAAlB,CAAqBL,EAAA,CAAYimB,CAAZ,CAArB,CADU,CAKV1f,CAAAga,SAAJ,GACEZ,CAAAY,SACA,CADsB,CAAA,CACtB,CAAAqF,CAAA,CAAmBwB,IAAAC,IAAA,CAASzB,CAAT,CAA2Brf,CAAAwW,SAA3B,CAFrB,CA9JkD,CAqKpD4C,CAAA9c,MAAA,CAAmBgjB,CAAnB,EAAoE,CAAA,CAApE,GAAwCA,CAAAhjB,MACxC8c;CAAAG,wBAAA,CAAqCiG,CACrCpG,EAAAM,sBAAA,CAAmC+F,CACnCrG,EAAAK,WAAA,CAAwBmG,CAExB/H,EAAAyF,8BAAA,CAAuDA,EAGvD,OAAOlE,EAnM8C,CAobvDsH,QAASA,GAAuB,CAACnK,CAAD,CAAa,CAE3C,IAF2C,IAElC1P,EAAI,CAF8B,CAE3BC,EAAKyP,CAAA/jB,OAArB,CAAwCqU,CAAxC,CAA4CC,CAA5C,CAAgDD,CAAA,EAAhD,CACE0P,CAAA,CAAW1P,CAAX,CAAA,CAAgB/R,EAAA,CAAQyhB,CAAA,CAAW1P,CAAX,CAAR,CAAuB,gBAAiB,CAAA,CAAjB,CAAvB,CAHyB,CAqB7C6T,QAASA,GAAY,CAACqG,CAAD,CAActlB,CAAd,CAAoB7F,CAApB,CAA8B+hB,CAA9B,CAA2CC,CAA3C,CAA4DoJ,CAA5D,CACCC,CADD,CACc,CACjC,GAAIxlB,CAAJ,GAAamc,CAAb,CAA8B,MAAO,KACjCzd,EAAAA,CAAQ,IACZ,IAAI2b,CAAA7iB,eAAA,CAA6BwI,CAA7B,CAAJ,CAAwC,CAAA,IAC9BuE,CAAWuW,EAAAA,CAAarI,CAAArB,IAAA,CAAcpR,CAAd,CAAqBsa,CAArB,CAAhC,KADsC,IAElCviB,EAAI,CAF8B,CAE3B6V,EAAKkN,CAAA/j
 B,OADhB,CACmCgB,CADnC,CACqC6V,CADrC,CACyC7V,CAAA,EADzC,CAEE,GAAI,CACFwM,CACA,CADYuW,CAAA,CAAW/iB,CAAX,CACZ,EAAMmkB,CAAN,GAAsBxlB,CAAtB,EAAmCwlB,CAAnC,CAAiD3X,CAAAwW,SAAjD,GAC8C,EAD9C,EACKxW,CAAA2W,SAAAngB,QAAA,CAA2BZ,CAA3B,CADL,GAEMorB,CAIJ,GAHEhhB,CAGF,CAHclL,EAAA,CAAQkL,CAAR,CAAmB,SAAUghB,CAAV,OAAgCC,CAAhC,CAAnB,CAGd,EADAF,CAAA1tB,KAAA,CAAiB2M,CAAjB,CACA,CAAA7F,CAAA,CAAQ6F,CANV,CAFE,CAUF,MAAMlG,CAAN,CAAS,CAAEwc,CAAA,CAAkBxc,CAAlB,CAAF,CAbyB,CAgBxC,MAAOK,EAnB0B,CA+BnCwmB,QAASA,EAAuB,CAAClsB,CAAD,CAAMgD,CAAN,CAAW,CAAA,IACrCypB,EAAUzpB,CAAAgjB,MAD2B,CAErC0G,EAAU1sB,CAAAgmB,MAF2B,CAGrChC,EAAWhkB,CAAA+oB,UAGf5qB;CAAA,CAAQ6B,CAAR,CAAa,QAAQ,CAACd,CAAD,CAAQZ,CAAR,CAAa,CACX,GAArB,EAAIA,CAAA2E,OAAA,CAAW,CAAX,CAAJ,GACMD,CAAA,CAAI1E,CAAJ,CAGJ,EAHgB0E,CAAA,CAAI1E,CAAJ,CAGhB,GAH6BY,CAG7B,GAFEA,CAEF,GAFoB,OAAR,GAAAZ,CAAA,CAAkB,GAAlB,CAAwB,GAEpC,EAF2C0E,CAAA,CAAI1E,CAAJ,CAE3C,EAAA0B,CAAA2sB,KAAA,CAASruB,CAAT,CAAcY,CAAd,CAAqB,CAAA,CAArB,CAA2ButB,CAAA,CAAQnuB,CAAR,CAA3B,CAJF,CADgC,CAAlC,CAUAH,EAAA,
 CAAQ6E,CAAR,CAAa,QAAQ,CAAC9D,CAAD,CAAQZ,CAAR,CAAa,CACrB,OAAX,EAAIA,CAAJ,EACEklB,EAAA,CAAaQ,CAAb,CAAuB9kB,CAAvB,CACA,CAAAc,CAAA,CAAI,OAAJ,CAAA,EAAgBA,CAAA,CAAI,OAAJ,CAAA,CAAeA,CAAA,CAAI,OAAJ,CAAf,CAA8B,GAA9B,CAAoC,EAApD,EAA0Dd,CAF5D,EAGkB,OAAX,EAAIZ,CAAJ,EACL0lB,CAAAtiB,KAAA,CAAc,OAAd,CAAuBsiB,CAAAtiB,KAAA,CAAc,OAAd,CAAvB,CAAgD,GAAhD,CAAsDxC,CAAtD,CACA,CAAAc,CAAA,MAAA,EAAgBA,CAAA,MAAA,CAAeA,CAAA,MAAf,CAA8B,GAA9B,CAAoC,EAApD,EAA0Dd,CAFrD,EAMqB,GANrB,EAMIZ,CAAA2E,OAAA,CAAW,CAAX,CANJ,EAM6BjD,CAAAxB,eAAA,CAAmBF,CAAnB,CAN7B,GAOL0B,CAAA,CAAI1B,CAAJ,CACA,CADWY,CACX,CAAAwtB,CAAA,CAAQpuB,CAAR,CAAA,CAAemuB,CAAA,CAAQnuB,CAAR,CARV,CAJyB,CAAlC,CAhByC,CAkC3C6tB,QAASA,EAAkB,CAACrK,CAAD,CAAamJ,CAAb,CAA2B2B,CAA3B,CACvBzI,CADuB,CACTgH,CADS,CACUtD,CADV,CACsBC,CADtB,CACmC1E,CADnC,CAC2D,CAAA,IAChFyJ,EAAY,EADoE,CAEhFC,CAFgF,CAGhFC,CAHgF,CAIhFC,EAA4B/B,CAAA,CAAa,CAAb,CAJoD,CAKhFgC,EAAqBnL,CAAApR,MAAA,EAL2D,CAOhFwc,EAAuBntB,CAAA,CAAO,EAAP,CAAWktB,CAAX,CAA+B,aACvC,IADuC,YACrB,IADqB,SACN,IADM,qBACqBA,CADrB,CA
 A/B,CAPyD,CAUhFtC,EAAepsB,CAAA,CAAW0uB,CAAAtC,YAAX,CACD,CAARsC,CAAAtC,YAAA,CAA+BM,CAA/B;AAA6C2B,CAA7C,CAAQ,CACRK,CAAAtC,YAEVM,EAAA7lB,MAAA,EAEAqd,EAAArK,IAAA,CAAUyK,CAAAsK,sBAAA,CAA2BxC,CAA3B,CAAV,CAAmD,OAAQjI,CAAR,CAAnD,CAAA0K,QAAA,CACU,QAAQ,CAACC,CAAD,CAAU,CAAA,IACpB5F,CADoB,CACuB5C,CAE/CwI,EAAA,CAAUxB,CAAA,CAAoBwB,CAApB,CAEV,IAAIJ,CAAAtnB,QAAJ,CAAgC,CAE5BulB,CAAA,CAj5IJ3Z,EAAApJ,KAAA,CAg5IuBklB,CAh5IvB,CAg5IE,CAGcnoB,CAAA,CAAO+L,EAAA,CAAKoc,CAAL,CAAP,CAHd,CACc,EAId5F,EAAA,CAAcyD,CAAA,CAAU,CAAV,CAEd,IAAwB,CAAxB,EAAIA,CAAAntB,OAAJ,EAAsD,CAAtD,GAA6B0pB,CAAAzpB,SAA7B,CACE,KAAMspB,GAAA,CAAe,OAAf,CAEF2F,CAAAjmB,KAFE,CAEuB2jB,CAFvB,CAAN,CAKF2C,CAAA,CAAoB,OAAQ,EAAR,CACpB5B,GAAA,CAAYvH,CAAZ,CAA0B8G,CAA1B,CAAwCxD,CAAxC,CACA,KAAIsE,EAAqB1G,EAAA,CAAkBoC,CAAlB,CAA+B,EAA/B,CAAmC6F,CAAnC,CAErBxsB,EAAA,CAASmsB,CAAAplB,MAAT,CAAJ,EACEokB,EAAA,CAAwBF,CAAxB,CAEFjK,EAAA,CAAaiK,CAAA5nB,OAAA,CAA0B2d,CAA1B,CACboK,EAAA,CAAwBU,CAAxB,CAAgCU,CAAhC,CAtB8B,CAAhC,IAwBE7F,EACA,CADcuF,CACd,CAAA/B,CAAAzlB,KAAA,CA
 AkB6nB,CAAlB,CAGFvL,EAAAniB,QAAA,CAAmButB,CAAnB,CAEAJ,EAAA,CAA0BxH,CAAA,CAAsBxD,CAAtB,CAAkC2F,CAAlC,CAA+CmF,CAA/C,CACtBzB,CADsB,CACHF,CADG,CACWgC,CADX,CAC+BpF,CAD/B,CAC2CC,CAD3C,CAEtB1E,CAFsB,CAG1BjlB,EAAA,CAAQgmB,CAAR,CAAsB,QAAQ,CAAC5iB,CAAD,CAAOxC,CAAP,CAAU,CAClCwC,CAAJ,EAAYkmB,CAAZ,GACEtD,CAAA,CAAaplB,CAAb,CADF,CACoBksB,CAAA,CAAa,CAAb,CADpB,CADsC,CAAxC,CAOA,KAFA8B,CAEA,CAF2BxJ,CAAA,CAAa0H,CAAA,CAAa,CAAb,CAAA3Y,WAAb,CAAyC6Y,CAAzC,CAE3B,CAAM0B,CAAA9uB,OAAN,CAAA,CAAwB,CAClB8J,CAAAA,CAAQglB,CAAAnc,MAAA,EACR6c,EAAAA,CAAyBV,CAAAnc,MAAA,EAFP,KAGlB8c,EAAkBX,CAAAnc,MAAA,EAHA,CAIlB+U,EAAoBoH,CAAAnc,MAAA,EAJF,CAKlBgY,EAAWuC,CAAA,CAAa,CAAb,CAEf,IAAIsC,CAAJ,GAA+BP,CAA/B,CAA0D,CACxD,IAAIS,EAAaF,CAAAnmB,UAEXgc;CAAAyF,8BAAN,EACIoE,CAAAtnB,QADJ,GAGE+iB,CAHF,CAGahW,EAAA,CAAY+U,CAAZ,CAHb,CAMAiE,GAAA,CAAY8B,CAAZ,CAA6BtoB,CAAA,CAAOqoB,CAAP,CAA7B,CAA6D7E,CAA7D,CAGAlF,GAAA,CAAate,CAAA,CAAOwjB,CAAP,CAAb,CAA+B+E,CAA/B,CAZwD,CAexD5I,CAAA,CADEiI,CAAAhI,wBAAJ,CAC2BC,CAAA,CAAwBld,CAAxB,CAA+BilB,CAAA9H,WAA/B,
 CAAmES,CAAnE,CAD3B,CAG2BA,CAE3BqH,EAAA,CAAwBC,CAAxB,CAAkDllB,CAAlD,CAAyD6gB,CAAzD,CAAmEvE,CAAnE,CACEU,CADF,CA1BsB,CA6BxBgI,CAAA,CAAY,IA1EY,CAD5B,CAAAhR,MAAA,CA6EQ,QAAQ,CAAC6R,CAAD,CAAWC,CAAX,CAAiBC,CAAjB,CAA0BhjB,CAA1B,CAAkC,CAC9C,KAAM0c,GAAA,CAAe,QAAf,CAAyD1c,CAAA4R,IAAzD,CAAN,CAD8C,CA7ElD,CAiFA,OAAOqR,SAA0B,CAACC,CAAD,CAAoBjmB,CAApB,CAA2BtG,CAA3B,CAAiCwsB,CAAjC,CAA8CtI,CAA9C,CAAiE,CAC5FZ,CAAAA,CAAyBY,CACzBoH,EAAJ,EACEA,CAAAjuB,KAAA,CAAeiJ,CAAf,CAGA,CAFAglB,CAAAjuB,KAAA,CAAe2C,CAAf,CAEA,CADAsrB,CAAAjuB,KAAA,CAAemvB,CAAf,CACA,CAAAlB,CAAAjuB,KAAA,CAAeimB,CAAf,CAJF,GAMMiI,CAAAhI,wBAGJ,GAFED,CAEF,CAF2BE,CAAA,CAAwBld,CAAxB,CAA+BilB,CAAA9H,WAA/B,CAAmES,CAAnE,CAE3B,EAAAqH,CAAA,CAAwBC,CAAxB,CAAkDllB,CAAlD,CAAyDtG,CAAzD,CAA+DwsB,CAA/D,CAA4ElJ,CAA5E,CATF,CAFgG,CAjGd,CAqHtFmC,QAASA,EAAU,CAACgD,CAAD,CAAIC,CAAJ,CAAO,CACxB,IAAI+D,EAAO/D,CAAAlI,SAAPiM,CAAoBhE,CAAAjI,SACxB,OAAa,EAAb,GAAIiM,CAAJ,CAAuBA,CAAvB,CACIhE,CAAAhjB,KAAJ,GAAeijB,CAAAjjB,KAAf,CAA+BgjB,CAAAhjB,KAAD,CAAUijB,CAAAjjB,KAAV,CAAqB,E
 AArB,CAAyB,CAAvD,CACOgjB,CAAA5qB,MADP,CACiB6qB,CAAA7qB,MAJO,CAQ1BmsB,QAASA,EAAiB,CAAC0C,CAAD,CAAOC,CAAP,CAA0B3iB,CAA1B,CAAqCtG,CAArC,CAA8C,CACtE,GAAIipB,CAAJ,CACE,KAAM5G,GAAA,CAAe,UAAf,CACF4G,CAAAlnB,KADE;AACsBuE,CAAAvE,KADtB,CACsCinB,CADtC,CAC4CjpB,EAAA,CAAYC,CAAZ,CAD5C,CAAN,CAFoE,CAQtE8hB,QAASA,EAA2B,CAACjF,CAAD,CAAaqM,CAAb,CAAmB,CACrD,IAAIC,EAAgB5L,CAAA,CAAa2L,CAAb,CAAmB,CAAA,CAAnB,CAChBC,EAAJ,EACEtM,CAAAljB,KAAA,CAAgB,UACJ,CADI,SAELyvB,QAAiC,CAACC,CAAD,CAAe,CAGvD,IAAoCC,EAAvBD,CAAAhuB,OAAAA,EAA0CvC,OACnDwwB,EAAJ,EAAsB/K,EAAA,CAAa8K,CAAAhuB,OAAA,EAAb,CAAoC,YAApC,CAEtB,OAAOkuB,SAA8B,CAAC3mB,CAAD,CAAQtG,CAAR,CAAc,CAAA,IAC7CjB,EAASiB,CAAAjB,OAAA,EADoC,CAE/CmuB,EAAWnuB,CAAA2H,KAAA,CAAY,UAAZ,CAAXwmB,EAAsC,EACxCA,EAAA7vB,KAAA,CAAcwvB,CAAd,CACA9tB,EAAA2H,KAAA,CAAY,UAAZ,CAAwBwmB,CAAxB,CACKF,EAAL,EAAuB/K,EAAA,CAAaljB,CAAb,CAAqB,YAArB,CACvBuH,EAAApF,OAAA,CAAa2rB,CAAb,CAA4BM,QAAiC,CAACxvB,CAAD,CAAQ,CACnEqC,CAAA,CAAK,CAAL,CAAA8hB,UAAA,CAAoBnkB,CAD+C,CAArE,CANiD,CANI,CAF3C,CAAhB,CAHmD,CA2BzDy
 vB,QAASA,EAAiB,CAACptB,CAAD,CAAOqtB,CAAP,CAA2B,CACnD,GAA0B,QAA1B,EAAIA,CAAJ,CACE,MAAO/L,EAAAgM,KAET,KAAIpnB,EAAM0e,EAAA,CAAU5kB,CAAV,CAEV,IAA0B,WAA1B,EAAIqtB,CAAJ,EACY,MADZ,EACKnnB,CADL,EAC4C,QAD5C,EACsBmnB,CADtB,EAEY,KAFZ,EAEKnnB,CAFL,GAE4C,KAF5C,EAEsBmnB,CAFtB,EAG4C,OAH5C,EAGsBA,CAHtB,EAIE,MAAO/L,EAAAiM,aAV0C,CAerDhI,QAASA,EAA2B,CAACvlB,CAAD,CAAOugB,CAAP,CAAmB5iB,CAAnB,CAA0B8H,CAA1B,CAAgC,CAClE,IAAIonB,EAAgB5L,CAAA,CAAatjB,CAAb,CAAoB,CAAA,CAApB,CAGpB,IAAKkvB,CAAL,CAAA,CAGA,GAAa,UAAb;AAAIpnB,CAAJ,EAA+C,QAA/C,GAA2Bmf,EAAA,CAAU5kB,CAAV,CAA3B,CACE,KAAM+lB,GAAA,CAAe,UAAf,CAEFtiB,EAAA,CAAYzD,CAAZ,CAFE,CAAN,CAKFugB,CAAAljB,KAAA,CAAgB,UACJ,GADI,SAELkJ,QAAQ,EAAG,CAChB,MAAO,KACAinB,QAAiC,CAAClnB,CAAD,CAAQ5C,CAAR,CAAiBvD,CAAjB,CAAuB,CACvDmoB,CAAAA,CAAenoB,CAAAmoB,YAAfA,GAAoCnoB,CAAAmoB,YAApCA,CAAuD,EAAvDA,CAEJ,IAAIpI,CAAAtZ,KAAA,CAA+BnB,CAA/B,CAAJ,CACE,KAAMsgB,GAAA,CAAe,aAAf,CAAN,CAWF,GAJA8G,CAIA,CAJgB5L,CAAA,CAAa9gB,CAAA,CAAKsF,CAAL,CAAb,CAAyB,CAAA,CAAzB,CAA+B2nB,CAAA,CAAkBptB,CAAlB,CAAwByF
 ,CAAxB,CAA/B,CAIhB,CAIAtF,CAAA,CAAKsF,CAAL,CAEC,CAFYonB,CAAA,CAAcvmB,CAAd,CAEZ,CADAmnB,CAAAnF,CAAA,CAAY7iB,CAAZ,CAAAgoB,GAAsBnF,CAAA,CAAY7iB,CAAZ,CAAtBgoB,CAA0C,EAA1CA,UACA,CADyD,CAAA,CACzD,CAAAvsB,CAAAf,CAAAmoB,YAAApnB,EAAoBf,CAAAmoB,YAAA,CAAiB7iB,CAAjB,CAAA8iB,QAApBrnB,EAAsDoF,CAAtDpF,QAAA,CACQ2rB,CADR,CACuBM,QAAiC,CAACO,CAAD,CAAWC,CAAX,CAAqB,CAO9D,OAAZ,GAAGloB,CAAH,EAAuBioB,CAAvB,EAAmCC,CAAnC,CACExtB,CAAAytB,aAAA,CAAkBF,CAAlB,CAA4BC,CAA5B,CADF,CAGExtB,CAAAirB,KAAA,CAAU3lB,CAAV,CAAgBioB,CAAhB,CAVwE,CAD7E,CArB0D,CADxD,CADS,CAFN,CAAhB,CATA,CAJkE,CAqEpEvD,QAASA,GAAW,CAACvH,CAAD,CAAeiL,CAAf,CAAiCC,CAAjC,CAA0C,CAAA,IACxDC,EAAuBF,CAAA,CAAiB,CAAjB,CADiC,CAExDG,EAAcH,CAAArxB,OAF0C,CAGxDuC,EAASgvB,CAAAza,WAH+C,CAIxD9V,CAJwD,CAIrD6V,CAEP,IAAIuP,CAAJ,CACE,IAAIplB,CAAO,CAAH,CAAG,CAAA6V,CAAA,CAAKuP,CAAApmB,OAAhB,CAAqCgB,CAArC,CAAyC6V,CAAzC,CAA6C7V,CAAA,EAA7C,CACE,GAAIolB,CAAA,CAAaplB,CAAb,CAAJ,EAAuBuwB,CAAvB,CAA6C,CAC3CnL,CAAA,CAAaplB,CAAA,EAAb,CAAA,CAAoBswB,CACJG,EAAAA,CAAKpd,CAALod,CAASD,CAA
 TC,CAAuB,CAAvC,KAAK,IACInd;AAAK8R,CAAApmB,OADd,CAEKqU,CAFL,CAESC,CAFT,CAEaD,CAAA,EAAA,CAAKod,CAAA,EAFlB,CAGMA,CAAJ,CAASnd,CAAT,CACE8R,CAAA,CAAa/R,CAAb,CADF,CACoB+R,CAAA,CAAaqL,CAAb,CADpB,CAGE,OAAOrL,CAAA,CAAa/R,CAAb,CAGX+R,EAAApmB,OAAA,EAAuBwxB,CAAvB,CAAqC,CACrC,MAZ2C,CAiB7CjvB,CAAJ,EACEA,CAAAmvB,aAAA,CAAoBJ,CAApB,CAA6BC,CAA7B,CAEEje,EAAAA,CAAW5T,CAAA6T,uBAAA,EACfD,EAAAI,YAAA,CAAqB6d,CAArB,CACAD,EAAA,CAAQnqB,CAAAwqB,QAAR,CAAA,CAA0BJ,CAAA,CAAqBpqB,CAAAwqB,QAArB,CACjBC,EAAAA,CAAI,CAAb,KAAgBC,CAAhB,CAAqBR,CAAArxB,OAArB,CAA8C4xB,CAA9C,CAAkDC,CAAlD,CAAsDD,CAAA,EAAtD,CACM1qB,CAGJ,CAHcmqB,CAAA,CAAiBO,CAAjB,CAGd,CAFAzqB,CAAA,CAAOD,CAAP,CAAA4b,OAAA,EAEA,CADAxP,CAAAI,YAAA,CAAqBxM,CAArB,CACA,CAAA,OAAOmqB,CAAA,CAAiBO,CAAjB,CAGTP,EAAA,CAAiB,CAAjB,CAAA,CAAsBC,CACtBD,EAAArxB,OAAA,CAA0B,CAvCkC,CA2C9DsqB,QAASA,GAAkB,CAACvkB,CAAD,CAAK+rB,CAAL,CAAiB,CAC1C,MAAO9vB,EAAA,CAAO,QAAQ,EAAG,CAAE,MAAO+D,EAAAI,MAAA,CAAS,IAAT,CAAejE,SAAf,CAAT,CAAlB,CAAyD6D,CAAzD,CAA6D+rB,CAA7D,CADmC,CAtzC5C,IAAIzK,GAAaA,QAAQ,CAA
 CngB,CAAD,CAAUvD,CAAV,CAAgB,CACvC,IAAAqnB,UAAA,CAAiB9jB,CACjB,KAAA+gB,MAAA,CAAatkB,CAAb,EAAqB,EAFkB,CAKzC0jB,GAAA/L,UAAA,CAAuB,YACT6M,EADS,WAeT4J,QAAQ,CAACC,CAAD,CAAW,CAC1BA,CAAH,EAAiC,CAAjC,CAAeA,CAAAhyB,OAAf,EACE+kB,CAAAmB,SAAA,CAAkB,IAAA8E,UAAlB,CAAkCgH,CAAlC,CAF2B,CAfV,cAgCNC,QAAQ,CAACD,CAAD,CAAW,CAC7BA,CAAH;AAAiC,CAAjC,CAAeA,CAAAhyB,OAAf,EACE+kB,CAAAmN,YAAA,CAAqB,IAAAlH,UAArB,CAAqCgH,CAArC,CAF8B,CAhCb,cAkDNZ,QAAQ,CAACe,CAAD,CAAazC,CAAb,CAAyB,CAC9C,IAAI0C,EAAQC,EAAA,CAAgBF,CAAhB,CAA4BzC,CAA5B,CAAZ,CACI4C,EAAWD,EAAA,CAAgB3C,CAAhB,CAA4ByC,CAA5B,CAEK,EAApB,GAAGC,CAAApyB,OAAH,CACE+kB,CAAAmN,YAAA,CAAqB,IAAAlH,UAArB,CAAqCsH,CAArC,CADF,CAE8B,CAAvB,GAAGA,CAAAtyB,OAAH,CACL+kB,CAAAmB,SAAA,CAAkB,IAAA8E,UAAlB,CAAkCoH,CAAlC,CADK,CAGLrN,CAAAwN,SAAA,CAAkB,IAAAvH,UAAlB,CAAkCoH,CAAlC,CAAyCE,CAAzC,CAT4C,CAlD3B,MAwEf1D,QAAQ,CAACruB,CAAD,CAAMY,CAAN,CAAaqxB,CAAb,CAAwBlH,CAAxB,CAAkC,CAAA,IAK1CmH,EAAaxb,EAAA,CAAmB,IAAA+T,UAAA,CAAe,CAAf,CAAnB,CAAsCzqB,CAAtC,CAIbkyB,EAAJ,GACE,IAAAzH,UAAAtnB,KAAA,CAAoBnD
 ,CAApB,CAAyBY,CAAzB,CACA,CAAAmqB,CAAA,CAAWmH,CAFb,CAKA,KAAA,CAAKlyB,CAAL,CAAA,CAAYY,CAGRmqB,EAAJ,CACE,IAAArD,MAAA,CAAW1nB,CAAX,CADF,CACoB+qB,CADpB,EAGEA,CAHF,CAGa,IAAArD,MAAA,CAAW1nB,CAAX,CAHb,IAKI,IAAA0nB,MAAA,CAAW1nB,CAAX,CALJ,CAKsB+qB,CALtB,CAKiC7gB,EAAA,CAAWlK,CAAX,CAAgB,GAAhB,CALjC,CASAkD,EAAA,CAAW2kB,EAAA,CAAU,IAAA4C,UAAV,CAGX,IAAkB,GAAlB,GAAKvnB,CAAL,EAAiC,MAAjC,GAAyBlD,CAAzB,EACkB,KADlB,GACKkD,CADL,EACmC,KADnC,GAC2BlD,CAD3B,CAEE,IAAA,CAAKA,CAAL,CAAA,CAAYY,CAAZ,CAAoB6jB,CAAA,CAAc7jB,CAAd,CAA6B,KAA7B,GAAqBZ,CAArB,CAGJ,EAAA,CAAlB,GAAIiyB,CAAJ,GACgB,IAAd,GAAIrxB,CAAJ,EAAsBA,CAAtB,GAAgCxB,CAAhC,CACE,IAAAqrB,UAAA0H,WAAA,CAA0BpH,CAA1B,CADF;AAGE,IAAAN,UAAArnB,KAAA,CAAoB2nB,CAApB,CAA8BnqB,CAA9B,CAJJ,CAUA,EADI2qB,CACJ,CADkB,IAAAA,YAClB,GAAe1rB,CAAA,CAAQ0rB,CAAA,CAAYvrB,CAAZ,CAAR,CAA0B,QAAQ,CAACwF,CAAD,CAAK,CACpD,GAAI,CACFA,CAAA,CAAG5E,CAAH,CADE,CAEF,MAAOmG,CAAP,CAAU,CACVwc,CAAA,CAAkBxc,CAAlB,CADU,CAHwC,CAAvC,CA5C+B,CAxE3B,UAgJXukB,QAAQ,CAACtrB,CAAD,CAAMwF,CAAN,CAAU,CAAA,IACtBohB,EAAQ,
 IADc,CAEtB2E,EAAe3E,CAAA2E,YAAfA,GAAqC3E,CAAA2E,YAArCA,CAAyD,EAAzDA,CAFsB,CAGtB6G,EAAa7G,CAAA,CAAYvrB,CAAZ,CAAboyB,GAAkC7G,CAAA,CAAYvrB,CAAZ,CAAlCoyB,CAAqD,EAArDA,CAEJA,EAAA9xB,KAAA,CAAekF,CAAf,CACA2W,EAAAjY,WAAA,CAAsB,QAAQ,EAAG,CAC1BkuB,CAAA1B,QAAL,EAEElrB,CAAA,CAAGohB,CAAA,CAAM5mB,CAAN,CAAH,CAH6B,CAAjC,CAMA,OAAOwF,EAZmB,CAhJP,CAP+D,KAuKlF6sB,GAAcnO,CAAAmO,YAAA,EAvKoE,CAwKlFC,GAAYpO,CAAAoO,UAAA,EAxKsE,CAyKlF/E,EAAsC,IAChB,EADC8E,EACD,EADsC,IACtC,EADwBC,EACxB,CAAhBnwB,EAAgB,CAChBorB,QAA4B,CAACnB,CAAD,CAAW,CACvC,MAAOA,EAAA/kB,QAAA,CAAiB,OAAjB,CAA0BgrB,EAA1B,CAAAhrB,QAAA,CAA+C,KAA/C,CAAsDirB,EAAtD,CADgC,CA3KqC,CA8KlFlK,EAAkB,cAGtB,OAAO5e,EAjL+E,CAJ5E,CA3H6C,CAy8C3Doe,QAASA,GAAkB,CAAClf,CAAD,CAAO,CAChC,MAAOuI,GAAA,CAAUvI,CAAArB,QAAA,CAAakrB,EAAb,CAA4B,EAA5B,CAAV,CADyB,CA8DlCT,QAASA,GAAe,CAACU,CAAD,CAAOC,CAAP,CAAa,CAAA,IAC/BC,EAAS,EADsB,CAE/BC,EAAUH,CAAA7qB,MAAA,CAAW,KAAX,CAFqB,CAG/BirB,EAAUH,CAAA9qB,MAAA,CAAW,KAAX,CAHqB;AAM3BlH,EAAI,CADZ,EAAA,CACA,IAAA,CAAeA,CAAf,CAAmBkyB,CAAAlzB,OAAnB
 ,CAAmCgB,CAAA,EAAnC,CAAwC,CAEtC,IADA,IAAIoyB,EAAQF,CAAA,CAAQlyB,CAAR,CAAZ,CACQqT,EAAI,CAAZ,CAAeA,CAAf,CAAmB8e,CAAAnzB,OAAnB,CAAmCqU,CAAA,EAAnC,CACE,GAAG+e,CAAH,EAAYD,CAAA,CAAQ9e,CAAR,CAAZ,CAAwB,SAAS,CAEnC4e,EAAA,GAA2B,CAAhB,CAAAA,CAAAjzB,OAAA,CAAoB,GAApB,CAA0B,EAArC,EAA2CozB,CALL,CAOxC,MAAOH,EAb4B,CA0BrC9iB,QAASA,GAAmB,EAAG,CAAA,IACzB0X,EAAc,EADW,CAEzBwL,EAAY,yBAWhB,KAAAC,SAAA,CAAgBC,QAAQ,CAACtqB,CAAD,CAAOmC,CAAP,CAAoB,CAC1CC,EAAA,CAAwBpC,CAAxB,CAA8B,YAA9B,CACIlG,EAAA,CAASkG,CAAT,CAAJ,CACEjH,CAAA,CAAO6lB,CAAP,CAAoB5e,CAApB,CADF,CAGE4e,CAAA,CAAY5e,CAAZ,CAHF,CAGsBmC,CALoB,CAU5C,KAAA0O,KAAA,CAAY,CAAC,WAAD,CAAc,SAAd,CAAyB,QAAQ,CAAC4B,CAAD,CAAYc,CAAZ,CAAqB,CAwBhE,MAAO,SAAQ,CAACgX,CAAD,CAAavY,CAAb,CAAqB,CAAA,IAC9BM,CAD8B,CACbnQ,CADa,CACAqoB,CAE/BvzB,EAAA,CAASszB,CAAT,CAAH,GACE7rB,CAOA,CAPQ6rB,CAAA7rB,MAAA,CAAiB0rB,CAAjB,CAOR,CANAjoB,CAMA,CANczD,CAAA,CAAM,CAAN,CAMd,CALA8rB,CAKA,CALa9rB,CAAA,CAAM,CAAN,CAKb,CAJA6rB,CAIA,CAJa3L,CAAApnB,eAAA,CAA2B2K,CAA3B,CACA,CAAPyc,CAAA,CAAYzc,CAAZ,CAAO,CACP
 E,EAAA,CAAO2P,CAAAwR,OAAP,CAAsBrhB,CAAtB,CAAmC,CAAA,CAAnC,CADO,EACqCE,EAAA,CAAOkR,CAAP,CAAgBpR,CAAhB,CAA6B,CAAA,CAA7B,CAElD,CAAAF,EAAA,CAAYsoB,CAAZ,CAAwBpoB,CAAxB,CAAqC,CAAA,CAArC,CARF,CAWAmQ,EAAA,CAAWG,CAAA7B,YAAA,CAAsB2Z,CAAtB,CAAkCvY,CAAlC,CAEX,IAAIwY,CAAJ,CAAgB,CACd,GAAMxY,CAAAA,CAAN,EAAyC,QAAzC,GAAgB,MAAOA,EAAAwR,OAAvB,CACE,KAAM7sB,EAAA,CAAO,aAAP,CAAA,CAAsB,OAAtB;AAEFwL,CAFE,EAEaooB,CAAAvqB,KAFb,CAE8BwqB,CAF9B,CAAN,CAKFxY,CAAAwR,OAAA,CAAcgH,CAAd,CAAA,CAA4BlY,CAPd,CAUhB,MAAOA,EA1B2B,CAxB4B,CAAtD,CAvBiB,CAsG/BnL,QAASA,GAAiB,EAAE,CAC1B,IAAA0J,KAAA,CAAY,CAAC,SAAD,CAAY,QAAQ,CAACra,CAAD,CAAQ,CACtC,MAAO0H,EAAA,CAAO1H,CAAAC,SAAP,CAD+B,CAA5B,CADc,CAsC5B2Q,QAASA,GAAyB,EAAG,CACnC,IAAAyJ,KAAA,CAAY,CAAC,MAAD,CAAS,QAAQ,CAAC0D,CAAD,CAAO,CAClC,MAAO,SAAQ,CAACkW,CAAD,CAAYC,CAAZ,CAAmB,CAChCnW,CAAAM,MAAA3X,MAAA,CAAiBqX,CAAjB,CAAuBtb,SAAvB,CADgC,CADA,CAAxB,CADuB,CAcrC0xB,QAASA,GAAY,CAAC/D,CAAD,CAAU,CAAA,IACzBzc,EAAS,EADgB,CACZ7S,CADY,CACP+F,CADO,CACFtF,CAE3B,IAAI,CAAC6uB,CAAL,CAAc,MAAOzc,EAErBhT,EA
 AA,CAAQyvB,CAAA3nB,MAAA,CAAc,IAAd,CAAR,CAA6B,QAAQ,CAAC2rB,CAAD,CAAO,CAC1C7yB,CAAA,CAAI6yB,CAAA7vB,QAAA,CAAa,GAAb,CACJzD,EAAA,CAAMyG,CAAA,CAAUkM,EAAA,CAAK2gB,CAAAjL,OAAA,CAAY,CAAZ,CAAe5nB,CAAf,CAAL,CAAV,CACNsF,EAAA,CAAM4M,EAAA,CAAK2gB,CAAAjL,OAAA,CAAY5nB,CAAZ,CAAgB,CAAhB,CAAL,CAEFT,EAAJ,GAEI6S,CAAA,CAAO7S,CAAP,CAFJ,CACM6S,CAAA,CAAO7S,CAAP,CAAJ,CACE6S,CAAA,CAAO7S,CAAP,CADF,EACiB,IADjB,CACwB+F,CADxB,EAGgBA,CAJlB,CAL0C,CAA5C,CAcA,OAAO8M,EAnBsB,CAmC/B0gB,QAASA,GAAa,CAACjE,CAAD,CAAU,CAC9B,IAAIkE,EAAahxB,CAAA,CAAS8sB,CAAT,CAAA,CAAoBA,CAApB,CAA8BlwB,CAE/C,OAAO,SAAQ,CAACsJ,CAAD,CAAO,CACf8qB,CAAL,GAAiBA,CAAjB,CAA+BH,EAAA,CAAa/D,CAAb,CAA/B,CAEA,OAAI5mB,EAAJ,CACS8qB,CAAA,CAAW/sB,CAAA,CAAUiC,CAAV,CAAX,CADT,EACwC,IADxC,CAIO8qB,CAPa,CAHQ,CAyBhCC,QAASA,GAAa,CAAC9pB,CAAD,CAAO2lB,CAAP,CAAgBoE,CAAhB,CAAqB,CACzC,GAAIzzB,CAAA,CAAWyzB,CAAX,CAAJ,CACE,MAAOA,EAAA,CAAI/pB,CAAJ;AAAU2lB,CAAV,CAETzvB,EAAA,CAAQ6zB,CAAR,CAAa,QAAQ,CAACluB,CAAD,CAAK,CACxBmE,CAAA,CAAOnE,CAAA,CAAGmE,CAAH,CAAS2lB,CAAT,CADiB,CAA1B,CAIA
 ,OAAO3lB,EARkC,CAiB3CuG,QAASA,GAAa,EAAG,CAAA,IACnByjB,EAAa,kBADM,CAEnBC,EAAW,YAFQ,CAGnBC,EAAoB,cAHD,CAInBC,EAAgC,CAAC,cAAD,CAAiB,gCAAjB,CAJb,CAMnBC,EAAW,IAAAA,SAAXA,CAA2B,mBAEV,CAAC,QAAQ,CAACpqB,CAAD,CAAO,CAC7BhK,CAAA,CAASgK,CAAT,CAAJ,GAEEA,CACA,CADOA,CAAAtC,QAAA,CAAawsB,CAAb,CAAgC,EAAhC,CACP,CAAIF,CAAA9pB,KAAA,CAAgBF,CAAhB,CAAJ,EAA6BiqB,CAAA/pB,KAAA,CAAcF,CAAd,CAA7B,GACEA,CADF,CACSvD,EAAA,CAASuD,CAAT,CADT,CAHF,CAMA,OAAOA,EAP0B,CAAhB,CAFU,kBAaX,CAAC,QAAQ,CAACqqB,CAAD,CAAI,CAC7B,MAAOxxB,EAAA,CAASwxB,CAAT,CAAA,EAnmNmB,eAmmNnB,GAnmNJrxB,EAAAxC,KAAA,CAmmN2B6zB,CAnmN3B,CAmmNI,EA9lNmB,eA8lNnB,GA9lNJrxB,EAAAxC,KAAA,CA8lNyC6zB,CA9lNzC,CA8lNI,CAA0ChuB,EAAA,CAAOguB,CAAP,CAA1C,CAAsDA,CADhC,CAAb,CAbW,SAkBpB,QACC,QACI,mCADJ,CADD,MAICvvB,EAAA,CAAYqvB,CAAZ,CAJD,KAKCrvB,EAAA,CAAYqvB,CAAZ,CALD,OAMCrvB,EAAA,CAAYqvB,CAAZ,CAND,CAlBoB,gBA2Bb,YA3Ba;eA4Bb,cA5Ba,CANR,CAyCnBG,EAAuB,IAAAC,aAAvBD,CAA2C,EAzCxB,CA+CnBE,EAA+B,IAAAC,qBAA/BD,CAA2D,EAE/D,KAAA5a,KAAA,CAAY,CAAC,cAAD,CAAiB,UAAjB,CAA6B,eAA7B,CAA8C,YAA9
 C,CAA4D,IAA5D,CAAkE,WAAlE,CACR,QAAQ,CAAC8a,CAAD,CAAeC,CAAf,CAAyBzR,CAAzB,CAAwC1G,CAAxC,CAAoDoY,CAApD,CAAwDpZ,CAAxD,CAAmE,CAihB7EgJ,QAASA,EAAK,CAACqQ,CAAD,CAAgB,CAqE5BC,QAASA,EAAiB,CAACrF,CAAD,CAAW,CAEnC,IAAIsF,EAAOjzB,CAAA,CAAO,EAAP,CAAW2tB,CAAX,CAAqB,MACxBqE,EAAA,CAAcrE,CAAAzlB,KAAd,CAA6BylB,CAAAE,QAA7B,CAA+ChjB,CAAAmoB,kBAA/C,CADwB,CAArB,CAGX,OAjpBC,IAkpBM,EADWrF,CAAAuF,OACX,EAlpBoB,GAkpBpB,CADWvF,CAAAuF,OACX,CAAHD,CAAG,CACHH,CAAAK,OAAA,CAAUF,CAAV,CAP+B,CApErC,IAAIpoB,EAAS,QACH,KADG,kBAEOynB,CAAAc,iBAFP,mBAGQd,CAAAU,kBAHR,CAAb,CAKInF,EAyEJwF,QAAqB,CAACxoB,CAAD,CAAS,CA2B5ByoB,QAASA,EAAW,CAACzF,CAAD,CAAU,CAC5B,IAAI0F,CAEJn1B,EAAA,CAAQyvB,CAAR,CAAiB,QAAQ,CAAC2F,CAAD,CAAWC,CAAX,CAAmB,CACtCj1B,CAAA,CAAWg1B,CAAX,CAAJ,GACED,CACA,CADgBC,CAAA,EAChB,CAAqB,IAArB,EAAID,CAAJ,CACE1F,CAAA,CAAQ4F,CAAR,CADF;AACoBF,CADpB,CAGE,OAAO1F,CAAA,CAAQ4F,CAAR,CALX,CAD0C,CAA5C,CAH4B,CA3BF,IACxBC,EAAapB,CAAAzE,QADW,CAExB8F,EAAa3zB,CAAA,CAAO,EAAP,CAAW6K,CAAAgjB,QAAX,CAFW,CAGxB+F,CAHwB,CAGeC,CAHf,CAK5BH,EAAa1zB,
 CAAA,CAAO,EAAP,CAAW0zB,CAAAI,OAAX,CAA8BJ,CAAA,CAAW1uB,CAAA,CAAU6F,CAAAL,OAAV,CAAX,CAA9B,CAGb8oB,EAAA,CAAYI,CAAZ,CACAJ,EAAA,CAAYK,CAAZ,CAGA,EAAA,CACA,IAAKC,CAAL,GAAsBF,EAAtB,CAAkC,CAChCK,CAAA,CAAyB/uB,CAAA,CAAU4uB,CAAV,CAEzB,KAAKC,CAAL,GAAsBF,EAAtB,CACE,GAAI3uB,CAAA,CAAU6uB,CAAV,CAAJ,GAAiCE,CAAjC,CACE,SAAS,CAIbJ,EAAA,CAAWC,CAAX,CAAA,CAA4BF,CAAA,CAAWE,CAAX,CATI,CAYlC,MAAOD,EAzBqB,CAzEhB,CAAaZ,CAAb,CAEd/yB,EAAA,CAAO6K,CAAP,CAAekoB,CAAf,CACAloB,EAAAgjB,QAAA,CAAiBA,CACjBhjB,EAAAL,OAAA,CAAgBU,EAAA,CAAUL,CAAAL,OAAV,CAuBhB,KAAIwpB,EAAQ,CArBQC,QAAQ,CAACppB,CAAD,CAAS,CACnCgjB,CAAA,CAAUhjB,CAAAgjB,QACV,KAAIqG,EAAUlC,EAAA,CAAcnnB,CAAA3C,KAAd,CAA2B4pB,EAAA,CAAcjE,CAAd,CAA3B,CAAmDhjB,CAAAuoB,iBAAnD,CAGVvyB,EAAA,CAAYgK,CAAA3C,KAAZ,CAAJ,EACE9J,CAAA,CAAQyvB,CAAR,CAAiB,QAAQ,CAAC1uB,CAAD,CAAQs0B,CAAR,CAAgB,CACb,cAA1B,GAAIzuB,CAAA,CAAUyuB,CAAV,CAAJ,EACI,OAAO5F,CAAA,CAAQ4F,CAAR,CAF4B,CAAzC,CAOE5yB,EAAA,CAAYgK,CAAAspB,gBAAZ,CAAJ,EAA4C,CAAAtzB,CAAA,CAAYyxB,CAAA6B,gBAAZ,CAA5C,GACEtpB,CAAAspB,gBADF,CAC2B7B,
 CAAA6B,gBAD3B,CAKA,OAAOC,EAAA,CAAQvpB,CAAR,CAAgBqpB,CAAhB,CAAyBrG,CAAzB,CAAAwG,KAAA,CAAuCrB,CAAvC,CAA0DA,CAA1D,CAlB4B,CAqBzB,CAAgBr1B,CAAhB,CAAZ,CACI22B,EAAUxB,CAAAyB,KAAA,CAAQ1pB,CAAR,CAYd,KATAzM,CAAA,CAAQo2B,CAAR,CAA8B,QAAQ,CAACC,CAAD,CAAc,CAClD,CAAIA,CAAAC,QAAJ;AAA2BD,CAAAE,aAA3B,GACEX,CAAAp0B,QAAA,CAAc60B,CAAAC,QAAd,CAAmCD,CAAAE,aAAnC,CAEF,EAAIF,CAAA9G,SAAJ,EAA4B8G,CAAAG,cAA5B,GACEZ,CAAAn1B,KAAA,CAAW41B,CAAA9G,SAAX,CAAiC8G,CAAAG,cAAjC,CALgD,CAApD,CASA,CAAMZ,CAAAh2B,OAAN,CAAA,CAAoB,CACd62B,CAAAA,CAASb,CAAArjB,MAAA,EACb,KAAImkB,EAAWd,CAAArjB,MAAA,EAAf,CAEA2jB,EAAUA,CAAAD,KAAA,CAAaQ,CAAb,CAAqBC,CAArB,CAJQ,CAOpBR,CAAAjH,QAAA,CAAkB0H,QAAQ,CAAChxB,CAAD,CAAK,CAC7BuwB,CAAAD,KAAA,CAAa,QAAQ,CAAC1G,CAAD,CAAW,CAC9B5pB,CAAA,CAAG4pB,CAAAzlB,KAAH,CAAkBylB,CAAAuF,OAAlB,CAAmCvF,CAAAE,QAAnC,CAAqDhjB,CAArD,CAD8B,CAAhC,CAGA,OAAOypB,EAJsB,CAO/BA,EAAAxY,MAAA,CAAgBkZ,QAAQ,CAACjxB,CAAD,CAAK,CAC3BuwB,CAAAD,KAAA,CAAa,IAAb,CAAmB,QAAQ,CAAC1G,CAAD,CAAW,CACpC5pB,CAAA,CAAG4pB,CAAAzlB,KAAH,CAAkBylB,CAAAuF,OAAl
 B,CAAmCvF,CAAAE,QAAnC,CAAqDhjB,CAArD,CADoC,CAAtC,CAGA,OAAOypB,EAJoB,CAO7B,OAAOA,EAnEqB,CAyP9BF,QAASA,EAAO,CAACvpB,CAAD,CAASqpB,CAAT,CAAkBP,CAAlB,CAA8B,CA8D5CsB,QAASA,EAAI,CAAC/B,CAAD,CAASvF,CAAT,CAAmBuH,CAAnB,CAAkCC,CAAlC,CAA8C,CACrDvc,CAAJ,GA/3BC,GAg4BC,EAAcsa,CAAd,EAh4ByB,GAg4BzB,CAAcA,CAAd,CACEta,CAAAhC,IAAA,CAAU6F,CAAV,CAAe,CAACyW,CAAD,CAASvF,CAAT,CAAmBiE,EAAA,CAAasD,CAAb,CAAnB,CAAgDC,CAAhD,CAAf,CADF,CAIEvc,CAAAkI,OAAA,CAAarE,CAAb,CALJ,CASA2Y,EAAA,CAAezH,CAAf,CAAyBuF,CAAzB,CAAiCgC,CAAjC,CAAgDC,CAAhD,CACKza,EAAA2a,QAAL,EAAyB3a,CAAAzS,OAAA,EAXgC,CAkB3DmtB,QAASA,EAAc,CAACzH,CAAD,CAAWuF,CAAX,CAAmBrF,CAAnB,CAA4BsH,CAA5B,CAAwC,CAE7DjC,CAAA;AAAS7G,IAAAC,IAAA,CAAS4G,CAAT,CAAiB,CAAjB,CAER,EAp5BA,GAo5BA,EAAUA,CAAV,EAp5B0B,GAo5B1B,CAAUA,CAAV,CAAoBoC,CAAAC,QAApB,CAAuCD,CAAAnC,OAAvC,EAAwD,MACjDxF,CADiD,QAE/CuF,CAF+C,SAG9CpB,EAAA,CAAcjE,CAAd,CAH8C,QAI/ChjB,CAJ+C,YAK1CsqB,CAL0C,CAAxD,CAJ4D,CAc/DK,QAASA,EAAgB,EAAG,CAC1B,IAAIC,EAAMzzB,EAAA,CAAQ0gB,CAAAgT,gBAAR,CAA+B7qB,CAA/B,CACG,GAAb,GAAI4qB,CA
 AJ,EAAgB/S,CAAAgT,gBAAAvzB,OAAA,CAA6BszB,CAA7B,CAAkC,CAAlC,CAFU,CA9FgB,IACxCH,EAAWxC,CAAA7T,MAAA,EAD6B,CAExCqV,EAAUgB,CAAAhB,QAF8B,CAGxC1b,CAHwC,CAIxC+c,CAJwC,CAKxClZ,EAAMmZ,CAAA,CAAS/qB,CAAA4R,IAAT,CAAqB5R,CAAAgrB,OAArB,CAEVnT,EAAAgT,gBAAA72B,KAAA,CAA2BgM,CAA3B,CACAypB,EAAAD,KAAA,CAAamB,CAAb,CAA+BA,CAA/B,CAGA,EAAK3qB,CAAA+N,MAAL,EAAqB0Z,CAAA1Z,MAArB,IAAyD,CAAA,CAAzD,GAAwC/N,CAAA+N,MAAxC,EAAmF,KAAnF,EAAkE/N,CAAAL,OAAlE,IACEoO,CADF,CACU7X,CAAA,CAAS8J,CAAA+N,MAAT,CAAA,CAAyB/N,CAAA+N,MAAzB,CACA7X,CAAA,CAASuxB,CAAA1Z,MAAT,CAAA,CAA2B0Z,CAAA1Z,MAA3B,CACAkd,CAHV,CAMA,IAAIld,CAAJ,CAEE,GADA+c,CACI,CADS/c,CAAAP,IAAA,CAAUoE,CAAV,CACT,CAAA3b,CAAA,CAAU60B,CAAV,CAAJ,CAA2B,CACzB,GAAIA,CAAAtB,KAAJ,CAGE,MADAsB,EAAAtB,KAAA,CAAgBmB,CAAhB,CAAkCA,CAAlC,CACOG,CAAAA,CAGHx3B,EAAA,CAAQw3B,CAAR,CAAJ,CACEP,CAAA,CAAeO,CAAA,CAAW,CAAX,CAAf,CAA8BA,CAAA,CAAW,CAAX,CAA9B,CAA6C3yB,EAAA,CAAY2yB,CAAA,CAAW,CAAX,CAAZ,CAA7C,CAAyEA,CAAA,CAAW,CAAX,CAAzE,CADF,CAGEP,CAAA,CAAeO,CAAf,CAA2B,GAA3B,CAAgC,EAAhC,CAAoC,IAApC,CAVqB,CA
 A3B,IAeE/c,EAAAhC,IAAA,CAAU6F,CAA

<TRUNCATED>

[06/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeIntegrationTest.java
deleted file mode 100644
index 8b5ec54..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeIntegrationTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchdb;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.nosql.couchdb.CouchDBNode;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * CouchDB integration tests.
- *
- * Test the operation of the {@link CouchDBNode} class.
- */
-public class CouchDBNodeIntegrationTest extends AbstractCouchDBNodeTest {
-
-    /**
-     * Test that a node starts and sets SERVICE_UP correctly.
-     */
-    @Test(groups = {"Integration", "WIP"})
-    public void canStartupAndShutdown() {
-        couchdb = app.createAndManageChild(EntitySpec.create(CouchDBNode.class)
-                .configure("httpPort", "8000+"));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(couchdb, Startable.SERVICE_UP, true);
-
-        couchdb.stop();
-
-        EntityTestUtils.assertAttributeEquals(couchdb, Startable.SERVICE_UP, false);
-    }
-
-    /**
-     * Test that a node can be used with jcouchdb client.
-     */
-    @Test(groups = {"Integration", "WIP"})
-    public void testConnection() throws Exception {
-        couchdb = app.createAndManageChild(EntitySpec.create(CouchDBNode.class)
-                .configure("httpPort", "8000+"));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(couchdb, Startable.SERVICE_UP, true);
-
-        JcouchdbSupport jcouchdb = new JcouchdbSupport(couchdb);
-        jcouchdb.jcouchdbTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeLiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeLiveTest.java
deleted file mode 100644
index bfaf1b7..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeLiveTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchdb;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.nosql.couchdb.CouchDBNode;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.text.Strings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * CouchDB live tests.
- *
- * Test the operation of the {@link CouchDBNode} class using the jclouds {@code rackspace-cloudservers-uk}
- * and {@code aws-ec2} providers, with different OS images. The tests use the {@link JcouchdbSupport#jcouchdbTest(CouchDBNode)} method
- * to exercise the node, and will need to have {@code brooklyn.jclouds.provider.identity} and {@code .credential}
- * set, usually in the {@code .brooklyn/brooklyn.properties} file.
- */
-public class CouchDBNodeLiveTest extends AbstractCouchDBNodeTest {
-
-    private static final Logger log = LoggerFactory.getLogger(CouchDBNodeLiveTest.class);
-
-    @DataProvider(name = "virtualMachineData")
-    public Object[][] provideVirtualMachineData() {
-        return new Object[][] { // ImageId, Provider, Region, Description (for logging)
-            new Object[] { "eu-west-1/ami-0307d674", "aws-ec2", "eu-west-1", "Ubuntu Server 14.04 LTS (HVM), SSD Volume Type" },
-            new Object[] { "LON/f9b690bf-88eb-43c2-99cf-391f2558732e", "rackspace-cloudservers-uk", "", "Ubuntu 12.04 LTS (Precise Pangolin)" }, 
-            new Object[] { "LON/a84b1592-6817-42da-a57c-3c13f3cfc1da", "rackspace-cloudservers-uk", "", "CentOS 6.5 (PVHVM)" }, 
-        };
-    }
-
-    @Test(groups = "Live", dataProvider = "virtualMachineData")
-    protected void testOperatingSystemProvider(String imageId, String provider, String region, String description) throws Exception {
-        log.info("Testing CouchDB on {}{} using {} ({})", new Object[] { provider, Strings.isNonEmpty(region) ? ":" + region : "", description, imageId });
-
-        Map<String, String> properties = MutableMap.of("imageId", imageId);
-        testLocation = app.getManagementContext().getLocationRegistry()
-                .resolve(provider + (Strings.isNonEmpty(region) ? ":" + region : ""), properties);
-
-        couchdb = app.createAndManageChild(EntitySpec.create(CouchDBNode.class)
-                .configure("httpPort", "12345+")
-                .configure("clusterName", "TestCluster"));
-        app.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(couchdb, Startable.SERVICE_UP, true);
-
-        JcouchdbSupport jcouchdb = new JcouchdbSupport(couchdb);
-        jcouchdb.jcouchdbTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/JcouchdbSupport.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/JcouchdbSupport.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/JcouchdbSupport.java
deleted file mode 100644
index 9883ea6..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/JcouchdbSupport.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchdb;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.entity.nosql.couchdb.CouchDBNode;
-import org.jcouchdb.db.Database;
-import org.jcouchdb.db.Server;
-import org.jcouchdb.db.ServerImpl;
-
-/**
- * CouchDB test framework for integration and live tests, using jcouchdb API.
- */
-public class JcouchdbSupport {
-
-    private CouchDBNode node;
-
-    public JcouchdbSupport(CouchDBNode node) {
-        this.node = node;
-    }
-
-    /**
-     * Exercise the {@link CouchDBNode} using the jcouchdb API.
-     */
-    public void jcouchdbTest() throws Exception {
-        Server server = new ServerImpl(node.getAttribute(Attributes.HOSTNAME), node.getHttpPort());
-        assertTrue(server.createDatabase("brooklyn"));
-
-        Database db = new Database(node.getAttribute(Attributes.HOSTNAME), node.getHttpPort(), "brooklyn");
-
-        // create a hash map document with two fields
-        Map<String,String> doc = new HashMap<String, String>();
-        doc.put("first", "one");
-        doc.put("second", "two");
-
-        // create the document in couchdb
-        int before = db.listDocuments(null, null).getTotalRows();
-        db.createDocument(doc);
-        int after = db.listDocuments(null, null).getTotalRows();
-
-        assertEquals(before + 1, after);
-    }
-
-    /**
-     * Write to a {@link CouchDBNode} using the jcouchdb API.
-     */
-    protected void writeData() throws Exception {
-    }
-
-    /**
-     * Read from a {@link CouchDBNode} using the jcouchdb API.
-     */
-    protected void readData() throws Exception {
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchClusterIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchClusterIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchClusterIntegrationTest.java
deleted file mode 100644
index eacc57f..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchClusterIntegrationTest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.elasticsearch;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.http.HttpTool;
-import org.apache.brooklyn.util.http.HttpToolResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.bouncycastle.util.Strings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public class ElasticSearchClusterIntegrationTest extends BrooklynAppLiveTestSupport {
-
-    // FIXME Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/bootstrap/Elasticsearch : Unsupported major.minor version 51.0
-
-    private static final Logger LOG = LoggerFactory.getLogger(ElasticSearchClusterIntegrationTest.class);
-
-    protected Location testLocation;
-    protected ElasticSearchCluster elasticSearchCluster;
-
-    @BeforeMethod(alwaysRun = true)
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        testLocation = app.newLocalhostProvisioningLocation();
-    }
-
-    @Test(groups = {"Integration"})
-    public void testStartupAndShutdown() {
-        elasticSearchCluster = app.createAndManageChild(EntitySpec.create(ElasticSearchCluster.class)
-                .configure(DynamicCluster.INITIAL_SIZE, 3));
-        app.start(ImmutableList.of(testLocation));
-        
-        EntityTestUtils.assertAttributeEqualsEventually(elasticSearchCluster, Startable.SERVICE_UP, true);
-        
-        elasticSearchCluster.stop();
-        
-        EntityTestUtils.assertAttributeEqualsEventually(elasticSearchCluster, Startable.SERVICE_UP, false);
-    }
-    
-    @Test(groups = {"Integration"})
-    public void testPutAndGet() throws URISyntaxException {
-        elasticSearchCluster = app.createAndManageChild(EntitySpec.create(ElasticSearchCluster.class)
-                .configure(DynamicCluster.INITIAL_SIZE, 3));
-        app.start(ImmutableList.of(testLocation));
-        
-        EntityTestUtils.assertAttributeEqualsEventually(elasticSearchCluster, Startable.SERVICE_UP, true);
-        assertEquals(elasticSearchCluster.getMembers().size(), 3);
-        assertEquals(clusterDocumentCount(), 0);
-        
-        ElasticSearchNode anyNode = (ElasticSearchNode)elasticSearchCluster.getMembers().iterator().next();
-        
-        String document = "{\"foo\" : \"bar\",\"baz\" : \"quux\"}";
-        
-        String putBaseUri = "http://" + anyNode.getAttribute(Attributes.HOSTNAME) + ":" + anyNode.getAttribute(Attributes.HTTP_PORT);
-        
-        HttpToolResponse putResponse = HttpTool.httpPut(
-                HttpTool.httpClientBuilder()
-                    .port(anyNode.getAttribute(Attributes.HTTP_PORT))
-                    .build(), 
-                new URI(putBaseUri + "/mydocuments/docs/1"), 
-                ImmutableMap.<String, String>of(), 
-                Strings.toByteArray(document)); 
-        assertEquals(putResponse.getResponseCode(), 201);
-        
-        for (Entity entity : elasticSearchCluster.getMembers()) {
-            ElasticSearchNode node = (ElasticSearchNode)entity;
-            String getBaseUri = "http://" + node.getAttribute(Attributes.HOSTNAME) + ":" + node.getAttribute(Attributes.HTTP_PORT);
-            HttpToolResponse getResponse = HttpTool.execAndConsume(
-                    HttpTool.httpClientBuilder().build(),
-                    new HttpGet(getBaseUri + "/mydocuments/docs/1/_source"));
-            assertEquals(getResponse.getResponseCode(), 200);
-            assertEquals(HttpValueFunctions.jsonContents("foo", String.class).apply(getResponse), "bar");
-        }
-        Asserts.succeedsEventually(new Runnable() {
-            public void run() {
-                int count = clusterDocumentCount();
-                assertTrue(count >= 1, "count="+count);
-                LOG.debug("Document count is {}", count);
-            }});
-    }
-    
-    private int clusterDocumentCount() {
-        int result = 0;
-        for (Entity entity : elasticSearchCluster.getMembers()) {
-            result += entity.getAttribute(ElasticSearchNode.DOCUMENT_COUNT);
-        }
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeIntegrationTest.java
deleted file mode 100644
index e6412f8..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeIntegrationTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.elasticsearch;
-
-import static org.testng.Assert.assertEquals;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.http.HttpTool;
-import org.apache.brooklyn.util.http.HttpToolResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.bouncycastle.util.Strings;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public class ElasticSearchNodeIntegrationTest {
-    
-    protected TestApplication app;
-    protected Location testLocation;
-    protected ElasticSearchNode elasticSearchNode;
-
-    @BeforeMethod(alwaysRun = true)
-    public void setup() throws Exception {
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-        testLocation = new LocalhostMachineProvisioningLocation();
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void shutdown() {
-        Entities.destroyAll(app.getManagementContext());
-    }
-    
-    @Test(groups = {"Integration"})
-    public void testStartupAndShutdown() {
-        elasticSearchNode = app.createAndManageChild(EntitySpec.create(ElasticSearchNode.class));
-        app.start(ImmutableList.of(testLocation));
-        
-        EntityTestUtils.assertAttributeEqualsEventually(elasticSearchNode, Startable.SERVICE_UP, true);
-        
-        elasticSearchNode.stop();
-        
-        EntityTestUtils.assertAttributeEqualsEventually(elasticSearchNode, Startable.SERVICE_UP, false);
-    }
-    
-    @Test(groups = {"Integration"})
-    public void testDocumentCount() throws URISyntaxException {
-        elasticSearchNode = app.createAndManageChild(EntitySpec.create(ElasticSearchNode.class));
-        app.start(ImmutableList.of(testLocation));
-        
-        EntityTestUtils.assertAttributeEqualsEventually(elasticSearchNode, Startable.SERVICE_UP, true);
-        
-        EntityTestUtils.assertAttributeEquals(elasticSearchNode, ElasticSearchNode.DOCUMENT_COUNT, 0);
-        
-        String baseUri = "http://" + elasticSearchNode.getAttribute(Attributes.HOSTNAME) + ":" + elasticSearchNode.getAttribute(Attributes.HTTP_PORT);
-        
-        HttpToolResponse pingResponse = HttpTool.execAndConsume(
-                HttpTool.httpClientBuilder().build(),
-                new HttpGet(baseUri));
-        assertEquals(pingResponse.getResponseCode(), 200);
-        
-        String document = "{\"foo\" : \"bar\",\"baz\" : \"quux\"}";
-        
-        HttpToolResponse putResponse = HttpTool.httpPut(
-                HttpTool.httpClientBuilder()
-                    .port(elasticSearchNode.getAttribute(Attributes.HTTP_PORT))
-                    .build(), 
-                new URI(baseUri + "/mydocuments/docs/1"), 
-                ImmutableMap.<String, String>of(), 
-                Strings.toByteArray(document)); 
-        assertEquals(putResponse.getResponseCode(), 201);
-        
-        HttpToolResponse getResponse = HttpTool.execAndConsume(
-                HttpTool.httpClientBuilder().build(),
-                new HttpGet(baseUri + "/mydocuments/docs/1/_source"));
-        assertEquals(getResponse.getResponseCode(), 200);
-        assertEquals(HttpValueFunctions.jsonContents("foo", String.class).apply(getResponse), "bar");
-        
-        EntityTestUtils.assertAttributeEqualsEventually(elasticSearchNode, ElasticSearchNode.DOCUMENT_COUNT, 1);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterEc2LiveTest.java
deleted file mode 100644
index 111ba9e..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterEc2LiveTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.hazelcast;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.api.location.Location;
-
-public class HazelcastClusterEc2LiveTest extends AbstractEc2LiveTest {
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(HazelcastClusterEc2LiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        HazelcastTestHelper.testHazelcastCluster(app, loc);
-    }
-
-    @Test(enabled = false)
-    public void testDummy() {
-    } // Convince TestNG IDE integration that this really does have test methods
-
-    
-    @Test(groups = {"Live", "Live-sanity"})
-    @Override
-    public void test_CentOS_6_3() throws Exception {
-        super.test_CentOS_6_3();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterNodeIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterNodeIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterNodeIntegrationTest.java
deleted file mode 100644
index dc89934..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterNodeIntegrationTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.hazelcast;
-
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-public class HazelcastClusterNodeIntegrationTest {
-    private TestApplication app;
-    private Location location;
-
-    @BeforeMethod(alwaysRun = true)
-    public void setup() throws Exception {
-        app = TestApplication.Factory.newManagedInstanceForTests();;
-        location = new LocalhostMachineProvisioningLocation();
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void shutdown() {
-        Entities.destroyAll(app.getManagementContext());
-    }
-
-    @Test(groups = {"Integration"})
-    public void testHazelcastCluster() {
-        HazelcastTestHelper.testHazelcastCluster(app, location);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterSoftlayerLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterSoftlayerLiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterSoftlayerLiveTest.java
deleted file mode 100644
index 412ce87..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterSoftlayerLiveTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.hazelcast;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import org.apache.brooklyn.entity.AbstractSoftlayerLiveTest;
-import org.apache.brooklyn.api.location.Location;
-
-public class HazelcastClusterSoftlayerLiveTest extends AbstractSoftlayerLiveTest {
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(HazelcastClusterSoftlayerLiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        HazelcastTestHelper.testHazelcastCluster(app, loc);
-    }
-
-    @Test(enabled = false)
-    public void testDummy() {
-    } // Convince TestNG IDE integration that this really does have test methods
-
-    
-    @Test(groups = {"Live", "Live-sanity"})
-    @Override
-    public void test_Ubuntu_12_0_4() throws Exception {
-        super.test_Ubuntu_12_0_4();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeIntegrationTest.java
deleted file mode 100644
index 26a18c5..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeIntegrationTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.hazelcast;
-
-import static org.testng.Assert.assertEquals;
-
-import java.net.URISyntaxException;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.EntityAsserts;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.util.http.HttpTool;
-import org.apache.brooklyn.util.http.HttpToolResponse;
-import org.apache.http.client.methods.HttpGet;
-import com.hazelcast.core.HazelcastInstance;
-import com.hazelcast.core.IMap;
-
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.collect.ImmutableList;
-
-public class HazelcastNodeIntegrationTest {
-    protected TestApplication app;
-    protected Location testLocation;
-    protected HazelcastNode hazelcastNode;
-
-    @BeforeMethod(alwaysRun = true)
-    public void setup() throws Exception {
-        app = TestApplication.Factory.newManagedInstanceForTests();;
-        testLocation = new LocalhostMachineProvisioningLocation();
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void shutdown() {
-        Entities.destroyAll(app.getManagementContext());
-    }
-    
-    @Test(groups = {"Integration"})
-    public void testHazelcastStartupAndShutdown() {
-        hazelcastNode = app.createAndManageChild(EntitySpec.create(HazelcastNode.class));
-        app.start(ImmutableList.of(testLocation));
-        EntityAsserts.assertAttributeEqualsEventually(hazelcastNode, Startable.SERVICE_UP, true);
-
-        hazelcastNode.stop();
-        EntityAsserts.assertAttributeEqualsEventually(hazelcastNode, Startable.SERVICE_UP, false);
-    }
-
-    @Test(groups = {"Integration"})
-    public void testHazelcastRestInterface() throws URISyntaxException {
-        hazelcastNode = app.createAndManageChild(EntitySpec.create(HazelcastNode.class));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityAsserts.assertAttributeEqualsEventually(hazelcastNode, Startable.SERVICE_UP, true);
-        EntityAsserts.assertAttributeEquals(hazelcastNode, HazelcastNode.NODE_PORT, 5701);
-
-        String baseUri = String.format("http://%s:%d/hazelcast/rest/cluster", hazelcastNode.getAttribute(Attributes.HOSTNAME), hazelcastNode.getAttribute(HazelcastNode.NODE_PORT)); 
-        HttpToolResponse response = HttpTool.execAndConsume(
-                HttpTool.httpClientBuilder().build(),
-                new HttpGet(baseUri));
-        assertEquals(response.getResponseCode(), 200);
-    }
-
-    @Test(groups = {"Integration"})
-    public void testHazelcastClient() throws URISyntaxException {
-        hazelcastNode = app.createAndManageChild(EntitySpec.create(HazelcastNode.class));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityAsserts.assertAttributeEqualsEventually(hazelcastNode, Startable.SERVICE_UP, true);
-        HazelcastTestHelper helper = new HazelcastTestHelper(hazelcastNode.getAttribute(Attributes.HOSTNAME), hazelcastNode.getAttribute(HazelcastNode.NODE_PORT));
-
-        HazelcastInstance client = helper.getClient();
-        HazelcastInstance client2 = helper.getClient();
-
-        client.getMap(HazelcastTestHelper.GROUP_NAME).put("A", "a");
-        client2.getMap(HazelcastTestHelper.GROUP_NAME).put("B", "b");
-
-        final IMap<Object, Object> map = client.getMap(HazelcastTestHelper.GROUP_NAME);
-        assertEquals("a", map.get("A"));
-        assertEquals("b", map.get("B"));
-
-        client.shutdown();
-        client2.shutdown();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastTestHelper.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastTestHelper.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastTestHelper.java
deleted file mode 100644
index b48e0bd..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastTestHelper.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.hazelcast;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityAsserts;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-import com.hazelcast.client.HazelcastClient;
-import com.hazelcast.client.config.ClientConfig;
-import com.hazelcast.core.HazelcastInstance;
-
-public class HazelcastTestHelper {
-    private static final Logger LOG = LoggerFactory.getLogger(HazelcastTestHelper.class);
-    private static ClientConfig clientConfig;
-
-    public static final String GROUP_NAME = "brooklyn";
-    public static final String GROUP_PASS = "brooklyn";
-
-    public HazelcastTestHelper(String hazelcastAddress, Integer hazelcastPort) {
-        clientConfig = new ClientConfig();
-        clientConfig.getGroupConfig().setName(GROUP_NAME).setPassword(GROUP_PASS);
-        clientConfig.getNetworkConfig().addAddress(String.format("%s:%d", hazelcastAddress, hazelcastPort));
-    }
-
-    public HazelcastInstance getClient() {
-        HazelcastInstance client = HazelcastClient.newHazelcastClient(clientConfig);
-        LOG.info("Hazelcast client {}", client.getName());
-
-        return client;
-    }
-
-    public static void testHazelcastCluster(TestApplication app, Location loc) {
-        HazelcastCluster cluster = app.createAndManageChild(EntitySpec.create(HazelcastCluster.class)
-                .configure(HazelcastCluster.INITIAL_SIZE, 3)
-                .configure(HazelcastCluster.MEMBER_SPEC, EntitySpec.create(HazelcastNode.class)));
-        app.start(ImmutableList.of(loc));
-
-        EntityAsserts.assertAttributeEqualsEventually(cluster, HazelcastNode.SERVICE_UP, true);
-
-        HazelcastNode first = (HazelcastNode) Iterables.get(cluster.getMembers(), 0);
-        HazelcastNode second = (HazelcastNode) Iterables.get(cluster.getMembers(), 1);
-
-        assertNodesUpAndInCluster(first, second);
-
-        EntityAsserts.assertAttributeEqualsEventually(cluster, Attributes.SERVICE_UP, true);
-    }
-
-    private static void assertNodesUpAndInCluster(final HazelcastNode... nodes) {
-        for (final HazelcastNode node : nodes) {
-            EntityAsserts.assertAttributeEqualsEventually(node, HazelcastNode.SERVICE_UP, true);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBEc2LiveTest.java
deleted file mode 100644
index 5ad5fa7..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBEc2LiveTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityAsserts;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.mongodb.DBObject;
-
-public class MongoDBEc2LiveTest extends AbstractEc2LiveTest {
-
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBEc2LiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        MongoDBServer entity = app.createAndManageChild(EntitySpec.create(MongoDBServer.class)
-                .configure("mongodbConfTemplateUrl", "classpath:///test-mongodb.conf"));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(entity, MongoDBServer.SERVICE_UP, true);
-
-        String id = MongoDBTestHelper.insert(entity, "hello", "world!");
-        DBObject docOut = MongoDBTestHelper.getById(entity, id);
-        assertEquals(docOut.get("hello"), "world!");
-    }
-
-    @Test(groups = {"Live"})
-    public void testWithOnlyPort22() throws Exception {
-        // CentOS-6.3-x86_64-GA-EBS-02-85586466-5b6c-4495-b580-14f72b4bcf51-ami-bb9af1d2.1
-        jcloudsLocation = mgmt.getLocationRegistry().resolve(LOCATION_SPEC, ImmutableMap.of(
-                "tags", ImmutableList.of(getClass().getName()),
-                "imageId", "us-east-1/ami-a96b01c0", 
-                "hardwareId", SMALL_HARDWARE_ID));
-
-        MongoDBServer server = app.createAndManageChild(EntitySpec.create(MongoDBServer.class)
-                .configure(MongoDBServer.PROVISIONING_PROPERTIES.subKey(CloudLocationConfig.INBOUND_PORTS.getName()), ImmutableList.of(22))
-                .configure(MongoDBServer.USE_CLIENT_MONITORING, false));
-        
-        app.start(ImmutableList.of(jcloudsLocation));
-        
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_UP, true);
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-        
-        Integer port = server.getAttribute(MongoDBServer.PORT);
-        assertNotNull(port);
-        
-        assertViaSshLocalPortListeningEventually(server, port);
-    }
-    
-    @Test(enabled=false)
-    public void testDummy() {} // Convince TestNG IDE integration that this really does have test methods
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBIntegrationTest.java
deleted file mode 100644
index c982fd3..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBIntegrationTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.collect.ImmutableList;
-import com.mongodb.DBObject;
-
-public class MongoDBIntegrationTest {
-
-    private TestApplication app;
-    private LocalhostMachineProvisioningLocation localhostProvisioningLocation;
-
-    @BeforeMethod(alwaysRun=true)
-    public void setUp() throws Exception {
-        localhostProvisioningLocation = new LocalhostMachineProvisioningLocation();
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-    }
-
-    @AfterMethod(alwaysRun=true)
-    public void tearDown() throws Exception {
-        if (app != null) Entities.destroyAll(app.getManagementContext());
-    }
-
-    @Test(groups = "Integration")
-    public void testCanStartAndStop() throws Exception {
-        MongoDBServer entity = app.createAndManageChild(EntitySpec.create(MongoDBServer.class)
-                .configure("mongodbConfTemplateUrl", "classpath:///test-mongodb.conf"));
-        app.start(ImmutableList.of(localhostProvisioningLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(entity, Startable.SERVICE_UP, true);
-        entity.stop();
-        assertFalse(entity.getAttribute(Startable.SERVICE_UP));
-    }
-
-    @Test(groups = "Integration", dependsOnMethods = { "testCanStartAndStop" })
-    public void testCanReadAndWrite() throws Exception {
-        MongoDBServer entity = app.createAndManageChild(EntitySpec.create(MongoDBServer.class)
-                .configure("mongodbConfTemplateUrl", "classpath:///test-mongodb.conf"));
-        app.start(ImmutableList.of(localhostProvisioningLocation));
-
-        String id = MongoDBTestHelper.insert(entity, "hello", "world!");
-        DBObject docOut = MongoDBTestHelper.getById(entity, id);
-        assertEquals(docOut.get("hello"), "world!");
-    }
-
-    @Test(groups = "Integration", dependsOnMethods = { "testCanStartAndStop" })
-    public void testPollInsertCountSensor() throws Exception {
-        MongoDBServer entity = app.createAndManageChild(EntitySpec.create(MongoDBServer.class)
-                .configure("mongodbConfTemplateUrl", "classpath:///test-mongodb.conf"));
-        app.start(ImmutableList.of(localhostProvisioningLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(entity, Startable.SERVICE_UP, true);
-
-        EntityTestUtils.assertAttributeEventuallyNonNull(entity, MongoDBServer.OPCOUNTERS_INSERTS);
-        Long initialInserts = entity.getAttribute(MongoDBServer.OPCOUNTERS_INSERTS);
-        MongoDBTestHelper.insert(entity, "a", Boolean.TRUE);
-        MongoDBTestHelper.insert(entity, "b", Boolean.FALSE);
-        EntityTestUtils.assertAttributeEqualsEventually(entity, MongoDBServer.OPCOUNTERS_INSERTS, initialInserts + 2);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBRebindIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBRebindIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBRebindIntegrationTest.java
deleted file mode 100644
index 6fc2013..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBRebindIntegrationTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.mgmt.rebind.RebindTestFixtureWithApp;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.base.Predicates;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-
-public class MongoDBRebindIntegrationTest extends RebindTestFixtureWithApp {
-
-    private LocalhostMachineProvisioningLocation loc;
-    
-    @BeforeMethod(alwaysRun=true)
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        loc = origApp.newLocalhostProvisioningLocation();
-    }
-
-    @Test(groups = {"Integration"})
-    public void testRebindMongoDb() throws Exception {
-        MongoDBServer origEntity = origApp.createAndManageChild(EntitySpec.create(MongoDBServer.class)
-                .configure("mongodbConfTemplateUrl", "classpath:///test-mongodb.conf"));
-        origApp.start(ImmutableList.of(loc));
-        EntityTestUtils.assertAttributeEventuallyNonNull(origEntity, MongoDBServer.STATUS_BSON);
-
-        // rebind
-        rebind();
-        final MongoDBServer newEntity = (MongoDBServer) Iterables.find(newApp.getChildren(), Predicates.instanceOf(MongoDBServer.class));
-
-        // confirm effectors still work on entity
-        EntityTestUtils.assertAttributeEqualsEventually(newEntity, MongoDBServer.SERVICE_UP, true);
-        newEntity.stop();
-        EntityTestUtils.assertAttributeEqualsEventually(newEntity, MongoDBServer.SERVICE_UP, false);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSetEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSetEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSetEc2LiveTest.java
deleted file mode 100644
index ca57f10..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSetEc2LiveTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.mongodb.DBObject;
-
-import groovy.time.TimeDuration;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.test.Asserts;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import java.util.concurrent.Callable;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-
-public class MongoDBReplicaSetEc2LiveTest extends AbstractEc2LiveTest {
-
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBReplicaSetEc2LiveTest.class);
-    private static final Integer REPLICA_SET_SIZE = 3;
-    private static final TimeDuration TIMEOUT = new TimeDuration(0, 0, 180, 0);
-
-    /**
-     * Test that a three node replica set starts and allows access through both nodes.
-     */
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        final MongoDBReplicaSet replicaSet = app.createAndManageChild(EntitySpec.create(MongoDBReplicaSet.class)
-                .configure(DynamicCluster.INITIAL_SIZE, REPLICA_SET_SIZE)
-                .configure("replicaSetName", "mongodb-live-test-replica-set")
-                .configure("memberSpec", EntitySpec.create(MongoDBServer.class)
-                        .configure("mongodbConfTemplateUrl", "classpath:///test-mongodb.conf")
-                        .configure("port", "27017+")));
-
-        assertEquals(replicaSet.getCurrentSize().intValue(), 0);
-
-        app.start(ImmutableList.of(loc));
-
-        Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT), new Callable<Boolean>() {
-            @Override
-            public Boolean call() {
-                assertEquals(replicaSet.getCurrentSize(), REPLICA_SET_SIZE);
-                assertNotNull(replicaSet.getPrimary());
-                assertEquals(replicaSet.getSecondaries().size(), REPLICA_SET_SIZE-1);
-                return true;
-            }
-        });
-
-        Entities.dumpInfo(app);
-
-        // Test inserting a document and reading from secondaries
-        final String documentId = MongoDBTestHelper.insert(replicaSet.getPrimary(), "meaning-of-life", 42);
-        Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT), new Callable<Boolean>() {
-            @Override
-            public Boolean call() throws Exception {
-                assertEquals(replicaSet.getCurrentSize().intValue(), 3);
-                for (MongoDBServer secondary : replicaSet.getSecondaries()) {
-                    DBObject docOut = MongoDBTestHelper.getById(secondary, documentId);
-                    assertEquals(docOut.get("meaning-of-life"), 42);
-                }
-                return true;
-            }
-        });
-
-    }
-
-    @Test(enabled=false)
-    public void testDummy() {} // Convince TestNG IDE integration that this really does have test methods
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSetIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSetIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSetIntegrationTest.java
deleted file mode 100644
index 8f82b60..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSetIntegrationTest.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotEquals;
-import static org.testng.Assert.assertNotNull;
-
-import java.util.Collection;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.mongodb.DBObject;
-
-public class MongoDBReplicaSetIntegrationTest extends BrooklynAppLiveTestSupport {
-
-    @SuppressWarnings("unused")
-    private static final Logger log = LoggerFactory.getLogger(MongoDBReplicaSetIntegrationTest.class);
-    
-    private Collection<LocalhostMachineProvisioningLocation> locs;
-
-    // Replica sets can take a while to start
-    private static final Duration TIMEOUT = Duration.of(3, TimeUnit.MINUTES);
-
-    @BeforeMethod(alwaysRun=true)
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        locs = ImmutableList.of(app.newLocalhostProvisioningLocation());
-    }
-
-    /**
-     * Creates and starts a replica set, asserts it reaches the given size
-     * and that the primary and secondaries are non-null.
-     */
-    private MongoDBReplicaSet makeAndStartReplicaSet(final Integer size, final String testDescription) {
-        // Sets secondaryPreferred so we can read from slaves.
-        final MongoDBReplicaSet replicaSet = app.createAndManageChild(EntitySpec.create(MongoDBReplicaSet.class)
-                .configure(DynamicCluster.INITIAL_SIZE, size)
-                .configure("replicaSetName", "test-rs-"+testDescription)
-                .configure("memberSpec", EntitySpec.create(MongoDBServer.class)
-                        .configure("mongodbConfTemplateUrl", "classpath:///test-mongodb.conf")
-                        .configure("port", "27017+")));
-        app.start(locs);
-
-        Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT), new Runnable() {
-            @Override
-            public void run() {
-                assertEquals(replicaSet.getCurrentSize(), size);
-                assertNotNull(replicaSet.getPrimary(), "replica set has no primary");
-                assertEquals(replicaSet.getPrimary().getReplicaSet().getName(), "test-rs-"+testDescription+replicaSet.getId());
-                assertEquals(replicaSet.getSecondaries().size(), size-1);
-            }
-        });
-        return replicaSet;
-    }
-
-    @Test(groups = "Integration")
-    public void testCanStartAndStopAReplicaSet() {
-        final MongoDBReplicaSet replicaSet = makeAndStartReplicaSet(3, "can-start-and-stop");
-        replicaSet.stop();
-        assertFalse(replicaSet.getAttribute(Startable.SERVICE_UP));
-    }
-
-    @Test(groups = "Integration")
-    public void testWriteToMasterAndReadFromSecondary() {
-        final MongoDBReplicaSet replicaSet = makeAndStartReplicaSet(3, "master-write-secondary-read");
-
-        // Test we can read a document written to the primary from all secondaries
-        final String documentId = MongoDBTestHelper.insert(replicaSet.getPrimary(), "meaning-of-life", 42);
-        Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT), new Runnable() {
-            @Override
-            public void run() {
-                assertEquals(replicaSet.getCurrentSize().intValue(), 3);
-                for (MongoDBServer secondary : replicaSet.getSecondaries()) {
-                    DBObject docOut = MongoDBTestHelper.getById(secondary, documentId);
-                    assertEquals(docOut.get("meaning-of-life"), 42);
-                }
-            }
-        });
-    }
-
-    @Test(groups = "Integration")
-    public void testCanResizeAndReadFromNewInstances() {
-        final MongoDBReplicaSet replicaSet = makeAndStartReplicaSet(3, "resize-and-read-from-secondaries");
-
-        // Test we can a document written to the primary from all secondaries
-        final String documentId = MongoDBTestHelper.insert(replicaSet.getPrimary(), "meaning-of-life", 42);
-        Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT), new Runnable() {
-            @Override
-            public void run() {
-                assertEquals(replicaSet.getCurrentSize().intValue(), 3);
-                for (MongoDBServer secondary : replicaSet.getSecondaries()) {
-                    DBObject docOut = MongoDBTestHelper.getById(secondary, documentId);
-                    assertEquals(docOut.get("meaning-of-life"), 42);
-                }
-            }
-        });
-
-        // Resize and confirm new members get data
-        replicaSet.resize(5);
-        Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT), new Runnable() {
-            @Override
-            public void run() {
-                assertEquals(replicaSet.getCurrentSize().intValue(), 5);
-                Collection<MongoDBServer> secondaries = replicaSet.getSecondaries();
-                assertEquals(secondaries.size(), 4);
-                for (MongoDBServer secondary : secondaries) {
-                    DBObject docOut = MongoDBTestHelper.getById(secondary, documentId);
-                    assertEquals(docOut.get("meaning-of-life"), 42);
-                }
-            }
-        });
-
-    }
-
-    @Test(groups = "Integration")
-    public void testResizeToEvenNumberOfMembers() {
-        final MongoDBReplicaSet replicaSet = makeAndStartReplicaSet(3, "resize-even-ignored");
-        assertEquals(replicaSet.getCurrentSize().intValue(), 3);
-        replicaSet.resize(4);
-        Asserts.succeedsEventually(new Runnable() {
-            @Override
-            public void run() {
-                assertEquals(replicaSet.getCurrentSize().intValue(), 4);
-            }
-        });
-    }
-
-    /**
-     * Test replacing the primary succeeds. More interesting than replacing a secondary
-     * because the removal of a primary must happen _through_ the primary. The flow is:
-     *  - Brooklyn removes the server from the set and stops it
-     *  - The remaining members of the set elect a new primary
-     *  - We remove the original primary from the new primary.
-     */
-    @Test(groups = "Integration")
-    public void testReplacePrimary() {
-        final MongoDBReplicaSet replicaSet = makeAndStartReplicaSet(3, "replace-primary");
-        final MongoDBServer replaced = replicaSet.getPrimary();
-        replicaSet.replaceMember(replaced.getId());
-        Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT), new Runnable() {
-            @Override
-            public void run() {
-                assertEquals(replicaSet.getCurrentSize().intValue(), 3);
-                for (Entity member : replicaSet.getMembers()) {
-                    assertNotEquals(member.getId(), replaced.getId());
-                }
-                assertNotNull(replicaSet.getPrimary());
-                assertNotEquals(replicaSet.getPrimary().getId(), replaced.getId(), "Expected a new primary to have been elected");
-            }
-        });
-    }
-
-    @Test(groups = "Integration")
-    public void testRemovePrimary() {
-        final MongoDBReplicaSet replicaSet = makeAndStartReplicaSet(3, "remove-primary");
-        final MongoDBServer removed = replicaSet.getPrimary();
-
-        replicaSet.removeMember(removed);
-        removed.stop();
-        Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT), new Runnable() {
-            @Override
-            public void run() {
-                assertEquals(replicaSet.getCurrentSize().intValue(), 2);
-                for (Entity member : replicaSet.getMembers()) {
-                    assertNotEquals(member.getId(), removed.getId());
-                }
-                assertNotNull(replicaSet.getPrimary());
-                assertNotEquals(replicaSet.getPrimary().getId(), removed.getId(), "Expected a new primary to have been elected");
-            }
-        });
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBRestartIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBRestartIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBRestartIntegrationTest.java
deleted file mode 100644
index 17f5c6b..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBRestartIntegrationTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBServer;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessRestartIntegrationTest;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-/**
- * Tests restart of the software *process* (as opposed to the VM).
- */
-@Test(groups="Integration")
-public class MongoDBRestartIntegrationTest extends AbstractSoftwareProcessRestartIntegrationTest {
-    
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBRestartIntegrationTest.class);
-
-    @Override
-    protected EntitySpec<? extends SoftwareProcess> newEntitySpec() {
-        return EntitySpec.create(MongoDBServer.class);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBSoftLayerLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBSoftLayerLiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBSoftLayerLiveTest.java
deleted file mode 100644
index be6c33b..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBSoftLayerLiveTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import static org.testng.Assert.assertEquals;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.entity.AbstractSoftlayerLiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.mongodb.DBObject;
-
-public class MongoDBSoftLayerLiveTest extends AbstractSoftlayerLiveTest {
-
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBSoftLayerLiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        MongoDBServer entity = app.createAndManageChild(EntitySpec.create(MongoDBServer.class)
-                .configure("mongodbConfTemplateUrl", "classpath:///test-mongodb.conf"));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(entity, MongoDBServer.SERVICE_UP, true);
-
-        String id = MongoDBTestHelper.insert(entity, "hello", "world!");
-        DBObject docOut = MongoDBTestHelper.getById(entity, id);
-        assertEquals(docOut.get("hello"), "world!");
-    }
-
-    @Test(enabled=false)
-    public void testDummy() {} // Convince TestNG IDE integration that this really does have test methods
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBTestHelper.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBTestHelper.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBTestHelper.java
deleted file mode 100644
index 76b2a91..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBTestHelper.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import java.net.UnknownHostException;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.bson.types.ObjectId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Throwables;
-import com.google.common.net.HostAndPort;
-import com.mongodb.BasicDBObject;
-import com.mongodb.CommandResult;
-import com.mongodb.DB;
-import com.mongodb.DBCollection;
-import com.mongodb.DBObject;
-import com.mongodb.MongoClient;
-import com.mongodb.ReadPreference;
-
-public class MongoDBTestHelper {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBTestHelper.class);
-
-    private static final String TEST_DB = "brooklyn_test";
-    private static final String TEST_COLLECTION = "test_collection";
-    private static final String ADMIN_DB = "admin";
-
-    /**
-     * Inserts a new object with { key: value } at given server.
-     * @return The new document's id
-     */
-    public static String insert(AbstractMongoDBServer entity, String key, Object value) {
-        LOG.info("Inserting {}:{} at {}", new Object[]{key, value, entity});
-        MongoClient mongoClient = clientForServer(entity);
-        try {
-            DB db = mongoClient.getDB(TEST_DB);
-            DBCollection testCollection = db.getCollection(TEST_COLLECTION);
-            BasicDBObject doc = new BasicDBObject(key, value);
-            testCollection.insert(doc);
-            ObjectId id = (ObjectId) doc.get("_id");
-            return id.toString();
-        } finally {
-            mongoClient.close();
-        }
-    }
-
-    /** @return The {@link DBObject} representing the object with the given id */
-    public static DBObject getById(AbstractMongoDBServer entity, String id) {
-        LOG.info("Getting {} from {}", new Object[]{id, entity});
-        MongoClient mongoClient = clientForServer(entity);
-        // Secondary preferred means the driver will let us read from secondaries too.
-        mongoClient.setReadPreference(ReadPreference.secondaryPreferred());
-        try {
-            DB db = mongoClient.getDB(TEST_DB);
-            DBCollection testCollection = db.getCollection(TEST_COLLECTION);
-            return testCollection.findOne(new BasicDBObject("_id", new ObjectId(id)));
-        } finally {
-            mongoClient.close();
-        }
-    }
-    
-    public static List<String> getDatabaseNames(AbstractMongoDBServer entity) {
-        LOG.info("Getting database names from {}", entity);
-        MongoClient mongoClient = clientForServer(entity);
-        try {
-            return mongoClient.getDatabaseNames();
-        } finally {
-            mongoClient.close();
-        }
-    }
-    
-    public static boolean isConfigServer(AbstractMongoDBServer entity) {
-        LOG.info("Checking if {} is a config server", entity);
-        MongoClient mongoClient = clientForServer(entity);
-        try {
-            DB db = mongoClient.getDB(ADMIN_DB);
-            CommandResult commandResult = db.command("getCmdLineOpts");
-            Map<?, ?> parsedArgs = (Map<?, ?>)commandResult.get("parsed");
-            if (parsedArgs == null) return false;
-            Boolean configServer = (Boolean)parsedArgs.get("configsvr");
-            if (configServer != null) {
-                // v2.5 format
-                return Boolean.TRUE.equals(configServer);
-            } else {
-                // v2.6 format
-                String role = (String) ((Map)parsedArgs.get("sharding")).get("clusterRole");
-                return "configsvr".equals(role);
-            }
-        } finally {
-            mongoClient.close();
-        }
-    }
-
-    private static MongoClient clientForServer(AbstractMongoDBServer server) {
-        try {
-            HostAndPort hap = BrooklynAccessUtils.getBrooklynAccessibleAddress(server, server.getAttribute(MongoDBServer.PORT));
-            return new MongoClient(hap.getHostText(), hap.getPort());
-        } catch (Exception e) {
-            // Fail whatever test called this method.
-            throw Throwables.propagate(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBWinEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBWinEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBWinEc2LiveTest.java
deleted file mode 100644
index e4233ab..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBWinEc2LiveTest.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.MachineProvisioningLocation;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.BrooklynConfigKeys;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.internal.BrooklynProperties;
-import org.apache.brooklyn.core.mgmt.internal.ManagementContextInternal;
-import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.entity.software.base.VanillaWindowsProcess;
-import org.apache.brooklyn.entity.software.base.test.location.WindowsTestFixture;
-import org.apache.brooklyn.location.winrm.WinRmMachineLocation;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public class MongoDBWinEc2LiveTest {
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBWinEc2LiveTest.class);
-
-    protected ManagementContextInternal mgmt;
-    protected TestApplication app;
-    protected MachineProvisioningLocation<WinRmMachineLocation> location;
-    protected WinRmMachineLocation machine;
-
-    @BeforeClass(alwaysRun = true)
-    public void setUpClass() throws Exception {
-        mgmt = new LocalManagementContextForTests(BrooklynProperties.Factory.newDefault());
-
-        location = WindowsTestFixture.setUpWindowsLocation(mgmt);
-        machine = location.obtain(ImmutableMap.of());
-    }
-
-    @AfterClass(alwaysRun = true)
-    public void tearDownClass() throws Exception {
-        try {
-            try {
-                if (location != null)
-                    location.release(machine);
-            } finally {
-                if (mgmt != null)
-                    Entities.destroyAll(mgmt);
-            }
-        } catch (Throwable t) {
-            LOG.error("Caught exception in tearDownClass method", t);
-        } finally {
-            mgmt = null;
-        }
-    }
-
-    @BeforeMethod(alwaysRun = true)
-    public void setUp() throws Exception {
-        EntitySpec<TestApplication> appSpec = EntitySpec.create(TestApplication.class)
-                .configure(BrooklynConfigKeys.SKIP_ON_BOX_BASE_DIR_RESOLUTION, true);
-        app = ApplicationBuilder.newManagedApp(appSpec, mgmt);
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void tearDown() throws Exception {
-        try {
-            try {
-                if (app != null)
-                    Entities.destroy(app);
-            } catch (Throwable t) {
-                LOG.error("Caught exception in tearDown method", t);
-            }
-        } finally {
-            app = null;
-        }
-    }
-
-    @Test(groups = "Live")
-    public void doTest() {
-
-        ImmutableMap<String, String> installTemplates = new ImmutableMap.Builder<String, String>()
-                .put("classpath://org/apache/brooklyn/entity/nosql/mongodb/win/install_mongodb.ps1", "C:\\install_mongodb.ps1")
-                .put("classpath://org/apache/brooklyn/entity/nosql/mongodb/win/configure_mongodb.ps1", "C:\\configure_mongodb.ps1")
-                .put("classpath://org/apache/brooklyn/entity/nosql/mongodb/win/launch_mongodb.ps1", "C:\\launch_mongodb.ps1")
-                .put("classpath://org/apache/brooklyn/entity/nosql/mongodb/win/stop_mongodb.ps1", "C:\\stop_mongodb.ps1")
-                .put("classpath://org/apache/brooklyn/entity/nosql/mongodb/win/checkrunning_mongodb.ps1", "C:\\checkrunning_mongodb.ps1")
-                .build();
-
-        VanillaWindowsProcess entity = app.createAndManageChild(EntitySpec.create(VanillaWindowsProcess.class)
-                .configure(VanillaWindowsProcess.INSTALL_TEMPLATES, installTemplates)
-                .configure(VanillaWindowsProcess.INSTALL_POWERSHELL_COMMAND, "C:\\install_mongodb.ps1")
-                .configure(VanillaWindowsProcess.CUSTOMIZE_POWERSHELL_COMMAND, "C:\\configure_mongodb.ps1")
-                .configure(VanillaWindowsProcess.LAUNCH_POWERSHELL_COMMAND, "C:\\launch_mongodb.ps1")
-                .configure(VanillaWindowsProcess.CHECK_RUNNING_POWERSHELL_COMMAND, "C:\\checkrunning_mongodb.ps1")
-                .configure(VanillaWindowsProcess.STOP_POWERSHELL_COMMAND, "C:\\stop_mongodb.ps1")
-                .configure(VanillaWindowsProcess.PROVISIONING_PROPERTIES, ImmutableMap.<String, Object> of("required.ports", "27017"))
-                .configure("mongodb.download.url", "https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.0.6-signed.msi")
-                .configure("mongodb.instance.name", "Instance1"));
-
-        app.start(ImmutableList.of(machine));
-        LOG.info("app started; asserting up");
-        EntityTestUtils.assertAttributeEqualsEventually(entity, Attributes.SERVICE_UP, true);
-        EntityTestUtils.assertAttributeEqualsEventually(entity, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-
-        entity.stop();
-        LOG.info("stopping entity");
-        EntityTestUtils.assertAttributeEqualsEventually(entity, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.STOPPED);
-        EntityTestUtils.assertAttributeEqualsEventually(entity, Attributes.SERVICE_UP, false);
-    }
-
-    @Test(enabled = false)
-    public void testDummy() {
-    } // Convince TestNG IDE integration that this really does have test methods
-
-}


[12/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBServer.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBServer.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBServer.java
deleted file mode 100644
index 34c07d3..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBServer.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import org.bson.BasicBSONObject;
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.api.sensor.AttributeSensor.SensorPersistenceMode;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-@Catalog(name="MongoDB Server",
-    description="MongoDB (from \"humongous\") is a scalable, high-performance, open source NoSQL database",
-    iconUrl="classpath:///mongodb-logo.png")
-@ImplementedBy(MongoDBServerImpl.class)
-public interface MongoDBServer extends AbstractMongoDBServer {
-
-    @SetFromFlag("mongodbConfTemplateUrl")
-    ConfigKey<String> MONGODB_CONF_TEMPLATE_URL = ConfigKeys.newConfigKeyWithDefault(
-            AbstractMongoDBServer.MONGODB_CONF_TEMPLATE_URL,
-            "classpath://org/apache/brooklyn/entity/nosql/mongodb/default-mongod.conf");
-
-    // See http://docs.mongodb.org/ecosystem/tools/http-interfaces/#http-console
-    // This is *always* 1000 more than port. We disable if it is not available.
-    PortAttributeSensorAndConfigKey HTTP_PORT =
-        new PortAttributeSensorAndConfigKey("mongodb.server.httpPort", "HTTP port for the server (estimated)", "28017+");
-
-    @SetFromFlag("enableRestInterface")
-    ConfigKey<Boolean> ENABLE_REST_INTERFACE = ConfigKeys.newBooleanConfigKey(
-            "mongodb.config.enable_rest", "Adds --rest to server startup flags when true", Boolean.FALSE);
-
-    @SetFromFlag("useClientMonitoring")
-    ConfigKey<Boolean> USE_CLIENT_MONITORING = ConfigKeys.newConfigKey("clientMonitoring.enabled", "Monitoring via the MongoDB client enabled", Boolean.TRUE);
-
-    AttributeSensor<String> HTTP_INTERFACE_URL = Sensors.newStringSensor(
-            "mongodb.server.http_interface", "URL of the server's HTTP console");
-
-    AttributeSensor<BasicBSONObject> STATUS_BSON = Sensors.builder(BasicBSONObject.class, "mongodb.server.status.bson")
-            .description("Server status (BSON/JSON map ojbect)")
-            .persistence(SensorPersistenceMode.NONE)
-            .build();
-    
-    AttributeSensor<Double> UPTIME_SECONDS = Sensors.newDoubleSensor(
-            "mongodb.server.uptime", "Server uptime in seconds");
-
-    AttributeSensor<Long> OPCOUNTERS_INSERTS = Sensors.newLongSensor(
-            "mongodb.server.opcounters.insert", "Server inserts");
-
-    AttributeSensor<Long> OPCOUNTERS_QUERIES = Sensors.newLongSensor(
-            "mongodb.server.opcounters.query", "Server queries");
-
-    AttributeSensor<Long> OPCOUNTERS_UPDATES = Sensors.newLongSensor(
-            "mongodb.server.opcounters.update", "Server updates");
-
-    AttributeSensor<Long> OPCOUNTERS_DELETES = Sensors.newLongSensor(
-            "mongodb.server.opcounters.delete", "Server deletes");
-
-    AttributeSensor<Long> OPCOUNTERS_GETMORE = Sensors.newLongSensor(
-            "mongodb.server.opcounters.getmore", "Server getmores");
-
-    AttributeSensor<Long> OPCOUNTERS_COMMAND = Sensors.newLongSensor(
-            "mongodb.server.opcounters.command", "Server commands");
-
-    AttributeSensor<Long> NETWORK_BYTES_IN = Sensors.newLongSensor(
-            "mongodb.server.network.bytesIn", "Server incoming network traffic (in bytes)");
-
-    AttributeSensor<Long> NETWORK_BYTES_OUT = Sensors.newLongSensor(
-            "mongodb.server.network.bytesOut", "Server outgoing network traffic (in bytes)");
-
-    AttributeSensor<Long> NETWORK_NUM_REQUESTS = Sensors.newLongSensor(
-            "mongodb.server.network.numRequests", "Server network requests");
-
-    /** A single server's replica set configuration **/
-    ConfigKey<MongoDBReplicaSet> REPLICA_SET = new BasicConfigKey<MongoDBReplicaSet>(MongoDBReplicaSet.class,
-            "mongodb.replicaset", "The replica set to which the server belongs. " +
-            "Users should not set this directly when creating a new replica set.");
-
-    AttributeSensor<ReplicaSetMemberStatus> REPLICA_SET_MEMBER_STATUS = Sensors.newSensor(
-            ReplicaSetMemberStatus.class, "mongodb.server.replicaSet.memberStatus", "The status of this server in the replica set");
-
-    AttributeSensor<Boolean> IS_PRIMARY_FOR_REPLICA_SET = Sensors.newBooleanSensor(
-            "mongodb.server.replicaSet.isPrimary", "True if this server is the write master for the replica set");
-
-    AttributeSensor<Boolean> IS_SECONDARY_FOR_REPLICA_SET = Sensors.newBooleanSensor(
-            "mongodb.server.replicaSet.isSecondary", "True if this server is a secondary server in the replica set");
-
-    AttributeSensor<String> REPLICA_SET_PRIMARY_ENDPOINT = Sensors.newStringSensor(
-            "mongodb.server.replicaSet.primary.endpoint", "The host:port of the server which is acting as primary (master) for the replica set");
-
-    AttributeSensor<String> MONGO_SERVER_ENDPOINT = Sensors.newStringSensor(
-            "mongodb.server.endpoint", "The host:port where this server is listening");
-
-    /**
-     * @return The replica set the server belongs to, or null if the server is a standalone instance.
-     */
-    MongoDBReplicaSet getReplicaSet();
-
-    /**
-     * @return True if the server is a child of {@link MongoDBReplicaSet}.
-     */
-    boolean isReplicaSetMember();
-
-    /**
-     * Initialises a replica set at the server the method is invoked on.
-     * @param replicaSetName The name for the replica set.
-     * @param id The id to be given to this server in the replica set configuration.
-     * @return True if initialisation is successful.
-     */
-    boolean initializeReplicaSet(String replicaSetName, Integer id);
-
-    /**
-     * Reconfigures the replica set that the server the method is invoked on is the primary member of
-     * to include a new member.
-     * <p/>
-     * Note that this can cause long downtime (typically 10-20s, even up to a minute).
-     *
-     * @param secondary New member of the set.
-     * @param id The id for the new set member. Must be unique within the set; its validity is not checked.
-     * @return True if addition is successful. False if the server this is called on is not the primary
-     *         member of the replica set.
-     */
-    boolean addMemberToReplicaSet(MongoDBServer secondary, Integer id);
-
-    /**
-     * Reconfigures the replica set that the server the method is invoked on is the primary member of
-     * to remove the given server.
-     * @param server The server to remove.
-     * @return True if removal is successful. False if the server this is called on is not the primary
-     *         member of the replica set.
-     */
-    boolean removeMemberFromReplicaSet(MongoDBServer server);
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBServerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBServerImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBServerImpl.java
deleted file mode 100644
index 35b60e8..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBServerImpl.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import java.net.UnknownHostException;
-import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.core.config.render.RendererHints;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.function.FunctionFeed;
-import org.apache.brooklyn.feed.function.FunctionPollConfig;
-import org.bson.BasicBSONObject;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Functions;
-import com.google.common.base.Objects;
-import com.google.common.net.HostAndPort;
-
-public class MongoDBServerImpl extends SoftwareProcessImpl implements MongoDBServer {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBServerImpl.class);
-
-    static {
-        RendererHints.register(HTTP_INTERFACE_URL, RendererHints.namedActionWithUrl());
-    }
-
-    private FunctionFeed serviceStats;
-    private FunctionFeed replicaSetStats;
-    private MongoDBClientSupport client;
-
-    public MongoDBServerImpl() {
-    }
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return MongoDBDriver.class;
-    }
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        connectServiceUpIsRunning();
-
-        int port = sensors().get(MongoDBServer.PORT);
-        HostAndPort accessibleAddress = BrooklynAccessUtils.getBrooklynAccessibleAddress(this, port);
-        sensors().set(MONGO_SERVER_ENDPOINT, String.format("%s:%d",
-                accessibleAddress.getHostText(), accessibleAddress.getPort()));
-
-        int httpConsolePort = BrooklynAccessUtils.getBrooklynAccessibleAddress(this, sensors().get(HTTP_PORT)).getPort();
-        sensors().set(HTTP_INTERFACE_URL, String.format("http://%s:%d",
-                accessibleAddress.getHostText(), httpConsolePort));
-
-        if (clientAccessEnabled()) {
-            try {
-                client = MongoDBClientSupport.forServer(this);
-            } catch (UnknownHostException e) {
-                LOG.warn("Unable to create client connection to {}, not connecting sensors: {} ", this, e.getMessage());
-                return;
-            }
-    
-            serviceStats = FunctionFeed.builder()
-                    .entity(this)
-                    .poll(new FunctionPollConfig<Object, BasicBSONObject>(STATUS_BSON)
-                            .period(2, TimeUnit.SECONDS)
-                            .callable(new Callable<BasicBSONObject>() {
-                                @Override
-                                public BasicBSONObject call() throws Exception {
-                                    return MongoDBServerImpl.this.sensors().get(SERVICE_UP)
-                                        ? client.getServerStatus()
-                                        : null;
-                                }
-                            })
-                            .onException(Functions.<BasicBSONObject>constant(null)))
-                    .build();
-    
-            if (isReplicaSetMember()) {
-                replicaSetStats = FunctionFeed.builder()
-                        .entity(this)
-                        .poll(new FunctionPollConfig<Object, ReplicaSetMemberStatus>(REPLICA_SET_MEMBER_STATUS)
-                                .period(2, TimeUnit.SECONDS)
-                                .callable(new Callable<ReplicaSetMemberStatus>() {
-                                    /**
-                                     * Calls {@link MongoDBClientSupport#getReplicaSetStatus} and
-                                     * extracts <code>myState</code> from the response.
-                                     * @return
-                                     *      The appropriate {@link org.apache.brooklyn.entity.nosql.mongodb.ReplicaSetMemberStatus}
-                                     *      if <code>myState</code> was non-null, {@link ReplicaSetMemberStatus#UNKNOWN} otherwise.
-                                     */
-                                    @Override
-                                    public ReplicaSetMemberStatus call() {
-                                        BasicBSONObject serverStatus = client.getReplicaSetStatus();
-                                        int state = serverStatus.getInt("myState", -1);
-                                        return ReplicaSetMemberStatus.fromCode(state);
-                                    }
-                                })
-                                .onException(Functions.constant(ReplicaSetMemberStatus.UNKNOWN))
-                                .suppressDuplicates(true))
-                        .build();
-            } else {
-                sensors().set(IS_PRIMARY_FOR_REPLICA_SET, false);
-                sensors().set(IS_SECONDARY_FOR_REPLICA_SET, false);
-            }
-        } else {
-            LOG.info("Not monitoring "+this+" to retrieve state via client API");
-        }
-
-        // Take interesting details from STATUS.
-        subscriptions().subscribe(this, STATUS_BSON, new SensorEventListener<BasicBSONObject>() {
-                @Override public void onEvent(SensorEvent<BasicBSONObject> event) {
-                    BasicBSONObject map = event.getValue();
-                    if (map != null && !map.isEmpty()) {
-                        sensors().set(UPTIME_SECONDS, map.getDouble("uptime", 0));
-
-                        // Operations
-                        BasicBSONObject opcounters = (BasicBSONObject) map.get("opcounters");
-                        sensors().set(OPCOUNTERS_INSERTS, opcounters.getLong("insert", 0));
-                        sensors().set(OPCOUNTERS_QUERIES, opcounters.getLong("query", 0));
-                        sensors().set(OPCOUNTERS_UPDATES, opcounters.getLong("update", 0));
-                        sensors().set(OPCOUNTERS_DELETES, opcounters.getLong("delete", 0));
-                        sensors().set(OPCOUNTERS_GETMORE, opcounters.getLong("getmore", 0));
-                        sensors().set(OPCOUNTERS_COMMAND, opcounters.getLong("command", 0));
-
-                        // Network stats
-                        BasicBSONObject network = (BasicBSONObject) map.get("network");
-                        sensors().set(NETWORK_BYTES_IN, network.getLong("bytesIn", 0));
-                        sensors().set(NETWORK_BYTES_OUT, network.getLong("bytesOut", 0));
-                        sensors().set(NETWORK_NUM_REQUESTS, network.getLong("numRequests", 0));
-
-                        // Replica set stats
-                        BasicBSONObject repl = (BasicBSONObject) map.get("repl");
-                        if (isReplicaSetMember() && repl != null) {
-                            sensors().set(IS_PRIMARY_FOR_REPLICA_SET, repl.getBoolean("ismaster"));
-                            sensors().set(IS_SECONDARY_FOR_REPLICA_SET, repl.getBoolean("secondary"));
-                            sensors().set(REPLICA_SET_PRIMARY_ENDPOINT, repl.getString("primary"));
-                        }
-                    }
-                }
-        });
-    }
-
-    @Override
-    protected void disconnectSensors() {
-        super.disconnectSensors();
-        disconnectServiceUpIsRunning();
-        if (serviceStats != null) serviceStats.stop();
-        if (replicaSetStats != null) replicaSetStats.stop();
-    }
-
-    protected boolean clientAccessEnabled() {
-        return Boolean.TRUE.equals(config().get(MongoDBServer.USE_CLIENT_MONITORING));
-    }
-    
-    @Override
-    public MongoDBReplicaSet getReplicaSet() {
-        return config().get(MongoDBServer.REPLICA_SET);
-    }
-
-    @Override
-    public boolean isReplicaSetMember() {
-        return getReplicaSet() != null;
-    }
-
-    @Override
-    public boolean initializeReplicaSet(String replicaSetName, Integer id) {
-        return client.initializeReplicaSet(replicaSetName, id);
-    }
-
-    @Override
-    public boolean addMemberToReplicaSet(MongoDBServer secondary, Integer id) {
-        // TODO The attributes IS_PRIMARY_FOR_REPLICA_SET and REPLICA_SET_MEMBER_STATUS can be out-of-sync.
-        // The former is obtained by an enricher that listens to STATUS_BSON (set by client.getServerStatus()).
-        // The latter is set by a different feed doing client.getReplicaSetStatus().getInt("myState").
-        // The ReplicaSet uses REPLICA_SET_MEMBER_STATUS to determine which node to call.
-        // 
-        // Relying on caller to respect the `false` result, to retry.
-        if (!sensors().get(IS_PRIMARY_FOR_REPLICA_SET)) {
-            LOG.warn("Attempted to add {} to replica set at server that is not primary: {}", secondary, this);
-            return false;
-        }
-        if (!clientAccessEnabled()) {
-            throw new IllegalStateException("client-access disabled for "+this+"; cannot add to replica set member "+secondary+" -> "+id);
-        }
-        return client.addMemberToReplicaSet(secondary, id);
-    }
-
-    @Override
-    public boolean removeMemberFromReplicaSet(MongoDBServer server) {
-        if (!sensors().get(IS_PRIMARY_FOR_REPLICA_SET)) {
-            LOG.warn("Attempted to remove {} from replica set at server that is not primary: {}", server, this);
-            return false;
-        }
-        if (!clientAccessEnabled()) {
-            throw new IllegalStateException("client-access disabled for "+this+"; cannot remove from replica set member "+server);
-        }
-        return client.removeMemberFromReplicaSet(server);
-    }
-
-    @Override
-    public String toString() {
-        return Objects.toStringHelper(this)
-                .add("id", getId())
-                .add("hostname", sensors().get(HOSTNAME))
-                .add("port", sensors().get(PORT))
-                .toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBSshDriver.java
deleted file mode 100644
index 89f8112..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBSshDriver.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import static com.google.common.base.Preconditions.checkState;
-
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-
-import com.google.common.base.Strings;
-import com.google.common.collect.ImmutableList;
-
-public class MongoDBSshDriver extends AbstractMongoDBSshDriver implements MongoDBDriver {
-
-    public MongoDBSshDriver(MongoDBServerImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public MongoDBServerImpl getEntity() {
-        return MongoDBServerImpl.class.cast(super.getEntity());
-    }
-
-    @Override
-    public void launch() {
-        MongoDBServer server = getEntity();
-
-        ImmutableList.Builder<String> argsBuilder = getArgsBuilderWithDefaults(server)
-            .add("--dbpath", getDataDirectory());
-
-        if (server.isReplicaSetMember()) {
-            String replicaSetName = server.getReplicaSet().getName();
-            checkState(!Strings.isNullOrEmpty(replicaSetName), "Replica set name must not be null or empty");
-            argsBuilder.add("--replSet", replicaSetName);
-        }
-
-        if (Boolean.TRUE.equals(server.getConfig(MongoDBServer.ENABLE_REST_INTERFACE)))
-            argsBuilder.add("--rest");
-
-        launch(argsBuilder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetConfig.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetConfig.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetConfig.java
deleted file mode 100644
index 9ea240b..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetConfig.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.Iterator;
-
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.bson.BSONObject;
-import org.bson.BasicBSONObject;
-import org.bson.types.BasicBSONList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Optional;
-import com.google.common.net.HostAndPort;
-
-/**
- * Simplifies the creation of configuration objects for Mongo DB replica sets.
- * <p/>
- * A configuration object is structured like this:
- * <pre>
- * {
- *    "_id" : "replica-set-name",
- *     "version" : 3,
- *    "members" : [
- *        { "_id" : 0, "host" : "Sams.local:27017" },
- *        { "_id" : 1, "host" : "Sams.local:27018" },
- *        { "_id" : 2, "host" : "Sams.local:27019" }
- *    ]
- * }
- * </pre>
- * To add or remove servers to a replica set you must redefine this configuration
- * (run <code>replSetReconfig</code> on the primary) with the new <code>members</code>
- * list and the <code>version</code> updated.
- */
-public class ReplicaSetConfig {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ReplicaSetConfig.class);
-    static final int MAXIMUM_REPLICA_SET_SIZE = 12;
-    static final int MAXIMUM_VOTING_MEMBERS = 7;
-
-    private Optional<HostAndPort> primary = Optional.absent();
-
-    private String name;
-    private Integer version;
-    BasicBSONList members;
-
-    public ReplicaSetConfig(String name) {
-        this(name, new BasicBSONList());
-    }
-
-    public ReplicaSetConfig(String name, BasicBSONList existingMembers) {
-        this.name = name;
-        this.members = existingMembers;
-        this.version = 1;
-    }
-
-    /**
-     * Creates a configuration with the given name.
-     */
-    public static ReplicaSetConfig builder(String name) {
-        return new ReplicaSetConfig(name);
-    }
-
-    /**
-     * Creates a configuration from an existing configuration.
-     * <p/>
-     * Automatically increments the replica set's version number.
-     */
-    public static ReplicaSetConfig fromExistingConfig(BSONObject config) {
-        checkNotNull(config);
-        checkArgument(config.containsField("_id"), "_id missing from replica set config");
-        checkArgument(config.containsField("version"), "version missing from replica set config");
-        checkArgument(config.containsField("members"), "members missing from replica set config");
-
-        String name = (String) config.get("_id");
-        Integer version = (Integer) config.get("version");
-        BasicBSONList members = (BasicBSONList) config.get("members");
-
-        return new ReplicaSetConfig(name, members).version(++version);
-    }
-
-    /**
-     * Sets the version of the configuration. The version number must increase as the replica set changes.
-     */
-    public ReplicaSetConfig version(Integer version) {
-        this.version = version;
-        return this;
-    }
-
-    /**
-     * Notes the primary member of the replica. Primary members will always be voting members.
-     */
-    public ReplicaSetConfig primary(HostAndPort primary) {
-        this.primary = Optional.of(primary);
-        return this;
-    }
-
-    /**
-     * Adds a new member to the replica set config using {@link MongoDBServer#HOSTNAME} and {@link MongoDBServer#PORT}
-     * for hostname and port. Doesn't attempt to check that the id is free.
-     */
-    public ReplicaSetConfig member(MongoDBServer server, Integer id) {
-        // TODO: Switch to SUBNET_HOSTNAME and there should be no need for a Brooklyn accessible
-        // address. It will require modification to MongoDBClientSupport, though, since it sets
-        // the primary to the host/port accessible from Brooklyn.
-        HostAndPort hap = BrooklynAccessUtils.getBrooklynAccessibleAddress(server, server.getAttribute(MongoDBServer.PORT));
-        return member(hap.getHostText(), hap.getPort(), id);
-    }
-
-    /**
-     * Adds a new member to the replica set config using the given {@link HostAndPort} for hostname and port.
-     * Doesn't attempt to check that the id is free.
-     */
-    public ReplicaSetConfig member(HostAndPort address, Integer id) {
-        return member(address.getHostText(), address.getPort(), id);
-    }
-
-    /**
-     * Adds a new member to the replica set config with the given hostname, port and id. Doesn't attempt to check
-     * that the id is free.
-     */
-    public ReplicaSetConfig member(String hostname, Integer port, Integer id) {
-        if (members.size() == MAXIMUM_REPLICA_SET_SIZE) {
-            throw new IllegalStateException(String.format(
-                    "Replica set {} exceeds maximum size of {} with addition of member at {}:{}",
-                    new Object[]{name, MAXIMUM_REPLICA_SET_SIZE, hostname, port}));
-        }
-        BasicBSONObject member = new BasicBSONObject();
-        member.put("_id", id);
-        member.put("host", String.format("%s:%s", hostname, port));
-        members.add(member);
-        return this;
-    }
-
-    /** Removes the first entity using {@link MongoDBServer#HOSTNAME} and {@link MongoDBServer#PORT}. */
-    public ReplicaSetConfig remove(MongoDBServer server) {
-        HostAndPort hap = BrooklynAccessUtils.getBrooklynAccessibleAddress(server, server.getAttribute(MongoDBServer.PORT));
-        return remove(hap.getHostText(), hap.getPort());
-    }
-
-    /** Removes the first entity with host and port matching the given address. */
-    public ReplicaSetConfig remove(HostAndPort address) {
-        return remove(address.getHostText(), address.getPort());
-    }
-
-    /**
-     * Removes the first entity with the given hostname and port from the list of members
-     */
-    public ReplicaSetConfig remove(String hostname, Integer port) {
-        String host = String.format("%s:%s", hostname, port);
-        Iterator<Object> it = this.members.iterator();
-        while (it.hasNext()) {
-            Object next = it.next();
-            if (next instanceof BasicBSONObject) {
-                BasicBSONObject basicBSONObject = (BasicBSONObject) next;
-                if (host.equals(basicBSONObject.getString("host"))) {
-                    it.remove();
-                    break;
-                }
-            }
-        }
-        return this;
-    }
-
-    /**
-     * @return A {@link BasicBSONObject} representing the configuration that is suitable for a MongoDB server.
-     */
-    public BasicBSONObject build() {
-        setVotingMembers();
-        BasicBSONObject config = new BasicBSONObject();
-        config.put("_id", name);
-        config.put("version", version);
-        config.put("members", members);
-        return config;
-    }
-
-    /**
-     * Selects 1, 3, 5 or 7 members to have a vote. The primary member (as set by
-     * {@link #primary(com.google.common.net.HostAndPort)}) is guaranteed a vote if
-     * it is in {@link #members}.
-     * <p/>
-     *
-     * Reconfiguring a server to be voters when they previously did not have votes generally triggers
-     * a primary election. This confuses the MongoDB Java driver, which logs an error like:
-     * <pre>
-     * WARN  emptying DBPortPool to sams.home/192.168.1.64:27019 b/c of error
-     * java.io.EOFException: null
-     *    at org.bson.io.Bits.readFully(Bits.java:48) ~[mongo-java-driver-2.11.3.jar:na]
-     * WARN  Command { "replSetReconfig" : ... } on sams.home/192.168.1.64:27019 failed
-     * com.mongodb.MongoException$Network: Read operation to server sams.home/192.168.1.64:27019 failed on database admin
-     *    at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:253) ~[mongo-java-driver-2.11.3.jar:na]
-     * Caused by: java.io.EOFException: null
-     *    at org.bson.io.Bits.readFully(Bits.java:48) ~[mongo-java-driver-2.11.3.jar:na]
-     * </pre>
-     *
-     * The MongoDB documentation on <a href=http://docs.mongodb.org/manual/tutorial/configure-a-non-voting-replica-set-member/">
-     * non-voting members</a> says:
-     * <blockquote>
-     *     Initializes a new replica set configuration. Disconnects the shell briefly and forces a
-     *     reconnection as the replica set renegotiates which member will be primary. As a result,
-     *     the shell will display an error even if this command succeeds.
-     * </blockquote>
-     *
-     * So the problem is more that the MongoDB Java driver does not understand why the server
-     * may have disconnected and is to eager to report a problem.
-     */
-    private void setVotingMembers() {
-        if (LOG.isDebugEnabled())
-            LOG.debug("Setting voting and non-voting members of replica set: {}", name);
-        boolean seenPrimary = false;
-        String expectedPrimary = primary.isPresent()
-                ? primary.get().getHostText() + ":" + primary.get().getPort()
-                : "";
-
-        // Ensure an odd number of voters
-        int setSize = this.members.size();
-        int nonPrimaryVotingMembers = Math.min(setSize % 2 == 0 ? setSize - 1 : setSize, MAXIMUM_VOTING_MEMBERS);
-        if (primary.isPresent()) {
-            if (LOG.isTraceEnabled())
-                LOG.trace("Reserving vote for primary: " + expectedPrimary);
-            nonPrimaryVotingMembers -= 1;
-        }
-
-        for (Object member : this.members) {
-            if (member instanceof BasicBSONObject) {
-                BasicBSONObject bsonObject = BasicBSONObject.class.cast(member);
-                String host = bsonObject.getString("host");
-
-                // is this member noted as the primary?
-                if (this.primary.isPresent() && expectedPrimary.equals(host)) {
-                    bsonObject.put("votes", 1);
-                    seenPrimary = true;
-                    if (LOG.isDebugEnabled())
-                        LOG.debug("Voting member (primary) of set {}: {}", name, host);
-                } else if (nonPrimaryVotingMembers-- > 0) {
-                    bsonObject.put("votes", 1);
-                    if (LOG.isDebugEnabled())
-                        LOG.debug("Voting member of set {}: {}", name, host);
-                } else {
-                    bsonObject.put("votes", 0);
-                    if (LOG.isDebugEnabled())
-                        LOG.debug("Non-voting member of set {}: {}", name, host);
-                }
-            } else {
-                LOG.error("Unexpected entry in replica set members list: " + member);
-            }
-        }
-
-        if (primary.isPresent() && !seenPrimary) {
-            LOG.warn("Cannot give replica set primary a vote in reconfigured set: " +
-                    "primary was indicated as {} but no member with that host and port was seen in the set. " +
-                    "The replica set now has an even number of voters.",
-                    this.primary);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetMemberStatus.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetMemberStatus.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetMemberStatus.java
deleted file mode 100644
index 16df3a7..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetMemberStatus.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-/**
- * @see <a href="http://docs.mongodb.org/manual/reference/replica-status/">Replica set status reference</a>
- */
-public enum ReplicaSetMemberStatus {
-
-    STARTUP("Start up, phase 1 (parsing configuration)"),
-    PRIMARY("Primary"),
-    SECONDARY("Secondary"),
-    RECOVERING("Member is recovering (initial sync, post-rollback, stale members)"),
-    FATAL("Member has encountered an unrecoverable error"),
-    STARTUP2("Start up, phase 2 (forking threads)"),
-    UNKNOWN("Unknown (the set has never connected to the member)"),
-    ARBITER("Member is an arbiter"),
-    DOWN("Member is not accessible to the set"),
-    ROLLBACK("Member is rolling back data. See rollback"),
-    SHUNNED("Member has been removed from replica set");
-
-    private final String description;
-
-    ReplicaSetMemberStatus(String description) {
-        this.description = description;
-    }
-
-    public static ReplicaSetMemberStatus fromCode(int code) {
-        switch (code) {
-            case 0: return STARTUP;
-            case 1: return PRIMARY;
-            case 2: return SECONDARY;
-            case 3: return RECOVERING;
-            case 4: return FATAL;
-            case 5: return STARTUP2;
-            case 6: return UNKNOWN;
-            case 7: return ARBITER;
-            case 8: return DOWN;
-            case 9: return ROLLBACK;
-            case 10: return SHUNNED;
-            default: return UNKNOWN;
-        }
-    }
-
-    @Override
-    public String toString() {
-        return name() + ": " + description;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/CoLocatedMongoDBRouter.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/CoLocatedMongoDBRouter.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/CoLocatedMongoDBRouter.java
deleted file mode 100644
index 55bad2e..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/CoLocatedMongoDBRouter.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.software.base.SameServerEntity;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-import com.google.common.reflect.TypeToken;
-
-@ImplementedBy(CoLocatedMongoDBRouterImpl.class)
-public interface CoLocatedMongoDBRouter extends SameServerEntity {
-    @SuppressWarnings("serial")
-    @SetFromFlag("siblingSpecs")
-    ConfigKey<Iterable<EntitySpec<?>>> SIBLING_SPECS = ConfigKeys.newConfigKey(new TypeToken<Iterable<EntitySpec<?>>>(){}, 
-            "mongodb.colocatedrouter.sibling.specs", "Collection of (configured) specs for entities to be co-located with the router");
-    
-    @SetFromFlag("shardedDeployment")
-    ConfigKey<MongoDBShardedDeployment> SHARDED_DEPLOYMENT = ConfigKeys.newConfigKey(MongoDBShardedDeployment.class, 
-            "mongodb.colocatedrouter.shardeddeployment", "Sharded deployment to which the router should report");
-
-    /** Deprecated since 0.7.0 use {@link #PROPAGATING_SENSORS} instead. */
-    @Deprecated
-    @SuppressWarnings("serial")
-    @SetFromFlag("propogatingSensors")
-    ConfigKey<List<Map<String, ?>>> PROPOGATING_SENSORS = ConfigKeys.newConfigKey(new TypeToken<List<Map<String, ?>>>(){}, 
-            "mongodb.colocatedrouter.propogating.sensors", "List of sensors to be propogated from child members");
-
-    @SetFromFlag("propagatingSensors")
-    ConfigKey<List<Map<String, ?>>> PROPAGATING_SENSORS = ConfigKeys.newConfigKey(new TypeToken<List<Map<String, ?>>>(){},
-            "mongodb.colocatedrouter.propagating.sensors", "List of sensors to be propogated from child members");
-
-    public static AttributeSensor<MongoDBRouter> ROUTER = Sensors.newSensor(MongoDBRouter.class,
-            "mongodb.colocatedrouter.router", "Router");
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/CoLocatedMongoDBRouterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/CoLocatedMongoDBRouterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/CoLocatedMongoDBRouterImpl.java
deleted file mode 100644
index 9648f47..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/CoLocatedMongoDBRouterImpl.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import java.util.Collection;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.mgmt.Task;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.group.AbstractGroup;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBAuthenticationMixins;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBAuthenticationUtils;
-import org.apache.brooklyn.entity.software.base.SameServerEntityImpl;
-
-public class CoLocatedMongoDBRouterImpl extends SameServerEntityImpl implements CoLocatedMongoDBRouter, MongoDBAuthenticationMixins {
-
-    @Override
-    public void init() {
-        super.init();
-        MongoDBRouter router = addChild(EntitySpec.create(MongoDBRouter.class)
-                .configure(MongoDBRouter.CONFIG_SERVERS,
-                        DependentConfiguration.attributeWhenReady(
-                                getConfig(CoLocatedMongoDBRouter.SHARDED_DEPLOYMENT),
-                                MongoDBConfigServerCluster.CONFIG_SERVER_ADDRESSES)));
-
-        for (EntitySpec<?> siblingSpec : getConfig(CoLocatedMongoDBRouter.SIBLING_SPECS)) {
-            addChild(siblingSpec);
-        }
-        sensors().set(ROUTER, router);
-    }
-
-    @Override
-    protected void doStart(Collection<? extends Location> locations) {
-        MongoDBRouter router = sensors().get(ROUTER);
-
-        // Do not attempt to read the configuration until after the router has been added to the cluster
-        // as it is at this point that the authentication configuration is set
-        Task<?> clusterTask = DependentConfiguration.attributeWhenReady(router, AbstractGroup.FIRST);
-        Entities.submit(this, clusterTask);
-        clusterTask.getUnchecked();
-
-        MongoDBAuthenticationUtils.setAuthenticationConfig(router, this);
-        router.sensors().set(MongoDBAuthenticationMixins.ROOT_PASSWORD, router.config().get(MongoDBAuthenticationMixins.ROOT_PASSWORD));
-        router.sensors().set(MongoDBAuthenticationMixins.ROOT_USERNAME, router.config().get(MongoDBAuthenticationMixins.ROOT_USERNAME));
-        router.sensors().set(MongoDBAuthenticationMixins.AUTHENTICATION_DATABASE, router.config().get(MongoDBAuthenticationMixins.AUTHENTICATION_DATABASE));
-        enrichers().add(Enrichers.builder().propagating(MongoDBRouter.PORT).from(router).build());
-        
-        super.doStart(locations);
-        sensors().set(Startable.SERVICE_UP, true);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServer.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServer.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServer.java
deleted file mode 100644
index 2108eaa..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServer.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.entity.nosql.mongodb.AbstractMongoDBServer;
-
-@ImplementedBy(MongoDBConfigServerImpl.class)
-public interface MongoDBConfigServer extends AbstractMongoDBServer {
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerCluster.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerCluster.java
deleted file mode 100644
index 73ac77d..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerCluster.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-
-import com.google.common.reflect.TypeToken;
-
-@ImplementedBy(MongoDBConfigServerClusterImpl.class)
-public interface MongoDBConfigServerCluster extends DynamicCluster {
-
-    @SuppressWarnings("serial")
-    AttributeSensor<Iterable<String>> CONFIG_SERVER_ADDRESSES = Sensors.newSensor(new TypeToken<Iterable<String>>() {}, 
-            "mongodb.config.server.addresses", "List of config server hostnames and ports");
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerClusterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerClusterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerClusterImpl.java
deleted file mode 100644
index b5bf2cc..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerClusterImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import java.util.Collection;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.entity.group.DynamicClusterImpl;
-
-import com.google.common.base.Function;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-import com.google.common.net.HostAndPort;
-
-public class MongoDBConfigServerClusterImpl extends DynamicClusterImpl implements MongoDBConfigServerCluster {
-    
-    @Override
-    protected EntitySpec<?> getMemberSpec() {
-        if (super.getMemberSpec() != null)
-            return super.getMemberSpec();
-        return EntitySpec.create(MongoDBConfigServer.class);
-    }
-    
-    @Override
-    public void start(Collection<? extends Location> locs) {
-        super.start(locs);
-        
-        // TODO this should be an enricher
-        Iterable<String> memberHostNamesAndPorts = Iterables.transform(getMembers(), new Function<Entity, String>() {
-            @Override
-            public String apply(Entity entity) {
-                HostAndPort hostAndPort = BrooklynAccessUtils.getBrooklynAccessibleAddress(entity, entity.getAttribute(MongoDBConfigServer.PORT));
-                return hostAndPort.getHostText() + ":" + hostAndPort.getPort();
-            }
-        });
-        sensors().set(MongoDBConfigServerCluster.CONFIG_SERVER_ADDRESSES, ImmutableList.copyOf(memberHostNamesAndPorts));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerDriver.java
deleted file mode 100644
index 9ccaccd..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerDriver.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface MongoDBConfigServerDriver extends SoftwareProcessDriver {
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerImpl.java
deleted file mode 100644
index faa6ed6..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-
-public class MongoDBConfigServerImpl extends SoftwareProcessImpl implements MongoDBConfigServer {
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return MongoDBConfigServerDriver.class;
-    }
-    
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        connectServiceUpIsRunning();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerSshDriver.java
deleted file mode 100644
index 3eada3b..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerSshDriver.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import org.apache.brooklyn.entity.nosql.mongodb.AbstractMongoDBSshDriver;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-
-public class MongoDBConfigServerSshDriver extends AbstractMongoDBSshDriver implements MongoDBDriver {
-    
-    public MongoDBConfigServerSshDriver(MongoDBConfigServerImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-    
-    @Override
-    public MongoDBConfigServerImpl getEntity() {
-        return MongoDBConfigServerImpl.class.cast(super.getEntity());
-    }
-
-    @Override
-    public void launch() {
-        launch(getArgsBuilderWithDefaults(getEntity())
-                .add("--configsvr")
-                .add("--dbpath", getDataDirectory()));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouter.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouter.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouter.java
deleted file mode 100644
index 9191391..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouter.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.nosql.mongodb.AbstractMongoDBServer;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.reflect.TypeToken;
-
-@Catalog(name="MongoDB Router",
-        description="MongoDB (from \"humongous\") is a scalable, high-performance, open source NoSQL database",
-        iconUrl="classpath:///mongodb-logo.png")
-@ImplementedBy(MongoDBRouterImpl.class)
-public interface MongoDBRouter extends AbstractMongoDBServer {
-
-    @SuppressWarnings("serial")
-    ConfigKey<Iterable<String>> CONFIG_SERVERS = ConfigKeys.newConfigKey(
-            new TypeToken<Iterable<String>>(){}, "mongodb.router.config.servers", "List of host names and ports of the config servers");
-    
-    AttributeSensor<Integer> SHARD_COUNT = Sensors.newIntegerSensor("mongodb.router.config.shard.count", "Number of shards that have been added");
-    
-    AttributeSensor<Boolean> RUNNING = Sensors.newBooleanSensor("mongodb.router.running", "Indicates that the router is running, "
-            + "and can be used to add shards, but is not necessarity available for CRUD operations (e.g. if no shards have been added)");
-
-    /**
-     * @throws IllegalStateException if times out.
-     */
-    public void waitForServiceUp(Duration duration);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterCluster.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterCluster.java
deleted file mode 100644
index a313c1c..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterCluster.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import java.util.Collection;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-
-@ImplementedBy(MongoDBRouterClusterImpl.class)
-public interface MongoDBRouterCluster extends DynamicCluster {
-
-    AttributeSensor<MongoDBRouter> ANY_ROUTER = Sensors.newSensor(MongoDBRouter.class, "mongodb.routercluster.any", 
-            "When set, can be used to access one of the routers in the cluster (usually the first). This will only be set once "
-            + "at least one shard has been added, and the router is available for CRUD operations");
-    
-    AttributeSensor<MongoDBRouter> ANY_RUNNING_ROUTER = Sensors.newSensor(MongoDBRouter.class, "mongodb.routercluster.any.running", 
-            "When set, can be used to access one of the running routers in the cluster (usually the first). This should only be used " 
-            + "to add shards as it does not guarantee that the router is available for CRUD operations");
-
-    /**
-     * @return One of the routers in the cluster if available, null otherwise
-     */
-    MongoDBRouter getAnyRouter();
-    
-    /**
-     * @return One of the running routers in the cluster. This should only be used to add shards as it does not guarantee that 
-     * the router is available for CRUD operations
-     */
-    MongoDBRouter getAnyRunningRouter();
-    
-    /**
-     * @return All routers in the cluster
-     */
-    Collection<MongoDBRouter> getRouters();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterClusterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterClusterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterClusterImpl.java
deleted file mode 100644
index 48b501c..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterClusterImpl.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import java.util.Collection;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.core.entity.EntityPredicates;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.group.AbstractMembershipTrackingPolicy;
-import org.apache.brooklyn.entity.group.DynamicClusterImpl;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-
-public class MongoDBRouterClusterImpl extends DynamicClusterImpl implements MongoDBRouterCluster {
-
-    @Override
-    public void init() {
-        super.init();
-        subscriptions().subscribeToChildren(this, MongoDBRouter.RUNNING, new SensorEventListener<Boolean>() {
-            @Override public void onEvent(SensorEvent<Boolean> event) {
-                setAnyRouter();
-            }
-        });
-    }
-    
-    @Override
-    public void start(Collection<? extends Location> locations) {
-        super.start(locations);
-        policies().add(PolicySpec.create(MemberTrackingPolicy.class)
-                .displayName("Router cluster membership tracker")
-                .configure("group", this));
-    }
-    
-    public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy {
-        @Override protected void onEntityEvent(EventType type, Entity member) {
-            ((MongoDBRouterClusterImpl)super.entity).setAnyRouter();
-        }
-        @Override protected void onEntityRemoved(Entity member) {
-            ((MongoDBRouterClusterImpl)super.entity).setAnyRouter();
-        }
-        @Override protected void onEntityChange(Entity member) {
-            ((MongoDBRouterClusterImpl)super.entity).setAnyRouter();
-        }
-    }
-    
-    protected void setAnyRouter() {
-        sensors().set(MongoDBRouterCluster.ANY_ROUTER, Iterables.tryFind(getRouters(), 
-                EntityPredicates.attributeEqualTo(Startable.SERVICE_UP, true)).orNull());
-
-        sensors().set(
-                MongoDBRouterCluster.ANY_RUNNING_ROUTER, 
-                Iterables.tryFind(getRouters(), EntityPredicates.attributeEqualTo(MongoDBRouter.RUNNING, true))
-                .orNull());
-    }
-    
-    @Override
-    public Collection<MongoDBRouter> getRouters() {
-        return ImmutableList.copyOf(Iterables.filter(getMembers(), MongoDBRouter.class));
-    }
-    
-    @Override
-    protected EntitySpec<?> getMemberSpec() {
-        if (super.getMemberSpec() != null)
-            return super.getMemberSpec();
-        return EntitySpec.create(MongoDBRouter.class);
-    }
-
-    @Override
-    public MongoDBRouter getAnyRouter() {
-        return getAttribute(MongoDBRouterCluster.ANY_ROUTER);
-    }
-    
-    @Override
-    public MongoDBRouter getAnyRunningRouter() {
-        return getAttribute(MongoDBRouterCluster.ANY_RUNNING_ROUTER);
-    }
- 
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterDriver.java
deleted file mode 100644
index 5ca17ac..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterDriver.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface MongoDBRouterDriver extends SoftwareProcessDriver {
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterImpl.java
deleted file mode 100644
index 149457d..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBClientSupport;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.function.FunctionFeed;
-import org.apache.brooklyn.feed.function.FunctionPollConfig;
-
-import com.google.common.base.Functions;
-
-public class MongoDBRouterImpl extends SoftwareProcessImpl implements MongoDBRouter {
-    
-    private volatile FunctionFeed functionFeed;
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return MongoDBRouterDriver.class;
-    }
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        functionFeed = FunctionFeed.builder()
-                .entity(this)
-                .poll(new FunctionPollConfig<Boolean, Boolean>(RUNNING)
-                        .period(5, TimeUnit.SECONDS)
-                        .callable(new Callable<Boolean>() {
-                            @Override
-                            public Boolean call() throws Exception {
-                                MongoDBClientSupport clientSupport = MongoDBClientSupport.forServer(MongoDBRouterImpl.this);
-                                return clientSupport.ping();
-                            }
-                        })
-                        .onException(Functions.<Boolean>constant(false)))
-                .poll(new FunctionPollConfig<Boolean, Boolean>(SERVICE_UP)
-                        .period(5, TimeUnit.SECONDS)
-                        .callable(new Callable<Boolean>() {
-                            @Override
-                            public Boolean call() throws Exception {
-                                // TODO: This is the same as in AbstractMongoDBSshDriver.isRunning. 
-                                // This feels like the right place. But feels like can be more consistent with different 
-                                // MongoDB types using the FunctionFeed.
-                                MongoDBClientSupport clientSupport = MongoDBClientSupport.forServer(MongoDBRouterImpl.this);
-                                return clientSupport.ping() && MongoDBRouterImpl.this.getAttribute(SHARD_COUNT) > 0;
-                            }
-                        })
-                        .onException(Functions.<Boolean>constant(false)))
-                .poll(new FunctionPollConfig<Integer, Integer>(SHARD_COUNT)
-                        .period(5, TimeUnit.SECONDS)
-                        .callable(new Callable<Integer>() {
-                            public Integer call() throws Exception {
-                                MongoDBClientSupport clientSupport = MongoDBClientSupport.forServer(MongoDBRouterImpl.this);
-                                return (int) clientSupport.getShardCount();
-                            }    
-                        })
-                        .onException(Functions.<Integer>constant(-1)))
-                .build();
-    }
-
-    @Override
-    protected void disconnectSensors() {
-        super.disconnectSensors();
-        if (functionFeed != null) functionFeed.stop();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterSshDriver.java
deleted file mode 100644
index 816906d..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBRouterSshDriver.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import org.apache.brooklyn.entity.nosql.mongodb.AbstractMongoDBSshDriver;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-
-import com.google.common.base.Joiner;
-import com.google.common.collect.ImmutableList;
-
-public class MongoDBRouterSshDriver extends AbstractMongoDBSshDriver implements MongoDBRouterDriver {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBRouterSshDriver.class);
-
-    public MongoDBRouterSshDriver(MongoDBRouterImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-    
-    @Override
-    public void launch() {
-        String configdb = Joiner.on(",").join(getEntity().getConfig(MongoDBRouter.CONFIG_SERVERS));
-        ImmutableList.Builder<String> argsBuilder = getArgsBuilderWithDefaults(MongoDBRouterImpl.class.cast(getEntity()))
-                .add("--configdb", configdb);
-        
-        String args = Joiner.on(" ").join(argsBuilder.build());
-        String command = String.format("%s/bin/mongos %s > out.log 2> err.log < /dev/null", getExpandedInstallDir(), args);
-        LOG.info(command);
-        newScript(LAUNCHING)
-                .updateTaskAndFailOnNonZeroResultCode()
-                .body.append(command).execute();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardCluster.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardCluster.java
deleted file mode 100644
index 02903c3..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardCluster.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-
-@ImplementedBy(MongoDBShardClusterImpl.class)
-public interface MongoDBShardCluster extends DynamicCluster {
-
-}


[10/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNode.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNode.java
deleted file mode 100644
index e21260a..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNode.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.riak;
-
-import java.net.URI;
-import java.util.List;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.annotation.Effector;
-import org.apache.brooklyn.core.annotation.EffectorParam;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.effector.MethodEffector;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.sensor.AttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.java.UsesJava;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.reflect.TypeToken;
-
-@Catalog(name="Riak Node", description="Riak is a distributed NoSQL key-value data store that offers "
-        + "extremely high availability, fault tolerance, operational simplicity and scalability.")
-@ImplementedBy(RiakNodeImpl.class)
-public interface RiakNode extends SoftwareProcess, UsesJava {
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION,
-            "Version to install (Default 2.0.5)", "2.0.5");
-
-    @SetFromFlag("optimizeNetworking")
-    ConfigKey<Boolean> OPTIMIZE_HOST_NETWORKING  = ConfigKeys.newBooleanConfigKey("riak.networking.optimize", "Optimize host networking when running in a VM", Boolean.TRUE);
-
-    // vm.args and app.config are used for pre-version 2.0.0. Later versions use the (simplified) riak.conf
-    // see https://github.com/joedevivo/ricon/blob/master/cuttlefish.md
-    @SetFromFlag("vmArgsTemplateUrl")
-    ConfigKey<String> RIAK_VM_ARGS_TEMPLATE_URL = ConfigKeys.newStringConfigKey(
-            "riak.vmArgs.templateUrl", "Template file (in freemarker format) for the vm.args config file",
-            "classpath://org/apache/brooklyn/entity/nosql/riak/vm.args");
-    @SetFromFlag("appConfigTemplateUrl")
-    ConfigKey<String> RIAK_APP_CONFIG_TEMPLATE_URL = ConfigKeys.newStringConfigKey(
-            "riak.appConfig.templateUrl", "Template file (in freemarker format) for the app.config config file",
-            "classpath://org/apache/brooklyn/entity/nosql/riak/app.config");
-    @SetFromFlag("appConfigTemplateUrlLinux")
-    ConfigKey<String> RIAK_CONF_TEMPLATE_URL_LINUX = ConfigKeys.newStringConfigKey(
-            "riak.riakConf.templateUrl.linux", "Template file (in freemarker format) for the app.config config file",
-            "classpath://org/apache/brooklyn/entity/nosql/riak/riak.conf");
-    @SetFromFlag("appConfigTemplateUrlMac")
-    ConfigKey<String> RIAK_CONF_TEMPLATE_URL_MAC = ConfigKeys.newStringConfigKey(
-            "riak.riakConf.templateUrl.mac", "Template file (in freemarker format) for the app.config config file",
-            "classpath://org/apache/brooklyn/entity/nosql/riak/riak-mac.conf");
-
-    ConfigKey<String> RIAK_CONF_ADDITIONAL_CONTENT = ConfigKeys.newStringConfigKey(
-            "riak.riakConf.additionalContent", "Template file (in freemarker format) for setting up additional settings in the riak.conf file", "");
-    
-    // maxOpenFiles' default value (65536) is based on the Basho's recommendation - http://docs.basho.com/riak/latest/ops/tuning/open-files-limit/ 
-    @SetFromFlag("maxOpenFiles")
-    ConfigKey<Integer> RIAK_MAX_OPEN_FILES = ConfigKeys.newIntegerConfigKey(
-            "riak.max.open.files", "Number of the open files required by Riak", 65536);
-    
-    @SetFromFlag("downloadUrlRhelCentos")
-    AttributeSensorAndConfigKey<String, String> DOWNLOAD_URL_RHEL_CENTOS = ConfigKeys.newTemplateSensorAndConfigKey("download.url.rhelcentos",
-            "URL pattern for downloading the linux RPM installer (will substitute things like ${version} automatically)",
-            "http://s3.amazonaws.com/downloads.basho.com/riak/${entity.majorVersion}/${entity.fullVersion}/rhel/" +
-                    "${entity.osMajorVersion}/riak-${entity.fullVersion}-1.el${entity.osMajorVersion}.x86_64.rpm");
-
-    @SetFromFlag("downloadUrlUbuntu")
-    AttributeSensorAndConfigKey<String, String> DOWNLOAD_URL_UBUNTU = ConfigKeys.newTemplateSensorAndConfigKey("download.url.ubuntu",
-            "URL pattern for downloading the linux Ubuntu installer (will substitute things like ${version} automatically)",
-            "http://s3.amazonaws.com/downloads.basho.com/riak/${entity.majorVersion}/${entity.fullVersion}/ubuntu/" +
-                    "$OS_RELEASE/riak_${entity.fullVersion}-1_amd64.deb");
-
-    @SetFromFlag("downloadUrlDebian")
-    AttributeSensorAndConfigKey<String, String> DOWNLOAD_URL_DEBIAN = ConfigKeys.newTemplateSensorAndConfigKey("download.url.debian",
-            "URL pattern for downloading the linux Debian installer (will substitute things like ${version} automatically)",
-            "http://s3.amazonaws.com/downloads.basho.com/riak/${entity.majorVersion}/${entity.fullVersion}/debian/" +
-                    "$OS_RELEASE/riak_${entity.fullVersion}-1_amd64.deb");
-
-    @SetFromFlag("downloadUrlMac")
-    AttributeSensorAndConfigKey<String, String> DOWNLOAD_URL_MAC = ConfigKeys.newTemplateSensorAndConfigKey("download.url.mac",
-            "URL pattern for downloading the MAC binaries tarball (will substitute things like ${version} automatically)",
-            "http://s3.amazonaws.com/downloads.basho.com/riak/${entity.majorVersion}/${entity.fullVersion}/osx/10.8/riak-${entity.fullVersion}-OSX-x86_64.tar.gz");
-
-    // NB these two needed for clients to access
-    @SetFromFlag("riakWebPort")
-    PortAttributeSensorAndConfigKey RIAK_WEB_PORT = new PortAttributeSensorAndConfigKey("riak.webPort", "Riak Web Port", "8098+");
-
-    @SetFromFlag("riakPbPort")
-    PortAttributeSensorAndConfigKey RIAK_PB_PORT = new PortAttributeSensorAndConfigKey("riak.pbPort", "Riak Protocol Buffers Port", "8087+");
-
-    @SetFromFlag("useHttpMonitoring")
-    ConfigKey<Boolean> USE_HTTP_MONITORING = ConfigKeys.newConfigKey("httpMonitoring.enabled", "HTTP(S) monitoring enabled", Boolean.TRUE);
-
-    AttributeSensor<Boolean> RIAK_PACKAGE_INSTALL = Sensors.newBooleanSensor(
-            "riak.install.package", "Flag to indicate whether Riak was installed using an OS package");
-    AttributeSensor<Boolean> RIAK_ON_PATH = Sensors.newBooleanSensor(
-            "riak.install.onPath", "Flag to indicate whether Riak is available on the PATH");
-
-    AttributeSensor<Boolean> RIAK_NODE_HAS_JOINED_CLUSTER = Sensors.newBooleanSensor(
-            "riak.node.riakNodeHasJoinedCluster", "Flag to indicate whether the Riak node has joined a cluster member");
-
-    AttributeSensor<String> RIAK_NODE_NAME = Sensors.newStringSensor("riak.node", "Returns the riak node name as defined in vm.args");
-
-    // these needed for nodes to talk to each other, but not clients (so ideally set up in the security group for internal access)
-    PortAttributeSensorAndConfigKey HANDOFF_LISTENER_PORT = new PortAttributeSensorAndConfigKey("handoffListenerPort", "Handoff Listener Port", "8099+");
-    PortAttributeSensorAndConfigKey EPMD_LISTENER_PORT = new PortAttributeSensorAndConfigKey("epmdListenerPort", "Erlang Port Mapper Daemon Listener Port", "4369");
-    PortAttributeSensorAndConfigKey ERLANG_PORT_RANGE_START = new PortAttributeSensorAndConfigKey("erlangPortRangeStart", "Erlang Port Range Start", "6000+");
-    PortAttributeSensorAndConfigKey ERLANG_PORT_RANGE_END = new PortAttributeSensorAndConfigKey("erlangPortRangeEnd", "Erlang Port Range End", "7999+");
-
-    @SetFromFlag("searchEnabled")
-    ConfigKey<Boolean> SEARCH_ENABLED = ConfigKeys.newBooleanConfigKey("riak.search", "Deploy Solr and configure Riak to use it", false);
-
-    /**
-     * http://docs.basho.com/riak/latest/dev/using/search/
-     * Solr is powered by Riak's Yokozuna engine and it is used through the riak webport
-     * So SEARCH_SOLR_PORT shouldn't be exposed
-     */
-    ConfigKey<Integer> SEARCH_SOLR_PORT = ConfigKeys.newIntegerConfigKey("search.solr.port", "Solr port", 8983);
-    ConfigKey<Integer> SEARCH_SOLR_JMX_PORT = ConfigKeys.newIntegerConfigKey("search.solr.jmx_port", "Solr port", 8985);
-
-    AttributeSensor<Integer> NODE_GETS = Sensors.newIntegerSensor("riak.node.gets", "Gets in the last minute");
-    AttributeSensor<Integer> NODE_GETS_TOTAL = Sensors.newIntegerSensor("riak.node.gets.total", "Total gets since node started");
-    AttributeSensor<Integer> NODE_PUTS = Sensors.newIntegerSensor("riak.node.puts", "Puts in the last minute");
-    AttributeSensor<Integer> NODE_PUTS_TOTAL = Sensors.newIntegerSensor("riak.node.puts.total", "Total puts since node started");
-    AttributeSensor<Integer> VNODE_GETS = Sensors.newIntegerSensor("riak.vnode.gets");
-    AttributeSensor<Integer> VNODE_GETS_TOTAL = Sensors.newIntegerSensor("riak.vnode.gets.total");
-
-    //Sensors for Riak Node Counters (within 1 minute window or lifetime of node.
-    //http://docs.basho.com/riak/latest/ops/running/stats-and-monitoring/#Statistics-from-Riak
-    AttributeSensor<Integer> VNODE_PUTS = Sensors.newIntegerSensor("riak.vnode.puts");
-    AttributeSensor<Integer> VNODE_PUTS_TOTAL = Sensors.newIntegerSensor("riak.vnode.puts.total");
-    AttributeSensor<Integer> READ_REPAIRS_TOTAL = Sensors.newIntegerSensor("riak.read.repairs.total");
-    AttributeSensor<Integer> COORD_REDIRS_TOTAL = Sensors.newIntegerSensor("riak.coord.redirs.total");
-    //Additional Riak node counters
-    AttributeSensor<Integer> MEMORY_PROCESSES_USED = Sensors.newIntegerSensor("riak.memory.processes.used");
-    AttributeSensor<Integer> SYS_PROCESS_COUNT = Sensors.newIntegerSensor("riak.sys.process.count");
-    AttributeSensor<Integer> PBC_CONNECTS = Sensors.newIntegerSensor("riak.pbc.connects");
-    AttributeSensor<Integer> PBC_ACTIVE = Sensors.newIntegerSensor("riak.pbc.active");
-    @SuppressWarnings("serial")
-    AttributeSensor<List<String>> RING_MEMBERS = Sensors.newSensor(new TypeToken<List<String>>() {},
-            "ring.members", "all the riak nodes in the ring");
-    
-    AttributeSensor<Integer> NODE_OPS = Sensors.newIntegerSensor("riak.node.ops", "Sum of node gets and puts in the last minute");
-    AttributeSensor<Integer> NODE_OPS_TOTAL = Sensors.newIntegerSensor("riak.node.ops.total", "Sum of node gets and puts since the node started");
-
-    MethodEffector<Void> JOIN_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "joinCluster");
-    MethodEffector<Void> LEAVE_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "leaveCluster");
-    MethodEffector<Void> REMOVE_FROM_CLUSTER = new MethodEffector<Void>(RiakNode.class, "removeNode");
-
-    AttributeSensor<Integer> RIAK_NODE_GET_FSM_TIME_MEAN = Sensors.newIntegerSensor("riak.node_get_fsm_time_mean", "Time between reception of client read request and subsequent response to client");
-    AttributeSensor<Integer> RIAK_NODE_PUT_FSM_TIME_MEAN = Sensors.newIntegerSensor("riak.node_put_fsm_time_mean", "Time between reception of client write request and subsequent response to client");
-    AttributeSensor<Integer> RIAK_OBJECT_COUNTER_MERGE_TIME_MEAN = Sensors.newIntegerSensor("riak.object_counter_merge_time_mean", "Time it takes to perform an Update Counter operation");
-    AttributeSensor<Integer> RIAK_OBJECT_SET_MERGE_TIME_MEAN = Sensors.newIntegerSensor("riak.object_set_merge_time_mean", "Time it takes to perform an Update Set operation");
-    AttributeSensor<Integer> RIAK_OBJECT_MAP_MERGE_TIME_MEAN = Sensors.newIntegerSensor("riak.object_map_merge_time_mean", "Time it takes to perform an Update Map operation");
-    AttributeSensor<Integer> RIAK_CONSISTENT_GET_TIME_MEAN = Sensors.newIntegerSensor("riak.consistent_get_time_mean", "Strongly consistent read latency");
-    AttributeSensor<Integer> RIAK_CONSISTENT_PUT_TIME_MEAN = Sensors.newIntegerSensor("riak.consistent_put_time_mean", "Strongly consistent write latency");
-
-    List<AttributeSensor<Integer>> ONE_MINUTE_SENSORS = ImmutableList.of(RIAK_NODE_GET_FSM_TIME_MEAN, RIAK_NODE_PUT_FSM_TIME_MEAN,
-            RIAK_OBJECT_COUNTER_MERGE_TIME_MEAN, RIAK_OBJECT_SET_MERGE_TIME_MEAN, RIAK_OBJECT_MAP_MERGE_TIME_MEAN,
-            RIAK_CONSISTENT_GET_TIME_MEAN, RIAK_CONSISTENT_PUT_TIME_MEAN);
-
-    AttributeSensor<URI> RIAK_CONSOLE_URI = Attributes.MAIN_URI;
-
-    // accessors, for use from template file
-    Integer getRiakWebPort();
-
-    Integer getRiakPbPort();
-
-    Integer getHandoffListenerPort();
-
-    Integer getEpmdListenerPort();
-
-    Integer getErlangPortRangeStart();
-
-    Integer getErlangPortRangeEnd();
-
-    Boolean isSearchEnabled();
-
-    Integer getSearchSolrPort();
-
-    Integer getSearchSolrJmxPort();
-
-    String getFullVersion();
-
-    String getMajorVersion();
-
-    String getOsMajorVersion();
-
-    // TODO add commitCluster() effector and add effectors joinCluster, leaveCluster, removeNode, recoverFailedNode which do not execute commitCluster()
-    // the commit where the commitCluster effector was available is adbf2dc1cb5df98b1e52d3ab35fa6bb4983b722f
-
-    @Effector(description = "Join the Riak cluster on the given node")
-    void joinCluster(@EffectorParam(name = "nodeName") String nodeName);
-
-    @Effector(description = "Leave the Riak cluster")
-    void leaveCluster();
-
-    @Effector(description = "Remove the given node from the Riak cluster")
-    void removeNode(@EffectorParam(name = "nodeName") String nodeName);
-
-    @Effector(description = "Recover and join the Riak cluster on the given node")
-    void recoverFailedNode(@EffectorParam(name = "nodeName") String nodeName);
-
-    @Effector(description = "Create or modify a bucket type before activation")
-    void bucketTypeCreate(@EffectorParam(name = "bucketTypeName") String bucketTypeName,
-                          @EffectorParam(name = "bucketTypeProperties") String bucketTypeProperties);
-
-    @Effector(description = "List all currently available bucket types and their activation status")
-    List<String> bucketTypeList();
-
-    @Effector(description = "Display the status and properties of a specific bucket type")
-    List<String> bucketTypeStatus(@EffectorParam(name = "bucketTypeName") String bucketTypeName);
-
-    @Effector(description = "Update a bucket type after activation")
-    void bucketTypeUpdate(@EffectorParam(name = "bucketTypeName") String bucketTypeName,
-                          @EffectorParam(name = "bucketTypeProperties") String bucketTypeProperties);
-
-    @Effector(description = "Activate a bucket type")
-    void bucketTypeActivate(@EffectorParam(name = "bucketTypeName") String bucketTypeName);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeDriver.java
deleted file mode 100644
index f42c85d..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeDriver.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.riak;
-
-import java.util.List;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface RiakNodeDriver extends SoftwareProcessDriver {
-
-    String getRiakEtcDir();
-
-    void joinCluster(String nodeName);
-
-    void leaveCluster();
-
-    void removeNode(String nodeName);
-
-    void recoverFailedNode(String nodeName);
-
-    String getOsMajorVersion();
-
-    void bucketTypeCreate(String bucketTypeName, String bucketTypeProperties);
-
-    List<String> bucketTypeList();
-
-    List<String> bucketTypeStatus(String bucketTypeName);
-
-    void bucketTypeUpdate(String bucketTypeName, String bucketTypeProperties);
-
-    void bucketTypeActivate(String bucketTypeName);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeImpl.java
deleted file mode 100644
index 60358a4..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeImpl.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.riak;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
-import javax.annotation.Nullable;
-
-import org.apache.brooklyn.api.location.MachineProvisioningLocation;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
-import org.apache.brooklyn.core.sensor.AttributeSensorAndConfigKey;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.entity.webapp.WebAppServiceMethods;
-import org.apache.brooklyn.feed.http.HttpFeed;
-import org.apache.brooklyn.feed.http.HttpPollConfig;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.util.collections.MutableSet;
-import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.apache.brooklyn.util.guava.Functionals;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ContiguousSet;
-import com.google.common.collect.DiscreteDomain;
-import com.google.common.collect.Range;
-import com.google.common.net.HostAndPort;
-
-public class RiakNodeImpl extends SoftwareProcessImpl implements RiakNode {
-
-    private volatile HttpFeed httpFeed;
-
-    @Override
-    public RiakNodeDriver getDriver() {
-        return (RiakNodeDriver) super.getDriver();
-    }
-
-    @Override
-    public Class<RiakNodeDriver> getDriverInterface() {
-        return RiakNodeDriver.class;
-    }
-
-    @Override
-    public void init() {
-        super.init();
-        // fail fast if config files not avail
-        Entities.getRequiredUrlConfig(this, RIAK_VM_ARGS_TEMPLATE_URL);
-        Entities.getRequiredUrlConfig(this, RIAK_APP_CONFIG_TEMPLATE_URL);
-        
-        Integer defaultMaxOpenFiles = RIAK_MAX_OPEN_FILES.getDefaultValue();
-        Integer maxOpenFiles = getConfig(RiakNode.RIAK_MAX_OPEN_FILES);
-        Preconditions.checkArgument(maxOpenFiles >= defaultMaxOpenFiles , "Specified number of open files : %s : is less than the required minimum",
-                maxOpenFiles, defaultMaxOpenFiles);
-    }
-
-    @SuppressWarnings("rawtypes")
-    public boolean isPackageDownloadUrlProvided() {
-        AttributeSensorAndConfigKey[] downloadProperties = { DOWNLOAD_URL_RHEL_CENTOS, DOWNLOAD_URL_UBUNTU, DOWNLOAD_URL_DEBIAN };
-        for (AttributeSensorAndConfigKey property : downloadProperties) {
-            if (!((ConfigurationSupportInternal) config()).getRaw(property).isAbsent()) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    protected Map<String, Object> obtainProvisioningFlags(@SuppressWarnings("rawtypes") MachineProvisioningLocation location) {
-        ConfigBag result = ConfigBag.newInstance(super.obtainProvisioningFlags(location));
-        result.configure(CloudLocationConfig.OS_64_BIT, true);
-        return result.getAllConfig();
-    }
-
-    @Override
-    protected Collection<Integer> getRequiredOpenPorts() {
-        // TODO this creates a huge list of inbound ports; much better to define on a security group using range syntax!
-        int erlangRangeStart = getConfig(ERLANG_PORT_RANGE_START).iterator().next();
-        int erlangRangeEnd = getConfig(ERLANG_PORT_RANGE_END).iterator().next();
-
-        Set<Integer> ports = MutableSet.copyOf(super.getRequiredOpenPorts());
-        Set<Integer> erlangPorts = ContiguousSet.create(Range.open(erlangRangeStart, erlangRangeEnd), DiscreteDomain.integers());
-        ports.addAll(erlangPorts);
-
-        return ports;
-    }
-
-    @Override
-    public void connectSensors() {
-        super.connectSensors();
-        connectServiceUpIsRunning();
-        HostAndPort accessible = BrooklynAccessUtils.getBrooklynAccessibleAddress(this, getRiakWebPort());
-
-        if (isHttpMonitoringEnabled()) {
-            HttpFeed.Builder httpFeedBuilder = HttpFeed.builder()
-                    .entity(this)
-                    .period(500, TimeUnit.MILLISECONDS)
-                    .baseUri(String.format("http://%s/stats", accessible.toString()))
-                    .poll(new HttpPollConfig<Integer>(NODE_GETS)
-                            .onSuccess(HttpValueFunctions.jsonContents("node_gets", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(NODE_GETS_TOTAL)
-                            .onSuccess(HttpValueFunctions.jsonContents("node_gets_total", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(NODE_PUTS)
-                            .onSuccess(HttpValueFunctions.jsonContents("node_puts", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(NODE_PUTS_TOTAL)
-                            .onSuccess(HttpValueFunctions.jsonContents("node_puts_total", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(VNODE_GETS)
-                            .onSuccess(HttpValueFunctions.jsonContents("vnode_gets", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(VNODE_GETS_TOTAL)
-                            .onSuccess(HttpValueFunctions.jsonContents("vnode_gets_total", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(VNODE_PUTS)
-                            .onSuccess(HttpValueFunctions.jsonContents("vnode_puts", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(VNODE_PUTS_TOTAL)
-                            .onSuccess(HttpValueFunctions.jsonContents("vnode_puts_total", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(READ_REPAIRS_TOTAL)
-                            .onSuccess(HttpValueFunctions.jsonContents("read_repairs_total", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(COORD_REDIRS_TOTAL)
-                            .onSuccess(HttpValueFunctions.jsonContents("coord_redirs_total", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(MEMORY_PROCESSES_USED)
-                            .onSuccess(HttpValueFunctions.jsonContents("memory_processes_used", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(SYS_PROCESS_COUNT)
-                            .onSuccess(HttpValueFunctions.jsonContents("sys_process_count", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(PBC_CONNECTS)
-                            .onSuccess(HttpValueFunctions.jsonContents("pbc_connects", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<Integer>(PBC_ACTIVE)
-                            .onSuccess(HttpValueFunctions.jsonContents("pbc_active", Integer.class))
-                            .onFailureOrException(Functions.constant(-1)))
-                    .poll(new HttpPollConfig<List<String>>(RING_MEMBERS)
-                            .onSuccess(Functionals.chain(
-                                    HttpValueFunctions.jsonContents("ring_members", String[].class),
-                                    new Function<String[], List<String>>() {
-                                        @Nullable
-                                        @Override
-                                        public List<String> apply(@Nullable String[] strings) {
-                                            return Arrays.asList(strings);
-                                        }
-                                    }
-                            ))
-                            .onFailureOrException(Functions.constant(Arrays.asList(new String[0]))));
-    
-            for (AttributeSensor<Integer> sensor : ONE_MINUTE_SENSORS) {
-                httpFeedBuilder.poll(new HttpPollConfig<Integer>(sensor)
-                        .period(Duration.ONE_MINUTE)
-                        .onSuccess(HttpValueFunctions.jsonContents(sensor.getName().substring(5), Integer.class))
-                        .onFailureOrException(Functions.constant(-1)));
-            }
-    
-            httpFeed = httpFeedBuilder.build();
-        }
-        
-        enrichers().add(Enrichers.builder().combining(NODE_GETS, NODE_PUTS).computingSum().publishing(NODE_OPS).build());
-        enrichers().add(Enrichers.builder().combining(NODE_GETS_TOTAL, NODE_PUTS_TOTAL).computingSum().publishing(NODE_OPS_TOTAL).build());
-        WebAppServiceMethods.connectWebAppServerPolicies(this);
-    }
-
-    @Override
-    public void disconnectSensors() {
-        super.disconnectSensors();
-        if (httpFeed != null) {
-            httpFeed.stop();
-        }
-        disconnectServiceUpIsRunning();
-    }
-
-    @Override
-    public void joinCluster(String nodeName) {
-        getDriver().joinCluster(nodeName);
-    }
-
-    @Override
-    public void leaveCluster() {
-        getDriver().leaveCluster();
-    }
-
-    @Override
-    public void removeNode(String nodeName) {
-        getDriver().removeNode(nodeName);
-    }
-
-    @Override
-    public void bucketTypeCreate(String bucketTypeName, String bucketTypeProperties) {
-        getDriver().bucketTypeCreate(bucketTypeName, bucketTypeProperties);
-    }
-
-    @Override
-    public List<String> bucketTypeList() {
-        return getDriver().bucketTypeList();
-    }
-
-    @Override
-    public List<String> bucketTypeStatus(String bucketTypeName) {
-        return getDriver().bucketTypeStatus(bucketTypeName);
-    }
-
-    @Override
-    public void bucketTypeUpdate(String bucketTypeName, String bucketTypeProperties) {
-        getDriver().bucketTypeUpdate(bucketTypeName, bucketTypeProperties);
-    }
-
-    @Override
-    public void bucketTypeActivate(String bucketTypeName) {
-        getDriver().bucketTypeActivate(bucketTypeName);
-    }
-
-    @Override
-    public void recoverFailedNode(String nodeName) {
-        getDriver().recoverFailedNode(nodeName);
-    }
-
-    protected boolean isHttpMonitoringEnabled() {
-        return Boolean.TRUE.equals(getConfig(USE_HTTP_MONITORING));
-    }
-    @Override
-    public Integer getRiakWebPort() {
-        return getAttribute(RiakNode.RIAK_WEB_PORT);
-    }
-
-    @Override
-    public Integer getRiakPbPort() {
-        return getAttribute(RiakNode.RIAK_PB_PORT);
-    }
-
-    @Override
-    public Integer getHandoffListenerPort() {
-        return getAttribute(RiakNode.HANDOFF_LISTENER_PORT);
-    }
-
-    @Override
-    public Integer getEpmdListenerPort() {
-        return getAttribute(RiakNode.EPMD_LISTENER_PORT);
-    }
-
-    @Override
-    public Integer getErlangPortRangeStart() {
-        return getAttribute(RiakNode.ERLANG_PORT_RANGE_START);
-    }
-
-    @Override
-    public Integer getErlangPortRangeEnd() {
-        return getAttribute(RiakNode.ERLANG_PORT_RANGE_END);
-    }
-
-    @Override
-    public Boolean isSearchEnabled() {
-        return getConfig(RiakNode.SEARCH_ENABLED);
-    }
-
-    @Override
-    public Integer getSearchSolrPort() {
-        return getConfig(RiakNode.SEARCH_SOLR_PORT);
-    }
-
-    @Override
-    public Integer getSearchSolrJmxPort() {
-        return getConfig(RiakNode.SEARCH_SOLR_JMX_PORT);
-    }
-
-    @Override
-    public String getMajorVersion() {
-        return getFullVersion().substring(0, 3);
-    }
-
-    @Override
-    public String getFullVersion() {
-        return getConfig(RiakNode.SUGGESTED_VERSION);
-    }
-
-    @Override
-    public String getOsMajorVersion() {
-        return getDriver().getOsMajorVersion();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java
deleted file mode 100644
index 65879a7..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java
+++ /dev/null
@@ -1,613 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.riak;
-
-import static java.lang.String.format;
-import static org.apache.brooklyn.util.ssh.BashCommands.INSTALL_CURL;
-import static org.apache.brooklyn.util.ssh.BashCommands.INSTALL_TAR;
-import static org.apache.brooklyn.util.ssh.BashCommands.addSbinPathCommand;
-import static org.apache.brooklyn.util.ssh.BashCommands.sbinPath;
-import static org.apache.brooklyn.util.ssh.BashCommands.alternatives;
-import static org.apache.brooklyn.util.ssh.BashCommands.chainGroup;
-import static org.apache.brooklyn.util.ssh.BashCommands.commandToDownloadUrlAs;
-import static org.apache.brooklyn.util.ssh.BashCommands.ifExecutableElse;
-import static org.apache.brooklyn.util.ssh.BashCommands.ifNotExecutable;
-import static org.apache.brooklyn.util.ssh.BashCommands.ok;
-import static org.apache.brooklyn.util.ssh.BashCommands.sudo;
-import static org.apache.brooklyn.util.text.StringEscapes.BashStringEscapes.escapeLiteralForDoubleQuotedBash;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.location.OsDetails;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.ssh.SshTasks;
-import org.apache.brooklyn.util.net.Urls;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.text.Strings;
-
-import com.google.common.base.Joiner;
-import com.google.common.base.Optional;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-
-// TODO: Alter -env ERL_CRASH_DUMP path in vm.args
-public class RiakNodeSshDriver extends JavaSoftwareProcessSshDriver implements RiakNodeDriver {
-
-    private static final Logger LOG = LoggerFactory.getLogger(RiakNodeSshDriver.class);
-    private static final String INSTALLING_FALLBACK = INSTALLING + "_fallback";
-
-    public RiakNodeSshDriver(final RiakNodeImpl entity, final SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    protected String getLogFileLocation() {
-        return "/var/log/riak/solr.log";
-    }
-
-    @Override
-    public RiakNodeImpl getEntity() {
-        return RiakNodeImpl.class.cast(super.getEntity());
-    }
-
-    @Override
-    public Map<String, String> getShellEnvironment() {
-        MutableMap<String, String> result = MutableMap.copyOf(super.getShellEnvironment());
-        // how to change epmd port, according to
-        // http://serverfault.com/questions/582787/how-to-change-listening-interface-of-rabbitmqs-epmd-port-4369
-        if (getEntity().getEpmdListenerPort() != null) {
-            result.put("ERL_EPMD_PORT", Integer.toString(getEntity().getEpmdListenerPort()));
-        }
-        result.put("WAIT_FOR_ERLANG", "60");
-        return result;
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("riak-%s", getVersion()))));
-
-        // Set package install attribute
-        OsDetails osDetails = getMachine().getMachineDetails().getOsDetails();
-        if (osDetails.isLinux()) {
-            entity.sensors().set(RiakNode.RIAK_PACKAGE_INSTALL, true);
-        } else if (osDetails.isMac()) {
-            entity.sensors().set(RiakNode.RIAK_PACKAGE_INSTALL, false);
-        }
-    }
-
-    @Override
-    public void install() {
-        if (entity.getConfig(Attributes.DOWNLOAD_URL) != null) {
-            LOG.warn("Ignoring download.url {}, use download.url.rhelcentos or download.url.mac", entity.getConfig(Attributes.DOWNLOAD_URL));
-        }
-
-        OsDetails osDetails = getMachine().getMachineDetails().getOsDetails();
-        List<String> commands = Lists.newLinkedList();
-        if (osDetails.isLinux()) {
-            if (getEntity().isPackageDownloadUrlProvided()) {
-                commands.addAll(installLinuxFromPackageUrl());
-            } else {
-                commands.addAll(installFromPackageCloud());
-            }
-        } else if (osDetails.isMac()) {
-            commands.addAll(installMac());
-        } else if (osDetails.isWindows()) {
-            throw new UnsupportedOperationException("RiakNode not supported on Windows instances");
-        } else {
-            throw new IllegalStateException("Machine was not detected as linux, mac or windows! Installation does not know how to proceed with " +
-                    getMachine() + ". Details: " + getMachine().getMachineDetails().getOsDetails());
-        }
-
-        int result = newScript(INSTALLING)
-                .body.append(commands)
-                .failIfBodyEmpty()
-                .execute();
-
-        if (result != 0 && osDetails.isLinux()) {
-            result = newScript(INSTALLING_FALLBACK)
-                    .body.append(installLinuxFromPackageUrl())
-                    .execute();
-        }
-
-        if (result != 0) {
-            throw new IllegalStateException(String.format("Install failed with result %d", result));
-        }
-    }
-
-    private List<String> installLinuxFromPackageUrl() {
-        DynamicTasks.queueIfPossible(SshTasks.dontRequireTtyForSudo(getMachine(), SshTasks.OnFailingTask.WARN_OR_IF_DYNAMIC_FAIL_MARKING_INESSENTIAL)).orSubmitAndBlock();
-
-        String expandedInstallDir = getExpandedInstallDir();
-        String installBin = Urls.mergePaths(expandedInstallDir, "bin");
-        String saveAsYum = "riak.rpm";
-        String saveAsApt = "riak.deb";
-        OsDetails osDetails = getMachine().getOsDetails();
-
-        String downloadUrl;
-        String osReleaseCmd;
-        if ("debian".equalsIgnoreCase(osDetails.getName())) {
-            // TODO osDetails.getName() is returning "linux", instead of debian/ubuntu on AWS with jenkins image,
-            //      running as integration test targetting localhost.
-            // TODO Debian support (default debian image fails with 'sudo: command not found')
-            downloadUrl = (String)entity.getAttribute(RiakNode.DOWNLOAD_URL_DEBIAN);
-            osReleaseCmd = osDetails.getVersion().substring(0, osDetails.getVersion().indexOf("."));
-        } else {
-            // assume Ubuntu
-            downloadUrl = (String)entity.getAttribute(RiakNode.DOWNLOAD_URL_UBUNTU);
-            osReleaseCmd = "`lsb_release -sc` && " +
-                    "export OS_RELEASE=`([[ \"lucid natty precise\" =~ (^| )\\$OS_RELEASE($| ) ]] && echo $OS_RELEASE || echo precise)`";
-        }
-        String apt = chainGroup(
-                //debian fix
-                addSbinPathCommand(),
-                "which apt-get",
-                ok(sudo("apt-get -y --allow-unauthenticated install logrotate libpam0g-dev libssl0.9.8")),
-                "export OS_NAME=" + Strings.toLowerCase(osDetails.getName()),
-                "export OS_RELEASE=" + osReleaseCmd,
-                String.format("wget -O %s %s", saveAsApt, downloadUrl),
-                sudo(String.format("dpkg -i %s", saveAsApt)));
-        String yum = chainGroup(
-                "which yum",
-                ok(sudo("yum -y install openssl")),
-                String.format("wget -O %s %s", saveAsYum, entity.getAttribute(RiakNode.DOWNLOAD_URL_RHEL_CENTOS)),
-                sudo(String.format("yum localinstall -y %s", saveAsYum)));
-        return ImmutableList.<String>builder()
-                .add("mkdir -p " + installBin)
-                .add(INSTALL_CURL)
-                .add(alternatives(apt, yum))
-                .add("ln -s `which riak` " + Urls.mergePaths(installBin, "riak"))
-                .add("ln -s `which riak-admin` " + Urls.mergePaths(installBin, "riak-admin"))
-                .build();
-    }
-
-    private List<String> installFromPackageCloud() {
-        OsDetails osDetails = getMachine().getMachineDetails().getOsDetails();
-        return ImmutableList.<String>builder()
-                .add(osDetails.getName().toLowerCase().contains("debian") ? addSbinPathCommand() : "")
-                .add(ifNotExecutable("curl", INSTALL_CURL))
-                .addAll(ifExecutableElse("yum", installDebianBased(), installRpmBased()))
-                .build();
-    }
-
-    private ImmutableList<String> installDebianBased() {
-        return ImmutableList.<String>builder()
-                .add("curl https://packagecloud.io/install/repositories/basho/riak/script.deb.sh | " + BashCommands.sudo("bash"))
-                .add(BashCommands.sudo("apt-get install --assume-yes riak=" + getEntity().getFullVersion() + "-1"))
-                .build();
-    }
-
-    private ImmutableList<String> installRpmBased() {
-        return ImmutableList.<String>builder()
-                .add("curl https://packagecloud.io/install/repositories/basho/riak/script.rpm.sh | " + BashCommands.sudo("bash"))
-                .add(BashCommands.sudo("yum install -y riak-" + getEntity().getFullVersion() + "*"))
-                .build();
-    }
-
-    protected List<String> installMac() {
-        String saveAs = resolver.getFilename();
-        String url = entity.getAttribute(RiakNode.DOWNLOAD_URL_MAC);
-        return ImmutableList.<String>builder()
-                .add(INSTALL_TAR)
-                .add(INSTALL_CURL)
-                .add(commandToDownloadUrlAs(url, saveAs))
-                .add("tar xzvf " + saveAs)
-                .build();
-    }
-
-    @Override
-    public void customize() {
-        checkRiakOnPath();
-
-        //create entity's runDir
-        newScript(CUSTOMIZING).execute();
-
-        OsDetails osDetails = getMachine().getMachineDetails().getOsDetails();
-
-        List<String> commands = Lists.newLinkedList();
-        commands.add(sudo("mkdir -p " + getRiakEtcDir()));
-
-        if (isVersion1()) {
-            String vmArgsTemplate = processTemplate(entity.getConfig(RiakNode.RIAK_VM_ARGS_TEMPLATE_URL));
-            String saveAsVmArgs = Urls.mergePaths(getRunDir(), "vm.args");
-            DynamicTasks.queue(SshEffectorTasks.put(saveAsVmArgs).contents(vmArgsTemplate));
-            commands.add(sudo("mv " + saveAsVmArgs + " " + getRiakEtcDir()));
-
-            String appConfigTemplate = processTemplate(entity.getConfig(RiakNode.RIAK_APP_CONFIG_TEMPLATE_URL));
-            String saveAsAppConfig = Urls.mergePaths(getRunDir(), "app.config");
-            DynamicTasks.queue(SshEffectorTasks.put(saveAsAppConfig).contents(appConfigTemplate));
-            commands.add(sudo("mv " + saveAsAppConfig + " " + getRiakEtcDir()));
-        } else {
-            String templateUrl = osDetails.isMac() ? entity.getConfig(RiakNode.RIAK_CONF_TEMPLATE_URL_MAC) :
-                    entity.getConfig(RiakNode.RIAK_CONF_TEMPLATE_URL_LINUX);
-            String riakConfContent = processTemplate(templateUrl);
-            String saveAsRiakConf = Urls.mergePaths(getRunDir(), "riak.conf");
-
-            if(Strings.isNonBlank(entity.getConfig(RiakNode.RIAK_CONF_ADDITIONAL_CONTENT))) {
-                String additionalConfigContent = processTemplateContents(entity.getConfig(RiakNode.RIAK_CONF_ADDITIONAL_CONTENT));
-                riakConfContent += "\n## Brooklyn note: additional config\n";
-                riakConfContent += additionalConfigContent;
-            }
-
-            DynamicTasks.queue(SshEffectorTasks.put(saveAsRiakConf).contents(riakConfContent));
-            commands.add(sudo("mv " + saveAsRiakConf + " " + getRiakEtcDir()));
-        }
-
-        //increase open file limit (default min for riak is: 4096)
-        //TODO: detect the actual limit then do the modification.
-        //TODO: modify ulimit for linux distros
-        //    commands.add(sudo("launchctl limit maxfiles 4096 32768"));
-        if (osDetails.isMac()) {
-            commands.add("ulimit -n 4096");
-        }
-
-        if (osDetails.isLinux() && isVersion1()) {
-            commands.add(sudo("chown -R riak:riak " + getRiakEtcDir()));
-        }
-
-        // TODO platform_*_dir
-        // TODO riak config log
-
-        ScriptHelper customizeScript = newScript(CUSTOMIZING)
-                .failOnNonZeroResultCode()
-                .body.append(commands);
-
-        if (!isRiakOnPath()) {
-            addRiakOnPath(customizeScript);
-        }
-        customizeScript.failOnNonZeroResultCode().execute();
-
-        if (osDetails.isLinux()) {
-            ImmutableMap<String, String> sysctl = ImmutableMap.<String, String>builder()
-                    .put("vm.swappiness", "0")
-                    .put("net.core.somaxconn", "40000")
-                    .put("net.ipv4.tcp_max_syn_backlog", "40000")
-                    .put("net.ipv4.tcp_sack",  "1")
-                    .put("net.ipv4.tcp_window_scaling",  "15")
-                    .put("net.ipv4.tcp_fin_timeout",     "1")
-                    .put("net.ipv4.tcp_keepalive_intvl", "30")
-                    .put("net.ipv4.tcp_tw_reuse",        "1")
-                    .put("net.ipv4.tcp_moderate_rcvbuf", "1")
-                    .build();
-
-            ScriptHelper optimize = newScript(CUSTOMIZING + "network")
-                .body.append(sudo("sysctl " + Joiner.on(' ').withKeyValueSeparator("=").join(sysctl)));
-
-            Optional<Boolean> enable = Optional.fromNullable(entity.getConfig(RiakNode.OPTIMIZE_HOST_NETWORKING));
-            if (!enable.isPresent()) optimize.inessential();
-            if (enable.or(true)) optimize.execute();
-        }
-
-        //set the riak node name
-        entity.sensors().set(RiakNode.RIAK_NODE_NAME, format("riak@%s", getSubnetHostname()));
-    }
-
-    @Override
-    public void launch() {
-        List<String> commands = Lists.newLinkedList();
-
-        if (isPackageInstall()) {
-            commands.add(addSbinPathCommand());
-            commands.add(sudo(format("sh -c \"ulimit -n %s && service riak start\"", maxOpenFiles())));
-        } else {
-            // NOTE: See instructions at http://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1
-            // for increasing the system limit for number of open files
-            commands.add("ulimit -n 65536 || true"); // `BashCommands.ok` will put this in parentheses, which will set ulimit -n in the subshell
-            commands.add(format("%s start >/dev/null 2>&1 < /dev/null &", getRiakCmd()));
-        }
-
-        ScriptHelper launchScript = newScript(LAUNCHING)
-                .body.append(commands);
-
-        if (!isRiakOnPath()) {
-            addRiakOnPath(launchScript);
-        }
-        launchScript.failOnNonZeroResultCode().execute();
-
-        String mainUri = String.format("http://%s:%s/admin", entity.getAttribute(Attributes.HOSTNAME), entity.getAttribute(RiakNode.RIAK_WEB_PORT));
-        entity.sensors().set(Attributes.MAIN_URI, URI.create(mainUri));
-    }
-
-    @Override
-    public void stop() {
-        leaveCluster();
-
-        String command = format("%s stop", getRiakCmd());
-        command = isPackageInstall() ? sudo(command) : command;
-
-        ScriptHelper stopScript = newScript(ImmutableMap.of(USE_PID_FILE, false), STOPPING)
-                .body.append(command);
-
-        if (!isRiakOnPath()) {
-            addRiakOnPath(stopScript);
-        }
-
-        int result = stopScript.failOnNonZeroResultCode().execute();
-        if (result != 0) {
-            newScript(ImmutableMap.of(USE_PID_FILE, false), STOPPING).execute();
-        }
-    }
-
-    @Override
-    public boolean isRunning() {
-        // Version 2.0.0 requires sudo for `riak ping`
-        ScriptHelper checkRunningScript = newScript(CHECK_RUNNING)
-                .body.append(sudo(format("%s ping", getRiakCmd())));
-
-        if (!isRiakOnPath()) {
-            addRiakOnPath(checkRunningScript);
-        }
-        return (checkRunningScript.execute() == 0);
-    }
-
-    public boolean isPackageInstall() {
-        return entity.getAttribute(RiakNode.RIAK_PACKAGE_INSTALL);
-    }
-
-    public boolean isRiakOnPath() {
-        return entity.getAttribute(RiakNode.RIAK_ON_PATH);
-    }
-
-    public String getRiakEtcDir() {
-        return isPackageInstall() ? "/etc/riak" : Urls.mergePaths(getExpandedInstallDir(), "etc");
-    }
-
-    protected String getRiakCmd() {
-        return isPackageInstall() ? "riak" : Urls.mergePaths(getExpandedInstallDir(), "bin/riak");
-    }
-
-    protected String getRiakAdminCmd() {
-        return isPackageInstall() ? "riak-admin" : Urls.mergePaths(getExpandedInstallDir(), "bin/riak-admin");
-    }
-
-    // TODO find a way to batch commit the changes, instead of committing for every operation.
-
-    @Override
-    public void joinCluster(String nodeName) {
-        if (getRiakName().equals(nodeName)) {
-            log.warn("Cannot join Riak node: {} to itself", nodeName);
-        } else {
-            if (!hasJoinedCluster()) {
-                ScriptHelper joinClusterScript = newScript("joinCluster")
-                        .body.append(sudo(format("%s cluster join %s", getRiakAdminCmd(), nodeName)))
-                        .body.append(sudo(format("%s cluster plan", getRiakAdminCmd())))
-                        .body.append(sudo(format("%s cluster commit", getRiakAdminCmd())))
-                        .failOnNonZeroResultCode();
-
-                if (!isRiakOnPath()) {
-                    addRiakOnPath(joinClusterScript);
-                }
-
-                joinClusterScript.execute();
-
-                entity.sensors().set(RiakNode.RIAK_NODE_HAS_JOINED_CLUSTER, Boolean.TRUE);
-            } else {
-                log.warn("entity {}: is already in the riak cluster", entity.getId());
-            }
-        }
-    }
-
-    @Override
-    public void leaveCluster() {
-        if (hasJoinedCluster()) {
-            ScriptHelper leaveClusterScript = newScript("leaveCluster")
-                    .body.append(sudo(format("%s cluster leave", getRiakAdminCmd())))
-                    .body.append(sudo(format("%s cluster plan", getRiakAdminCmd())))
-                    .body.append(sudo(format("%s cluster commit", getRiakAdminCmd())))
-                    .failOnNonZeroResultCode();
-
-            if (!isRiakOnPath()) {
-                addRiakOnPath(leaveClusterScript);
-            }
-
-            leaveClusterScript.execute();
-
-            entity.sensors().set(RiakNode.RIAK_NODE_HAS_JOINED_CLUSTER, Boolean.FALSE);
-        } else {
-            log.warn("entity {}: has already left the riak cluster", entity.getId());
-        }
-    }
-
-    @Override
-    public void removeNode(String nodeName) {
-        ScriptHelper removeNodeScript = newScript("removeNode")
-                .body.append(sudo(format("%s cluster force-remove %s", getRiakAdminCmd(), nodeName)))
-                .body.append(sudo(format("%s down %s", getRiakAdminCmd(), nodeName)))
-                .body.append(sudo(format("%s cluster plan", getRiakAdminCmd())))
-                .body.append(sudo(format("%s cluster commit", getRiakAdminCmd())))
-                .failOnNonZeroResultCode();
-
-        if (!isRiakOnPath()) {
-            addRiakOnPath(removeNodeScript);
-        }
-
-        removeNodeScript.execute();
-    }
-
-    @Override
-    public void bucketTypeCreate(String bucketTypeName, String bucketTypeProperties) {
-        ScriptHelper bucketTypeCreateScript = newScript("bucket-type_create " + bucketTypeName)
-                .body.append(sudo(format("%s bucket-type create %s %s",
-                        getRiakAdminCmd(),
-                        bucketTypeName,
-                        escapeLiteralForDoubleQuotedBash(bucketTypeProperties))));
-        if(!isRiakOnPath()) {
-            addRiakOnPath(bucketTypeCreateScript);
-        }
-        bucketTypeCreateScript.body.append(sudo(format("%s bucket-type activate %s", getRiakAdminCmd(), bucketTypeName)))
-                .failOnNonZeroResultCode();
-
-        bucketTypeCreateScript.execute();
-    }
-
-    @Override
-    public List<String> bucketTypeList() {
-        ScriptHelper bucketTypeListScript = newScript("bucket-types_list")
-                .body.append(sudo(format("%s bucket-type list", getRiakAdminCmd())))
-                .gatherOutput()
-                .noExtraOutput()
-                .failOnNonZeroResultCode();
-        if (!isRiakOnPath()) {
-            addRiakOnPath(bucketTypeListScript);
-        }
-        bucketTypeListScript.execute();
-        String stdout = bucketTypeListScript.getResultStdout();
-        return Arrays.asList(stdout.split("[\\r\\n]+"));
-    }
-
-    @Override
-    public List<String> bucketTypeStatus(String bucketTypeName) {
-        ScriptHelper bucketTypeStatusScript = newScript("bucket-type_status")
-                .body.append(sudo(format("%s bucket-type status %s", getRiakAdminCmd(), bucketTypeName)))
-                .gatherOutput()
-                .noExtraOutput()
-                .failOnNonZeroResultCode();
-        if (!isRiakOnPath()) {
-            addRiakOnPath(bucketTypeStatusScript);
-        }
-        bucketTypeStatusScript.execute();
-        String stdout = bucketTypeStatusScript.getResultStdout();
-        return Arrays.asList(stdout.split("[\\r\\n]+"));
-    }
-
-    @Override
-    public void bucketTypeUpdate(String bucketTypeName, String bucketTypeProperties) {
-        ScriptHelper bucketTypeStatusScript = newScript("bucket-type_update")
-                .body.append(sudo(format("%s bucket-type update %s %s",
-                        getRiakAdminCmd(),
-                        bucketTypeName,
-                        escapeLiteralForDoubleQuotedBash(bucketTypeProperties))))
-                .failOnNonZeroResultCode();
-        if (!isRiakOnPath()) {
-            addRiakOnPath(bucketTypeStatusScript);
-        }
-        bucketTypeStatusScript.execute();
-    }
-
-    @Override
-    public void bucketTypeActivate(String bucketTypeName) {
-        ScriptHelper bucketTypeStatusScript = newScript("bucket-type_activate")
-                .body.append(sudo(format("%s bucket-type activate %s", getRiakAdminCmd(), bucketTypeName)))
-                .failOnNonZeroResultCode();
-        if (!isRiakOnPath()) {
-            addRiakOnPath(bucketTypeStatusScript);
-        }
-        bucketTypeStatusScript.execute();
-    }
-
-    @Override
-    public void recoverFailedNode(String nodeName) {
-        //TODO find ways to detect a faulty/failed node
-        //argument passed 'node' is any working node in the riak cluster
-        //following the instruction from: http://docs.basho.com/riak/latest/ops/running/recovery/failed-node/
-
-        if (hasJoinedCluster()) {
-            String failedNodeName = getRiakName();
-
-
-            String stopCommand = format("%s stop", getRiakCmd());
-            stopCommand = isPackageInstall() ? sudo(stopCommand) : stopCommand;
-
-            String startCommand = format("%s start > /dev/null 2>&1 < /dev/null &", getRiakCmd());
-            startCommand = isPackageInstall() ? sudo(startCommand) : startCommand;
-
-            ScriptHelper recoverNodeScript = newScript("recoverNode")
-                    .body.append(stopCommand)
-                    .body.append(format("%s down %s", getRiakAdminCmd(), failedNodeName))
-                    .body.append(sudo(format("rm -rf %s", getRingStateDir())))
-                    .body.append(startCommand)
-                    .body.append(sudo(format("%s cluster join %s", getRiakAdminCmd(), nodeName)))
-                    .body.append(sudo(format("%s cluster plan", getRiakAdminCmd())))
-                    .body.append(sudo(format("%s cluster commit", getRiakAdminCmd())))
-                    .failOnNonZeroResultCode();
-
-            if (!isRiakOnPath()) {
-                addRiakOnPath(recoverNodeScript);
-            }
-
-            recoverNodeScript.execute();
-
-        } else {
-            log.warn("entity {}: is not in the riak cluster", entity.getId());
-        }
-    }
-
-    @Override
-    public void setup() {
-        if(entity.getConfig(RiakNode.SEARCH_ENABLED)) {
-            // JavaSoftwareProcessSshDriver.setup() is called in order to install java
-            super.setup();
-        }
-    }
-
-    private Boolean hasJoinedCluster() {
-        return Boolean.TRUE.equals(entity.getAttribute(RiakNode.RIAK_NODE_HAS_JOINED_CLUSTER));
-    }
-
-    protected void checkRiakOnPath() {
-        boolean riakOnPath = newScript("riakOnPath")
-                .body.append("which riak")
-                .execute() == 0;
-        entity.sensors().set(RiakNode.RIAK_ON_PATH, riakOnPath);
-    }
-
-    private String getRiakName() {
-        return entity.getAttribute(RiakNode.RIAK_NODE_NAME);
-    }
-
-    private String getRingStateDir() {
-        //TODO: check for non-package install.
-        return isPackageInstall() ? "/var/lib/riak/ring" : Urls.mergePaths(getExpandedInstallDir(), "lib/ring");
-    }
-
-    protected boolean isVersion1() {
-        return getVersion().startsWith("1.");
-    }
-
-    @Override
-    public String getOsMajorVersion() {
-        OsDetails osDetails = getMachine().getMachineDetails().getOsDetails();
-        String osVersion = osDetails.getVersion();
-        return osVersion.contains(".") ? osVersion.substring(0, osVersion.indexOf(".")) : osVersion;
-    }
-
-    private void addRiakOnPath(ScriptHelper scriptHelper) {
-        Map<String, String> newPathVariable = ImmutableMap.of("PATH", sbinPath());
-//        log.warn("riak command not found on PATH. Altering future commands' environment variables from {} to {}", getShellEnvironment(), newPathVariable);
-        scriptHelper.environmentVariablesReset(newPathVariable);
-    }
-
-    public Integer maxOpenFiles() {
-        return entity.getConfig(RiakNode.RIAK_MAX_OPEN_FILES);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServer.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServer.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServer.java
deleted file mode 100644
index 702d595..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServer.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.solr;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.BrooklynConfigKeys;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.java.UsesJava;
-import org.apache.brooklyn.entity.java.UsesJavaMXBeans;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.collect.Maps;
-import com.google.common.reflect.TypeToken;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a Solr node.
- */
-@Catalog(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")
-@ImplementedBy(SolrServerImpl.class)
-public interface SolrServer extends SoftwareProcess, UsesJava, UsesJmx, UsesJavaMXBeans {
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "4.7.2");
-
-    @SetFromFlag("downloadUrl")
-    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "${driver.mirrorUrl}/${version}/solr-${version}.tgz");
-
-    /** download mirror, if desired */
-    @SetFromFlag("mirrorUrl")
-    ConfigKey<String> MIRROR_URL = ConfigKeys.newStringConfigKey("solr.install.mirror.url", "URL of mirror",
-            "http://mirrors.ukfast.co.uk/sites/ftp.apache.org/lucene/solr/");
-
-    @SetFromFlag("solrPort")
-    PortAttributeSensorAndConfigKey SOLR_PORT = new PortAttributeSensorAndConfigKey("solr.http.port", "Solr HTTP communications port",
-            PortRanges.fromString("8983+"));
-
-    @SetFromFlag("solrConfigTemplateUrl")
-    ConfigKey<String> SOLR_CONFIG_TEMPLATE_URL = ConfigKeys.newStringConfigKey(
-            "solr.config.templateUrl", "Template file (in freemarker format) for the solr.xml config file", 
-            "classpath://org/apache/brooklyn/entity/nosql/solr/solr.xml");
-
-    @SetFromFlag("coreConfigMap")
-    ConfigKey<Map<String, String>> SOLR_CORE_CONFIG = ConfigKeys.newConfigKey(new TypeToken<Map<String, String>>() { },
-            "solr.core.config", "Map of core names to core configuration archive URL",
-            Maps.<String, String>newHashMap());
-
-    ConfigKey<Duration> START_TIMEOUT = ConfigKeys.newConfigKeyWithDefault(BrooklynConfigKeys.START_TIMEOUT, Duration.FIVE_MINUTES);
-
-    /* Accessors used from template */
-
-    Integer getSolrPort();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerDriver.java
deleted file mode 100644
index 866aedb..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerDriver.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.solr;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface SolrServerDriver extends JavaSoftwareProcessDriver {
-
-    Integer getSolrPort();
-
-    String getSolrConfigTemplateUrl();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerImpl.java
deleted file mode 100644
index 98fa91e..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerImpl.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.solr;
-
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.http.HttpFeed;
-import org.apache.brooklyn.feed.http.HttpPollConfig;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-
-import com.google.common.base.Functions;
-import com.google.common.net.HostAndPort;
-
-import java.net.URI;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Implementation of {@link SolrServer}.
- */
-public class SolrServerImpl extends SoftwareProcessImpl implements SolrServer {
-
-    @Override
-    public Integer getSolrPort() {
-        return getAttribute(SolrServer.SOLR_PORT);
-    }
-
-    @Override
-    public Class<SolrServerDriver> getDriverInterface() {
-        return SolrServerDriver.class;
-    }
-
-    private volatile HttpFeed httpFeed;
-
-    @Override 
-    protected void connectSensors() {
-        super.connectSensors();
-
-        HostAndPort hp = BrooklynAccessUtils.getBrooklynAccessibleAddress(this, getSolrPort());
-
-        String solrUri = String.format("http://%s:%d/solr", hp.getHostText(), hp.getPort());
-        sensors().set(Attributes.MAIN_URI, URI.create(solrUri));
-
-        httpFeed = HttpFeed.builder()
-                .entity(this)
-                .period(500, TimeUnit.MILLISECONDS)
-                .baseUri(solrUri)
-                .poll(new HttpPollConfig<Boolean>(SERVICE_UP)
-                        .onSuccess(HttpValueFunctions.responseCodeEquals(200))
-                        .onFailureOrException(Functions.constant(false)))
-                .build();
-    }
-
-    @Override
-    public void disconnectSensors() {
-        super.disconnectSensors();
-
-        if (httpFeed != null) httpFeed.stop();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerSshDriver.java
deleted file mode 100644
index 773083e..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerSshDriver.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.solr;
-
-import static java.lang.String.format;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.file.ArchiveUtils;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.net.Urls;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.stream.Streams;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Sets;
-
-/**
- * Start a {@link SolrServer} in a {@link Location} accessible over ssh.
- */
-public class SolrServerSshDriver extends JavaSoftwareProcessSshDriver implements SolrServerDriver {
-
-    private static final Logger log = LoggerFactory.getLogger(SolrServerSshDriver.class);
-
-    public SolrServerSshDriver(SolrServerImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public Integer getSolrPort() { return entity.getAttribute(SolrServer.SOLR_PORT); }
-
-    @Override
-    public String getSolrConfigTemplateUrl() { return entity.getConfig(SolrServer.SOLR_CONFIG_TEMPLATE_URL); }
-
-    public String getMirrorUrl() { return entity.getConfig(SolrServer.MIRROR_URL); }
-
-    public String getPidFile() { return Os.mergePaths(getRunDir(), "solr.pid"); }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("solr-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = ImmutableList.<String>builder()
-                .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-                .add(BashCommands.INSTALL_TAR)
-                .add("tar xzfv " + saveAs)
-                .build();
-
-        newScript(INSTALLING)
-                .failOnNonZeroResultCode()
-                .body.append(commands)
-                .execute();
-    }
-
-    public Set<Integer> getPortsUsed() {
-        Set<Integer> result = Sets.newLinkedHashSet(super.getPortsUsed());
-        result.addAll(getPortMap().values());
-        return result;
-    }
-
-    private Map<String, Integer> getPortMap() {
-        return ImmutableMap.<String, Integer>builder()
-                .put("solrPort", getSolrPort())
-                .put("jmxPort", entity.getAttribute(UsesJmx.JMX_PORT))
-                .put("rmiPort", entity.getAttribute(UsesJmx.RMI_REGISTRY_PORT))
-                .build();
-    }
-
-    @Override
-    public void customize() {
-        log.debug("Customizing {}", entity);
-        Networking.checkPortsValid(getPortMap());
-
-        ImmutableList.Builder<String> commands = new ImmutableList.Builder<String>()
-                .add("mkdir contrib")
-                .add("mkdir solr")
-                .add(String.format("cp -R %s/example/{etc,contexts,lib,logs,resources,webapps} .", getExpandedInstallDir()))
-                .add(String.format("cp %s/example/start.jar .", getExpandedInstallDir()))
-                .add(String.format("cp %s/dist/*.jar lib/", getExpandedInstallDir()))
-                .add(String.format("cp %s/contrib/*/lib/*.jar contrib/", getExpandedInstallDir()));
-
-        newScript(CUSTOMIZING)
-                .body.append(commands.build())
-                .execute();
-
-        // Copy the solr.xml configuration file across
-        String configFileContents = processTemplate(getSolrConfigTemplateUrl());
-        String destinationConfigFile = String.format("%s/solr/solr.xml", getRunDir());
-        getMachine().copyTo(Streams.newInputStreamWithContents(configFileContents), destinationConfigFile);
-
-        // Copy the core definitions across
-        Map<String, String> coreConfig = entity.getConfig(SolrServer.SOLR_CORE_CONFIG);
-        for (String core : coreConfig.keySet()) {
-            String url = coreConfig.get(core);
-            String solr = Urls.mergePaths(getRunDir(), "solr");
-            ArchiveUtils.deploy(url, getMachine(), solr);
-        }
-    }
-
-    @Override
-    public void launch() {
-        newScript(MutableMap.of(USE_PID_FILE, getPidFile()), LAUNCHING)
-                .body.append("nohup java $JAVA_OPTS -jar start.jar > ./logs/console.log 2>&1 &")
-                .execute();
-    }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of(USE_PID_FILE, getPidFile()), CHECK_RUNNING).execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(MutableMap.of(USE_PID_FILE, getPidFile()), STOPPING).execute();
-    }
-
-    @Override
-    protected String getLogFileLocation() {
-        return Urls.mergePaths(getRunDir(), "solr", "logs", "solr.log");
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/cassandra-logo.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/cassandra-logo.png b/brooklyn-library/software/nosql/src/main/resources/cassandra-logo.png
deleted file mode 100644
index be27504..0000000
Binary files a/brooklyn-library/software/nosql/src/main/resources/cassandra-logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/couchbase-logo.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/couchbase-logo.png b/brooklyn-library/software/nosql/src/main/resources/couchbase-logo.png
deleted file mode 100644
index 94daf5d..0000000
Binary files a/brooklyn-library/software/nosql/src/main/resources/couchbase-logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/couchdb-logo.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/couchdb-logo.png b/brooklyn-library/software/nosql/src/main/resources/couchdb-logo.png
deleted file mode 100644
index 196b6f9..0000000
Binary files a/brooklyn-library/software/nosql/src/main/resources/couchdb-logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/mongodb-logo.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/mongodb-logo.png b/brooklyn-library/software/nosql/src/main/resources/mongodb-logo.png
deleted file mode 100644
index 81e4bfe..0000000
Binary files a/brooklyn-library/software/nosql/src/main/resources/mongodb-logo.png and /dev/null differ


[27/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNode.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNode.java
deleted file mode 100644
index 5003d4d..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNode.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.effector.Effector;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.objs.HasShortName;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.annotation.EffectorParam;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.config.MapConfigKey;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-@Catalog(name="MySql Node", description="MySql is an open source relational database management system (RDBMS)", iconUrl="classpath:///mysql-logo-110x57.png")
-@ImplementedBy(MySqlNodeImpl.class)
-public interface MySqlNode extends SoftwareProcess, HasShortName, DatastoreCommon {
-
-    // NOTE MySQL changes the minor version number of their GA release frequently, check for latest version if install fails
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "5.6.26");
-
-    //http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.26-osx10.9-x86_64.tar.gz
-    //http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.26-linux-glibc2.5-x86_64.tar.gz
-    @SetFromFlag("downloadUrl")
-    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new StringAttributeSensorAndConfigKey(
-            Attributes.DOWNLOAD_URL, "http://dev.mysql.com/get/Downloads/MySQL-${driver.majorVersion}/mysql-${version}-${driver.osTag}.tar.gz");
-
-    @SetFromFlag("port")
-    PortAttributeSensorAndConfigKey MYSQL_PORT = new PortAttributeSensorAndConfigKey("mysql.port", "MySQL port", PortRanges.fromString("3306, 13306+"));
-
-    @SetFromFlag("dataDir")
-    ConfigKey<String> DATA_DIR = ConfigKeys.newStringConfigKey(
-            "mysql.datadir", "Directory for writing data files", null);
-
-    @SetFromFlag("serverConf")
-    MapConfigKey<Object> MYSQL_SERVER_CONF = new MapConfigKey<Object>(
-            Object.class, "mysql.server.conf", "Configuration options for mysqld");
-    
-    ConfigKey<Object> MYSQL_SERVER_CONF_LOWER_CASE_TABLE_NAMES = MYSQL_SERVER_CONF.subKey("lower_case_table_names", "See MySQL guide. Set 1 to ignore case in table names (useful for OS portability)");
-    
-    @SetFromFlag("serverId")
-    ConfigKey<Integer> MYSQL_SERVER_ID = ConfigKeys.newIntegerConfigKey("mysql.server_id", "Corresponds to server_id option", 0);
-    
-    @SetFromFlag("password")
-    StringAttributeSensorAndConfigKey PASSWORD = new StringAttributeSensorAndConfigKey(
-            "mysql.password", "Database admin password (or randomly generated if not set)", null);
-
-    @SetFromFlag("socketUid")
-    StringAttributeSensorAndConfigKey SOCKET_UID = new StringAttributeSensorAndConfigKey(
-            "mysql.socketUid", "Socket uid, for use in file /tmp/mysql.sock.<uid>.3306 (or randomly generated if not set)", null);
-
-    @SetFromFlag("generalLog")
-    ConfigKey GENERAL_LOG = ConfigKeys.newBooleanConfigKey("mysql.general_log", "Enable general log", false);
-    
-    /** @deprecated since 0.7.0 use DATASTORE_URL */ @Deprecated
-    AttributeSensor<String> MYSQL_URL = DATASTORE_URL;
-
-    @SetFromFlag("configurationTemplateUrl")
-    BasicAttributeSensorAndConfigKey<String> TEMPLATE_CONFIGURATION_URL = new StringAttributeSensorAndConfigKey(
-            "mysql.template.configuration.url", "Template file (in freemarker format) for the mysql.conf file",
-            "classpath://org/apache/brooklyn/entity/database/mysql/mysql.conf");
-
-    AttributeSensor<Double> QUERIES_PER_SECOND_FROM_MYSQL = Sensors.newDoubleSensor("mysql.queries.perSec.fromMysql");
-
-    interface ExportDumpEffector {
-        ConfigKey<String> PATH = ConfigKeys.newStringConfigKey("path", "Where to export the dump to. Resolved against runtime directory if relative.", "dump.sql");
-        ConfigKey<String> ADDITIONAL_OPTIONS = ConfigKeys.newStringConfigKey("additionalOptions", "Additional command line options to pass to mysqldump");
-
-        Effector<Void> EXPORT_DUMP = Effectors.effector(Void.class, "export_dump")
-                .description("Invokes mysqldump against the node")
-                .parameter(PATH)
-                .parameter(ADDITIONAL_OPTIONS)
-                .buildAbstract();
-    }
-    Effector<Void> EXPORT_DUMP = ExportDumpEffector.EXPORT_DUMP;
-
-    interface ImportDumpEffector {
-        ConfigKey<String> PATH = ConfigKeys.newStringConfigKey("path", "Path to a file with SQL statements to import as the root user");
-
-        Effector<Void> IMPORT_DUMP = Effectors.effector(Void.class, "import_dump")
-                .description("Runs the sql statements in the file as the root user")
-                .parameter(PATH)
-                .buildAbstract();
-    }
-    Effector<Void> IMPORT_DUMP = ImportDumpEffector.IMPORT_DUMP;
-
-    interface ChangePasswordEffector {
-        ConfigKey<String> PASSWORD = ConfigKeys.newStringConfigKey("password", "New password to set");
-
-        Effector<Void> CHANGE_PASSWORD = Effectors.effector(Void.class, "change_password")
-                .description("Change the mysql root password")
-                .parameter(PASSWORD)
-                .buildAbstract();
-    }
-    Effector<Void> CHANGE_PASSWORD = ChangePasswordEffector.CHANGE_PASSWORD;
-
-    @org.apache.brooklyn.core.annotation.Effector(description = "Execute SQL script on the node as the root user")
-    public String executeScript(@EffectorParam(name="commands") String commands);
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNodeEffectors.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNodeEffectors.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNodeEffectors.java
deleted file mode 100644
index af68959..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNodeEffectors.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import org.apache.brooklyn.api.effector.Effector;
-import org.apache.brooklyn.core.effector.EffectorBody;
-import org.apache.brooklyn.core.effector.EffectorTasks;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode.ChangePasswordEffector;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode.ExportDumpEffector;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode.ImportDumpEffector;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.ssh.SshTasks;
-
-import com.google.common.base.Preconditions;
-import com.google.common.base.Strings;
-
-public class MySqlNodeEffectors {
-    public static class ExportDumpEffectoryBody extends EffectorBody<Void> implements ExportDumpEffector {
-        @Override
-        public Void call(ConfigBag parameters) {
-            String path = parameters.get(PATH);
-            String additionalOptions = Strings.nullToEmpty(parameters.get(ADDITIONAL_OPTIONS));
-            //TODO additionalOptions, path are not sanitized and are coming from the user.
-            //Should we try to sanitize (potentially limiting the range of possible inputs),
-            //or just assume the user has full machine access anyway?
-            ((MySqlNodeImpl)entity()).getDriver().dumpDatabase(additionalOptions, path);
-            return null;
-        }
-    }
-    public static Effector<Void> EXPORT_DUMP = Effectors.effector(ExportDumpEffector.EXPORT_DUMP)
-            .impl(new ExportDumpEffectoryBody())
-            .build();
-
-    public static class ImportDumpEffectorBody extends EffectorBody<Void> implements ImportDumpEffector {
-        @Override
-        public Void call(ConfigBag parameters) {
-            String path = Preconditions.checkNotNull(parameters.get(PATH), "path is required");
-            // TODO sanitize path?
-            ((MySqlNodeImpl)entity()).getDriver().executeScriptFromInstalledFileAsync(path);
-            return null;
-        }
-    }
-    public static Effector<Void> IMPORT_DUMP = Effectors.effector(ImportDumpEffector.IMPORT_DUMP)
-            .impl(new ImportDumpEffectorBody())
-            .build();
-
-    public static class ChangePasswordEffectorBody extends EffectorBody<Void> implements ChangePasswordEffector {
-        @Override
-        public Void call(ConfigBag parameters) {
-            String newPass = Preconditions.checkNotNull(parameters.get(PASSWORD), "password is required");
-            String oldPass = entity().getAttribute(MySqlNode.PASSWORD);
-            entity().sensors().set(MySqlNode.PASSWORD, newPass);
-            MySqlDriver driver = ((MySqlNodeImpl)entity()).getDriver();
-            driver.changePassword(oldPass, newPass);
-            SshMachineLocation machine = EffectorTasks.getSshMachine(entity());
-            DynamicTasks.queue(
-                    SshTasks.newSshExecTaskFactory(machine, 
-                                    "cd "+entity().getAttribute(MySqlNode.RUN_DIR),
-                                    "sed -i'' -e 's@^\\(\\s*password\\s*=\\s*\\).*$@\\1" + newPass.replace("\\", "\\\\") + "@g' mymysql.cnf")
-                            .requiringExitCodeZero()
-                            .summary("Change root password"));
-            return null;
-        }
-    }
-    public static Effector<Void> CHANGE_PASSWORD = Effectors.effector(ChangePasswordEffector.CHANGE_PASSWORD)
-            .impl(new ChangePasswordEffectorBody())
-            .build();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNodeImpl.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNodeImpl.java
deleted file mode 100644
index e2b0c2e..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNodeImpl.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.core.effector.EffectorBody;
-import org.apache.brooklyn.core.location.Locations;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.ssh.SshFeed;
-import org.apache.brooklyn.feed.ssh.SshPollConfig;
-import org.apache.brooklyn.feed.ssh.SshPollValue;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.apache.brooklyn.util.guava.Maybe;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Function;
-
-public class MySqlNodeImpl extends SoftwareProcessImpl implements MySqlNode {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MySqlNodeImpl.class);
-
-    private SshFeed feed;
-
-    public MySqlNodeImpl() {
-    }
-
-    public MySqlNodeImpl(Entity parent) {
-        this(MutableMap.of(), parent);
-    }
-
-    public MySqlNodeImpl(Map<?,?> flags) {
-        super(flags, null);
-    }
-
-    public MySqlNodeImpl(Map<?,?> flags, Entity parent) {
-        super(flags, parent);
-    }
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return MySqlDriver.class;
-    }
-
-    @Override
-    public MySqlDriver getDriver() {
-        return (MySqlDriver) super.getDriver();
-    }
-    
-    @Override
-    public void init() {
-        super.init();
-        getMutableEntityType().addEffector(EXECUTE_SCRIPT, new EffectorBody<String>() {
-            @Override
-            public String call(ConfigBag parameters) {
-                return executeScript((String)parameters.getStringKey("commands"));
-            }
-        });
-        getMutableEntityType().addEffector(MySqlNodeEffectors.EXPORT_DUMP);
-        getMutableEntityType().addEffector(MySqlNodeEffectors.IMPORT_DUMP);
-        getMutableEntityType().addEffector(MySqlNodeEffectors.CHANGE_PASSWORD);
-    }
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        sensors().set(DATASTORE_URL, String.format("mysql://%s:%s/", getAttribute(HOSTNAME), getAttribute(MYSQL_PORT)));
-        
-        /*        
-         * TODO status gives us things like:
-         *   Uptime: 2427  Threads: 1  Questions: 581  Slow queries: 0  Opens: 53  Flush tables: 1  Open tables: 35  Queries per second avg: 0.239
-         * So can extract lots of sensors from that.
-         */
-        Maybe<SshMachineLocation> machine = Locations.findUniqueSshMachineLocation(getLocations());
-        boolean retrieveUsageMetrics = getConfig(RETRIEVE_USAGE_METRICS);
-
-        if (machine.isPresent()) {
-            String cmd = getDriver().getStatusCmd();
-            feed = SshFeed.builder()
-                    .entity(this)
-                    .period(Duration.FIVE_SECONDS)
-                    .machine(machine.get())
-                    .poll(new SshPollConfig<Double>(QUERIES_PER_SECOND_FROM_MYSQL)
-                            .command(cmd)
-                            .onSuccess(new Function<SshPollValue, Double>() {
-                                @Override
-                                public Double apply(SshPollValue input) {
-                                    String q = Strings.getFirstWordAfter(input.getStdout(), "Queries per second avg:");
-                                    if (q==null) return null;
-                                    return Double.parseDouble(q);
-                                }})
-                            .setOnFailureOrException(null)
-                            .enabled(retrieveUsageMetrics))
-                    .poll(new SshPollConfig<Boolean>(SERVICE_PROCESS_IS_RUNNING)
-                            .command(cmd)
-                            .setOnSuccess(true)
-                            .setOnFailureOrException(false)
-                            .suppressDuplicates(true))
-                    .build();
-        } else {
-            LOG.warn("Location(s) {} not an ssh-machine location, so not polling for status; setting serviceUp immediately", getLocations());
-            sensors().set(SERVICE_UP, true);
-        }
-    }
-    
-    @Override
-    protected void disconnectSensors() {
-        if (feed != null) feed.stop();
-        super.disconnectSensors();
-    }
-
-    public int getPort() {
-        return getAttribute(MYSQL_PORT);
-    }
-
-    public synchronized String getSocketUid() {
-        String result = getAttribute(MySqlNode.SOCKET_UID);
-        if (Strings.isBlank(result)) {
-            result = Identifiers.makeRandomId(6);
-            sensors().set(MySqlNode.SOCKET_UID, result);
-        }
-        return result;
-    }
-
-    public String getPassword() {
-        String result = getAttribute(MySqlNode.PASSWORD);
-        if (Strings.isBlank(result)) {
-            result = Identifiers.makeRandomId(6);
-            sensors().set(MySqlNode.PASSWORD, result);
-        }
-        return result;
-    }
-    
-    @Override
-    public String getShortName() {
-        return "MySQL";
-    }
-
-    @Override
-    public String executeScript(String commands) {
-        return getDriver().executeScriptAsync(commands).block().getStdout();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlRowParser.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlRowParser.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlRowParser.java
deleted file mode 100644
index f7f98b9..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlRowParser.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import java.util.Map;
-
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.text.Strings;
-
-public class MySqlRowParser {
-    public static Map<String, String> parseSingle(String row) {
-        Map<String, String> values = MutableMap.of();
-        String[] lines = row.split("\\n");
-        for (String line : lines) {
-            if (line.startsWith("*")) continue; // row delimiter
-            String[] arr = line.split(":", 2);
-            String key = arr[0].trim();
-            String value = Strings.emptyToNull(arr[1].trim());
-            values.put(key, value);
-        }
-        return values;
-    };
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlSshDriver.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlSshDriver.java
deleted file mode 100644
index 868d158..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlSshDriver.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import static java.lang.String.format;
-import static org.apache.brooklyn.util.JavaGroovyEquivalents.groovyTruth;
-import static org.apache.brooklyn.util.ssh.BashCommands.commandsToDownloadUrlsAs;
-import static org.apache.brooklyn.util.ssh.BashCommands.installPackage;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.api.location.OsDetails;
-import org.apache.brooklyn.api.mgmt.Task;
-import org.apache.brooklyn.core.effector.EffectorTasks;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.location.BasicOsDetails.OsVersions;
-import org.apache.brooklyn.entity.database.DatastoreMixins;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.Tasks;
-import org.apache.brooklyn.util.core.task.ssh.SshTasks;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.io.FileUtil;
-import org.apache.brooklyn.util.net.Urls;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.stream.Streams;
-import org.apache.brooklyn.util.text.ComparableVersion;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.CountdownTimer;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * The SSH implementation of the {@link MySqlDriver}.
- */
-public class MySqlSshDriver extends AbstractSoftwareProcessSshDriver implements MySqlDriver {
-
-    public static final Logger log = LoggerFactory.getLogger(MySqlSshDriver.class);
-
-    public MySqlSshDriver(MySqlNodeImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-
-        entity.sensors().set(Attributes.LOG_FILE_LOCATION, getLogFile());
-    }
-
-    public String getOsTag() {
-        // e.g. "osx10.6-x86_64"; see http://www.mysql.com/downloads/mysql/#downloads
-        OsDetails os = getLocation().getOsDetails();
-        if (os == null) return "linux-glibc2.5-x86_64";
-        if (os.isMac()) {
-            String osp1 = os.getVersion()==null ? "osx10.8" //lowest common denominator
-                : new ComparableVersion(os.getVersion()).isGreaterThanOrEqualTo(OsVersions.MAC_10_9) ? "osx10.9"
-                : "osx10.8";  //lowest common denominator
-            if (!os.is64bit()) {
-                throw new IllegalStateException("Only 64 bit MySQL build is available for OS X");
-            }
-            return osp1+"-x86_64";
-        }
-        //assume generic linux
-        String osp1 = "linux-glibc2.5";
-        String osp2 = os.is64bit() ? "x86_64" : "i686";
-        return osp1+"-"+osp2;
-    }
-
-    public String getBaseDir() { return getExpandedInstallDir(); }
-
-    public String getDataDir() {
-        String result = entity.getConfig(MySqlNode.DATA_DIR);
-        return Strings.isBlank(result) ? "." : result;
-    }
-
-    public String getLogFile() {
-        return Urls.mergePaths(getRunDir(), "console.log");
-    }
-
-    public String getConfigFile() {
-        return "mymysql.cnf";
-    }
-
-    // Only invoked to determine the default download URL form the specified version.
-    public String getMajorVersion() {
-        return getEntity().config().get(MySqlNode.SUGGESTED_VERSION).replaceAll("(\\d+\\.\\d+)\\.\\d+", "$1");
-    }
-
-    public String getDefaultUnpackedDirectoryName() {
-        return Strings.removeAllFromEnd(resolver.getFilename(), ".tar.gz");
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        String unpackedDirectoryName = resolver.getUnpackedDirectoryName(getDefaultUnpackedDirectoryName());
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), unpackedDirectoryName));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = new LinkedList<String>();
-        commands.add(BashCommands.INSTALL_TAR);
-        commands.add(BashCommands.INSTALL_CURL);
-
-        commands.add("echo installing extra packages");
-        commands.add(installPackage(ImmutableMap.of("yum", "libgcc_s.so.1"), null));
-        commands.add(installPackage(ImmutableMap.of("yum", "libaio.so.1 libncurses.so.5", "apt", "libaio1 libaio-dev"), null));
-
-        // these deps are only needed on some OS versions but others don't need them
-        commands.add(installPackage(ImmutableMap.of("yum", "libaio", "apt", "ia32-libs"), null));
-        commands.add("echo finished installing extra packages");
-        commands.addAll(commandsToDownloadUrlsAs(urls, saveAs));
-        commands.add(format("tar xfvz %s", saveAs));
-
-        newScript(INSTALLING).body.append(commands).execute();
-    }
-
-    @Override
-    public MySqlNodeImpl getEntity() { return (MySqlNodeImpl) super.getEntity(); }
-    public int getPort() { return getEntity().getPort(); }
-    public String getSocketUid() { return getEntity().getSocketUid(); }
-    public String getPassword() { return getEntity().getPassword(); }
-
-    @Override
-    public void customize() {
-        copyDatabaseConfigScript();
-
-        newScript(CUSTOMIZING)
-            .updateTaskAndFailOnNonZeroResultCode()
-            .body.append(
-                "chmod 600 "+getConfigFile(),
-                getBaseDir()+"/scripts/mysql_install_db "+
-                    "--basedir="+getBaseDir()+" --datadir="+getDataDir()+" "+
-                    "--defaults-file="+getConfigFile())
-            .execute();
-
-        // launch, then we will configure it
-        launch();
-
-        // Wrap in inessential task to allow the stop step to execute even if any of the nested
-        // tasks fail - poor man's try-catch for tasks.
-        Task<Void> configTask = DynamicTasks.<Void>queue("execute scripts", new Runnable() {
-            @Override
-            public void run() {
-                Tasks.markInessential();
-                CountdownTimer timer = Duration.seconds(20).countdownTimer();
-                boolean hasCreationScript = copyDatabaseCreationScript();
-                timer.waitForExpiryUnchecked();
-
-                changePassword("", getPassword());
-
-                if (hasCreationScript)
-                    executeScriptFromInstalledFileAsync("creation-script.sql").asTask().getUnchecked();
-            }
-        });
-
-        // not sure necessary to stop then subsequently launch, but seems safest
-        // (if skipping, use a flag in launch to indicate we've just launched it)
-        stop();
-
-        // Fail if any of the tasks above failed, they are marked inessential so the
-        // errors don't propagate automatically.
-        if (configTask.isError()) {
-            configTask.getUnchecked();
-        }
-    }
-
-    @Override
-    public void changePassword(String oldPass, String newPass) {
-        DynamicTasks.queue(
-            SshEffectorTasks.ssh(
-                "cd "+getRunDir(),
-                getBaseDir()+"/bin/mysqladmin --defaults-file="+getConfigFile()+" --password=" + oldPass + " password "+newPass)
-            .summary("setting password")
-            .requiringExitCodeZero());
-    }
-
-    protected void copyDatabaseConfigScript() {
-        newScript(CUSTOMIZING).execute();  //create the directory
-
-        String configScriptContents = processTemplate(entity.getAttribute(MySqlNode.TEMPLATE_CONFIGURATION_URL));
-        Reader configContents = new StringReader(configScriptContents);
-
-        getMachine().copyTo(configContents, Urls.mergePaths(getRunDir(), getConfigFile()));
-    }
-
-    protected boolean copyDatabaseCreationScript() {
-        String creationScriptContents = DatastoreMixins.getDatabaseCreationScriptAsString(entity);
-        if (creationScriptContents==null) return false;
-
-        File templateFile = null;
-        BufferedWriter writer = null;
-        try {
-            templateFile = File.createTempFile("mysql", null);
-            FileUtil.setFilePermissionsTo600(templateFile);
-            writer = new BufferedWriter(new FileWriter(templateFile));
-            writer.write(creationScriptContents);
-            writer.flush();
-            copyTemplate(templateFile.getAbsoluteFile(), getRunDir() + "/creation-script.sql");
-        } catch (IOException e) {
-            throw Exceptions.propagate(e);
-        } finally {
-            if (writer != null) Streams.closeQuietly(writer);
-            if (templateFile != null) templateFile.delete();
-        }
-        return true;
-    }
-
-    public String getMySqlServerOptionsString() {
-        Map<String, Object> options = entity.getConfig(MySqlNode.MYSQL_SERVER_CONF);
-        StringBuilder result = new StringBuilder();
-        if (groovyTruth(options)) {
-            for (Map.Entry<String, Object> entry : options.entrySet()) {
-                result.append(entry.getKey());
-                String value = entry.getValue().toString();
-                if (!Strings.isEmpty(value)) {
-                    result.append(" = ").append(value);
-                }
-                result.append('\n');
-            }
-        }
-        return result.toString();
-    }
-
-    @Override
-    public void launch() {
-        entity.sensors().set(MySqlNode.PID_FILE, getRunDir() + "/" + AbstractSoftwareProcessSshDriver.PID_FILENAME);
-        newScript(MutableMap.of("usePidFile", true), LAUNCHING)
-            .updateTaskAndFailOnNonZeroResultCode()
-            .body.append(format("nohup %s/bin/mysqld --defaults-file=%s --user=`whoami` > %s 2>&1 < /dev/null &", getBaseDir(), getConfigFile(), getLogFile()))
-            .execute();
-    }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of("usePidFile", false), CHECK_RUNNING)
-            .body.append(getStatusCmd())
-            .execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(MutableMap.of("usePidFile", true), STOPPING).execute();
-    }
-
-    @Override
-    public void kill() {
-        newScript(MutableMap.of("usePidFile", true), KILLING).execute();
-    }
-
-    @Override
-    public String getStatusCmd() {
-        return format("%s/bin/mysqladmin --defaults-file=%s status", getBaseDir(), Urls.mergePaths(getRunDir(), getConfigFile()));
-    }
-
-    @Override
-    public ProcessTaskWrapper<Integer> executeScriptAsync(String commands) {
-        String filename = "mysql-commands-"+Identifiers.makeRandomId(8);
-        DynamicTasks.queue(SshEffectorTasks.put(Urls.mergePaths(getRunDir(), filename)).contents(commands).summary("copying datastore script to execute "+filename));
-        return executeScriptFromInstalledFileAsync(filename);
-    }
-
-    @Override
-    public ProcessTaskWrapper<Integer> executeScriptFromInstalledFileAsync(String filenameAlreadyInstalledAtServer) {
-        SshMachineLocation machine = EffectorTasks.getSshMachine(entity);
-        return DynamicTasks.queue(
-                SshTasks.newSshExecTaskFactory(machine, 
-                                "cd "+getRunDir(),
-                                getBaseDir()+"/bin/mysql --defaults-file="+getConfigFile()+" < "+filenameAlreadyInstalledAtServer)
-                        .requiringExitCodeZero()
-                        .summary("executing datastore script "+filenameAlreadyInstalledAtServer));
-    }
-
-    @Override
-    public ProcessTaskWrapper<Integer> dumpDatabase(String additionalOptions, String dumpDestination) {
-        SshMachineLocation machine = EffectorTasks.getSshMachine(entity);
-        return DynamicTasks.queue(
-                SshTasks.newSshExecTaskFactory(machine, 
-                                "cd "+getRunDir(),
-                                getBaseDir()+"/bin/mysqldump --defaults-file="+getConfigFile()+" "+additionalOptions+" > "+dumpDestination)
-                        .requiringExitCodeZero()
-                        .summary("Dumping database to " + dumpDestination));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/ReplicationSnapshot.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/ReplicationSnapshot.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/ReplicationSnapshot.java
deleted file mode 100644
index 48af15a..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/ReplicationSnapshot.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-public class ReplicationSnapshot {
-    private String entityId;
-    private String snapshotPath;
-    private String binLogName;
-    private int binLogPosition;
-
-    public ReplicationSnapshot(String entityId, String snapshotPath, String binLogName, int binLogPosition) {
-        this.entityId = entityId;
-        this.snapshotPath = snapshotPath;
-        this.binLogName = binLogName;
-        this.binLogPosition = binLogPosition;
-    }
-
-    public String getEntityId() {
-        return entityId;
-    }
-    public void setEntityId(String entityId) {
-        this.entityId = entityId;
-    }
-    public String getSnapshotPath() {
-        return snapshotPath;
-    }
-    public void setSnapshotPath(String snapshotPath) {
-        this.snapshotPath = snapshotPath;
-    }
-    public String getBinLogName() {
-        return binLogName;
-    }
-    public void setBinLogName(String binLogName) {
-        this.binLogName = binLogName;
-    }
-    public int getBinLogPosition() {
-        return binLogPosition;
-    }
-    public void setBinLogPosition(int binLogPosition) {
-        this.binLogPosition = binLogPosition;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlDriver.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlDriver.java
deleted file mode 100644
index dc267b4..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlDriver.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper;
-
-/**
- * The {@link org.apache.brooklyn.entity.software.base.SoftwareProcessDriver} for PostgreSQL.
- */
-public interface PostgreSqlDriver extends SoftwareProcessDriver {
-
-    String getStatusCmd();
-
-    ProcessTaskWrapper<Integer> executeScriptAsync(String commands);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNode.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNode.java
deleted file mode 100644
index cd97719..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNode.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.effector.Effector;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.objs.HasShortName;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.database.DatabaseNode;
-import org.apache.brooklyn.entity.database.DatastoreMixins;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * PostgreSQL database node entity.
- * <p>
- * <ul>
- * <li>You may need to increase shared memory settings in the kernel depending on the setting of
- * the {@link #SHARED_MEMORY_BUFFER} key. The minimumm value is <em>128kB</em>. See the PostgreSQL
- * <a href="http://www.postgresql.org/docs/9.1/static/kernel-resources.html">documentation</a>.
- * <li>You will also need to enable passwordless sudo.
- * </ul>
- */
-@Catalog(name="PostgreSQL Node", description="PostgreSQL is an object-relational database management system (ORDBMS)", iconUrl="classpath:///postgresql-logo-200px.png")
-@ImplementedBy(PostgreSqlNodeImpl.class)
-public interface PostgreSqlNode extends SoftwareProcess, HasShortName, DatastoreCommon, DatabaseNode {
-    
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "9.3-1");//"9.1-4");
-
-    @SetFromFlag("configFileUrl")
-    ConfigKey<String> CONFIGURATION_FILE_URL = ConfigKeys.newStringConfigKey(
-            "postgresql.config.file.url", "URL where PostgreSQL configuration file can be found; "
-                + "if not supplied the blueprint uses the default and customises it");
-
-    @SetFromFlag("authConfigFileUrl")
-    ConfigKey<String> AUTHENTICATION_CONFIGURATION_FILE_URL = ConfigKeys.newStringConfigKey(
-            "postgresql.authConfig.file.url", "URL where PostgreSQL host-based authentication configuration file can be found; "
-                + "if not supplied the blueprint uses the default and customises it");
-
-    @SetFromFlag("port")
-    PortAttributeSensorAndConfigKey POSTGRESQL_PORT = new PortAttributeSensorAndConfigKey(
-            "postgresql.port", "PostgreSQL port", PortRanges.fromString("5432+"));
-
-    @SetFromFlag("sharedMemory")
-    ConfigKey<String> SHARED_MEMORY = ConfigKeys.newStringConfigKey(
-            "postgresql.sharedMemory", "Size of shared memory buffer (must specify as kB, MB or GB, minimum 128kB)", "4MB");
-
-    @SetFromFlag("maxConnections")
-    ConfigKey<Integer> MAX_CONNECTIONS = ConfigKeys.newIntegerConfigKey(
-            "postgresql.maxConnections", "Maximum number of connections to the database", 100);
-
-    @SetFromFlag("disconnectOnStop")
-    ConfigKey<Boolean> DISCONNECT_ON_STOP = ConfigKeys.newBooleanConfigKey(
-            "postgresql.disconnect.on.stop", "If true, PostgreSQL will immediately disconnet (pg_ctl -m immediate stop) all current connections when the node is stopped", true);
-
-    @SetFromFlag("pollPeriod")
-    ConfigKey<Long> POLL_PERIOD = ConfigKeys.newLongConfigKey(
-            "postgresql.sensorpoll", "Poll period (in milliseconds)", 1000L);
-    
-    @SetFromFlag("initializeDB")
-    ConfigKey<Boolean> INITIALIZE_DB = ConfigKeys.newBooleanConfigKey(
-            "postgresql.initialize", "If true, PostgreSQL will create a new user and database", false);
-
-    @SetFromFlag("username")
-    BasicAttributeSensorAndConfigKey<String> USERNAME = new BasicAttributeSensorAndConfigKey<>(
-            String.class, "postgresql.username", "Username of the database user");
-    
-    String DEFAULT_USERNAME = "postgresqluser";
-    
-    @SetFromFlag("password")
-    BasicAttributeSensorAndConfigKey<String> PASSWORD = new BasicAttributeSensorAndConfigKey<>(
-            String.class, "postgresql.password",
-            "Password for the database user, auto-generated if not set");
-
-    @SetFromFlag("database")
-    BasicAttributeSensorAndConfigKey<String> DATABASE = new BasicAttributeSensorAndConfigKey<>(
-            String.class, "postgresql.database", "Database to be used");
-    
-    String DEFAULT_DB_NAME = "db";
-
-    Effector<String> EXECUTE_SCRIPT = Effectors.effector(DatastoreMixins.EXECUTE_SCRIPT)
-            .description("Executes the given script contents using psql")
-            .buildAbstract();
-
-    Integer getPostgreSqlPort();
-    String getSharedMemory();
-    Integer getMaxConnections();
-
-    String executeScript(String commands);
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeChefImplFromScratch.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeChefImplFromScratch.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeChefImplFromScratch.java
deleted file mode 100644
index 96e65a5..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeChefImplFromScratch.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import org.apache.brooklyn.api.effector.Effector;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.effector.EffectorBody;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.location.Locations;
-import org.apache.brooklyn.entity.chef.ChefConfig;
-import org.apache.brooklyn.entity.chef.ChefLifecycleEffectorTasks;
-import org.apache.brooklyn.entity.chef.ChefServerTasks;
-import org.apache.brooklyn.entity.stock.EffectorStartableImpl;
-import org.apache.brooklyn.feed.ssh.SshFeed;
-import org.apache.brooklyn.feed.ssh.SshPollConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.Jsonya;
-import org.apache.brooklyn.util.core.ResourceUtils;
-import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.guava.Maybe;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-public class PostgreSqlNodeChefImplFromScratch extends EffectorStartableImpl implements PostgreSqlNode {
-
-    private static final Logger LOG = LoggerFactory.getLogger(PostgreSqlNodeChefImplFromScratch.class);
-
-    public static final Effector<String> EXECUTE_SCRIPT = Effectors.effector(String.class, "executeScript")
-            .description("invokes a script")
-            .parameter(ExecuteScriptEffectorBody.SCRIPT)
-            .impl(new ExecuteScriptEffectorBody()).build();
-    
-    private SshFeed feed;
-
-    public void init() {
-        super.init();
-        new ChefPostgreSqlLifecycle().attachLifecycleEffectors(this);
-    }
-
-    @Override
-    public Integer getPostgreSqlPort() { return getAttribute(POSTGRESQL_PORT); }
-
-    @Override
-    public String getSharedMemory() { return getConfig(SHARED_MEMORY); }
-
-    @Override
-    public Integer getMaxConnections() { return getConfig(MAX_CONNECTIONS); }
-
-    @Override
-    public String getShortName() {
-        return "PostgreSQL";
-    }
-
-    public static class ChefPostgreSqlLifecycle extends ChefLifecycleEffectorTasks {
-        {
-            usePidFile("/var/run/postgresql/*.pid");
-            useService("postgresql");
-        }
-        protected void startWithKnifeAsync() {
-            Entities.warnOnIgnoringConfig(entity(), ChefConfig.CHEF_LAUNCH_RUN_LIST);
-            Entities.warnOnIgnoringConfig(entity(), ChefConfig.CHEF_LAUNCH_ATTRIBUTES);
-            
-            DynamicTasks.queue(
-                    ChefServerTasks
-                        .knifeConvergeRunList("postgresql::server")
-                        .knifeAddAttributes(Jsonya
-                            .at("postgresql", "config").add(
-                                "port", entity().getPostgreSqlPort(), 
-                                "listen_addresses", "*").getRootMap())
-                        .knifeAddAttributes(Jsonya
-                            .at("postgresql", "pg_hba").list().map().add(
-                                "type", "host", "db", "all", "user", "all", 
-                                "addr", "0.0.0.0/0", "method", "md5").getRootMap()) 
-                        // no other arguments currenty supported; chef will pick a password for us
-                );
-        }
-        protected void postStartCustom() {
-            super.postStartCustom();
-
-            // now run the creation script
-            String creationScript;
-            String creationScriptUrl = entity().getConfig(PostgreSqlNode.CREATION_SCRIPT_URL);
-            if (creationScriptUrl != null) {
-                creationScript = ResourceUtils.create(entity()).getResourceAsString(creationScriptUrl);
-            } else {
-                creationScript = entity().getConfig(PostgreSqlNode.CREATION_SCRIPT_CONTENTS);
-            }
-            entity().executeScript(creationScript);
-
-            // and finally connect sensors
-            entity().connectSensors();
-        }
-        protected void preStopCustom() {
-            entity().disconnectSensors();
-            super.preStopCustom();
-        }
-        protected PostgreSqlNodeChefImplFromScratch entity() {
-            return (PostgreSqlNodeChefImplFromScratch) super.entity();
-        }
-    }
-    
-    public static class ExecuteScriptEffectorBody extends EffectorBody<String> {
-        public static final ConfigKey<String> SCRIPT = ConfigKeys.newStringConfigKey("script", "contents of script to run");
-        
-        public String call(ConfigBag parameters) {
-            return DynamicTasks.queue(SshEffectorTasks.ssh(
-                    BashCommands.pipeTextTo(
-                        parameters.get(SCRIPT),
-                        BashCommands.sudoAsUser("postgres", "psql --file -")))
-                    .requiringExitCodeZero()).getStdout();
-        }
-    }
-    
-    protected void connectSensors() {
-        sensors().set(DATASTORE_URL, String.format("postgresql://%s:%s/", getAttribute(HOSTNAME), getAttribute(POSTGRESQL_PORT)));
-
-        Maybe<SshMachineLocation> machine = Locations.findUniqueSshMachineLocation(getLocations());
-
-        if (machine.isPresent()) {
-            feed = SshFeed.builder()
-                    .entity(this)
-                    .machine(machine.get())
-                    .poll(new SshPollConfig<Boolean>(SERVICE_UP)
-                            .command("ps -ef | grep [p]ostgres")
-                            .setOnSuccess(true)
-                            .setOnFailureOrException(false))
-                    .build();
-        } else {
-            LOG.warn("Location(s) {} not an ssh-machine location, so not polling for status; setting serviceUp immediately", getLocations());
-        }
-    }
-
-    protected void disconnectSensors() {
-        if (feed != null) feed.stop();
-    }
-
-    @Override
-    public String executeScript(String commands) {
-        return Entities.invokeEffector(this, this, EXECUTE_SCRIPT,
-                ConfigBag.newInstance().configure(ExecuteScriptEffectorBody.SCRIPT, commands).getAllConfig()).getUnchecked();
-    }
-
-    @Override
-    public void populateServiceNotUpDiagnostics() {
-        // TODO no-op currently; should check ssh'able etc
-    }    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeImpl.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeImpl.java
deleted file mode 100644
index 0421a98..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeImpl.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import org.apache.brooklyn.core.effector.EffectorBody;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class PostgreSqlNodeImpl extends SoftwareProcessImpl implements PostgreSqlNode {
-
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(PostgreSqlNodeImpl.class);
-
-    public Class<?> getDriverInterface() {
-        return PostgreSqlDriver.class;
-    }
-    @Override
-    public PostgreSqlDriver getDriver() {
-        return (PostgreSqlDriver) super.getDriver();
-    }
-
-    @Override
-    public Integer getPostgreSqlPort() { return getAttribute(POSTGRESQL_PORT); }
-
-    @Override
-    public String getSharedMemory() { return getConfig(SHARED_MEMORY); }
-
-    @Override
-    public Integer getMaxConnections() { return getConfig(MAX_CONNECTIONS); }
-
-    @Override
-    public void init() {
-        super.init();
-        getMutableEntityType().addEffector(EXECUTE_SCRIPT, new EffectorBody<String>() {
-            @Override
-            public String call(ConfigBag parameters) {
-                return executeScript((String) parameters.getStringKey("commands"));
-            }
-        });
-    }
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        connectServiceUpIsRunning();
-        // in jdbc url it is postgresql:// but elsewhere it is usually postgres://
-        // TODO add a public JDBC_URL ?  
-        // include user:pass@url ?  (for all datastore types, and if so, 
-        // make sure ".with_credentials" or similar is in name so it is masked in ui)
-        sensors().set(DATASTORE_URL, String.format("postgresql://%s:%s/", getAttribute(HOSTNAME), getAttribute(POSTGRESQL_PORT)));
-    }
-
-    @Override
-    protected void disconnectSensors() {
-        disconnectServiceUpIsRunning();
-        super.disconnectSensors();
-    }
-    
-    @Override
-    public String getShortName() {
-        return "PostgreSQL";
-    }
-
-    @Override
-    public String executeScript(String commands) {
-        return getDriver()
-                .executeScriptAsync(commands)
-                .block()
-                .getStdout();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSpecs.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSpecs.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSpecs.java
deleted file mode 100644
index b46374d..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSpecs.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.entity.chef.ChefConfig;
-import org.apache.brooklyn.entity.chef.ChefConfig.ChefModes;
-
-/**
- * Utiltiy for creating specs for {@link PostgreSqlNode} instances.
- */
-public class PostgreSqlSpecs {
-
-    private PostgreSqlSpecs() {}
-
-    public static EntitySpec<PostgreSqlNode> spec() {
-        return EntitySpec.create(PostgreSqlNode.class);
-    }
-
-    /** Requires {@code knife}. */
-    public static EntitySpec<PostgreSqlNode> specChef() {
-        EntitySpec<PostgreSqlNode> spec = EntitySpec.create(PostgreSqlNode.class, PostgreSqlNodeChefImplFromScratch.class);
-        spec.configure(ChefConfig.CHEF_MODE, ChefModes.KNIFE);
-        return spec;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java
deleted file mode 100644
index 059c348..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import static java.lang.String.format;
-import static org.apache.brooklyn.util.ssh.BashCommands.INSTALL_WGET;
-import static org.apache.brooklyn.util.ssh.BashCommands.alternativesGroup;
-import static org.apache.brooklyn.util.ssh.BashCommands.chainGroup;
-import static org.apache.brooklyn.util.ssh.BashCommands.dontRequireTtyForSudo;
-import static org.apache.brooklyn.util.ssh.BashCommands.executeCommandThenAsUserTeeOutputToFile;
-import static org.apache.brooklyn.util.ssh.BashCommands.fail;
-import static org.apache.brooklyn.util.ssh.BashCommands.ifExecutableElse0;
-import static org.apache.brooklyn.util.ssh.BashCommands.ifExecutableElse1;
-import static org.apache.brooklyn.util.ssh.BashCommands.installPackage;
-import static org.apache.brooklyn.util.ssh.BashCommands.sudo;
-import static org.apache.brooklyn.util.ssh.BashCommands.sudoAsUser;
-import static org.apache.brooklyn.util.ssh.BashCommands.warn;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.annotation.Nullable;
-
-import org.apache.brooklyn.api.location.OsDetails;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableList;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.ssh.SshTasks;
-import org.apache.brooklyn.util.core.task.ssh.SshTasks.OnFailingTask;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.net.Urls;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.stream.Streams;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.apache.brooklyn.util.text.StringEscapes;
-import org.apache.brooklyn.util.text.StringFunctions;
-import org.apache.brooklyn.util.text.Strings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.entity.database.DatastoreMixins;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-
-import com.google.common.base.Charsets;
-import com.google.common.base.Function;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-import com.google.common.io.Files;
-
-/**
- * The SSH implementation of the {@link PostgreSqlDriver}.
- */
-public class PostgreSqlSshDriver extends AbstractSoftwareProcessSshDriver implements PostgreSqlDriver {
-
-    public static final Logger log = LoggerFactory.getLogger(PostgreSqlSshDriver.class);
-
-    public PostgreSqlSshDriver(PostgreSqlNodeImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-
-        entity.sensors().set(Attributes.LOG_FILE_LOCATION, getLogFile());
-    }
-
-    /*
-     * TODO this is much messier than we would like because postgres runs as user postgres,
-     * meaning the dirs must be RW by that user, and accessible (thus all parent paths),
-     * which may rule out putting it in a location used by the default user.
-     * Two irritating things:
-     * * currently we sometimes make up a different onbox base dir;
-     * * currently we put files to /tmp for staging
-     * Could investigate if it really needs to run as user postgres;
-     * could also see whether default user can be added to group postgres,
-     * and the run dir (and all parents) made accessible to group postgres.
-     */
-    @Override
-    public void install() {
-        String version = getEntity().getConfig(SoftwareProcess.SUGGESTED_VERSION);
-        String majorMinorVersion = version.substring(0, version.lastIndexOf("-"));
-        String shortVersion = majorMinorVersion.replace(".", "");
-
-        String altTarget = "/opt/brooklyn/postgres/";
-        String altInstallDir = Urls.mergePaths(altTarget, "install/"+majorMinorVersion);
-        
-        Iterable<String> pgctlLocations = ImmutableList.of(
-            altInstallDir+"/bin",
-            "/usr/lib/postgresql/"+majorMinorVersion+"/bin/",
-            "/opt/local/lib/postgresql"+shortVersion+"/bin/",
-            "/usr/pgsql-"+majorMinorVersion+"/bin",
-            "/usr/local/bin/",
-            "/usr/bin/",
-            "/bin/");
-
-        DynamicTasks.queueIfPossible(SshTasks.dontRequireTtyForSudo(getMachine(),
-            // sudo is absolutely required here, in customize we set user to postgres
-            OnFailingTask.FAIL)).orSubmitAndBlock();
-        DynamicTasks.waitForLast();
-
-        // Check whether we can find a usable pg_ctl, and if not install one
-        MutableList<String> findOrInstall = MutableList.<String>of()
-            .append("which pg_ctl")
-            .appendAll(Iterables.transform(pgctlLocations, StringFunctions.formatter("test -x %s/pg_ctl")))
-            .append(installPackage(ImmutableMap.of(
-                "yum", "postgresql"+shortVersion+" postgresql"+shortVersion+"-server",
-                "apt", "postgresql-"+majorMinorVersion,
-                "port", "postgresql"+shortVersion+" postgresql"+shortVersion+"-server"
-                ), null))
-                // due to impl of installPackage, it will not come to the line below I don't think
-                .append(warn(format("WARNING: failed to find or install postgresql %s binaries", majorMinorVersion)));
-
-        // Link to correct binaries folder (different versions of pg_ctl and psql don't always play well together)
-        MutableList<String> linkFromHere = MutableList.<String>of()
-            .append(ifExecutableElse1("pg_ctl", chainGroup(
-                "PG_EXECUTABLE=`which pg_ctl`",
-                "PG_DIR=`dirname $PG_EXECUTABLE`",
-                "echo 'found pg_ctl in '$PG_DIR' on path so linking PG bin/ to that dir'",
-                "ln -s $PG_DIR bin")))
-                .appendAll(Iterables.transform(pgctlLocations, givenDirIfFileExistsInItLinkToDir("pg_ctl", "bin")))
-                .append(fail(format("WARNING: failed to find postgresql %s binaries for pg_ctl, may already have another version installed; aborting", majorMinorVersion), 9));
-
-        newScript(INSTALLING)
-        .body.append(
-            dontRequireTtyForSudo(),
-            ifExecutableElse0("yum", getYumRepository(version, majorMinorVersion, shortVersion)),
-            ifExecutableElse0("apt-get", getAptRepository()),
-            "rm -f bin", // if left over from previous incomplete/failed install (not sure why that keeps happening!)
-            alternativesGroup(findOrInstall),
-            alternativesGroup(linkFromHere))
-            .failOnNonZeroResultCode()
-            .queue();
-        
-        // check that the proposed install dir is one that user postgres can access
-        // TODO if command above fails then the following `getUnchecked` blocks forever
-        if (DynamicTasks.queue(SshEffectorTasks.ssh(sudoAsUser("postgres", "ls "+getInstallDir())).allowingNonZeroExitCode()
-                .summary("check postgres user can access install dir")).asTask().getUnchecked()!=0) {
-            log.info("Postgres install dir "+getInstallDir()+" for "+getEntity()+" is not accessible to user 'postgres'; " + "using "+altInstallDir+" instead");
-            String newRunDir = Urls.mergePaths(altTarget, "apps", getEntity().getApplication().getId(), getEntity().getId());
-            if (DynamicTasks.queue(SshEffectorTasks.ssh("ls "+altInstallDir+"/pg_ctl").allowingNonZeroExitCode()
-                    .summary("check whether "+altInstallDir+" is set up")).asTask().getUnchecked()==0) {
-                // alt target already exists with binary; nothing to do for install
-            } else {
-                DynamicTasks.queue(SshEffectorTasks.ssh(
-                    "mkdir -p "+altInstallDir,
-                    "rm -rf '"+altInstallDir+"'",
-                    "mv "+getInstallDir()+" "+altInstallDir,
-                    "rm -rf '"+getInstallDir()+"'",
-                    "ln -s "+altInstallDir+" "+getInstallDir(),
-                    "mkdir -p " + newRunDir,
-                    "chown -R postgres:postgres "+altTarget).runAsRoot().requiringExitCodeZero()
-                    .summary("move install dir from user to postgres owned space"));
-            }
-            DynamicTasks.waitForLast();
-            setInstallDir(altInstallDir);
-            setRunDir(newRunDir);
-        }
-    }
-
-    private String getYumRepository(String version, String majorMinorVersion, String shortVersion) {
-        // postgres becomes available if you add the repos using an RPM such as
-        // http://yum.postgresql.org/9.3/redhat/rhel-6-i386/pgdg-centos93-9.3-1.noarch.rpm
-        // fedora, rhel, sl, and centos supported for RPM's
-
-        OsDetails osDetails = getMachine().getMachineDetails().getOsDetails();
-        String arch = osDetails.getArch();
-        String osMajorVersion = osDetails.getVersion();
-        String osName = osDetails.getName();
-
-        log.debug("postgres detecting yum information for "+getEntity()+" at "+getMachine()+": "+osName+", "+osMajorVersion+", "+arch);
-
-        if (osName==null) osName = ""; else osName = osName.toLowerCase();
-
-        if (osName.equals("ubuntu")) return "echo skipping yum repo setup as this is not an rpm environment";
-
-        if (osName.equals("rhel") || osName.contains("red hat")) osName = "redhat";
-        else if (osName.equals("centos")) osName = "centos";
-        else if (osName.equals("sl") || osName.startsWith("scientific")) osName = "sl";
-        else if (osName.equals("fedora")) osName = "fedora";
-        else {
-            log.debug("insufficient OS family information '"+osName+"' for "+getMachine()+" when installing "+getEntity()+" (yum repos); treating as centos");
-            osName = "centos";
-        }
-
-        if (Strings.isBlank(arch)) {
-            log.warn("Insuffient architecture information '"+arch+"' for "+getMachine()+"when installing "+getEntity()+"; treating as x86_64");
-            arch = "x86_64";
-        }
-
-        if (Strings.isBlank(osMajorVersion)) {
-            if (osName.equals("fedora")) osMajorVersion = "20";
-            else osMajorVersion = "6";
-            log.warn("Insuffient OS version information '"+getMachine().getOsDetails().getVersion()+"' for "+getMachine()+"when installing "+getEntity()+" (yum repos); treating as "+osMajorVersion);
-        } else {
-            if (osMajorVersion.indexOf(".")>0) 
-                osMajorVersion = osMajorVersion.substring(0, osMajorVersion.indexOf('.'));
-        }
-
-        return chainGroup(
-                INSTALL_WGET,
-                sudo(format("wget http://yum.postgresql.org/%s/redhat/rhel-%s-%s/pgdg-%s%s-%s.noarch.rpm", majorMinorVersion, osMajorVersion, arch, osName, shortVersion, version)),
-                sudo(format("rpm -Uvh pgdg-%s%s-%s.noarch.rpm", osName, shortVersion, version))
-            );
-    }
-
-    private String getAptRepository() {
-        return chainGroup(
-                INSTALL_WGET,
-                "wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo tee -a apt-key add -",
-                "echo \"deb http://apt.postgresql.org/pub/repos/apt/   $(sudo lsb_release --codename --short)-pgdg main\" | sudo tee -a /etc/apt/sources.list.d/postgresql.list"
-            );
-    }
-
-    private static Function<String, String> givenDirIfFileExistsInItLinkToDir(final String filename, final String linkToMake) {
-        return new Function<String, String>() {
-            public String apply(@Nullable String dir) {
-                return ifExecutableElse1(Urls.mergePaths(dir, filename),
-                    chainGroup("echo 'found "+filename+" in "+dir+" so linking to it in "+linkToMake+"'", "ln -s "+dir+" "+linkToMake));
-            }
-        };
-    }
-
-    @Override
-    public void customize() {
-        // Some OSes start postgres during package installation
-        DynamicTasks.queue(SshEffectorTasks.ssh(sudoAsUser("postgres", "/etc/init.d/postgresql stop")).allowingNonZeroExitCode()).get();
-
-        newScript(CUSTOMIZING)
-        .body.append(
-            sudo("mkdir -p " + getDataDir()),
-            sudo("chown postgres:postgres " + getDataDir()),
-            sudo("chmod 700 " + getDataDir()),
-            sudo("touch " + getLogFile()),
-            sudo("chown postgres:postgres " + getLogFile()),
-            sudo("touch " + getPidFile()),
-            sudo("chown postgres:postgres " + getPidFile()),
-            alternativesGroup(
-                chainGroup(format("test -e %s", getInstallDir() + "/bin/initdb"),
-                    sudoAsUser("postgres", getInstallDir() + "/bin/initdb -D " + getDataDir())),
-                    callPgctl("initdb", true)))
-                    .failOnNonZeroResultCode()
-                    .execute();
-
-        String configUrl = getEntity().getConfig(PostgreSqlNode.CONFIGURATION_FILE_URL);
-        if (Strings.isBlank(configUrl)) {
-            // http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
-            // If the same setting is listed multiple times, the last one wins.
-            DynamicTasks.queue(SshEffectorTasks.ssh(
-                executeCommandThenAsUserTeeOutputToFile(
-                    chainGroup(
-                        "echo \"listen_addresses = '*'\"",
-                        "echo \"port = " + getEntity().getPostgreSqlPort() +  "\"",
-                        "echo \"max_connections = " + getEntity().getMaxConnections() +  "\"",
-                        "echo \"shared_buffers = " + getEntity().getSharedMemory() +  "\"",
-                        "echo \"external_pid_file = '" + getPidFile() +  "'\""),
-                        "postgres", getDataDir() + "/postgresql.conf")));
-        } else {
-            String contents = processTemplate(configUrl);
-            DynamicTasks.queue(
-                SshEffectorTasks.put("/tmp/postgresql.conf").contents(contents),
-                SshEffectorTasks.ssh(sudoAsUser("postgres", "cp /tmp/postgresql.conf " + getDataDir() + "/postgresql.conf")));
-        }
-
-        String authConfigUrl = getEntity().getConfig(PostgreSqlNode.AUTHENTICATION_CONFIGURATION_FILE_URL);
-        if (Strings.isBlank(authConfigUrl)) {
-            DynamicTasks.queue(SshEffectorTasks.ssh(
-                // TODO give users control which hosts can connect and the authentication mechanism
-                executeCommandThenAsUserTeeOutputToFile("echo \"host all all 0.0.0.0/0 md5\"", "postgres", getDataDir() + "/pg_hba.conf")));
-        } else {
-            String contents = processTemplate(authConfigUrl);
-            DynamicTasks.queue(
-                SshEffectorTasks.put("/tmp/pg_hba.conf").contents(contents),
-                SshEffectorTasks.ssh(sudoAsUser("postgres", "cp /tmp/pg_hba.conf " + getDataDir() + "/pg_hba.conf")));
-        }
-
-        // Wait for commands to complete before running the creation script
-        DynamicTasks.waitForLast();
-        if(Boolean.TRUE.equals(entity.getConfig(PostgreSqlNode.INITIALIZE_DB))){
-            initializeNewDatabase();
-        }
-        // Capture log file contents if there is an error configuring the database
-        try {
-            executeDatabaseCreationScript();
-        } catch (RuntimeException r) {
-            logTailOfPostgresLog();
-            throw Exceptions.propagate(r);
-        }
-
-        // Try establishing an external connection. If you get a "Connection refused...accepting TCP/IP connections
-        // on port 5432?" error then the port is probably closed. Check that the firewall allows external TCP/IP
-        // connections (netstat -nap). You can open a port with lokkit or by configuring the iptables.
-    }
-
-    private void initializeNewDatabase() {
-        String createUserCommand = String.format(
-                "\"CREATE USER %s WITH PASSWORD '%s'; \"",
-                StringEscapes.escapeSql(getUsername()), 
-                StringEscapes.escapeSql(getUserPassword())
-        );
-        String createDatabaseCommand = String.format(
-                "\"CREATE DATABASE %s OWNER %s\"",
-                StringEscapes.escapeSql(getDatabaseName()),
-                StringEscapes.escapeSql(getUsername()));
-        newScript("initializing user and database")
-        .body.append(
-                "cd " + getInstallDir(),
-                callPgctl("start", true),
-                sudoAsUser("postgres", getInstallDir() + "/bin/psql -p " + entity.getAttribute(PostgreSqlNode.POSTGRESQL_PORT) + 
-                        " --command="+ createUserCommand),
-                sudoAsUser("postgres", getInstallDir() + "/bin/psql -p " + entity.getAttribute(PostgreSqlNode.POSTGRESQL_PORT) + 
-                                " --command="+ createDatabaseCommand),
-                callPgctl("stop", true))
-                .failOnNonZeroResultCode().execute();
-    }
-    
-    private String getConfigOrDefault(BasicAttributeSensorAndConfigKey<String> key, String def) {
-        String config = entity.getConfig(key);
-        if(Strings.isEmpty(config)) {
-            config = def;
-            log.debug(entity + " has no config specified for " + key + "; using default `" + def + "`");
-            entity.sensors().set(key, config);
-        }
-        return config;
-    }
-    
-    protected String getDatabaseName() {
-        return getConfigOrDefault(PostgreSqlNode.DATABASE, PostgreSqlNode.DEFAULT_DB_NAME);
-    }
-    
-    protected String getUsername(){
-        return getConfigOrDefault(PostgreSqlNode.USERNAME, PostgreSqlNode.DEFAULT_USERNAME);
-    }
-    
-    protected String getUserPassword() {
-        return getConfigOrDefault(PostgreSqlNode.PASSWORD, Strings.makeRandomId(8));
-    }
-
-    protected void executeDatabaseCreationScript() {
-        if (copyDatabaseCreationScript()) {
-            newScript("running postgres creation script")
-            .body.append(
-                "cd " + getInstallDir(),
-                callPgctl("start", true),
-                sudoAsUser("postgres", getInstallDir() + "/bin/psql -p " + entity.getAttribute(PostgreSqlNode.POSTGRESQL_PORT) + " --file " + getRunDir() + "/creation-script.sql"),
-                callPgctl("stop", true))
-                .failOnNonZeroResultCode()
-                .execute();
-        }
-    }
-
-    private boolean installFile(InputStream contents, String destName) {
-        String uid = Identifiers.makeRandomId(8);
-        // TODO currently put in /tmp for staging, since run dir may not be accessible to ssh user
-        getMachine().copyTo(contents, "/tmp/"+destName+"_"+uid);
-        DynamicTasks.queueIfPossible(SshEffectorTasks.ssh(
-            "cd "+getRunDir(), 
-            "mv /tmp/"+destName+"_"+uid+" "+destName,
-            "chown postgres:postgres "+destName,
-            "chmod 644 "+destName)
-            .runAsRoot().requiringExitCodeZero())
-            .orSubmitAndBlock(getEntity()).andWaitForSuccess();
-        return true;
-    }
-    private boolean copyDatabaseCreationScript() {
-        InputStream creationScript = DatastoreMixins.getDatabaseCreationScript(entity);
-        if (creationScript==null)
-            return false;
-        return installFile(creationScript, "creation-script.sql");
-    }
-
-    public String getDataDir() {
-        return getRunDir() + "/data";
-    }
-
-    public String getLogFile() {
-        return getRunDir() + "/postgresql.log";
-    }
-
-    public String getPidFile() {
-        return getRunDir() + "/postgresql.pid";
-    }
-
-    /** @deprecated since 0.7.0 renamed {@link #logTailOfPostgresLog()} */
-    @Deprecated
-    public void copyLogFileContents() { logTailOfPostgresLog(); }
-    public void logTailOfPostgresLog() {
-        try {
-            File file = Os.newTempFile("postgresql-"+getEntity().getId(), "log");
-            int result = getMachine().copyFrom(getLogFile(), file.getAbsolutePath());
-            if (result != 0) throw new IllegalStateException("Could not access log file " + getLogFile());
-            log.info("Saving {} contents as {}", getLogFile(), file);
-            Streams.logStreamTail(log, "postgresql.log", Streams.byteArrayOfString(Files.toString(file, Charsets.UTF_8)), 1024);
-            file.delete();
-        } catch (IOException ioe) {
-            log.debug("Error reading copied log file: {}", ioe);
-        }
-    }
-
-    protected String callPgctl(String command, boolean waitForIt) {
-        return sudoAsUser("postgres", getInstallDir() + "/bin/pg_ctl -D " + getDataDir() +
-            " -l " + getLogFile() + (waitForIt ? " -w " : " ") + command);
-    }
-
-    @Override
-    public void launch() {
-        log.info(String.format("Starting entity %s at %s", this, getLocation()));
-        newScript(MutableMap.of("usePidFile", false), LAUNCHING)
-        .body.append(callPgctl("start", false))
-        .execute();
-    }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of("usePidFile", getPidFile()), CHECK_RUNNING)
-            .body.append(getStatusCmd())
-            .execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(MutableMap.of("usePidFile", false), STOPPING)
-        .body.append(callPgctl((entity.getConfig(PostgreSqlNode.DISCONNECT_ON_STOP) ? "-m immediate " : "") + "stop", false))
-        .failOnNonZeroResultCode()
-        .execute();
-        newScript(MutableMap.of("usePidFile", getPidFile(), "processOwner", "postgres"), STOPPING).execute();
-    }
-
-    @Override
-    public PostgreSqlNodeImpl getEntity() {
-        return (PostgreSqlNodeImpl) super.getEntity();
-    }
-
-    @Override
-    public String getStatusCmd() {
-        return callPgctl("status", false);
-    }
-
-    public ProcessTaskWrapper<Integer> executeScriptAsync(String commands) {
-        String filename = "postgresql-commands-"+Identifiers.makeRandomId(8);
-        installFile(Streams.newInputStreamWithContents(commands), filename);
-        return executeScriptFromInstalledFileAsync(filename);
-    }
-
-    public ProcessTaskWrapper<Integer> executeScriptFromInstalledFileAsync(String filenameAlreadyInstalledAtServer) {
-        return DynamicTasks.queue(
-            SshEffectorTasks.ssh(
-                "cd "+getRunDir(),
-                sudoAsUser("postgres", getInstallDir() + "/bin/psql -p " + entity.getAttribute(PostgreSqlNode.POSTGRESQL_PORT) + " --file " + filenameAlreadyInstalledAtServer))
-                .summary("executing datastore script "+filenameAlreadyInstalledAtServer));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepDriver.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepDriver.java
deleted file mode 100644
index ab4eec0..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepDriver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.rubyrep;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-/**
- * The driver interface for {@link RubyRepNode}.
- */
-public interface RubyRepDriver extends SoftwareProcessDriver {
-
-}


[07/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterLiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterLiveTest.java
deleted file mode 100644
index 7279f92..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterLiveTest.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.math.BigInteger;
-import java.net.Socket;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.apache.brooklyn.entity.nosql.cassandra.AstyanaxSupport.AstyanaxSample;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-import com.netflix.astyanax.AstyanaxContext;
-import com.netflix.astyanax.Cluster;
-import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
-
-/**
- * A live test of the {@link CassandraDatacenter} entity.
- *
- * Tests that a two node cluster can be started on Amazon EC2 and data written on one {@link CassandraNode}
- * can be read from another, using the Astyanax API.
- */
-public class CassandraDatacenterLiveTest extends BrooklynAppLiveTestSupport {
-
-    private static final Logger log = LoggerFactory.getLogger(CassandraDatacenterLiveTest.class);
-    
-    private String provider = 
-            "aws-ec2:eu-west-1";
-//            "rackspace-cloudservers-uk";
-//            "named:hpcloud-compute-at";
-//            "localhost";
-//            "jcloudsByon:(provider=\"aws-ec2\",region=\"us-east-1\",user=\"aled\",hosts=\"i-6f374743,i-35324219,i-1135453d\")";
-
-    protected Location testLocation;
-    protected CassandraDatacenter cluster;
-
-    @BeforeMethod(alwaysRun = true)
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        testLocation = mgmt.getLocationRegistry().resolve(provider);
-    }
-
-    @AfterMethod(alwaysRun=true)
-    @Override
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-    
-    @Test(groups = "Live")
-    public void testDatacenter() throws Exception {
-        EntitySpec<CassandraDatacenter> spec = EntitySpec.create(CassandraDatacenter.class)
-                .configure("initialSize", 2)
-                .configure("clusterName", "CassandraClusterLiveTest");
-        runCluster(spec, false);
-    }
-    
-    @Test(groups = "Live")
-    public void testDatacenterWithVnodes() throws Exception {
-        EntitySpec<CassandraDatacenter> spec = EntitySpec.create(CassandraDatacenter.class)
-                .configure("initialSize", 2)
-                .configure(CassandraDatacenter.USE_VNODES, true)
-                .configure("clusterName", "CassandraClusterLiveTest");
-        runCluster(spec, true);
-    }
-    
-    /*
-     * TODO on some distros (e.g. CentOS?), it comes pre-installed with java 6. Installing java 7 
-     * didn't seem to be enough. I also had to set JAVA_HOME:
-     *     .configure("shell.env", MutableMap.of("JAVA_HOME", "/etc/alternatives/java_sdk_1.7.0"))
-     * However, that would break other deployments such as on Ubuntu where JAVA_HOME would be different.
-     * 
-     * TODO In AWS eu-west-1, with the default image choice (ami-ad2404da, ubuntu-trusty-14.04-amd64-server-20150908),
-     * `apt-get install openjdk-8-jdk` failed with the error "Unable to locate package openjdk-8-jdk".
-     * This meant Cassandra failed to start, because no Java was installed.
-     */
-    @Test(groups = "Live")
-    public void testDatacenterWithVnodesVersion2() throws Exception {
-        EntitySpec<CassandraDatacenter> spec = EntitySpec.create(CassandraDatacenter.class)
-                .configure("initialSize", 2)
-                .configure(CassandraNode.SUGGESTED_VERSION, "2.0.9")
-                .configure(CassandraDatacenter.USE_VNODES, true)
-                .configure("clusterName", "CassandraClusterLiveTest");
-        runCluster(spec, true);
-    }
-
-    @Test(groups = {"Live", "Acceptance"}, invocationCount=10)
-    public void testManyTimes() throws Exception {
-        testDatacenter();
-    }
-
-    /**
-     * Test a Cassandra Datacenter:
-     * <ol>
-     *   <li>Create two node datacenter
-     *   <li>Confirm allows access via the Astyanax API through both nodes.
-     *   <li>Confirm can size
-     * </ol>
-     */
-    protected void runCluster(EntitySpec<CassandraDatacenter> datacenterSpec, boolean usesVnodes) throws Exception {
-        cluster = app.createAndManageChild(datacenterSpec);
-        assertEquals(cluster.getCurrentSize().intValue(), 0);
-
-        app.start(ImmutableList.of(testLocation));
-
-        // Check cluster is up and healthy
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, CassandraDatacenter.GROUP_SIZE, 2);
-        Entities.dumpInfo(app);
-        List<CassandraNode> members = castToCassandraNodes(cluster.getMembers());
-        assertNodesConsistent(members);
-
-        if (usesVnodes) {
-            assertVnodeTokensConsistent(members);
-        } else {
-            assertSingleTokenConsistent(members);
-        }
-        
-        // Can connect via Astyanax
-        checkConnectionRepeatedly(2, 5, members);
-
-        // Resize
-        cluster.resize(3);
-        assertEquals(cluster.getMembers().size(), 3, "members="+cluster.getMembers());
-        if (usesVnodes) {
-            assertVnodeTokensConsistent(castToCassandraNodes(cluster.getMembers()));
-        } else {
-            assertSingleTokenConsistent(castToCassandraNodes(cluster.getMembers()));
-        }
-        checkConnectionRepeatedly(2, 5, cluster.getMembers());
-    }
-
-    protected static List<CassandraNode> castToCassandraNodes(Collection<? extends Entity> rawnodes) {
-        final List<CassandraNode> nodes = Lists.newArrayList();
-        for (Entity node : rawnodes) {
-            nodes.add((CassandraNode) node);
-        }
-        return nodes;
-    }
-
-    protected static void assertNodesConsistent(final List<CassandraNode> nodes) {
-        final Integer expectedLiveNodeCount = nodes.size();
-        // may take some time to be consistent (with new thrift_latency checks on the node,
-        // contactability should not be an issue, but consistency still might be)
-        Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TWO_MINUTES), new Runnable() {
-            public void run() {
-                for (Entity n : nodes) {
-                    CassandraNode node = (CassandraNode) n;
-                    EntityTestUtils.assertAttributeEquals(node, Startable.SERVICE_UP, true);
-                    String errmsg = "node="+node+"; hostname="+node.getAttribute(Attributes.HOSTNAME)+"; port="+node.getThriftPort();
-                    assertTrue(isSocketOpen(node), errmsg);
-                    assertTrue(areVersionsConsistent(node), errmsg);
-                    EntityTestUtils.assertAttributeEquals(node, CassandraNode.LIVE_NODE_COUNT, expectedLiveNodeCount);
-                }
-            }});
-    }
-    
-    protected static void assertSingleTokenConsistent(final List<CassandraNode> nodes) {
-        final int numNodes = nodes.size();
-        Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TWO_MINUTES), new Runnable() {
-            public void run() {
-                Set<BigInteger> alltokens = Sets.newLinkedHashSet();
-                for (Entity node : nodes) {
-                    EntityTestUtils.assertAttributeEquals(node, Startable.SERVICE_UP, true);
-                    EntityTestUtils.assertConfigEquals(node, CassandraNode.NUM_TOKENS_PER_NODE, 1);
-                    EntityTestUtils.assertAttributeEquals(node, CassandraNode.PEERS, numNodes);
-                    Set<BigInteger> tokens = node.getAttribute(CassandraNode.TOKENS);
-                    assertNotNull(tokens);
-                    alltokens.addAll(tokens);
-                }
-                assertFalse(alltokens.contains(null), "tokens="+alltokens);
-                assertEquals(alltokens.size(), numNodes);
-            }});
-    }
-
-    protected static void assertVnodeTokensConsistent(final List<CassandraNode> nodes) {
-        final int numNodes = nodes.size();
-        final int tokensPerNode = Iterables.get(nodes, 0).getNumTokensPerNode();
-        
-        Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TWO_MINUTES), new Runnable() {
-            public void run() {
-                Set<BigInteger> alltokens = Sets.newLinkedHashSet();
-                for (Entity node : nodes) {
-                    EntityTestUtils.assertAttributeEquals(node, Startable.SERVICE_UP, true);
-                    EntityTestUtils.assertAttributeEquals(node, CassandraNode.PEERS, tokensPerNode*numNodes);
-                    EntityTestUtils.assertConfigEquals(node, CassandraNode.NUM_TOKENS_PER_NODE, 256);
-                    Set<BigInteger> tokens = node.getAttribute(CassandraNode.TOKENS);
-                    assertNotNull(tokens);
-                    assertEquals(tokens.size(), tokensPerNode, "tokens="+tokens);
-                    alltokens.addAll(tokens);
-                }
-                assertFalse(alltokens.contains(null));
-                assertEquals(alltokens.size(), tokensPerNode*numNodes);
-            }});
-    }
-
-    protected static void checkConnectionRepeatedly(int totalAttemptsAllowed, int numRetriesPerAttempt, Iterable<? extends Entity> nodes) throws Exception {
-        int attemptNum = 0;
-        while (true) {
-            try {
-                checkConnection(numRetriesPerAttempt, nodes);
-                return;
-            } catch (Exception e) {
-                attemptNum++;
-                if (attemptNum >= totalAttemptsAllowed) {
-                    log.warn("Cassandra not usable, "+attemptNum+" attempts; failing: "+e, e);
-                    throw e;                
-                }
-                log.warn("Cassandra not usable (attempt "+attemptNum+" of "+totalAttemptsAllowed+"), trying again after delay: "+e, e);
-                Time.sleep(Duration.TEN_SECONDS);
-            }
-        }
-    }
-
-    protected static void checkConnection(int numRetries, Iterable<? extends Entity> nodes) throws ConnectionException {
-        CassandraNode first = (CassandraNode) Iterables.get(nodes, 0);
-        
-        // have been seeing intermittent SchemaDisagreementException errors on AWS, probably due to Astyanax / how we are using it
-        // (confirmed that clocks are in sync)
-        String uniqueName = Identifiers.makeRandomId(8);
-        AstyanaxSample astyanaxFirst = AstyanaxSample.builder().node(first).columnFamilyName(uniqueName).build();
-        Map<String, List<String>> versions;
-        AstyanaxContext<Cluster> context = astyanaxFirst.newAstyanaxContextForCluster();
-        try {
-            versions = context.getEntity().describeSchemaVersions();
-        } finally {
-            context.shutdown();
-        }
-            
-        log.info("Cassandra schema versions are: "+versions);
-        if (versions.size() > 1) {
-            Assert.fail("Inconsistent versions on Cassandra start: "+versions);
-        }
-        String keyspacePrefix = "BrooklynTests_"+Identifiers.makeRandomId(8);
-
-        String keyspaceName = astyanaxFirst.writeData(keyspacePrefix, numRetries);
-
-        for (Entity node : nodes) {
-            AstyanaxSample astyanaxSecond = AstyanaxSample.builder().node((CassandraNode)node).columnFamilyName(uniqueName).build();
-            astyanaxSecond.readData(keyspaceName, numRetries);
-        }
-    }
-
-    protected static Boolean areVersionsConsistent(CassandraNode node) {
-        AstyanaxContext<Cluster> context = null;
-        try {
-            context = new AstyanaxSample(node).newAstyanaxContextForCluster();
-            Map<String, List<String>> v = context.getEntity().describeSchemaVersions();
-            return v.size() == 1;
-        } catch (Exception e) {
-            return null;
-        } finally {
-            if (context != null) context.shutdown();
-        }
-    }
-
-    protected static boolean isSocketOpen(CassandraNode node) {
-        try {
-            Socket s = new Socket(node.getAttribute(Attributes.HOSTNAME), node.getThriftPort());
-            s.close();
-            return true;
-        } catch (Exception e) {
-            return false;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterRebindIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterRebindIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterRebindIntegrationTest.java
deleted file mode 100644
index 89b03da..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterRebindIntegrationTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-
-import java.math.BigInteger;
-import java.util.Set;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.mgmt.rebind.RebindOptions;
-import org.apache.brooklyn.core.mgmt.rebind.RebindTestFixtureWithApp;
-import org.apache.brooklyn.entity.proxy.nginx.NginxController;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.base.Predicates;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-
-/**
- * Test the operation of the {@link NginxController} class.
- */
-public class CassandraDatacenterRebindIntegrationTest extends RebindTestFixtureWithApp {
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(CassandraDatacenterRebindIntegrationTest.class);
-
-    private LocalhostMachineProvisioningLocation localhostProvisioningLocation;
-    
-    @BeforeMethod(alwaysRun=true)
-    public void setUp() throws Exception {
-        CassandraNodeIntegrationTest.assertCassandraPortsAvailableEventually();
-        super.setUp();
-        localhostProvisioningLocation = origApp.newLocalhostProvisioningLocation();
-    }
-
-    @AfterMethod(alwaysRun=true)
-    @Override
-    public void tearDown() throws Exception {
-        super.tearDown();
-        CassandraNodeIntegrationTest.assertCassandraPortsAvailableEventually();
-    }
-    
-    /**
-     * Test that Brooklyn can rebind to a single node datacenter.
-     */
-    @Test(groups = "Integration")
-    public void testRebindDatacenterOfSizeOne() throws Exception {
-        CassandraDatacenter origDatacenter = origApp.createAndManageChild(EntitySpec.create(CassandraDatacenter.class)
-                .configure("initialSize", 1));
-
-        origApp.start(ImmutableList.of(localhostProvisioningLocation));
-        CassandraNode origNode = (CassandraNode) Iterables.get(origDatacenter.getMembers(), 0);
-
-        EntityTestUtils.assertAttributeEqualsEventually(origDatacenter, CassandraDatacenter.GROUP_SIZE, 1);
-        CassandraDatacenterLiveTest.assertNodesConsistent(ImmutableList.of(origNode));
-        CassandraDatacenterLiveTest.assertSingleTokenConsistent(ImmutableList.of(origNode));
-        CassandraDatacenterLiveTest.checkConnectionRepeatedly(2, 5, ImmutableList.of(origNode));
-        Set<BigInteger> origTokens = origNode.getAttribute(CassandraNode.TOKENS);
-        assertNotNull(origTokens);
-        assertFalse(origTokens.contains(null), "tokens="+origTokens);
-        
-        newApp = rebind(RebindOptions.create().terminateOrigManagementContext(true));
-        final CassandraDatacenter newDatacenter = (CassandraDatacenter) Iterables.find(newApp.getChildren(), Predicates.instanceOf(CassandraDatacenter.class));
-        final CassandraNode newNode = (CassandraNode) Iterables.find(newDatacenter.getMembers(), Predicates.instanceOf(CassandraNode.class));
-        
-        EntityTestUtils.assertAttributeEqualsEventually(newDatacenter, CassandraDatacenter.GROUP_SIZE, 1);
-        EntityTestUtils.assertAttributeEqualsEventually(newNode, Startable.SERVICE_UP, true);
-        EntityTestUtils.assertAttributeEqualsEventually(newNode, CassandraNode.TOKENS, origTokens);
-        CassandraDatacenterLiveTest.assertNodesConsistent(ImmutableList.of(newNode));
-        CassandraDatacenterLiveTest.assertSingleTokenConsistent(ImmutableList.of(newNode));
-        CassandraDatacenterLiveTest.checkConnectionRepeatedly(2, 5, ImmutableList.of(newNode));
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterTest.java
deleted file mode 100644
index 2c978b2..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterTest.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import static org.testng.Assert.assertEquals;
-
-import java.math.BigInteger;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.LocationSpec;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.test.BrooklynAppUnitTestSupport;
-import org.apache.brooklyn.entity.software.base.EmptySoftwareProcess;
-import org.apache.brooklyn.entity.software.base.EmptySoftwareProcessSshDriver;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.core.ResourceUtils;
-import org.apache.brooklyn.util.core.text.TemplateProcessor;
-import org.apache.brooklyn.util.javalang.JavaClassNames;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Sets;
-
-public class CassandraDatacenterTest extends BrooklynAppUnitTestSupport {
-
-    private static final Logger log = LoggerFactory.getLogger(CassandraDatacenterTest.class);
-    
-    private LocalhostMachineProvisioningLocation loc;
-    private CassandraDatacenter cluster;
-    
-    @BeforeMethod(alwaysRun=true)
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        loc = mgmt.getLocationManager().createLocation(LocationSpec.create(LocalhostMachineProvisioningLocation.class));
-    }
-    
-    @Test
-    public void testPopulatesInitialSeeds() throws Exception {
-        cluster = app.createAndManageChild(EntitySpec.create(CassandraDatacenter.class)
-                .configure(CassandraDatacenter.INITIAL_SIZE, 2)
-                .configure(CassandraDatacenter.TOKEN_SHIFT, BigInteger.ZERO)
-                .configure(CassandraDatacenter.DELAY_BEFORE_ADVERTISING_CLUSTER, Duration.ZERO)
-                .configure(CassandraDatacenter.MEMBER_SPEC, EntitySpec.create(EmptySoftwareProcess.class)));
-
-        app.start(ImmutableList.of(loc));
-        EmptySoftwareProcess e1 = (EmptySoftwareProcess) Iterables.get(cluster.getMembers(), 0);
-        EmptySoftwareProcess e2 = (EmptySoftwareProcess) Iterables.get(cluster.getMembers(), 1);
-        
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, CassandraDatacenter.CURRENT_SEEDS, ImmutableSet.<Entity>of(e1, e2));
-    }
-    
-    @Test(groups="Integration") // because takes approx 2 seconds
-    public void testUpdatesSeedsOnFailuresAndAdditions() throws Exception {
-        doTestUpdatesSeedsOnFailuresAndAdditions(true, false);
-    }
-    
-    protected void doTestUpdatesSeedsOnFailuresAndAdditions(boolean fast, boolean checkSeedsConstantOnRejoining) throws Exception {
-        cluster = app.createAndManageChild(EntitySpec.create(CassandraDatacenter.class)
-                .configure(CassandraDatacenter.INITIAL_SIZE, 2)
-                .configure(CassandraDatacenter.TOKEN_SHIFT, BigInteger.ZERO)
-                .configure(CassandraDatacenter.DELAY_BEFORE_ADVERTISING_CLUSTER, Duration.ZERO)
-                .configure(CassandraDatacenter.MEMBER_SPEC, EntitySpec.create(EmptySoftwareProcess.class)));
-
-        app.start(ImmutableList.of(loc));
-        EmptySoftwareProcess e1 = (EmptySoftwareProcess) Iterables.get(cluster.getMembers(), 0);
-        EmptySoftwareProcess e2 = (EmptySoftwareProcess) Iterables.get(cluster.getMembers(), 1);
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, CassandraDatacenter.CURRENT_SEEDS, ImmutableSet.<Entity>of(e1, e2));
-        log.debug("Test "+JavaClassNames.niceClassAndMethod()+", cluster "+cluster+" has "+cluster.getMembers()+"; e1="+e1+" e2="+e2);
-        
-        // calling the driver stop for this entity will cause SERVICE_UP to become false, and stay false
-        // (and that's all it does, incidentally); if we just set the attribute it will become true on serviceUp sensor feed
-        log.info("Simulating failure of cassandra node "+e1);
-        ((EmptySoftwareProcess)e1).getDriver().stop();
-        // not necessary, but speeds things up:
-        if (fast)
-            e1.sensors().set(Attributes.SERVICE_UP, false);
-        
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, CassandraDatacenter.CURRENT_SEEDS, ImmutableSet.<Entity>of(e2));
-
-        cluster.resize(3);
-        EmptySoftwareProcess e3 = (EmptySoftwareProcess) Iterables.getOnlyElement(Sets.difference(ImmutableSet.copyOf(cluster.getMembers()), ImmutableSet.of(e1,e2)));
-        log.debug("Test "+JavaClassNames.niceClassAndMethod()+", cluster "+cluster+" has "+cluster.getMembers()+"; e3="+e3);
-        try {
-            EntityTestUtils.assertAttributeEqualsEventually(cluster, CassandraDatacenter.CURRENT_SEEDS, ImmutableSet.<Entity>of(e2, e3));
-        } finally {
-            log.debug("Test "+JavaClassNames.niceClassAndMethod()+", cluster "+cluster+" has "+cluster.getMembers()+"; seeds "+cluster.getAttribute(CassandraDatacenter.CURRENT_SEEDS));
-        }
-        
-        if (!checkSeedsConstantOnRejoining) {
-            // cluster should not revert to e1+e2, simply because e1 has come back; but e1 should rejoin the group
-            // (not that important, and waits for 1s, so only done as part of integration)
-            ((EmptySoftwareProcessSshDriver)(((EmptySoftwareProcess)e1).getDriver())).launch();
-            if (fast)
-                e1.sensors().set(Attributes.SERVICE_UP, true);
-            EntityTestUtils.assertAttributeEqualsEventually(e1, CassandraNode.SERVICE_UP, true);
-            EntityTestUtils.assertAttributeEqualsContinually(cluster, CassandraDatacenter.CURRENT_SEEDS, ImmutableSet.<Entity>of(e2, e3));
-        }
-    }
-    
-    @Test
-    public void testPopulatesInitialTokens() throws Exception {
-        cluster = app.createAndManageChild(EntitySpec.create(CassandraDatacenter.class)
-                .configure(CassandraDatacenter.INITIAL_SIZE, 2)
-                .configure(CassandraDatacenter.TOKEN_SHIFT, BigInteger.ZERO)
-                .configure(CassandraDatacenter.DELAY_BEFORE_ADVERTISING_CLUSTER, Duration.ZERO)
-                .configure(CassandraDatacenter.MEMBER_SPEC, EntitySpec.create(EmptySoftwareProcess.class)));
-
-        app.start(ImmutableList.of(loc));
-
-        Set<BigInteger> tokens = Sets.newLinkedHashSet();
-        for (Entity member : cluster.getMembers()) {
-            Set<BigInteger > memberTokens = member.getConfig(CassandraNode.TOKENS);
-            if (memberTokens != null) tokens.addAll(memberTokens);
-        }
-        assertEquals(tokens, ImmutableSet.of(new BigInteger("-9223372036854775808"), BigInteger.ZERO));
-    }
-    
-    @Test
-    public void testDoesNotPopulateInitialTokens() throws Exception {
-        cluster = app.createAndManageChild(EntitySpec.create(CassandraDatacenter.class)
-                .configure(CassandraDatacenter.INITIAL_SIZE, 2)
-                .configure(CassandraDatacenter.USE_VNODES, true)
-                .configure(CassandraDatacenter.DELAY_BEFORE_ADVERTISING_CLUSTER, Duration.ZERO)
-                .configure(CassandraDatacenter.MEMBER_SPEC, EntitySpec.create(EmptySoftwareProcess.class)));
-
-        app.start(ImmutableList.of(loc));
-
-        Set<BigInteger> tokens = Sets.newLinkedHashSet();
-        for (Entity member : cluster.getMembers()) {
-            Set<BigInteger > memberTokens = member.getConfig(CassandraNode.TOKENS);
-            if (memberTokens != null) tokens.addAll(memberTokens);
-        }
-        assertEquals(tokens, ImmutableSet.of());
-    }
-    
-    public static class MockInputForTemplate {
-        public BigInteger getToken() { return new BigInteger("-9223372036854775808"); }
-        public String getTokensAsString() { return "" + getToken(); }
-        public int getNumTokensPerNode() { return 1; }
-        public String getSeeds() { return ""; }
-        public int getGossipPort() { return 1234; }
-        public int getSslGossipPort() { return 1234; }
-        public int getThriftPort() { return 1234; }
-        public int getNativeTransportPort() { return 1234; }
-        public String getClusterName() { return "Mock"; }
-        public String getEndpointSnitchName() { return ""; }
-        public String getListenAddress() { return "0"; }
-        public String getBroadcastAddress() { return "0"; }
-        public String getRpcAddress() { return "0"; }
-        public String getRunDir() { return "/tmp/mock"; }
-    }
-    
-    @Test
-    public void testBigIntegerFormattedCorrectly() {
-        Map<String, Object> substitutions = ImmutableMap.<String, Object>builder()
-                .put("entity", new MockInputForTemplate())
-                .put("driver", new MockInputForTemplate())
-                .build();
-
-        String templatedUrl = CassandraNode.CASSANDRA_CONFIG_TEMPLATE_URL.getDefaultValue();
-        String url = TemplateProcessor.processTemplateContents(templatedUrl, ImmutableMap.of("entity", ImmutableMap.of("majorMinorVersion", "1.2")));
-        String templateContents = new ResourceUtils(this).getResourceAsString(url);
-        String processedTemplate = TemplateProcessor.processTemplateContents(templateContents, substitutions);
-        Assert.assertEquals(processedTemplate.indexOf("775,808"), -1);
-        Assert.assertTrue(processedTemplate.indexOf("-9223372036854775808") > 0);
-    }
-    
-    @Test(groups="Integration") // because takes approx 30 seconds
-    public void testUpdatesSeedsFastishManyTimes() throws Exception {
-        final int COUNT = 20;
-        for (int i=0; i<COUNT; i++) {
-            log.info("Test "+JavaClassNames.niceClassAndMethod()+", iteration "+(i+1)+" of "+COUNT);
-            try {
-                doTestUpdatesSeedsOnFailuresAndAdditions(true, true);
-                tearDown();
-                setUp();
-            } catch (Exception e) {
-                log.warn("Error in "+JavaClassNames.niceClassAndMethod()+", iteration "+(i+1)+" of "+COUNT, e);
-                throw e;
-            }
-        }
-    }
-    
-    @Test(groups="Integration") // because takes approx 5 seconds
-    public void testUpdateSeedsSlowAndRejoining() throws Exception {
-        final int COUNT = 1;
-        for (int i=0; i<COUNT; i++) {
-            log.info("Test "+JavaClassNames.niceClassAndMethod()+", iteration "+(i+1)+" of "+COUNT);
-            doTestUpdatesSeedsOnFailuresAndAdditions(false, true);
-            tearDown();
-            setUp();
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraFabricTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraFabricTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraFabricTest.java
deleted file mode 100644
index f28ddc1..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraFabricTest.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import static org.testng.Assert.assertEquals;
-
-import java.util.Collection;
-import java.util.Set;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.location.LocationSpec;
-import org.apache.brooklyn.core.entity.AbstractEntity;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityInternal;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.BrooklynAppUnitTestSupport;
-import org.apache.brooklyn.entity.software.base.EmptySoftwareProcess;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Sets;
-
-public class CassandraFabricTest extends BrooklynAppUnitTestSupport {
-
-    private static final Logger log = LoggerFactory.getLogger(CassandraFabricTest.class);
-    
-    private LocalhostMachineProvisioningLocation loc1;
-    private LocalhostMachineProvisioningLocation loc2;
-    private CassandraFabric fabric;
-    
-    @BeforeMethod(alwaysRun=true)
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        loc1 = mgmt.getLocationManager().createLocation(LocationSpec.create(LocalhostMachineProvisioningLocation.class));
-        loc2 = mgmt.getLocationManager().createLocation(LocationSpec.create(LocalhostMachineProvisioningLocation.class));
-    }
-    
-    @Test
-    public void testPopulatesInitialSeeds() throws Exception {
-        fabric = app.createAndManageChild(EntitySpec.create(CassandraFabric.class)
-                .configure(CassandraFabric.INITIAL_QUORUM_SIZE, 2)
-                .configure(CassandraDatacenter.DELAY_BEFORE_ADVERTISING_CLUSTER, Duration.ZERO)
-                .configure(CassandraFabric.MEMBER_SPEC, EntitySpec.create(CassandraDatacenter.class)
-                        .configure(CassandraDatacenter.INITIAL_SIZE, 2)
-                        .configure(CassandraDatacenter.MEMBER_SPEC, EntitySpec.create(EmptySoftwareProcess.class))));
-
-        app.start(ImmutableList.of(loc1, loc2));
-        CassandraDatacenter d1 = (CassandraDatacenter) Iterables.get(fabric.getMembers(), 0);
-        CassandraDatacenter d2 = (CassandraDatacenter) Iterables.get(fabric.getMembers(), 1);
-
-        final EmptySoftwareProcess d1a = (EmptySoftwareProcess) Iterables.get(d1.getMembers(), 0);
-        final EmptySoftwareProcess d1b = (EmptySoftwareProcess) Iterables.get(d1.getMembers(), 1);
-
-        final EmptySoftwareProcess d2a = (EmptySoftwareProcess) Iterables.get(d2.getMembers(), 0);
-        final EmptySoftwareProcess d2b = (EmptySoftwareProcess) Iterables.get(d2.getMembers(), 1);
-
-        Predicate<Set<Entity>> predicate = new Predicate<Set<Entity>>() {
-            @Override public boolean apply(Set<Entity> input) {
-                return input != null && input.size() >= 2 &&
-                        Sets.intersection(input, ImmutableSet.of(d1a, d1b)).size() == 1 &&
-                        Sets.intersection(input, ImmutableSet.of(d2a, d2b)).size() == 1;
-            }
-        };
-        EntityTestUtils.assertAttributeEventually(fabric, CassandraFabric.CURRENT_SEEDS, predicate);
-        EntityTestUtils.assertAttributeEventually(d1, CassandraDatacenter.CURRENT_SEEDS, predicate);
-        EntityTestUtils.assertAttributeEventually(d2, CassandraDatacenter.CURRENT_SEEDS, predicate);
-        
-        Set<Entity> seeds = fabric.getAttribute(CassandraFabric.CURRENT_SEEDS);
-        assertEquals(d1.getAttribute(CassandraDatacenter.CURRENT_SEEDS), seeds);
-        assertEquals(d2.getAttribute(CassandraDatacenter.CURRENT_SEEDS), seeds);
-        log.info("Seeds="+seeds);
-    }
-
-    @Test
-    public void testPopulatesInitialSeedsWhenNodesOfOneClusterComeUpBeforeTheOtherCluster() throws Exception {
-        fabric = app.createAndManageChild(EntitySpec.create(CassandraFabric.class)
-                .configure(CassandraFabric.INITIAL_QUORUM_SIZE, 2)
-                .configure(CassandraDatacenter.DELAY_BEFORE_ADVERTISING_CLUSTER, Duration.ZERO)
-                .configure(CassandraFabric.MEMBER_SPEC, EntitySpec.create(CassandraDatacenter.class)
-                        .configure(CassandraDatacenter.INITIAL_SIZE, 2)
-                        .configure(CassandraDatacenter.MEMBER_SPEC, EntitySpec.create(DummyCassandraNode.class))));
-
-        Thread t = new Thread() {
-            public void run() {
-                app.start(ImmutableList.of(loc1, loc2));
-            }
-        };
-        t.start();
-        try {
-            EntityTestUtils.assertGroupSizeEqualsEventually(fabric, 2);
-            CassandraDatacenter d1 = (CassandraDatacenter) Iterables.get(fabric.getMembers(), 0);
-            CassandraDatacenter d2 = (CassandraDatacenter) Iterables.get(fabric.getMembers(), 1);
-    
-            EntityTestUtils.assertGroupSizeEqualsEventually(d1, 2);
-            final DummyCassandraNode d1a = (DummyCassandraNode) Iterables.get(d1.getMembers(), 0);
-            final DummyCassandraNode d1b = (DummyCassandraNode) Iterables.get(d1.getMembers(), 1);
-    
-            EntityTestUtils.assertGroupSizeEqualsEventually(d2, 2);
-            final DummyCassandraNode d2a = (DummyCassandraNode) Iterables.get(d2.getMembers(), 0);
-            final DummyCassandraNode d2b = (DummyCassandraNode) Iterables.get(d2.getMembers(), 1);
-
-            d1a.sensors().set(Attributes.HOSTNAME, "d1a");
-            d1b.sensors().set(Attributes.HOSTNAME, "d1b");
-            
-            Thread.sleep(1000);
-            d2a.sensors().set(Attributes.HOSTNAME, "d2a");
-            d2b.sensors().set(Attributes.HOSTNAME, "d2b");
-            
-            Predicate<Set<Entity>> predicate = new Predicate<Set<Entity>>() {
-                @Override public boolean apply(Set<Entity> input) {
-                    return input != null && input.size() >= 2 &&
-                            Sets.intersection(input, ImmutableSet.of(d1a, d1b)).size() == 1 &&
-                            Sets.intersection(input, ImmutableSet.of(d2a, d2b)).size() == 1;
-                }
-            };
-            EntityTestUtils.assertAttributeEventually(fabric, CassandraFabric.CURRENT_SEEDS, predicate);
-            EntityTestUtils.assertAttributeEventually(d1, CassandraDatacenter.CURRENT_SEEDS, predicate);
-            EntityTestUtils.assertAttributeEventually(d2, CassandraDatacenter.CURRENT_SEEDS, predicate);
-            
-            Set<Entity> seeds = fabric.getAttribute(CassandraFabric.CURRENT_SEEDS);
-            assertEquals(d1.getAttribute(CassandraDatacenter.CURRENT_SEEDS), seeds);
-            assertEquals(d2.getAttribute(CassandraDatacenter.CURRENT_SEEDS), seeds);
-            log.info("Seeds="+seeds);
-        } finally {
-            log.info("Failed seeds; fabric="+fabric.getAttribute(CassandraFabric.CURRENT_SEEDS));
-            t.interrupt();
-        }
-    }
-    
-    
-    @ImplementedBy(DummyCassandraNodeImpl.class)
-    public interface DummyCassandraNode extends Entity, Startable, EntityLocal, EntityInternal {
-    }
-    
-    public static class DummyCassandraNodeImpl extends AbstractEntity implements DummyCassandraNode {
-
-        @Override
-        public void start(Collection<? extends Location> locations) {
-            ServiceStateLogic.setExpectedState(this, Lifecycle.STARTING);
-        }
-
-        @Override
-        public void stop() {
-            ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPING);
-        }
-
-        @Override
-        public void restart() {
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeEc2LiveTest.java
deleted file mode 100644
index c1b8b04..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeEc2LiveTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import static org.testng.Assert.assertNotNull;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityAsserts;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.entity.nosql.cassandra.AstyanaxSupport.AstyanaxSample;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public class CassandraNodeEc2LiveTest extends AbstractEc2LiveTest {
-
-    private static final Logger log = LoggerFactory.getLogger(CassandraNodeEc2LiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        log.info("Testing Cassandra on {}", loc);
-
-        CassandraNode cassandra = app.createAndManageChild(EntitySpec.create(CassandraNode.class)
-                .configure("thriftPort", "9876+")
-                .configure("clusterName", "TestCluster"));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(cassandra, CassandraNode.SERVICE_UP, true);
-
-        AstyanaxSample astyanax = new AstyanaxSample(cassandra);
-        astyanax.astyanaxTest();
-    }
-    
-    @Test(groups = {"Live"})
-    public void testWithOnlyPort22() throws Exception {
-        // CentOS-6.3-x86_64-GA-EBS-02-85586466-5b6c-4495-b580-14f72b4bcf51-ami-bb9af1d2.1
-        jcloudsLocation = mgmt.getLocationRegistry().resolve(LOCATION_SPEC, ImmutableMap.of(
-                "tags", ImmutableList.of(getClass().getName()),
-                "imageId", "us-east-1/ami-a96b01c0", 
-                "hardwareId", SMALL_HARDWARE_ID));
-
-        CassandraNode server = app.createAndManageChild(EntitySpec.create(CassandraNode.class)
-                .configure(CassandraNode.PROVISIONING_PROPERTIES.subKey(CloudLocationConfig.INBOUND_PORTS.getName()), ImmutableList.of(22))
-                .configure(CassandraNode.USE_JMX, false)
-                .configure(CassandraNode.USE_THRIFT_MONITORING, false));
-        
-        app.start(ImmutableList.of(jcloudsLocation));
-        
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_UP, true);
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-        
-        Integer port = server.getAttribute(CassandraNode.THRIFT_PORT);
-        assertNotNull(port);
-        
-        assertViaSshLocalPortListeningEventually(server, port);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeIntegrationTest.java
deleted file mode 100644
index 12edbe6..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeIntegrationTest.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraNode;
-import org.apache.brooklyn.entity.nosql.cassandra.AstyanaxSupport.AstyanaxSample;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.test.NetworkingTestUtils;
-import org.apache.brooklyn.util.math.MathPredicates;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Maps;
-
-/**
- * Cassandra integration tests.
- *
- * Test the operation of the {@link CassandraNode} class.
- */
-public class CassandraNodeIntegrationTest extends AbstractCassandraNodeTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(CassandraNodeIntegrationTest.class);
-
-    public static void assertCassandraPortsAvailableEventually() {
-        Map<String, Integer> ports = getCassandraDefaultPorts();
-        NetworkingTestUtils.assertPortsAvailableEventually(ports);
-        LOG.info("Confirmed Cassandra ports are available: "+ports);
-    }
-    
-    public static Map<String, Integer> getCassandraDefaultPorts() {
-        List<PortAttributeSensorAndConfigKey> ports = ImmutableList.of(
-                CassandraNode.GOSSIP_PORT, 
-                CassandraNode.SSL_GOSSIP_PORT, 
-                CassandraNode.THRIFT_PORT, 
-                CassandraNode.NATIVE_TRANSPORT_PORT, 
-                CassandraNode.RMI_REGISTRY_PORT);
-        Map<String, Integer> result = Maps.newLinkedHashMap();
-        for (PortAttributeSensorAndConfigKey key : ports) {
-            result.put(key.getName(), key.getConfigKey().getDefaultValue().iterator().next());
-        }
-        return result;
-    }
-
-    @BeforeMethod(alwaysRun = true)
-    @Override
-    public void setUp() throws Exception {
-        assertCassandraPortsAvailableEventually();
-        super.setUp();
-    }
-    
-    @AfterMethod(alwaysRun=true)
-    @Override
-    public void tearDown() throws Exception {
-        super.tearDown();
-        assertCassandraPortsAvailableEventually();
-    }
-    
-    /**
-     * Test that a node starts and sets SERVICE_UP correctly.
-     */
-    @Test(groups = "Integration")
-    public void canStartupAndShutdown() {
-        cassandra = app.createAndManageChild(EntitySpec.create(CassandraNode.class)
-                .configure("jmxPort", "11099+")
-                .configure("rmiRegistryPort", "19001+"));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(cassandra, Startable.SERVICE_UP, true);
-        Entities.dumpInfo(app);
-
-        cassandra.stop();
-
-        EntityTestUtils.assertAttributeEqualsEventually(cassandra, Startable.SERVICE_UP, false);
-    }
-
-    /**
-     * Test that a keyspace and column family can be created and used with Astyanax client.
-     */
-    @Test(groups = "Integration")
-    public void testConnection() throws Exception {
-        cassandra = app.createAndManageChild(EntitySpec.create(CassandraNode.class)
-                .configure("jmxPort", "11099+")
-                .configure("rmiRegistryPort", "19001+")
-                .configure("thriftPort", "9876+"));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(cassandra, Startable.SERVICE_UP, true);
-
-        AstyanaxSample astyanax = new AstyanaxSample(cassandra);
-        astyanax.astyanaxTest();
-    }
-    
-    /**
-     * Cassandra v2 needs Java >= 1.7. If you have java 6 as the defult locally, then you can use
-     * something like {@code .configure("shell.env", MutableMap.of("JAVA_HOME", "/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home"))}
-     */
-    @Test(groups = "Integration")
-    public void testCassandraVersion2() throws Exception {
-        // TODO In v2.0.10, the bin/cassandra script changed to add an additional check for JMX connectivity.
-        // This causes cassandera script to hang for us (presumably due to the CLASSPATH/JVM_OPTS we're passing
-        // in, regarding JMX agent).
-        // See:
-        //  - https://issues.apache.org/jira/browse/CASSANDRA-7254
-        //  - https://github.com/apache/cassandra/blame/trunk/bin/cassandra#L211-216
-        
-        String version = "2.0.9";
-        String majorMinorVersion = "2.0";
-        
-        cassandra = app.createAndManageChild(EntitySpec.create(CassandraNode.class)
-                .configure(CassandraNode.SUGGESTED_VERSION, version)
-                .configure(CassandraNode.NUM_TOKENS_PER_NODE, 256)
-                .configure("jmxPort", "11099+")
-                .configure("rmiRegistryPort", "19001+"));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(cassandra, Startable.SERVICE_UP, true);
-        Entities.dumpInfo(app);
-
-        AstyanaxSample astyanax = new AstyanaxSample(cassandra);
-        astyanax.astyanaxTest();
-
-        assertEquals(cassandra.getMajorMinorVersion(), majorMinorVersion);
-        
-        Asserts.succeedsEventually(new Runnable() {
-            @Override public void run() {
-                assertNotNull(cassandra.getAttribute(CassandraNode.TOKENS));
-                assertEquals(cassandra.getAttribute(CassandraNode.TOKENS).size(), 256, "tokens="+cassandra.getAttribute(CassandraNode.TOKENS));
-                
-                assertEquals(cassandra.getAttribute(CassandraNode.PEERS), (Integer)256);
-                assertEquals(cassandra.getAttribute(CassandraNode.LIVE_NODE_COUNT), (Integer)1);
-        
-                assertTrue(cassandra.getAttribute(CassandraNode.SERVICE_UP_JMX));
-                assertNotNull(cassandra.getAttribute(CassandraNode.THRIFT_PORT_LATENCY));
-        
-                assertNotNull(cassandra.getAttribute(CassandraNode.READ_PENDING));
-                assertNotNull(cassandra.getAttribute(CassandraNode.READ_ACTIVE));
-                EntityTestUtils.assertAttribute(cassandra, CassandraNode.READ_COMPLETED, MathPredicates.greaterThanOrEqual(1));
-                assertNotNull(cassandra.getAttribute(CassandraNode.WRITE_PENDING));
-                assertNotNull(cassandra.getAttribute(CassandraNode.WRITE_ACTIVE));
-                EntityTestUtils.assertAttribute(cassandra, CassandraNode.WRITE_COMPLETED, MathPredicates.greaterThanOrEqual(1));
-                
-                assertNotNull(cassandra.getAttribute(CassandraNode.READS_PER_SECOND_LAST));
-                assertNotNull(cassandra.getAttribute(CassandraNode.WRITES_PER_SECOND_LAST));
-        
-                assertNotNull(cassandra.getAttribute(CassandraNode.THRIFT_PORT_LATENCY_IN_WINDOW));
-                assertNotNull(cassandra.getAttribute(CassandraNode.READS_PER_SECOND_IN_WINDOW));
-                assertNotNull(cassandra.getAttribute(CassandraNode.WRITES_PER_SECOND_IN_WINDOW));
-                
-                // an example MXBean
-                EntityTestUtils.assertAttribute(cassandra, CassandraNode.MAX_HEAP_MEMORY, MathPredicates.greaterThanOrEqual(1));
-            }});
-
-        cassandra.stop();
-
-        EntityTestUtils.assertAttributeEqualsEventually(cassandra, Startable.SERVICE_UP, false);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeLiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeLiveTest.java
deleted file mode 100644
index cf070bf..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeLiveTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraNode;
-import org.apache.brooklyn.entity.nosql.cassandra.AstyanaxSupport.AstyanaxSample;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.text.Strings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * Cassandra live tests.
- *
- * Test the operation of the {@link CassandraNode} class using the jclouds {@code rackspace-cloudservers-uk}
- * and {@code aws-ec2} providers, with different OS images. The tests use the {@link AstyanaxSupport#astyanaxTest()} method
- * to exercise the node, and will need to have {@code brooklyn.jclouds.provider.identity} and {@code .credential}
- * set, usually in the {@code .brooklyn/bropoklyn.properties} file.
- */
-public class CassandraNodeLiveTest extends AbstractCassandraNodeTest {
-
-    private static final Logger log = LoggerFactory.getLogger(CassandraNodeLiveTest.class);
-
-    @DataProvider(name = "virtualMachineData")
-    public Object[][] provideVirtualMachineData() {
-        return new Object[][] { // ImageId, Provider, Region, Description (for logging)
-            new Object[] { "eu-west-1/ami-0307d674", "aws-ec2", "eu-west-1", "Ubuntu Server 14.04 LTS (HVM), SSD Volume Type" },
-            new Object[] { "LON/f9b690bf-88eb-43c2-99cf-391f2558732e", "rackspace-cloudservers-uk", "", "Ubuntu 12.04 LTS (Precise Pangolin)" }, 
-            new Object[] { "LON/a84b1592-6817-42da-a57c-3c13f3cfc1da", "rackspace-cloudservers-uk", "", "CentOS 6.5 (PVHVM)" }, 
-        };
-    }
-
-    @Test(groups = "Live", dataProvider = "virtualMachineData")
-    protected void testOperatingSystemProvider(String imageId, String provider, String region, String description) throws Exception {
-        log.info("Testing Cassandra on {}{} using {} ({})", new Object[] { provider, Strings.isNonEmpty(region) ? ":" + region : "", description, imageId });
-
-        Map<String, String> properties = MutableMap.of("imageId", imageId);
-        testLocation = app.getManagementContext().getLocationRegistry()
-                .resolve(provider + (Strings.isNonEmpty(region) ? ":" + region : ""), properties);
-
-        cassandra = app.createAndManageChild(EntitySpec.create(CassandraNode.class)
-                .configure("thriftPort", "9876+")
-                .configure("clusterName", "TestCluster"));
-        app.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(cassandra, CassandraNode.SERVICE_UP, true);
-
-        AstyanaxSample astyanax = new AstyanaxSample(cassandra);
-        astyanax.astyanaxTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/NonNegTokenGeneratorTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/NonNegTokenGeneratorTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/NonNegTokenGeneratorTest.java
deleted file mode 100644
index 281ae6d..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/NonNegTokenGeneratorTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import static org.testng.Assert.assertEquals;
-
-import java.math.BigInteger;
-import java.util.List;
-
-import org.apache.brooklyn.entity.nosql.cassandra.TokenGenerators.AbstractTokenGenerator;
-import org.apache.brooklyn.entity.nosql.cassandra.TokenGenerators.NonNeg127TokenGenerator;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-
-public class NonNegTokenGeneratorTest {
-
-    public static final BigInteger C4_1 = new BigInteger("42535295865117307932921825928971026432");
-    public static final BigInteger C4_2 = new BigInteger("85070591730234615865843651857942052864");
-    public static final BigInteger C4_3 = new BigInteger("127605887595351923798765477786913079296");
-
-    // TODO Expect this behaviour to change when we better support dynamically growing/shrinking.
-    // In particular, the expected behaviour for testReturnsNullWhenClusterSizeUnknown 
-    // and testReturnsNullWhenGrowingClusterUnknownAmount will change.
-
-    private AbstractTokenGenerator generator;
-
-    @BeforeMethod(alwaysRun=true)
-    public void setUp() throws Exception {
-        generator = new NonNeg127TokenGenerator();
-    }
-    
-    @Test
-    public void testGetTokenForReplacementNode() {
-        assertEquals(generator.getTokenForReplacementNode(BigInteger.ONE), BigInteger.ZERO);
-        assertEquals(generator.getTokenForReplacementNode(BigInteger.ZERO), generator.max());
-        assertEquals(generator.getTokenForReplacementNode(generator.max()), generator.max().subtract(BigInteger.ONE));
-    }
-    
-    @Test
-    public void testGeneratesInitialTokens() throws Exception {
-        List<BigInteger> tokens = Lists.newArrayList();
-        generator.growingCluster(4);
-        for (int i = 0; i < 4; i++) {
-            tokens.add(generator.newToken());
-        }
-        
-        assertEquals(tokens, ImmutableList.of(
-                BigInteger.ZERO, 
-                C4_1,
-                C4_2,
-                C4_3));
-    }
-    
-    // Expect behaviour to be changed to better choose tokens for growing clusters 
-    // (but eg need to take into account how busy each node is!)
-    @Test
-    public void testGeneratesTokensForGrowingCluster() throws Exception {
-        List<BigInteger> tokens = Lists.newArrayList();
-        generator.growingCluster(4);
-        for (int i = 0; i < 4; i++) {
-            tokens.add(generator.newToken());
-        }
-        generator.growingCluster(1);
-        assertEquals(generator.newToken(), C4_3.add(generator.max().add(BigInteger.ONE)).divide(BigInteger.valueOf(2)));
-        generator.growingCluster(2);
-        assertEquals(generator.newToken(), C4_1.divide(BigInteger.valueOf(2)));
-        assertEquals(generator.newToken(), C4_2.add(C4_1).divide(BigInteger.valueOf(2)));
-    }
-    
-    @Test
-    public void testGeneratesTokensForGrowingClusterWhenInitialSizeIsOne() throws Exception {
-        // initial size 1 has to do a special "average with ourself by half phase shift" computation
-        List<BigInteger> tokens = Lists.newArrayList();
-        generator.growingCluster(1);
-        tokens.add(generator.newToken());
-        
-        generator.growingCluster(1);
-        assertEquals(generator.newToken(), C4_2);
-        generator.growingCluster(2);
-        assertEquals(generator.newToken(), C4_3);
-        assertEquals(generator.newToken(), C4_1);
-    }
-    
-    @Test
-    public void testReturnsNullWhenClusterSizeUnknown() throws Exception {
-        assertEquals(generator.newToken(), null);
-    }
-    
-    @Test
-    public void testReturnsNullWhenGrowingClusterUnknownAmount() throws Exception {
-        generator.growingCluster(4);
-        for (int i = 0; i < 4; i++) {
-            generator.newToken();
-        }
-        assertEquals(generator.newToken(), null);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/PosNegTokenGeneratorTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/PosNegTokenGeneratorTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/PosNegTokenGeneratorTest.java
deleted file mode 100644
index e353f41..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/PosNegTokenGeneratorTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import static org.testng.Assert.assertEquals;
-
-import java.math.BigInteger;
-
-import org.apache.brooklyn.entity.nosql.cassandra.TokenGenerators.AbstractTokenGenerator;
-import org.apache.brooklyn.entity.nosql.cassandra.TokenGenerators.PosNeg63TokenGenerator;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-public class PosNegTokenGeneratorTest {
-
-    // TODO Expect this behaviour to change when we better support dynamically growing/shrinking.
-    // In particular, the expected behaviour for testReturnsNullWhenClusterSizeUnknown 
-    // and testReturnsNullWhenGrowingClusterUnknownAmount will change.
-
-    private AbstractTokenGenerator generator;
-
-    @BeforeMethod(alwaysRun=true)
-    public void setUp() throws Exception {
-        generator = new PosNeg63TokenGenerator();
-    }
-    
-    @Test
-    public void testGetTokenForReplacementNode() {
-        assertEquals(generator.getTokenForReplacementNode(BigInteger.ONE), BigInteger.ZERO);
-        assertEquals(generator.getTokenForReplacementNode(BigInteger.ZERO), BigInteger.ONE.negate());
-        assertEquals(generator.getTokenForReplacementNode(generator.min()), generator.max());
-        assertEquals(generator.getTokenForReplacementNode(generator.max()), generator.max().subtract(BigInteger.ONE));
-    }
-    
-    @Test
-    public void testGeneratesInitialTokens() throws Exception {
-        generator.growingCluster(4);
-        assertEquals(generator.newToken(), generator.min());
-        assertEquals(generator.newToken(), generator.min().add(generator.range().divide(BigInteger.valueOf(4))));
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseOfflineTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseOfflineTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseOfflineTest.java
deleted file mode 100644
index 0d684c1..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseOfflineTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchbase;
-
-import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.location.BasicOsDetails;
-import org.apache.brooklyn.core.location.BasicOsDetails.OsArchs;
-import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
-import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests;
-
-public class CouchbaseOfflineTest {
-
-    private LocalManagementContext mgmt;
-
-    @BeforeMethod
-    public void setUp() {
-        mgmt = LocalManagementContextForTests.newInstance();
-    }
-    
-    @AfterMethod
-    public void tearDown() {
-        Entities.destroyAll(mgmt);
-    }
-    
-    @Test
-    public void testResolvingDownloadLinks() {
-        checkOsTag("linux", OsArchs.I386, "unknown", true, "centos6.x86.rpm");
-        checkOsTag("linux", OsArchs.I386, "unknown", false, "x86.rpm");
-        checkOsTag("rhel", OsArchs.X_86_64, "6", true, "centos6.x86_64.rpm");
-        checkOsTag("Ubuntu 14", OsArchs.X_86_64, "14.04", true, "ubuntu12.04_amd64.deb");
-        checkOsTag("Ubuntu 14", OsArchs.X_86_64, "14.04", false, "x86_64.deb");
-        checkOsTag("Debian 7up", OsArchs.I386, "7ish", true, "debian7_x86.deb");
-        Assert.assertEquals(new CouchbaseNodeSshDriver.DownloadLinkSegmentComputer(null, true, "test").getOsTag(), "centos6.x86_64.rpm");
-        Assert.assertEquals(new CouchbaseNodeSshDriver.DownloadLinkSegmentComputer(null, false, "test").getOsTag(), "x86_64.rpm");
-    }
-
-    protected void checkOsTag(String os, String arch, String version, boolean isV30, String expectedTag) {
-        Assert.assertEquals(new CouchbaseNodeSshDriver.DownloadLinkSegmentComputer(new BasicOsDetails(os, arch, version), isV30, "test").getOsTag(), expectedTag);
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayEc2LiveTest.java
deleted file mode 100644
index 421dc85..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayEc2LiveTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchbase;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public class CouchbaseSyncGatewayEc2LiveTest extends AbstractEc2LiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        CouchbaseCluster cluster = app.createAndManageChild(EntitySpec.create(CouchbaseCluster.class)
-            .configure(CouchbaseNode.COUCHBASE_ADMIN_USERNAME, "Administrator")
-            .configure(CouchbaseNode.COUCHBASE_ADMIN_PASSWORD, "Password")
-            .configure(DynamicCluster.INITIAL_SIZE, 3)
-            .configure(CouchbaseCluster.CREATE_BUCKETS, (List<Map<String,Object>>)ImmutableList.of(
-                (Map<String,Object>)ImmutableMap.<String, Object>of(
-                    "bucket", "default",
-                    "bucket-ramsize", 100,
-                    "bucket-type", "couchbase",
-                    "bucket-port", 11211
-                ),
-                (Map<String,Object>)ImmutableMap.<String, Object>of(
-                    "bucket", "my_bucket",
-                    "bucket-ramsize", 100,
-                    "bucket-type", "couchbase",
-                    "bucket-port", 11223
-                ),
-                (Map<String,Object>)ImmutableMap.<String, Object>of(
-                    "bucket", "another",
-                    "bucket-ramsize", 100,
-                    "bucket-type", "couchbase",
-                    "bucket-port", 11224
-                ))
-            )
-        );
-        CouchbaseSyncGateway gateway = app.createAndManageChild(EntitySpec.create(CouchbaseSyncGateway.class)
-            .configure(CouchbaseSyncGateway.COUCHBASE_SERVER, cluster)
-            .configure(CouchbaseSyncGateway.COUCHBASE_SERVER_BUCKET, "my_bucket")
-        );
-        
-        app.start(ImmutableList.of(loc));
-        
-        EntityTestUtils.assertAttributeEqualsEventually(gateway, Startable.SERVICE_UP, true);
-    }
-    
-    
-    // Supported operating systems
-    @Test(groups = {"Live"})
-    @Override
-    public void test_Ubuntu_12_0() throws Exception {
-        super.test_Ubuntu_12_0();
-    }
-    
-    @Test(groups = {"Live"})
-    @Override
-    public void test_Red_Hat_Enterprise_Linux_6() throws Exception {
-        super.test_Red_Hat_Enterprise_Linux_6();
-    }
-    
-    @Test(groups = {"Live"})
-    @Override
-    public void test_CentOS_6_3() throws Exception {
-        super.test_CentOS_6_3();
-    }
-    
-    // Unsupported operating systems
-    
-    @Test(groups = {"Live"})
-    @Override
-    public void test_CentOS_5() throws Exception {
-        // Unsupported
-        // error: Failed dependencies:
-        //     libc.so.6(GLIBC_2.7)(64bit) is needed by couchbase-server-2.5.1-1083.x86_64
-        //        libcrypto.so.10()(64bit) is needed by couchbase-server-2.5.1-1083.x86_64
-        //        libreadline.so.6()(64bit) is needed by couchbase-server-2.5.1-1083.x86_64
-        //        libssl.so.10()(64bit) is needed by couchbase-server-2.5.1-1083.x86_64
-        //        libstdc++.so.6(GLIBCXX_3.4.10)(64bit) is needed by couchbase-server-2.5.1-1083.x86_64
-        //        libstdc++.so.6(GLIBCXX_3.4.11)(64bit) is needed by couchbase-server-2.5.1-1083.x86_64
-        //        libstdc++.so.6(GLIBCXX_3.4.9)(64bit) is needed by couchbase-server-2.5.1-1083.x86_64
-        //        libtinfo.so.5()(64bit) is needed by couchbase-server-2.5.1-1083.x86_64
-        //        openssl >= 1.0.0 is needed by couchbase-server-2.5.1-1083.x86_64
-        //        rpmlib(FileDigests) <= 4.6.0-1 is needed by couchbase-server-2.5.1-1083.x86_64
-        //        rpmlib(PayloadIsXz) <= 5.2-1 is needed by couchbase-server-2.5.1-1083.x86_64
-    }
-    
-    @Test(groups = {"Live"})
-    @Override
-    public void test_Debian_6() throws Exception {
-        // Unsupported
-    }
-    
-    @Test(groups = {"Live"})
-    @Override
-    public void test_Debian_7_2() throws Exception {
-        // Unsupported
-    }
-    
-    @Test(groups = {"Live"})
-    @Override
-    public void test_Ubuntu_10_0() throws Exception {
-        // Unsupported
-        // Installing cannot proceed since the package 'libssl1*' is missing. 
-        // Please install libssl1* and try again. 
-        //    $sudo apt-get install libssl1*
-        //
-        // Installing libssl1* doesn't fix the issue
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/AbstractCouchDBNodeTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/AbstractCouchDBNodeTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/AbstractCouchDBNodeTest.java
deleted file mode 100644
index 22d4bc6..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/AbstractCouchDBNodeTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchdb;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-/**
- * CouchDB test framework for integration and live tests.
- */
-public class AbstractCouchDBNodeTest {
-
-    private static final Logger log = LoggerFactory.getLogger(AbstractCouchDBNodeTest.class);
-
-    protected TestApplication app;
-    protected Location testLocation;
-    protected CouchDBNode couchdb;
-
-    @BeforeMethod(alwaysRun = true)
-    public void setup() throws Exception {
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-        testLocation = new LocalhostMachineProvisioningLocation();
-        // testLocation = app.managementContext.locationRegistry.resolve("named:test");
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void shutdown() {
-        Entities.destroyAll(app.getManagementContext());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBClusterLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBClusterLiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBClusterLiveTest.java
deleted file mode 100644
index cfa4ad3..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBClusterLiveTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchdb;
-
-import static org.testng.Assert.assertEquals;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-
-/**
- * A live test of the {@link CouchDBCluster} entity.
- *
- * Tests that a two node cluster can be started on Amazon EC2 and data written on one {@link CouchDBNode}
- * can be read from another, using the Astyanax API.
- */
-public class CouchDBClusterLiveTest {
-
-    // private String provider = "rackspace-cloudservers-uk";
-    private String provider = "aws-ec2:eu-west-1";
-
-    protected TestApplication app;
-    protected Location testLocation;
-    protected CouchDBCluster cluster;
-
-    @BeforeMethod(alwaysRun = true)
-    public void setup() {
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-        testLocation = app.getManagementContext().getLocationRegistry().resolve(provider);
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void shutdown() {
-        Entities.destroyAll(app.getManagementContext());
-    }
-
-    /**
-     * Test that a two node cluster starts up and allows access via the Astyanax API through both nodes.
-     */
-    @Test(groups = "Live")
-    public void canStartupAndShutdown() throws Exception {
-        cluster = app.createAndManageChild(EntitySpec.create(CouchDBCluster.class)
-                .configure("initialSize", 2)
-                .configure("clusterName", "AmazonCluster"));
-        assertEquals(cluster.getCurrentSize().intValue(), 0);
-
-        app.start(ImmutableList.of(testLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, CouchDBCluster.GROUP_SIZE, 2);
-        Entities.dumpInfo(app);
-
-        CouchDBNode first = (CouchDBNode) Iterables.get(cluster.getMembers(), 0);
-        CouchDBNode second = (CouchDBNode) Iterables.get(cluster.getMembers(), 1);
-
-        EntityTestUtils.assertAttributeEqualsEventually(first, Startable.SERVICE_UP, true);
-        EntityTestUtils.assertAttributeEqualsEventually(second, Startable.SERVICE_UP, true);
-
-        JcouchdbSupport jcouchdbFirst = new JcouchdbSupport(first);
-        JcouchdbSupport jcouchdbSecond = new JcouchdbSupport(second);
-        jcouchdbFirst.jcouchdbTest();
-        jcouchdbSecond.jcouchdbTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeEc2LiveTest.java
deleted file mode 100644
index 7534a96..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeEc2LiveTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchdb;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.ImmutableList;
-
-public class CouchDBNodeEc2LiveTest extends AbstractEc2LiveTest {
-
-    private static final Logger log = LoggerFactory.getLogger(CouchDBNodeEc2LiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        log.info("Testing Cassandra on {}", loc);
-
-        CouchDBNode couchdb = app.createAndManageChild(EntitySpec.create(CouchDBNode.class)
-                .configure("httpPort", "8000+"));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(couchdb, Startable.SERVICE_UP, true);
-
-        JcouchdbSupport jcouchdb = new JcouchdbSupport(couchdb);
-        jcouchdb.jcouchdbTest();
-    }
-}


[11/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardClusterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardClusterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardClusterImpl.java
deleted file mode 100644
index e0c0f35..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardClusterImpl.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import java.net.UnknownHostException;
-import java.util.Collection;
-import java.util.Set;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.group.DynamicClusterImpl;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBClientSupport;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBReplicaSet;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBServer;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Stopwatch;
-import com.google.common.collect.Sets;
-
-public class MongoDBShardClusterImpl extends DynamicClusterImpl implements MongoDBShardCluster {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBShardClusterImpl.class);
-    
-    // TODO: Need to use attributes for this in order to support brooklyn restart 
-    private Set<Entity> addedMembers = Sets.newConcurrentHashSet();
-
-    // TODO: Need to use attributes for this in order to support brooklyn restart 
-    private Set<Entity> addingMembers = Sets.newConcurrentHashSet();
-
-    /**
-     * For shard addition and removal.
-     * Used for retrying.
-     * 
-     * TODO Should use ExecutionManager.
-     */
-    private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
-
-    @Override
-    protected EntitySpec<?> getMemberSpec() {
-        EntitySpec<?> result = super.getMemberSpec();
-        if (result == null)
-            result = EntitySpec.create(MongoDBReplicaSet.class);
-        result.configure(DynamicClusterImpl.INITIAL_SIZE, getConfig(MongoDBShardedDeployment.SHARD_REPLICASET_SIZE));
-        return result;
-    }
-
-    @Override
-    public void start(Collection<? extends Location> locations) {
-        subscriptions().subscribeToMembers(this, Startable.SERVICE_UP, new SensorEventListener<Boolean>() {
-            public void onEvent(SensorEvent<Boolean> event) {
-                addShards();
-            }
-        });
-
-        super.start(locations);
-        
-        MongoDBRouterCluster routers = getParent().getAttribute(MongoDBShardedDeployment.ROUTER_CLUSTER);
-        subscriptions().subscribe(routers, MongoDBRouterCluster.ANY_RUNNING_ROUTER, new SensorEventListener<MongoDBRouter>() {
-            public void onEvent(SensorEvent<MongoDBRouter> event) {
-                if (event.getValue() != null)
-                    addShards();
-            }
-        });
-    }
-
-    @Override
-    public void stop() {
-        // TODO Note that after this the executor will not run if the set is restarted.
-        executor.shutdownNow();
-        super.stop();
-    }
-    
-    @Override
-    public void onManagementStopped() {
-        super.onManagementStopped();
-        executor.shutdownNow();
-    }
-
-    protected void addShards() {
-        MongoDBRouter router = getParent().getAttribute(MongoDBShardedDeployment.ROUTER_CLUSTER).getAttribute(MongoDBRouterCluster.ANY_RUNNING_ROUTER);
-        if (router == null) {
-            if (LOG.isTraceEnabled()) LOG.trace("Not adding shards because no running router in {}", this);
-            return;
-        }
-        
-        for (Entity member : this.getMembers()) {
-            if (member.getAttribute(Startable.SERVICE_UP) && !addingMembers.contains(member)) {
-                LOG.info("{} adding shard {}", new Object[] {MongoDBShardClusterImpl.this, member});
-                addingMembers.add(member);
-                addShardAsync(member);
-            }
-        }
-    }
-    
-    protected void addShardAsync(final Entity replicaSet) {
-        final Duration timeout = Duration.minutes(20);
-        final Stopwatch stopwatch = Stopwatch.createStarted();
-        final AtomicInteger attempts = new AtomicInteger();
-        
-        // TODO Don't use executor, use ExecutionManager; but following pattern in MongoDBReplicaSetImpl for now.
-        executor.submit(new Runnable() {
-            @Override
-            public void run() {
-                boolean reschedule;
-                MongoDBRouter router = getParent().getAttribute(MongoDBShardedDeployment.ROUTER_CLUSTER).getAttribute(MongoDBRouterCluster.ANY_RUNNING_ROUTER);
-                if (router == null) {
-                    LOG.debug("Rescheduling adding shard {} because no running router for cluster {}", replicaSet, this);
-                    reschedule = true;
-                } else {
-                    MongoDBClientSupport client;
-                    try {
-                        client = MongoDBClientSupport.forServer(router);
-                    } catch (UnknownHostException e) {
-                        throw Exceptions.propagate(e);
-                    }
-
-                    try {
-                        MongoDBServer primary = replicaSet.getAttribute(MongoDBReplicaSet.PRIMARY_ENTITY);
-                        if (primary != null) {
-                            String addr = String.format("%s:%d", primary.getAttribute(MongoDBServer.SUBNET_HOSTNAME), primary.getAttribute(MongoDBServer.PORT));
-                            String replicaSetURL = ((MongoDBReplicaSet) replicaSet).getName() + "/" + addr;
-                            boolean added = client.addShardToRouter(replicaSetURL);
-                            if (added) {
-                                LOG.info("{} added shard {} via {}", new Object[]{MongoDBShardClusterImpl.this, replicaSetURL, router});
-                                addedMembers.add(replicaSet);
-                                reschedule = false;
-                            } else {
-                                LOG.debug("Rescheduling addition of shard {} because add failed via router {}", replicaSetURL, router);
-                                reschedule = true;
-                            }
-                        } else {
-                            LOG.debug("Rescheduling addition of shard {} because primary is null", replicaSet);
-                            reschedule = true;
-                        }
-                    } catch (Exception e) {
-                        LOG.error("Failed to add shard to router {}:  ", router,  e);
-                        throw Exceptions.propagate(e);
-                    }
-                }
-                
-                if (reschedule) {
-                    int numAttempts = attempts.incrementAndGet();
-                    if (numAttempts > 1 && timeout.toMilliseconds() > stopwatch.elapsed(TimeUnit.MILLISECONDS)) {
-                        executor.schedule(this, 3, TimeUnit.SECONDS);
-                    } else {
-                        LOG.warn("Timeout after {} attempts ({}) adding shard {}; aborting", 
-                                new Object[] {numAttempts, Time.makeTimeStringRounded(stopwatch), replicaSet});
-                        addingMembers.remove(replicaSet);
-                    }
-                }
-            }
-        });
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeployment.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeployment.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeployment.java
deleted file mode 100644
index d48313c..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeployment.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.entity.Group;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBReplicaSet;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBServer;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.reflect.TypeToken;
-
-@Catalog(name="MongoDB Sharded Deployment",
-        description="MongoDB (from \"humongous\") is a scalable, high-performance, open source NoSQL database",
-        iconUrl="classpath:///mongodb-logo.png")
-@ImplementedBy(MongoDBShardedDeploymentImpl.class)
-public interface MongoDBShardedDeployment extends Entity, Startable {
-    @SetFromFlag("configClusterSize")
-    ConfigKey<Integer> CONFIG_CLUSTER_SIZE = ConfigKeys.newIntegerConfigKey("mongodb.config.cluster.size", 
-            "Number of config servers", 3);
-    
-    @SetFromFlag("initialRouterClusterSize")
-    ConfigKey<Integer> INITIAL_ROUTER_CLUSTER_SIZE = ConfigKeys.newIntegerConfigKey("mongodb.router.cluster.initial.size", 
-            "Initial number of routers (mongos)", 0);
-    
-    @SetFromFlag("initialShardClusterSize")
-    ConfigKey<Integer> INITIAL_SHARD_CLUSTER_SIZE = ConfigKeys.newIntegerConfigKey("mongodb.shard.cluster.initial.size", 
-            "Initial number of shards (replicasets)", 2);
-    
-    @SetFromFlag("shardReplicaSetSize")
-    ConfigKey<Integer> SHARD_REPLICASET_SIZE = ConfigKeys.newIntegerConfigKey("mongodb.shard.replicaset.size", 
-            "Number of servers (mongod) in each shard (replicaset)", 3);
-    
-    @SetFromFlag("routerUpTimeout")
-    ConfigKey<Duration> ROUTER_UP_TIMEOUT = ConfigKeys.newConfigKey(Duration.class, "mongodb.router.up.timeout", 
-            "Maximum time to wait for the routers to become available before adding the shards", Duration.FIVE_MINUTES);
-    
-    @SetFromFlag("coLocatedRouterGroup")
-    ConfigKey<Group> CO_LOCATED_ROUTER_GROUP = ConfigKeys.newConfigKey(Group.class, "mongodb.colocated.router.group", 
-            "Group to be monitored for the addition of new CoLocatedMongoDBRouter entities");
-    
-    @SuppressWarnings("serial")
-    ConfigKey<EntitySpec<?>> MONGODB_ROUTER_SPEC = ConfigKeys.newConfigKey(
-            new TypeToken<EntitySpec<?>>() {},
-            "mongodb.router.spec", 
-            "Spec for Router instances",
-            EntitySpec.create(MongoDBRouter.class));
-
-    @SuppressWarnings("serial")
-    ConfigKey<EntitySpec<?>> MONGODB_REPLICA_SET_SPEC = ConfigKeys.newConfigKey(
-            new TypeToken<EntitySpec<?>>() {},
-            "mongodb.replicaset.spec", 
-            "Spec for Replica Set",
-            EntitySpec.create(MongoDBReplicaSet.class)
-                    .configure(MongoDBReplicaSet.MEMBER_SPEC, EntitySpec.create(MongoDBServer.class)));
-
-    @SuppressWarnings("serial")
-    ConfigKey<EntitySpec<?>> MONGODB_CONFIG_SERVER_SPEC = ConfigKeys.newConfigKey(
-            new TypeToken<EntitySpec<?>>() {},
-            "mongodb.configserver.spec", 
-            "Spec for Config Server instances",
-            EntitySpec.create(MongoDBConfigServer.class));
-
-    public static AttributeSensor<MongoDBConfigServerCluster> CONFIG_SERVER_CLUSTER = Sensors.newSensor(
-            MongoDBConfigServerCluster.class, "mongodbshardeddeployment.configservers", "Config servers");
-    public static AttributeSensor<MongoDBRouterCluster> ROUTER_CLUSTER = Sensors.newSensor(
-            MongoDBRouterCluster.class, "mongodbshardeddeployment.routers", "Routers");
-    
-    public static AttributeSensor<MongoDBShardCluster> SHARD_CLUSTER = Sensors.newSensor(
-            MongoDBShardCluster.class, "mongodbshardeddeployment.shards", "Shards");
-    
-    public MongoDBConfigServerCluster getConfigCluster();
-    
-    public MongoDBRouterCluster getRouterCluster();
-    
-    public MongoDBShardCluster getShardCluster();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeploymentImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeploymentImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeploymentImpl.java
deleted file mode 100644
index 05ab66c..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeploymentImpl.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.attributeWhenReady;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.core.entity.AbstractEntity;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic.ServiceNotUpLogic;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.group.AbstractMembershipTrackingPolicy;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBAuthenticationMixins;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBAuthenticationUtils;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public class MongoDBShardedDeploymentImpl extends AbstractEntity implements MongoDBShardedDeployment, MongoDBAuthenticationMixins {
-    
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBShardedDeploymentImpl.class);
-    
-    @Override
-    public void init() {
-        super.init();
-
-        EntitySpec<MongoDBConfigServerCluster> configServerClusterSpec = EntitySpec.create(MongoDBConfigServerCluster.class)
-                .configure(MongoDBConfigServerCluster.MEMBER_SPEC, getConfig(MONGODB_CONFIG_SERVER_SPEC))
-                .configure(DynamicCluster.INITIAL_SIZE, getConfig(CONFIG_CLUSTER_SIZE));
-        MongoDBAuthenticationUtils.setAuthenticationConfig(configServerClusterSpec, this);
-        sensors().set(CONFIG_SERVER_CLUSTER, addChild(configServerClusterSpec));
-
-        EntitySpec<MongoDBRouterCluster> routerClusterSpec = EntitySpec.create(MongoDBRouterCluster.class)
-                .configure(MongoDBRouterCluster.MEMBER_SPEC, getConfig(MONGODB_ROUTER_SPEC))
-                .configure(DynamicCluster.INITIAL_SIZE, getConfig(INITIAL_ROUTER_CLUSTER_SIZE))
-                .configure(MongoDBRouter.CONFIG_SERVERS, attributeWhenReady(getAttribute(CONFIG_SERVER_CLUSTER), MongoDBConfigServerCluster.CONFIG_SERVER_ADDRESSES));
-        MongoDBAuthenticationUtils.setAuthenticationConfig(routerClusterSpec, this);
-        sensors().set(ROUTER_CLUSTER, addChild(routerClusterSpec));
-
-        EntitySpec<MongoDBShardCluster> shardClusterSpec = EntitySpec.create(MongoDBShardCluster.class)
-                .configure(MongoDBShardCluster.MEMBER_SPEC, getConfig(MONGODB_REPLICA_SET_SPEC))
-                .configure(DynamicCluster.INITIAL_SIZE, getConfig(INITIAL_SHARD_CLUSTER_SIZE));
-        MongoDBAuthenticationUtils.setAuthenticationConfig(shardClusterSpec, this);
-        sensors().set(SHARD_CLUSTER, addChild(shardClusterSpec));
-
-        enrichers().add(Enrichers.builder()
-                .propagating(MongoDBConfigServerCluster.CONFIG_SERVER_ADDRESSES)
-                .from(getAttribute(CONFIG_SERVER_CLUSTER))
-                .build());
-
-        // Advertise even if default are used (root password is set in MongoDBAuthenticationUtils)
-        sensors().set(MongoDBAuthenticationMixins.AUTHENTICATION_DATABASE, config().get(MongoDBAuthenticationMixins.AUTHENTICATION_DATABASE));
-        sensors().set(MongoDBAuthenticationMixins.ROOT_USERNAME, config().get(MongoDBAuthenticationMixins.ROOT_USERNAME));
-
-        ServiceNotUpLogic.updateNotUpIndicator(this, Attributes.SERVICE_STATE_ACTUAL, "stopped");
-    }
-
-    @Override
-    public void start(Collection<? extends Location> locations) {
-        ServiceStateLogic.setExpectedState(this, Lifecycle.STARTING);
-        try {
-            final MongoDBRouterCluster routers = getAttribute(ROUTER_CLUSTER);
-            final MongoDBShardCluster shards = getAttribute(SHARD_CLUSTER);
-            List<DynamicCluster> clusters = ImmutableList.of(getAttribute(CONFIG_SERVER_CLUSTER), routers, shards);
-            Entities.invokeEffectorList(this, clusters, Startable.START, ImmutableMap.of("locations", locations))
-                    .get();
-
-            if (getConfigRaw(MongoDBShardedDeployment.CO_LOCATED_ROUTER_GROUP, true).isPresent()) {
-                policies().add(PolicySpec.create(ColocatedRouterTrackingPolicy.class)
-                        .displayName("Co-located router tracker")
-                        .configure("group", getConfig(MongoDBShardedDeployment.CO_LOCATED_ROUTER_GROUP)));
-            }
-
-            ServiceNotUpLogic.clearNotUpIndicator(this, Attributes.SERVICE_STATE_ACTUAL);
-            ServiceStateLogic.setExpectedState(this, Lifecycle.RUNNING);
-        } catch (Exception e) {
-            ServiceStateLogic.setExpectedState(this, Lifecycle.ON_FIRE);
-            // no need to log here; the effector invocation should do that
-            throw Exceptions.propagate(e);
-        }
-    }
-
-    public static class ColocatedRouterTrackingPolicy extends AbstractMembershipTrackingPolicy {
-        @Override
-        protected void onEntityAdded(Entity member) {
-            MongoDBAuthenticationUtils.setAuthenticationConfig(member, entity);
-            MongoDBRouterCluster cluster = entity.getAttribute(ROUTER_CLUSTER);
-            cluster.addMember(member.getAttribute(CoLocatedMongoDBRouter.ROUTER));
-        }
-        @Override
-        protected void onEntityRemoved(Entity member) {
-            MongoDBRouterCluster cluster = entity.getAttribute(ROUTER_CLUSTER);
-            cluster.removeMember(member.getAttribute(CoLocatedMongoDBRouter.ROUTER));
-        }
-    }
-
-    @Override
-    public void stop() {
-        ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPING);
-        try {
-            Entities.invokeEffectorList(this, ImmutableList.of(getAttribute(CONFIG_SERVER_CLUSTER), getAttribute(ROUTER_CLUSTER), 
-                    getAttribute(SHARD_CLUSTER)), Startable.STOP).get();
-        } catch (Exception e) {
-            ServiceStateLogic.setExpectedState(this, Lifecycle.ON_FIRE);
-            throw Exceptions.propagate(e);
-        }
-        ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPED);
-        ServiceNotUpLogic.updateNotUpIndicator(this, Attributes.SERVICE_STATE_ACTUAL, "stopped");
-    }
-    
-    @Override
-    public void restart() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public MongoDBConfigServerCluster getConfigCluster() {
-        return getAttribute(CONFIG_SERVER_CLUSTER);
-    }
-
-    @Override
-    public MongoDBRouterCluster getRouterCluster() {
-        return getAttribute(ROUTER_CLUSTER);
-    }
-
-    @Override
-    public MongoDBShardCluster getShardCluster() {
-        return getAttribute(SHARD_CLUSTER);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisCluster.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisCluster.java
deleted file mode 100644
index bc80a96..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisCluster.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-
-/**
- * A cluster of {@link RedisStore}s with one master and a group of slaves.
- *
- * The slaves are contained in a {@link DynamicCluster} which can be resized by a policy if required.
- *
- * TODO add sensors with aggregated Redis statistics from cluster
- */
-@Catalog(name="Redis Cluster", description="Redis is an open-source, networked, in-memory, key-value data store with optional durability", iconUrl="classpath:///redis-logo.png")
-@ImplementedBy(RedisClusterImpl.class)
-public interface RedisCluster extends Entity, Startable {
-    
-    public RedisStore getMaster();
-    
-    public DynamicCluster getSlaves();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisClusterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisClusterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisClusterImpl.java
deleted file mode 100644
index 8d847e7..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisClusterImpl.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.mgmt.Task;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.entity.AbstractEntity;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic.ComputeServiceIndicatorsFromChildrenAndMembers;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic.ServiceProblemsLogic;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.collections.QuorumCheck.QuorumChecks;
-import org.apache.brooklyn.util.exceptions.CompoundRuntimeException;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
-
-public class RedisClusterImpl extends AbstractEntity implements RedisCluster {
-
-    private static final AttributeSensor<RedisStore> MASTER = Sensors.newSensor(RedisStore.class, "redis.master");
-    private static final AttributeSensor<DynamicCluster> SLAVES = Sensors.newSensor(DynamicCluster.class, "redis.slaves");
-
-    public RedisClusterImpl() {
-    }
-
-    @Override
-    public RedisStore getMaster() {
-        return getAttribute(MASTER);
-    }
-    
-    @Override
-    public DynamicCluster getSlaves() {
-        return getAttribute(SLAVES);
-    }
-
-    @Override
-    public void init() {
-        super.init();
-
-        RedisStore master = addChild(EntitySpec.create(RedisStore.class));
-        sensors().set(MASTER, master);
-
-        DynamicCluster slaves = addChild(EntitySpec.create(DynamicCluster.class)
-                .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(RedisSlave.class).configure(RedisSlave.MASTER, master)
-                .configure(SoftwareProcess.CUSTOMIZE_LATCH, DependentConfiguration.attributeWhenReady(master, Attributes.SERVICE_UP))));
-        sensors().set(SLAVES, slaves);
-
-        enrichers().add(Enrichers.builder()
-                .propagating(RedisStore.HOSTNAME, RedisStore.ADDRESS, RedisStore.SUBNET_HOSTNAME, RedisStore.SUBNET_ADDRESS, RedisStore.REDIS_PORT)
-                .from(master)
-                .build());
-    }
-
-    @Override
-    protected void initEnrichers() {
-        super.initEnrichers();
-        ServiceStateLogic.newEnricherFromChildrenUp().
-            checkChildrenOnly().
-            requireUpChildren(QuorumChecks.all()).
-            configure(ComputeServiceIndicatorsFromChildrenAndMembers.IGNORE_ENTITIES_WITH_THESE_SERVICE_STATES, ImmutableSet.<Lifecycle>of()).
-            addTo(this);
-    }
-    
-    @Override
-    public void start(Collection<? extends Location> locations) {
-        ServiceStateLogic.setExpectedState(this, Lifecycle.STARTING);
-        ServiceProblemsLogic.clearProblemsIndicator(this, START);
-        try {
-            doStart(locations);
-            ServiceStateLogic.setExpectedState(this, Lifecycle.RUNNING);
-        } catch (Exception e) {
-            ServiceProblemsLogic.updateProblemsIndicator(this, START, "Start failed with error: "+e);
-            ServiceStateLogic.setExpectedState(this, Lifecycle.ON_FIRE);
-            throw Exceptions.propagate(e);
-        }
-    }
-
-    private void doStart(Collection<? extends Location> locations) {
-        // Start the master and slaves asynchronously (the slave has a LAUNCH_LATCH on master to ensure it is available before the slaves are launched)
-        Task<Void> masterStartTask = getMaster().invoke(RedisStore.START, ImmutableMap.<String, Object>of("locations", ImmutableList.copyOf(locations)));
-        Task<Void> slaveStartTask = getSlaves().invoke(DynamicCluster.START, ImmutableMap.<String, Object>of("locations", ImmutableList.copyOf(locations)));
-
-        // Wait for both master and slave to start before returning
-        masterStartTask.getUnchecked();
-        slaveStartTask.getUnchecked();
-    }
-
-    @Override
-    public void stop() {
-        ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPING);
-        try {
-            doStop();
-            ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPED);
-        } catch (Exception e) {
-            ServiceProblemsLogic.updateProblemsIndicator(this, STOP, "Stop failed with error: "+e);
-            ServiceStateLogic.setExpectedState(this, Lifecycle.ON_FIRE);
-            throw Exceptions.propagate(e);
-        }
-    }
-
-    private void doStop() {
-        StringBuilder message = new StringBuilder();
-        List<Exception> exceptions = Lists.newLinkedList();
-
-        try {
-            getSlaves().invoke(DynamicCluster.STOP, ImmutableMap.<String, Object>of()).getUnchecked();
-        } catch (Exception e) {
-            message.append("Failed to stop Redis slaves");
-            exceptions.add(e);
-        }
-
-        try {
-            getMaster().invoke(RedisStore.STOP, ImmutableMap.<String, Object>of()).getUnchecked();
-        } catch (Exception e) {
-            message.append((message.length() == 0) ? "Failed to stop Redis master" : " and master");
-            exceptions.add(e);
-        }
-
-        if (!exceptions.isEmpty()) {
-            throw new CompoundRuntimeException(message.toString(), exceptions);
-        }
-    }
-
-    @Override
-    public void restart() {
-        throw new UnsupportedOperationException();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisShard.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisShard.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisShard.java
deleted file mode 100644
index 4d50d90..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisShard.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-
-@ImplementedBy(RedisShardImpl.class)
-public interface RedisShard extends Entity {
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisShardImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisShardImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisShardImpl.java
deleted file mode 100644
index ff01869..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisShardImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import org.apache.brooklyn.core.entity.AbstractEntity;
-
-public class RedisShardImpl extends AbstractEntity implements RedisShard {
-    public RedisShardImpl() {
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisSlave.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisSlave.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisSlave.java
deleted file mode 100644
index d3882c2..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisSlave.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * A {@link RedisStore} configured as a slave.
- */
-@ImplementedBy(RedisSlaveImpl.class)
-public interface RedisSlave extends RedisStore {
-
-    @SetFromFlag("master")
-    ConfigKey<RedisStore> MASTER = new BasicConfigKey<RedisStore>(RedisStore.class, "redis.master", "Redis master");
-
-    @SetFromFlag("redisConfigTemplateUrl")
-    ConfigKey<String> REDIS_CONFIG_TEMPLATE_URL = new BasicConfigKey<String>(
-            String.class, "redis.config.templateUrl", "Template file (in freemarker format) for the redis.conf config file", 
-            "classpath://org/apache/brooklyn/entity/nosql/redis/slave.conf");
-
-    RedisStore getMaster();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisSlaveImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisSlaveImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisSlaveImpl.java
deleted file mode 100644
index b58ce7d..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisSlaveImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-
-/**
- * A {@link RedisStore} configured as a slave.
- */
-public class RedisSlaveImpl extends RedisStoreImpl implements RedisSlave {
-
-    public RedisSlaveImpl() {
-    }
-
-    @Override
-    public RedisStore getMaster() {
-        return getConfig(MASTER);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStore.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStore.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStore.java
deleted file mode 100644
index 64c0344..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStore.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.ResourcePredicates;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * An entity that represents a Redis key-value store service.
- */
-@Catalog(name="Redis Server", description="Redis is an open-source, networked, in-memory, key-value data store with optional durability", iconUrl="classpath:///redis-logo.png")
-@ImplementedBy(RedisStoreImpl.class)
-public interface RedisStore extends SoftwareProcess {
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION =
-            ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "2.8.4");
-
-    @SetFromFlag("downloadUrl")
-    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "http://download.redis.io/releases/redis-${version}.tar.gz");
-
-    @SetFromFlag("redisPort")
-    PortAttributeSensorAndConfigKey REDIS_PORT = new PortAttributeSensorAndConfigKey("redis.port", "Redis port number", "6379+");
-
-    @SetFromFlag("redisConfigTemplateUrl")
-    ConfigKey<String> REDIS_CONFIG_TEMPLATE_URL = ConfigKeys.builder(String.class)
-            .name("redis.config.templateUrl")
-            .description("Template file (in freemarker format) for the redis.conf config file")
-            .defaultValue("classpath://org/apache/brooklyn/entity/nosql/redis/redis.conf")
-            .constraint(ResourcePredicates.urlExists())
-            .build();
-
-    AttributeSensor<Integer> UPTIME = Sensors.newIntegerSensor("redis.uptime", "Redis uptime in seconds");
-
-    // See http://redis.io/commands/info for details of all information available
-    AttributeSensor<Integer> TOTAL_CONNECTIONS_RECEIVED = Sensors.newIntegerSensor("redis.connections.received.total", "Total number of connections accepted by the server");
-    AttributeSensor<Integer> TOTAL_COMMANDS_PROCESSED = Sensors.newIntegerSensor("redis.commands.processed.total", "Total number of commands processed by the server");
-    AttributeSensor<Integer> EXPIRED_KEYS = Sensors.newIntegerSensor("redis.keys.expired", "Total number of key expiration events");
-    AttributeSensor<Integer> EVICTED_KEYS = Sensors.newIntegerSensor("redis.keys.evicted", "Number of evicted keys due to maxmemory limit");
-    AttributeSensor<Integer> KEYSPACE_HITS = Sensors.newIntegerSensor("redis.keyspace.hits", "Number of successful lookup of keys in the main dictionary");
-    AttributeSensor<Integer> KEYSPACE_MISSES = Sensors.newIntegerSensor("redis.keyspace.misses", "Number of failed lookup of keys in the main dictionary");
-
-    String getAddress();
-
-    Integer getRedisPort();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStoreDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStoreDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStoreDriver.java
deleted file mode 100644
index 63424ba..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStoreDriver.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface RedisStoreDriver extends SoftwareProcessDriver {
-
-    String getRunDir();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStoreImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStoreImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStoreImpl.java
deleted file mode 100644
index 2fed9b1..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStoreImpl.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import java.util.concurrent.TimeUnit;
-
-import javax.annotation.Nullable;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.location.MachineLocation;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.ssh.SshFeed;
-import org.apache.brooklyn.feed.ssh.SshPollConfig;
-import org.apache.brooklyn.feed.ssh.SshPollValue;
-import org.apache.brooklyn.feed.ssh.SshValueFunctions;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-import com.google.common.base.Optional;
-import com.google.common.base.Predicates;
-import com.google.common.base.Splitter;
-import com.google.common.collect.Iterables;
-
-/**
- * An entity that represents a Redis key-value store service.
- */
-public class RedisStoreImpl extends SoftwareProcessImpl implements RedisStore {
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(RedisStoreImpl.class);
-
-    private transient SshFeed sshFeed;
-
-    public RedisStoreImpl() {
-    }
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-
-        connectServiceUpIsRunning();
-
-        // Find an SshMachineLocation for the UPTIME feed
-        Optional<Location> location = Iterables.tryFind(getLocations(), Predicates.instanceOf(SshMachineLocation.class));
-        if (!location.isPresent()) throw new IllegalStateException("Could not find SshMachineLocation in list of locations");
-        SshMachineLocation machine = (SshMachineLocation) location.get();
-        String statsCommand = getDriver().getRunDir() + "/bin/redis-cli -p " + getRedisPort() + " info stats";
-        boolean retrieveUsageMetrics = getConfig(RETRIEVE_USAGE_METRICS);
-        
-        sshFeed = SshFeed.builder()
-                .entity(this)
-                .machine(machine)
-                .period(5, TimeUnit.SECONDS)
-                .poll(new SshPollConfig<Integer>(UPTIME)
-                        .command(getDriver().getRunDir() + "/bin/redis-cli -p " + getRedisPort() + " info server")
-                        .onFailureOrException(Functions.constant(-1))
-                        .onSuccess(infoFunction("uptime_in_seconds"))
-                        .enabled(retrieveUsageMetrics))
-                .poll(new SshPollConfig<Integer>(TOTAL_CONNECTIONS_RECEIVED)
-                        .command(statsCommand)
-                        .onFailureOrException(Functions.constant(-1))
-                        .onSuccess(infoFunction("total_connections_received"))
-                        .enabled(retrieveUsageMetrics))
-                .poll(new SshPollConfig<Integer>(TOTAL_COMMANDS_PROCESSED)
-                        .command(statsCommand)
-                        .onFailureOrException(Functions.constant(-1))
-                        .onSuccess(infoFunction("total_commands_processed"))
-                        .enabled(retrieveUsageMetrics))
-                .poll(new SshPollConfig<Integer>(EXPIRED_KEYS)
-                        .command(statsCommand)
-                        .onFailureOrException(Functions.constant(-1))
-                        .onSuccess(infoFunction("expired_keys"))
-                        .enabled(retrieveUsageMetrics))
-                .poll(new SshPollConfig<Integer>(EVICTED_KEYS)
-                        .command(statsCommand)
-                        .onFailureOrException(Functions.constant(-1))
-                        .onSuccess(infoFunction("evicted_keys"))
-                        .enabled(retrieveUsageMetrics))
-                .poll(new SshPollConfig<Integer>(KEYSPACE_HITS)
-                        .command(statsCommand)
-                        .onFailureOrException(Functions.constant(-1))
-                        .onSuccess(infoFunction("keyspace_hits"))
-                        .enabled(retrieveUsageMetrics))
-                .poll(new SshPollConfig<Integer>(KEYSPACE_MISSES)
-                        .command(statsCommand)
-                        .onFailureOrException(Functions.constant(-1))
-                        .onSuccess(infoFunction("keyspace_misses"))
-                        .enabled(retrieveUsageMetrics))
-                .build();
-    }
-
-    /**
-     * Create a {@link Function} to retrieve a particular field value from a {@code redis-cli info}
-     * command.
-     * 
-     * @param field the info field to retrieve and convert
-     * @return a new function that converts a {@link SshPollValue} to an {@link Integer}
-     */
-    private static Function<SshPollValue, Integer> infoFunction(final String field) {
-        return Functions.compose(new Function<String, Integer>() {
-            @Override
-            public Integer apply(@Nullable String input) {
-                Optional<String> line = Iterables.tryFind(Splitter.on('\n').split(input), Predicates.containsPattern(field + ":"));
-                if (line.isPresent()) {
-                    String data = line.get().trim();
-                    int colon = data.indexOf(":");
-                    return Integer.parseInt(data.substring(colon + 1));
-                } else {
-                    throw new IllegalStateException("Data for field "+field+" not found: "+input);
-                }
-            }
-        }, SshValueFunctions.stdout());
-    }
-
-    @Override
-    public void disconnectSensors() {
-        disconnectServiceUpIsRunning();
-        if (sshFeed != null) sshFeed.stop();
-        super.disconnectSensors();
-    }
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return RedisStoreDriver.class;
-    }
-
-    @Override
-    public RedisStoreDriver getDriver() {
-        return (RedisStoreDriver) super.getDriver();
-    }
-
-    @Override
-    public String getAddress() {
-        MachineLocation machine = getMachineOrNull();
-        return (machine != null) ? machine.getAddress().getHostAddress() : null;
-    }
-
-    @Override
-    public Integer getRedisPort() {
-        return getAttribute(RedisStore.REDIS_PORT);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStoreSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStoreSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStoreSshDriver.java
deleted file mode 100644
index 81ebfe3..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisStoreSshDriver.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import static java.lang.String.format;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Start a {@link RedisStore} in a {@link Location} accessible over ssh.
- */
-public class RedisStoreSshDriver extends AbstractSoftwareProcessSshDriver implements RedisStoreDriver {
-
-    private static final Logger LOG = LoggerFactory.getLogger(RedisStoreSshDriver.class);
-
-    public RedisStoreSshDriver(RedisStoreImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("redis-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        MutableMap<String, String> installGccPackageFlags = MutableMap.of(
-                "onlyifmissing", "gcc",
-                "yum", "gcc",
-                "apt", "gcc",
-                "port", null);
-        MutableMap<String, String> installMakePackageFlags = MutableMap.of(
-                "onlyifmissing", "make",
-                "yum", "make",
-                "apt", "make",
-                "port", null);
-        //Headers still might be missing on some systems (especially if gcc & make are pre-installed)
-        Map<String, String> installBuildEssentialPackageFlags = ImmutableMap.of(
-                "apt", "build-essential");
-
-        List<String> commands = ImmutableList.<String>builder()
-                .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-                .add(BashCommands.INSTALL_TAR)
-                .add(BashCommands.INSTALL_CURL)
-                .add(BashCommands.installPackage(installGccPackageFlags, "redis-prerequisites-gcc"))
-                .add(BashCommands.installPackage(installMakePackageFlags, "redis-prerequisites-make"))
-                .add(BashCommands.installPackage(installBuildEssentialPackageFlags, null))
-                .add("tar xzfv " + saveAs)
-                .add(format("cd redis-%s", getVersion()))
-                .add("pushd deps")
-                .add("make lua hiredis linenoise")
-                .add("popd")
-                .add("make clean && make")
-                .build();
-
-        newScript(INSTALLING)
-                .failOnNonZeroResultCode()
-                .body.append(commands).execute();
-    }
-
-    @Override
-    public void customize() {
-        newScript(MutableMap.of("usePidFile", false), CUSTOMIZING)
-                .failOnNonZeroResultCode()
-                .body.append(
-                        format("cd %s", getExpandedInstallDir()),
-                        "make install PREFIX="+getRunDir())
-                .execute();
-
-        copyTemplate(getEntity().getConfig(RedisStore.REDIS_CONFIG_TEMPLATE_URL), "redis.conf");
-    }
-
-    @Override
-    public void launch() {
-        // TODO Should we redirect stdout/stderr: format(" >> %s/console 2>&1 </dev/null &", getRunDir())
-        newScript(MutableMap.of("usePidFile", false), LAUNCHING)
-                .failOnNonZeroResultCode()
-                .body.append("./bin/redis-server redis.conf")
-                .execute();
-    }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of("usePidFile", false), CHECK_RUNNING)
-                .body.append("./bin/redis-cli -p " + getEntity().getAttribute(RedisStore.REDIS_PORT) + " ping > /dev/null")
-                .execute() == 0;
-    }
-
-    /**
-     * Restarts redis with the current configuration.
-     */
-    @Override
-    public void stop() {
-        int exitCode = newScript(MutableMap.of("usePidFile", false), STOPPING)
-                .body.append("./bin/redis-cli -p " + getEntity().getAttribute(RedisStore.REDIS_PORT) + " shutdown")
-                .execute();
-        // TODO: Good enough? Will cause warnings when trying to stop a server that is already not running.
-        if (exitCode != 0) {
-            LOG.warn("Unexpected exit code when stopping {}: {}", entity, exitCode);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakCluster.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakCluster.java
deleted file mode 100644
index e6de705..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakCluster.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.riak;
-
-import java.net.URI;
-import java.util.Map;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.reflect.TypeToken;
-
-@Catalog(name="Riak Cluster", description="Riak is a distributed NoSQL key-value data store that offers "
-        + "extremely high availability, fault tolerance, operational simplicity and scalability.")
-@ImplementedBy(RiakClusterImpl.class)
-public interface RiakCluster extends DynamicCluster {
-
-    @SuppressWarnings("serial")
-    AttributeSensor<Map<Entity, String>> RIAK_CLUSTER_NODES = Sensors.newSensor(
-            new TypeToken<Map<Entity, String>>() {}, 
-            "riak.cluster.nodes", "Names of all active Riak nodes in the cluster <Entity,Riak Name>");
-
-    @SetFromFlag("delayBeforeAdvertisingCluster")
-    ConfigKey<Duration> DELAY_BEFORE_ADVERTISING_CLUSTER = ConfigKeys.newConfigKey(Duration.class, "riak.cluster.delayBeforeAdvertisingCluster", "Delay after cluster is started before checking and advertising its availability", Duration.seconds(2 * 60));
-
-    AttributeSensor<Boolean> IS_CLUSTER_INIT = Sensors.newBooleanSensor("riak.cluster.isClusterInit", "Flag to determine if the cluster was already initialized");
-
-    AttributeSensor<Boolean> IS_FIRST_NODE_SET = Sensors.newBooleanSensor("riak.cluster.isFirstNodeSet", "Flag to determine if the first node has been set");
-
-    AttributeSensor<String> NODE_LIST = Sensors.newStringSensor("riak.cluster.nodeList", "List of nodes (including ports), comma separated");
-
-    AttributeSensor<String> NODE_LIST_PB_PORT = Sensors.newStringSensor("riak.cluster.nodeListPbPort", "List of nodes (including ports for riak db clients), comma separated");
-
-    AttributeSensor<URI> RIAK_CONSOLE_URI = Attributes.MAIN_URI;
-
-    AttributeSensor<Integer> NODE_GETS_1MIN_PER_NODE = Sensors.newIntegerSensor("riak.node.gets.1m.perNode", "Gets in the last minute, averaged across cluster");
-    AttributeSensor<Integer> NODE_PUTS_1MIN_PER_NODE = Sensors.newIntegerSensor("riak.node.puts.1m.perNode", "Puts in the last minute, averaged across cluster");
-    AttributeSensor<Integer> NODE_OPS_1MIN_PER_NODE = Sensors.newIntegerSensor("riak.node.ops.1m.perNode", "Sum of node gets and puts in the last minute, averaged across cluster");
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakClusterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakClusterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakClusterImpl.java
deleted file mode 100644
index 8272815..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakClusterImpl.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.riak;
-
-import static org.apache.brooklyn.util.JavaGroovyEquivalents.groovyTruth;
-
-import java.net.URI;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.api.sensor.EnricherSpec;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.EntityInternal;
-import org.apache.brooklyn.core.entity.EntityPredicates;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic.ServiceNotUpLogic;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.group.AbstractMembershipTrackingPolicy;
-import org.apache.brooklyn.entity.group.DynamicClusterImpl;
-import org.apache.brooklyn.util.core.task.Tasks;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Function;
-import com.google.common.base.Joiner;
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.base.Predicates;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-public class RiakClusterImpl extends DynamicClusterImpl implements RiakCluster {
-
-    private static final Logger log = LoggerFactory.getLogger(RiakClusterImpl.class);
-
-    private transient Object mutex = new Object[0];
-
-    public void init() {
-        super.init();
-        log.info("Initializing the riak cluster...");
-        sensors().set(IS_CLUSTER_INIT, false);
-    }
-
-    @Override
-    protected void doStart() {
-        super.doStart();
-        connectSensors();
-
-        try {
-            Duration delay = getConfig(DELAY_BEFORE_ADVERTISING_CLUSTER);
-            Tasks.setBlockingDetails("Sleeping for "+delay+" before advertising cluster available");
-            Time.sleep(delay);
-        } finally {
-            Tasks.resetBlockingDetails();
-        }
-
-        //FIXME: add a quorum to tolerate failed nodes before setting on fire.
-        @SuppressWarnings("unchecked")
-        Optional<Entity> anyNode = Iterables.tryFind(getMembers(), Predicates.and(
-                Predicates.instanceOf(RiakNode.class),
-                EntityPredicates.attributeEqualTo(RiakNode.RIAK_NODE_HAS_JOINED_CLUSTER, true),
-                EntityPredicates.attributeEqualTo(RiakNode.SERVICE_UP, true)));
-        if (anyNode.isPresent()) {
-            sensors().set(IS_CLUSTER_INIT, true);
-        } else {
-            log.warn("No Riak Nodes are found on the cluster: {}. Initialization Failed", getId());
-            ServiceStateLogic.setExpectedState(this, Lifecycle.ON_FIRE);
-        }
-    }
-
-    protected EntitySpec<?> getMemberSpec() {
-        EntitySpec<?> result = config().get(MEMBER_SPEC);
-        if (result!=null) return result;
-        return EntitySpec.create(RiakNode.class);
-    }
-
-    protected void connectSensors() {
-        policies().add(PolicySpec.create(MemberTrackingPolicy.class)
-                .displayName("Controller targets tracker")
-                .configure("sensorsToTrack", ImmutableSet.of(RiakNode.SERVICE_UP))
-                .configure("group", this));
-
-        EnricherSpec<?> first = Enrichers.builder()
-                 .aggregating(Attributes.MAIN_URI)
-                 .publishing(Attributes.MAIN_URI)
-                 .computing(new Function<Collection<URI>,URI>() {
-                    @Override
-                    public URI apply(Collection<URI> input) {
-                        return input.iterator().next();
-                    } })
-                 .fromMembers()
-                 .build();
-        enrichers().add(first);
-        
-        Map<? extends AttributeSensor<? extends Number>, ? extends AttributeSensor<? extends Number>> enricherSetup = 
-            ImmutableMap.<AttributeSensor<? extends Number>, AttributeSensor<? extends Number>>builder()
-                .put(RiakNode.NODE_PUTS, RiakCluster.NODE_PUTS_1MIN_PER_NODE)
-                .put(RiakNode.NODE_GETS, RiakCluster.NODE_GETS_1MIN_PER_NODE)
-                .put(RiakNode.NODE_OPS, RiakCluster.NODE_OPS_1MIN_PER_NODE)
-            .build();
-        // construct sum and average over cluster
-        for (AttributeSensor<? extends Number> nodeSensor : enricherSetup.keySet()) {
-            addSummingMemberEnricher(nodeSensor);
-            addAveragingMemberEnricher(nodeSensor, enricherSetup.get(nodeSensor));
-        }
-    }
-
-    private void addAveragingMemberEnricher(AttributeSensor<? extends Number> fromSensor, AttributeSensor<? extends Number> toSensor) {
-        enrichers().add(Enrichers.builder()
-            .aggregating(fromSensor)
-            .publishing(toSensor)
-            .fromMembers()
-            .computingAverage()
-            .build()
-        );
-    }
-
-    private void addSummingMemberEnricher(AttributeSensor<? extends Number> source) {
-        enrichers().add(Enrichers.builder()
-            .aggregating(source)
-            .publishing(source)
-            .fromMembers()
-            .computingSum()
-            .build()
-        );
-    }
-
-    protected void onServerPoolMemberChanged(final Entity member) {
-        synchronized (mutex) {
-            log.trace("For {}, considering membership of {} which is in locations {}", new Object[]{ this, member, member.getLocations() });
-
-            Map<Entity, String> nodes = getAttribute(RIAK_CLUSTER_NODES);
-            if (belongsInServerPool(member)) {
-                // TODO can we discover the nodes by asking the riak cluster, rather than assuming what we add will be in there?
-                // TODO and can we do join as part of node starting?
-
-                if (nodes == null) {
-                    nodes = Maps.newLinkedHashMap();
-                }
-                String riakName = getRiakName(member);
-                Preconditions.checkNotNull(riakName);
-
-                // flag a first node to be the first node in the riak cluster.
-                Boolean firstNode = getAttribute(IS_FIRST_NODE_SET);
-                if (!Boolean.TRUE.equals(firstNode)) {
-                    sensors().set(IS_FIRST_NODE_SET, Boolean.TRUE);
-
-                    nodes.put(member, riakName);
-                    sensors().set(RIAK_CLUSTER_NODES, nodes);
-
-                    ((EntityInternal) member).sensors().set(RiakNode.RIAK_NODE_HAS_JOINED_CLUSTER, Boolean.TRUE);
-
-                    log.info("Added initial Riak node {}: {}; {} to new cluster", new Object[] { this, member, getRiakName(member) });
-                } else {
-                    // TODO: be wary of erroneous nodes but are still flagged 'in cluster'
-                    // add the new node to be part of the riak cluster.
-                    Optional<Entity> anyNodeInCluster = Iterables.tryFind(nodes.keySet(), Predicates.and(
-                            Predicates.instanceOf(RiakNode.class),
-                            EntityPredicates.attributeEqualTo(RiakNode.RIAK_NODE_HAS_JOINED_CLUSTER, true)));
-                    if (anyNodeInCluster.isPresent()) {
-                        if (!nodes.containsKey(member) && member.getAttribute(RiakNode.RIAK_NODE_HAS_JOINED_CLUSTER) == null) {
-                            String anyNodeName = anyNodeInCluster.get().getAttribute(RiakNode.RIAK_NODE_NAME);
-                            Entities.invokeEffectorWithArgs(this, member, RiakNode.JOIN_RIAK_CLUSTER, anyNodeName).blockUntilEnded();
-                            nodes.put(member, riakName);
-                            sensors().set(RIAK_CLUSTER_NODES, nodes);
-                            log.info("Added Riak node {}: {}; {} to cluster", new Object[] { this, member, getRiakName(member) });
-                        }
-                    } else {
-                        log.error("isFirstNodeSet, but no cluster members found to add {}", member.getId());
-                    }
-                }
-            } else {
-                if (nodes != null && nodes.containsKey(member)) {
-                    DependentConfiguration.attributeWhenReady(member, RiakNode.RIAK_NODE_HAS_JOINED_CLUSTER, Predicates.equalTo(false)).blockUntilEnded(Duration.TWO_MINUTES);
-                    @SuppressWarnings("unchecked")
-                    Optional<Entity> anyNodeInCluster = Iterables.tryFind(nodes.keySet(), Predicates.and(
-                            Predicates.instanceOf(RiakNode.class),
-                            EntityPredicates.attributeEqualTo(RiakNode.RIAK_NODE_HAS_JOINED_CLUSTER, true),
-                            Predicates.not(Predicates.equalTo(member))));
-                    if (anyNodeInCluster.isPresent()) {
-                        Entities.invokeEffectorWithArgs(this, anyNodeInCluster.get(), RiakNode.REMOVE_FROM_CLUSTER, getRiakName(member)).blockUntilEnded();
-                    }
-                    nodes.remove(member);
-                    sensors().set(RIAK_CLUSTER_NODES, nodes);
-                    log.info("Removed Riak node {}: {}; {} from cluster", new Object[]{ this, member, getRiakName(member) });
-                }
-            }
-
-            ServiceNotUpLogic.updateNotUpIndicatorRequiringNonEmptyMap(this, RIAK_CLUSTER_NODES);
-
-            calculateClusterAddresses();
-        }
-    }
-
-    private void calculateClusterAddresses() {
-        List<String> addresses = Lists.newArrayList();
-        List<String> addressesPbPort = Lists.newArrayList();
-        for (Entity entity : this.getMembers()) {
-            if (entity instanceof RiakNode && entity.getAttribute(Attributes.SERVICE_UP)) {
-                RiakNode riakNode = (RiakNode) entity;
-                addresses.add(riakNode.getAttribute(Attributes.SUBNET_HOSTNAME) + ":" + riakNode.getAttribute(RiakNode.RIAK_WEB_PORT));
-                addressesPbPort.add(riakNode.getAttribute(Attributes.SUBNET_HOSTNAME) + ":" + riakNode.getAttribute(RiakNode.RIAK_PB_PORT));
-            }
-        }
-        sensors().set(RiakCluster.NODE_LIST, Joiner.on(",").join(addresses));
-        sensors().set(RiakCluster.NODE_LIST_PB_PORT, Joiner.on(",").join(addressesPbPort));
-    }
-
-    protected boolean belongsInServerPool(Entity member) {
-        if (!groovyTruth(member.getAttribute(Startable.SERVICE_UP))) {
-            log.trace("Members of {}, checking {}, eliminating because not up", this, member);
-            return false;
-        }
-        if (!getMembers().contains(member)) {
-            log.trace("Members of {}, checking {}, eliminating because not member", this, member);
-            return false;
-        }
-        log.trace("Members of {}, checking {}, approving", this, member);
-
-        return true;
-    }
-
-    private String getRiakName(Entity node) {
-        return node.getAttribute(RiakNode.RIAK_NODE_NAME);
-    }
-
-    public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy {
-        @Override
-        protected void onEntityEvent(EventType type, Entity entity) {
-            ((RiakClusterImpl) super.entity).onServerPoolMemberChanged(entity);
-        }
-    }
-}


[47/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/available.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/available.jsp b/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/available.jsp
deleted file mode 100644
index 380339e..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/available.jsp
+++ /dev/null
@@ -1,76 +0,0 @@
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample "Hello, World" Application</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed "Hello, World" Application</h1>
-<p>This is the home page for a sample application used to illustrate 
-how web applications can be deployed to multi-cloud environments using Brooklyn.
-</td>
-</tr>
-</table>
-
-<p>
-The following apps are available:
-<p>
-
-<ul>
-<%
-String dburl=System.getProperty("brooklyn.example.db.url");
-//URL should be supplied e.g. "-Dbrooklyn.example.db.url=jdbc:mysql://localhost/visitors?user=brooklyn&password=br00k11n"
-//(note quoting needed due to ampersand)
-if (dburl!=null) {
-%>
-<li><a href="db.jsp">SQL database chatroom</a></li>
-<% } %>
-
-<%
-String hadoop=System.getProperty("brooklyn.example.hadoop.site.xml.url");
-//URL should be supplied e.g. -Dbrooklyn.example.hadoop.site.xml.url=file://tmp/hadoop-site.xml
-if (hadoop!=null) {
-%>
-<li><a href="hadoop-chat.jsp">Hadoop chatroom</a></li>
-<li><a href="hadoop-wordcount.jsp">Hadoop wordcount</a> (inevitably!) run over the chats</li>
-<% } %>
-
-<%
-boolean primes = true;
-if (primes) {
-%>
-<li><a href="primes.jsp">Prime number counting (compute)</a></li>
-<% } %>
-
-<%
-if (hadoop==null && dburl==null && primes==false) {
-%>
-<li><i>None.</i> Try one of the other Brooklyn examples to see SQL or Hadoop.</li>
-<% } %>
-</ul>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/db.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/db.jsp b/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/db.jsp
deleted file mode 100644
index 7e91b66..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/db.jsp
+++ /dev/null
@@ -1,123 +0,0 @@
-<%@ page language="java" import="java.sql.*"%>
-
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample Application Database JSP Page</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td align=center>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed WebApp (Database JSP)</h1>
-This is the output of a JSP page that is part of the Hello, World application,
-deployed by brooklyn, to show <b>SQL database interactivity</b>.
-</td>
-</tr>
-</table>
-
-<%
-String url=System.getProperty("brooklyn.example.db.url");
-//URL should be supplied e.g. ""-Dbrooklyn.example.db.url=jdbc:mysql://localhost/visitors?user=brooklyn&password=br00k11n"
-//(note quoting needed due to ampersand)
-if (url==null) {
-%>
-    <p>(There is no database included as part of this example.)</p>
-<% } else { /* begin database-enabled block */ %>
-
-<br/>
-<p>Visitors:</p>
-<ul>
-
-<%
-Connection con=null;
-ResultSet rst=null;
-Statement stmt=null;
-int i=0;
-
-try {
-  
-  String DRIVER = "com.mysql.jdbc.Driver";
-  Class.forName(DRIVER).newInstance();
-
-  con=DriverManager.getConnection(url);
-  stmt=con.createStatement();
-  
-  if (request.getParameter("name")!=null) {
-      //add a message
-      stmt.execute("INSERT INTO MESSAGES values (default, '"+
-              //better escaping and security desired... 
-              //this essentially does StringEscapeUtils.escapeSql (either brooklyn.util or apache commons)
-              request.getParameter("name").replaceAll("'", "''")+
-              "', '"+
-              request.getParameter("message").replaceAll("'", "''")+
-              "')");
-  }
-  
-  rst=stmt.executeQuery("select * from MESSAGES");
-  while (rst.next()) {
-%>
-    <li> <b><%= rst.getString(2) %></b>: <%= rst.getString(3) %> </li>
-<%
-    i++;
-  }
-} catch (Exception e) {
-  i=-1;
-%>
-  <li> <b>The database does not appear to be connected.</b> </li>
-  <li> ERROR: <%= e %> </li>
-<%
-} finally {
-  if (rst!=null) rst.close();
-  if (stmt!=null) stmt.close();
-  if (con!=null) con.close();
-}
-
-if (i==0) {
-%>
-  <li> <i>None.</i> </li>
-<%
-}
-%>
-
-</ul>
-
-<br/>
-
-<p>Please enter a message:</p>
-
-<form action="db.jsp" method="GET">
-  <table>
-    <tr><td>Name: </td><td><input type="text" name="name"></td></tr>
-    <tr><td>Message: </td><td><input type="text" name="message"></td></tr>
-  </table>
-  <input type="submit" value="Submit"/>
-</form>
-
-<% } /* end of database-enabled block */ %>
-
-<br/>
-<p>Click <a href="index.html">here</a> to go back to the main page.</p>
-
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/hadoop-chat.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/hadoop-chat.jsp b/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/hadoop-chat.jsp
deleted file mode 100644
index f7e61f4..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/hadoop-chat.jsp
+++ /dev/null
@@ -1,110 +0,0 @@
-<%@ page language="java" import="java.sql.*"%>
-
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample Application HDFS JSP Page</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td align=center>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed WebApp (Database JSP)</h1>
-This is the output of a JSP page that is part of the Hello, World application,
-deployed by brooklyn, to show <b>hadoop hdfs used as the data store</b>.
-</td>
-</tr>
-</table>
-
-<%
-String hadoop=System.getProperty("brooklyn.example.hadoop.site.xml.url");
-if (hadoop==null) {
-%>
-    <p>(There is no hadoop included as part of this example.)</p>
-<% } else { /* begin hadoop-enabled block */ 
-
-
-try {
-    org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();
-    conf.setClassLoader(brooklyn.demo.webapp.hello.HadoopWordCount.class.getClassLoader());
-    conf.addResource(new java.net.URL(hadoop));
-    org.apache.hadoop.fs.FileSystem fsClient = org.apache.hadoop.fs.FileSystem.get(conf);
-    if (fsClient==null) throw new NullPointerException("Can't access fsClient at "+hadoop);
-    
-    if (request.getParameter("name")!=null) {
-        java.io.OutputStream os1 = fsClient.create(new org.apache.hadoop.fs.Path("chats", ""+System.currentTimeMillis()+"-"+((int)(Math.random()*10000))));
-        os1.write(request.getParameter("name").getBytes());
-        os1.write(" : ".getBytes());
-        os1.write(request.getParameter("message").getBytes());
-        os1.flush(); os1.close();
-    }
-%>
-    <br/>
-    <p>Visitors:</p>
-    <ul>
-<%
-    org.apache.hadoop.fs.FileStatus[] files = fsClient.listStatus(new org.apache.hadoop.fs.Path("chats"));
-    if (files==null) files = new org.apache.hadoop.fs.FileStatus[0]; 
-    for (org.apache.hadoop.fs.FileStatus f: files) {
-%>
-        <li> <%= brooklyn.demo.webapp.hello.DemoUtils.stringFromInputStream(fsClient.open(f.getPath())) %> </li>
-<%
-    }
-    if (files.length==0) {
-    %>
-      <li> <i>None.</i> </li>
-    <%
-    }
-    %>
-
-    </ul>
-    <br/>
-
-    <p>Please enter a message:</p>
-
-    <form action="hadoop-chat.jsp" method="GET">
-      <table>
-        <tr><td>Name: </td><td><input type="text" name="name"></td></tr>
-        <tr><td>Message: </td><td><input type="text" name="message"></td></tr>
-      </table>
-      <input type="submit" value="Submit"/>
-    </form>
-
-<%
-} catch (Exception e) {
-%>
-    <b>Error connecting to Hadoop.</b><br/>
-    ERROR: <%= e %><br/><br/>
-    <pre> <%= brooklyn.demo.webapp.hello.DemoUtils.getStackTrace(e) %></pre>
-<%
-}
-}
-%>
-
-    <br/>
-    <p>Click <a href="hadoop-wordcount.jsp">here</a> to run a map-reduce job counting the words in these comments.</p>
-    <p>Click <a href="index.html">here</a> to go back to the main page.</p>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/hadoop-wordcount.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/hadoop-wordcount.jsp b/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/hadoop-wordcount.jsp
deleted file mode 100644
index 570a659..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/hadoop-wordcount.jsp
+++ /dev/null
@@ -1,114 +0,0 @@
-<%@ page language="java" import="java.sql.*"%>
-
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample Application Database JSP Page</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td align=center>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed WebApp (Database JSP)</h1>
-This is the output of a JSP page that is part of the Hello, World application,
-deployed by brooklyn, to show <b>a hadoop map-reduce task run<b>.
-</td>
-</tr>
-</table>
-
-<%
-String hadoop=System.getProperty("brooklyn.example.hadoop.site.xml.url");
-String hadoopJar=System.getProperty("brooklyn.example.hadoop.custom.jar.url");
-if (hadoop==null) {
-%>
-    <p>There is no hadoop included as part of this example. Set brooklyn.example.hadoop.site.xml.url to proceed.</p>
-<% } else if (hadoopJar==null) { 
-%>
-    <p>brooklyn.example.hadoop.custom.jar.url must be set to point to the Jar.</p>
-<%} else { /* begin hadoop-enabled block */ 
-
-try {
-    org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();
-    conf.setClassLoader(brooklyn.demo.webapp.hello.HadoopWordCount.class.getClassLoader());
-    conf.addResource(new java.net.URL(hadoop));
-    org.apache.hadoop.fs.FileSystem fsClient = org.apache.hadoop.fs.FileSystem.get(conf);
-    if (fsClient==null) throw new NullPointerException("Can't access fsClient at "+hadoop);
-
-    org.apache.hadoop.mapreduce.Job job = brooklyn.demo.webapp.hello.HadoopWordCount.makeJob(conf);
-    ((org.apache.hadoop.mapred.JobConf)job.getConfiguration()).setJar(hadoopJar);
-    org.apache.hadoop.fs.FileStatus[] files = fsClient.listStatus(new org.apache.hadoop.fs.Path("chats"));
-    if (files==null) files = new org.apache.hadoop.fs.FileStatus[0];
-    for (org.apache.hadoop.fs.FileStatus f: files) {
-        org.apache.hadoop.mapreduce.lib.input.FileInputFormat.addInputPath(job, f.getPath());
-    }
-    
-    org.apache.hadoop.fs.Path outp = new org.apache.hadoop.fs.Path("out-"+((int)(Math.random()*10000)));
-    org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.setOutputPath(job, outp);
-
-    boolean result = job.waitForCompletion(true);
-    
-    if (!result) {
-        %> <p><b></b><i>Map reduce job returned non-zero result code.</i></b></p> <%
-    }
-
-    %> <p>Output from map reduce is as follows:</p> <%
-    
-    files = fsClient.listStatus(outp);
-    if (files==null) files = new org.apache.hadoop.fs.FileStatus[0];
-    for (org.apache.hadoop.fs.FileStatus f: files) {
-        try {
-            if (!f.isDir() && f.getLen()>0) {
-                %>
-                <%= f.getPath() %>:<br/>
-                <pre><%= brooklyn.demo.webapp.hello.DemoUtils.stringFromInputStream(fsClient.open(f.getPath())) %></pre>
-                <%
-            }
-        } catch (Exception e) {
-            %> Error: <%= e %><%
-        }
-    }
-    if (files.length==0) {
-    %>
-      <i>No output.</i> </li>
-    <%
-    }
-    
-    fsClient.delete(outp, true);
-    
-} catch (Exception e) {
-%>
-    <b>Error connecting to Hadoop.</b><br/>
-    ERROR: <%= e %><br/>
-    <pre> <%= brooklyn.demo.webapp.hello.DemoUtils.getStackTrace(e) %></pre>
-<%
-} 
-}
-%>
-
-    <br/>
-    <p>Click <a href="hadoop-chat.jsp">here</a> to view the chat room.</p>
-    <p>Click <a href="index.html">here</a> to go back to the main page.</p>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/images/BrooklynBridge3Large.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/images/BrooklynBridge3Large.png b/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/images/BrooklynBridge3Large.png
deleted file mode 100644
index 2f8253a..0000000
Binary files a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/images/BrooklynBridge3Large.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/images/bridge-large-no-title.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/images/bridge-large-no-title.png b/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/images/bridge-large-no-title.png
deleted file mode 100644
index 0a7f878..0000000
Binary files a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/images/bridge-large-no-title.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/images/bridge-small.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/images/bridge-small.png b/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/images/bridge-small.png
deleted file mode 100644
index 4149c3c..0000000
Binary files a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/images/bridge-small.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/index.html b/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/index.html
deleted file mode 100644
index 33b9bd9..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-<!--
-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.
--->
-
-<html>
-<head>
-<title>Sample "Hello, World" Application</title>
-<link rel="stylesheet" type="text/css" href="styles/main.css">
-</head>
-<body>
-<div id='main'>
-<div id="header">
-	<div class="header_text">
-		<h1>Sample Brooklyn Deployed "Hello, World" Application</h1>
-	</div>
-</div>
-	<div id="container">
-		<div class="text_row">
-		  <div class="app_info"><h3>This is the home page for a sample application used to illustrate 
-		how web applications can be deployed to multi-cloud environments using Brooklyn.</h3></div>
-		  <div class="illustrations"><p>See the available illustrations <a href="available.jsp">here</a>.</p></div>
-		</div>
-	</div>
-</div>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/primes.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/primes.jsp b/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/primes.jsp
deleted file mode 100644
index 04f83a1..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/primes.jsp
+++ /dev/null
@@ -1,77 +0,0 @@
-<%@ page language="java"%>
-
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample Application Compute JSP Page</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td align=center>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed WebApp (Compute Primes JSP)</h1>
-This is the output of a JSP page that is part of the Hello, World application,
-deployed by brooklyn, to show <b>compute load by generating primes</b>.
-</td>
-</tr>
-</table>
-
-<%
-Object nx = request.getParameter("n");
-if (nx==null) {
-%>
-    <p>Please supply a value <i>n</i> in the URL, to compute primes up to <i>n</i>.</p>
-    <form action="primes.jsp" method="GET">
-      <table>
-        <tr><td>Count primes up to: </td><td><input type="text" name="n"></td></tr>
-      </table>
-      <input type="submit" value="Submit"/>
-    </form>
-    
-<%
-} else {
-    long n = Long.parseLong(""+nx);
-    long startTime = System.currentTimeMillis();
-    int count = 0;
-    for (long k=2; k<=n; k++) {
-        // check if k prime
-        boolean prime = true;
-        for (long j=2; j*j<=k; j++) {
-            if (k%j==0) {
-                prime = false;
-                break;
-            }
-        }
-        if (prime) count++;
-    }
-    long totalTime = System.currentTimeMillis() - startTime;
-%>
-    <p>There are <%= count %> primes less than or equal to <%= n %>.</p>
-    <p>Computation took <%= totalTime %> ms.</p>
-<%
-}
-%>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/styles/main.css
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/styles/main.css b/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/styles/main.css
deleted file mode 100644
index 27606d3..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/styles/main.css
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.
-*/
-*{
-	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
-body{
-	padding: 0;
-	margin: 0;
-}
-#main{
-	background: url('../images/BrooklynBridge3Large.png')fixed;
-	-webkit-background-size: cover;
-	-moz-background-size: cover;
-	-o-background-size: cover;
-	background-size: cover;
-	height: 100vh;
-	background-color: #6BB445;
-}
-#header{
-	text-align: center;
-}
-h1{
-	font-family: "open sans","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
-    text-transform: uppercase;
-    line-height: 105%;
-    letter-spacing: 1px;
-    font-weight: bold;
-    text-align: center;
-    margin: 20px 0 15px;
-    margin: 0;
-    padding-top: 20vh;
-}
-#container{
-	padding-top: 30vh;
-	text-align: center;
-	line-height: 140%;
-    font-family: "Noto Serif","open sans","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
-    font-weight: normal;
-    color: white;
-    text-shadow: #000 0px 0px 5px,   #000 0px 0px 5px,   #000 0px 0px 5px,
-    	#000 0px 0px 5px,   #000 0px 0px 5px,   #000 0px 0px 5px;
-    font-style: italic;
-    margin-bottom: 45px;
-	width: 80%;
-	margin-left: 10%;
-}
-a{
-	color: #6BB445;
-}
-.text_row{
-	padding: 5%;
-}
-.illustrations{
-	padding-bottom: 5%;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/pom.xml b/brooklyn-library/examples/webapps/pom.xml
deleted file mode 100644
index d5c0c05..0000000
--- a/brooklyn-library/examples/webapps/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>pom</packaging>
-    <artifactId>brooklyn-examples-webapps-parent</artifactId>
-    <name>Brooklyn Examples Aggregator Project - Webapps</name>
-    <description>
-        Brooklyn examples module, building the Brooklyn examples.
-    </description>
-
-    <parent>
-        <groupId>org.apache.brooklyn.example</groupId>
-        <artifactId>brooklyn-examples-parent</artifactId>
-        <version>0.9.0-SNAPSHOT</version>   <!-- BROOKLYN_VERSION -->
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-    <modules>
-        <module>hello-world-webapp</module>
-        <module>hello-world-sql</module>
-    </modules>
-
-    <dependencyManagement>
-      <dependencies>
-        <dependency>
-          <groupId>javax.servlet</groupId>
-          <artifactId>javax.servlet-api</artifactId>
-          <version>3.1.0</version>
-          <scope>provided</scope>
-        </dependency>
-      </dependencies>
-    </dependencyManagement>
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/pom.xml b/brooklyn-library/pom.xml
deleted file mode 100644
index 2b6ba8d..0000000
--- a/brooklyn-library/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-parent</artifactId>
-        <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-        <relativePath>../brooklyn-server/parent/</relativePath>
-    </parent>
-
-    <groupId>org.apache.brooklyn</groupId>
-    <artifactId>brooklyn-library</artifactId>
-    <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-    <packaging>pom</packaging>
-
-    <name>Brooklyn Library Root</name>
-    <description>
-        Brooklyn Library project root, serving as the ancestor POM for all projects --
-        declaring versions, profiles, and the modules to build
-    </description>
-    <url>https://brooklyn.apache.org/</url>
-    <inceptionYear>2012</inceptionYear>
-
-    <developers>
-        <!-- TODO update with PMC members and committers -->
-    </developers>
-
-    <scm>
-        <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-brooklyn.git</connection>
-        <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-brooklyn.git</developerConnection>
-        <url>https://git-wip-us.apache.org/repos/asf?p=incubator-brooklyn.git</url>
-        <tag>HEAD</tag>
-    </scm>
-
-    <issueManagement>
-        <system>JIRA</system>
-        <url>https://issues.apache.org/jira/browse/BROOKLYN</url>
-    </issueManagement>
-    <ciManagement>
-        <system>Jenkins</system>
-        <url>https://builds.apache.org/job/incubator-brooklyn-master-build/</url>
-    </ciManagement>
-    <mailingLists>
-        <mailingList>
-            <name>Brooklyn Developer List</name>
-            <subscribe>dev-subscribe@brooklyn.apache.org</subscribe>
-            <unsubscribe>dev-unsubscribe@brooklyn.apache.org</unsubscribe>
-            <post>dev@brooklyn.apache.org</post>
-            <archive>
-                http://mail-archives.apache.org/mod_mbox/brooklyn-dev/
-            </archive>
-        </mailingList>
-    </mailingLists>
-
-    <properties>
-    
-		<!-- Versions of Software we Blueprint -->
-        <qpid.version>0.20</qpid.version>
-        <mongodb.version>3.0.3</mongodb.version>
-        <riak.version>1.4.0</riak.version>
-        <hazelcast.version>3.5.4</hazelcast.version>
-        <org.marre.smsj.version>1.0.0-20051126</org.marre.smsj.version>
-        <mysql-connector-java.version>5.1.18</mysql-connector-java.version>
-        <hadoop.version>1.0.2</hadoop.version>
-        <postgresql.version>9.1-901.jdbc4</postgresql.version>
-        <activemq.version>5.10.0</activemq.version>
-        <rabbitmq-version>2.8.7</rabbitmq-version>
-        <kafka.version>0.8.2.1</kafka.version>
-        <storm.version>0.9.0.1</storm.version>
-        <redis.version>1.5.2</redis.version>
-        
-    </properties>
-
-    <modules>
-
-        <!-- <module>sandbox/cassandra-multicloud-snitch</module> -->
-        <!-- <module>sandbox/database</module> -->
-        <!-- <module>sandbox/examples/simple-open-loop-policy</module> -->
-        <!-- <module>sandbox/extra</module> -->
-        <!-- <module>sandbox/mobile-app</module> -->
-        <!-- <module>sandbox/monitoring</module> -->
-        <!-- <module>sandbox/nosql</module> -->
-        <!-- <module>sandbox/web-acceptance</module> -->
-
-        <module>software/network</module>
-        <module>software/osgi</module>
-        <module>software/database</module>
-        <module>software/webapp</module>
-        <module>software/messaging</module>
-        <module>software/nosql</module>
-        <module>software/monitoring</module>
-
-        <module>qa</module>
-        
-        <module>examples</module>
-
-    </modules>
-
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/log-exclusions.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/log-exclusions.txt b/brooklyn-library/qa/log-exclusions.txt
deleted file mode 100644
index 8c9252e..0000000
--- a/brooklyn-library/qa/log-exclusions.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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.
-
-GrailsUtil.*is deprecated please use
-echo.*WARNING

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/pom.xml b/brooklyn-library/qa/pom.xml
deleted file mode 100644
index e38afd1..0000000
--- a/brooklyn-library/qa/pom.xml
+++ /dev/null
@@ -1,136 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>brooklyn-qa</artifactId>
-    <packaging>jar</packaging>
-    <name>Brooklyn QA</name>
-    <description>
-        This project contains QA-style tests (e.g. longevity and stress tests).
-    </description>
-
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-launcher</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-database</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-webapp</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>net.sf.jopt-simple</groupId>
-            <artifactId>jopt-simple</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-camp</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.maven.shared</groupId>
-            <artifactId>maven-verifier</artifactId>
-            <version>1.5</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-dependency-plugin</artifactId>
-                    <executions>
-                        <execution>
-                            <phase>install</phase>
-                            <goals>
-                                <goal>copy-dependencies</goal>
-                            </goals>
-                            <configuration>
-                                <outputDirectory>${project.build.directory}/lib</outputDirectory>
-                                <excludeArtifactIds>brooklyn-dist</excludeArtifactIds>
-                            </configuration>
-                        </execution>
-                    </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.rat</groupId>
-                <artifactId>apache-rat-plugin</artifactId>
-                <configuration>
-                    <excludes combine.children="append">
-                        <exclude>src/test/projects/downstream-parent-test/README</exclude>
-                    </excludes>
-                  </configuration>
-            </plugin>
-        </plugins>
-    </build> 
-
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedJBoss7ServerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedJBoss7ServerImpl.java b/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedJBoss7ServerImpl.java
deleted file mode 100644
index ed00f61..0000000
--- a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedJBoss7ServerImpl.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.load;
-
-import static java.lang.String.format;
-
-import java.util.concurrent.Callable;
-
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.webapp.jboss.JBoss7ServerImpl;
-import org.apache.brooklyn.entity.webapp.jboss.JBoss7SshDriver;
-import org.apache.brooklyn.feed.function.FunctionFeed;
-import org.apache.brooklyn.feed.function.FunctionPollConfig;
-import org.apache.brooklyn.feed.http.HttpFeed;
-import org.apache.brooklyn.feed.http.HttpPollConfig;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.guava.Functionals;
-import org.apache.brooklyn.util.os.Os;
-
-import com.google.common.net.HostAndPort;
-
-/**
- * For simulating various aspects of the JBoss 7 app-server entity.
- *  
- * The use-case for this is that the desired configuration is not always available for testing. 
- * For example, there may be insufficient resources to run 100s of JBoss app-servers, or one 
- * may be experimenting with possible configurations such as use of an external monitoring tool 
- * that is not yet available.
- * 
- * It is then possible to simulate aspects of the behaviour, for performance and load testing purposes. 
- * 
- * There is configuration for:
- * <ul>
- *   <li>{@code simulateEntity}
- *     <ul>
- *       <li>if true, no underlying entity will be started. Instead a sleep 100000 job will be run and monitored.
- *       <li>if false, the underlying entity (i.e. a JBoss app-server) will be started as normal.
- *     </ul>
- *   <li>{@code simulateExternalMonitoring}
- *     <ul>
- *       <li>if true, disables the default monitoring mechanism. Instead, a function will periodically execute 
- *           to set the entity's sensors (as though the values had been obtained from the external monitoring tool).
- *       <li>if false, then:
- *         <ul>
- *           <li>If {@code simulateEntity==true} it will execute comparable commands (e.g. execute a command of the same 
- *               size over ssh or do a comparable number of http GET requests).
- *           <li>If {@code simulateEntity==false} then normal monitoring will be done.
- *         </ul>
- *     </ul>
- *   <li>{@code skipSshOnStart}
- *     <ul>
- *       <li>If true (and if {@code simulateEntity==true}), then no ssh commands will be executed at deploy-time. 
- *           This is useful for speeding up load testing, to get to the desired number of entities.
- *           Should not be set to {@code true} if {@code simulateEntity==false}.
- *       <li>If false, the ssh commands will be executed (based on the value of {@code simulateEntity}.
- *     </ul>
- * </ul>
- */
-public class SimulatedJBoss7ServerImpl extends JBoss7ServerImpl {
-
-    public static final ConfigKey<Boolean> SIMULATE_ENTITY = SimulatedTheeTierApp.SIMULATE_ENTITY;
-    public static final ConfigKey<Boolean> SIMULATE_EXTERNAL_MONITORING = SimulatedTheeTierApp.SIMULATE_EXTERNAL_MONITORING;
-    public static final ConfigKey<Boolean> SKIP_SSH_ON_START = SimulatedTheeTierApp.SKIP_SSH_ON_START;
-    
-    private HttpFeed httpFeed;
-    private FunctionFeed functionFeed;
-    
-    @Override
-    public Class<?> getDriverInterface() {
-        return SimulatedJBoss7SshDriver.class;
-    }
-
-    @Override
-    protected void connectSensors() {
-        boolean simulateEntity = getConfig(SIMULATE_ENTITY);
-        boolean simulateExternalMonitoring = getConfig(SIMULATE_EXTERNAL_MONITORING);
-
-        if (!simulateEntity && !simulateExternalMonitoring) {
-            super.connectSensors();
-            return;
-        }
-        
-        HostAndPort hp = BrooklynAccessUtils.getBrooklynAccessibleAddress(this,
-                getAttribute(MANAGEMENT_HTTP_PORT) + getConfig(PORT_INCREMENT));
-
-        String managementUri = String.format("http://%s:%s/management/subsystem/web/connector/http/read-resource",
-                hp.getHostText(), hp.getPort());
-        sensors().set(MANAGEMENT_URL, managementUri);
-
-        if (simulateExternalMonitoring) {
-            // TODO What would set this normally, if not doing connectServiceUpIsRunning?
-            sensors().set(SERVICE_PROCESS_IS_RUNNING, true);
-        } else {
-            // if simulating entity, then simulate work of periodic HTTP request; TODO but not parsing JSON response
-            String uriToPoll = (simulateEntity) ? "http://localhost:8081" : managementUri;
-            
-            httpFeed = HttpFeed.builder()
-                    .entity(this)
-                    .period(200)
-                    .baseUri(uriToPoll)
-                    .credentials(getConfig(MANAGEMENT_USER), getConfig(MANAGEMENT_PASSWORD))
-                    .poll(new HttpPollConfig<Integer>(MANAGEMENT_STATUS)
-                            .onSuccess(HttpValueFunctions.responseCode()))
-                    .build();
-            
-            // Polls over ssh for whether process is running
-            connectServiceUpIsRunning();
-        }
-        
-        functionFeed = FunctionFeed.builder()
-                .entity(this)
-                .period(5000)
-                .poll(new FunctionPollConfig<Boolean,Boolean>(MANAGEMENT_URL_UP)
-                        .callable(new Callable<Boolean>() {
-                            private int counter = 0;
-                            public Boolean call() {
-                                sensors().set(REQUEST_COUNT, (counter++ % 100));
-                                sensors().set(ERROR_COUNT, (counter++ % 100));
-                                sensors().set(TOTAL_PROCESSING_TIME, (counter++ % 100));
-                                sensors().set(MAX_PROCESSING_TIME, (counter++ % 100));
-                                sensors().set(BYTES_RECEIVED, (long) (counter++ % 100));
-                                sensors().set(BYTES_SENT, (long) (counter++ % 100));
-                                return true;
-                            }}))
-                .build();
-        
-        enrichers().add(Enrichers.builder().updatingMap(Attributes.SERVICE_NOT_UP_INDICATORS)
-                .from(MANAGEMENT_URL_UP)
-                .computing(Functionals.ifNotEquals(true).value("Management URL not reachable") )
-                .build());
-    }
-
-    @Override
-    protected void disconnectSensors() {
-        super.disconnectSensors();
-        if (httpFeed != null) httpFeed.stop();
-        if (functionFeed != null) functionFeed.stop();
-    }
-    
-    public static class SimulatedJBoss7SshDriver extends JBoss7SshDriver {
-        public SimulatedJBoss7SshDriver(SimulatedJBoss7ServerImpl entity, SshMachineLocation machine) {
-            super(entity, machine);
-        }
-        
-        @Override
-        public boolean isRunning() {
-            if (entity.getConfig(SKIP_SSH_ON_START)) {
-                return true;
-            } else {
-                return super.isRunning();
-            }
-        }
-
-        @Override
-        public void install() {
-            if (entity.getConfig(SKIP_SSH_ON_START)) {
-                // no-op
-            } else {
-                super.install();
-            }
-        }
-        
-        @Override
-        public void customize() {
-            if (entity.getConfig(SKIP_SSH_ON_START)) {
-                // no-op
-            } else {
-                super.customize();
-            }
-        }
-        
-        @Override
-        public void launch() {
-            if (!entity.getConfig(SIMULATE_ENTITY)) {
-                super.launch();
-                return;
-            }
-            
-            // We wait for evidence of JBoss running because, using SshCliTool,
-            // we saw the ssh session return before the JBoss process was fully running
-            // so the process failed to start.
-            String pidFile = Os.mergePathsUnix(getRunDir(), PID_FILENAME);
-
-            if (entity.getConfig(SKIP_SSH_ON_START)) {
-                // minimal ssh, so that isRunning will subsequently work
-                newScript(MutableMap.of("usePidFile", pidFile), LAUNCHING)
-                        .body.append(
-                                format("nohup sleep 100000 > %s/console 2>&1 < /dev/null &", getRunDir()))
-                        .execute();
-            } else {
-                newScript(MutableMap.of(USE_PID_FILE, false), LAUNCHING)
-                        .body.append(
-                                "export LAUNCH_JBOSS_IN_BACKGROUND=true",
-                                format("export JBOSS_HOME=%s", getExpandedInstallDir()),
-                                format("export JBOSS_PIDFILE=%s/%s", getRunDir(), PID_FILENAME),
-                                format("echo skipping exec of %s/bin/%s.sh ", getExpandedInstallDir(), SERVER_TYPE) +
-                                        format("--server-config %s ", CONFIG_FILE) +
-                                        format("-Djboss.server.base.dir=%s/%s ", getRunDir(), SERVER_TYPE) +
-                                        format("\"-Djboss.server.base.url=file://%s/%s\" ", getRunDir(), SERVER_TYPE) +
-                                        "-Djava.net.preferIPv4Stack=true " +
-                                        "-Djava.net.preferIPv6Addresses=false " +
-                                        format(" >> %s/console 2>&1 </dev/null &", getRunDir()),
-                                format("nohup sleep 100000 > %s/console 2>&1 < /dev/null &", getRunDir()),
-                                format("echo $! > "+pidFile),
-                                format("echo starting > %s/console", getRunDir()),
-                                "for i in {1..10}\n" +
-                                        "do\n" +
-                                        "    grep -i 'starting' "+getRunDir()+"/console && exit\n" +
-                                        "    sleep 1\n" +
-                                        "done\n" +
-                                        "echo \"Couldn't determine if process is running (console output does not contain 'starting'); continuing but may subsequently fail\""
-    
-                            )
-                        .execute();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedMySqlNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedMySqlNodeImpl.java b/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedMySqlNodeImpl.java
deleted file mode 100644
index 4560050..0000000
--- a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedMySqlNodeImpl.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.load;
-
-import static java.lang.String.format;
-
-import java.util.concurrent.Callable;
-
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode;
-import org.apache.brooklyn.entity.database.mysql.MySqlNodeImpl;
-import org.apache.brooklyn.entity.database.mysql.MySqlSshDriver;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.feed.function.FunctionFeed;
-import org.apache.brooklyn.feed.function.FunctionPollConfig;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper;
-import org.apache.brooklyn.util.time.CountdownTimer;
-import org.apache.brooklyn.util.time.Duration;
-
-/**
- * @see SimulatedJBoss7ServerImpl for description of purpose and configuration options.
- */
-public class SimulatedMySqlNodeImpl extends MySqlNodeImpl {
-
-    public static final ConfigKey<Boolean> SIMULATE_ENTITY = SimulatedTheeTierApp.SIMULATE_ENTITY;
-    public static final ConfigKey<Boolean> SIMULATE_EXTERNAL_MONITORING = SimulatedTheeTierApp.SIMULATE_EXTERNAL_MONITORING;
-    public static final ConfigKey<Boolean> SKIP_SSH_ON_START = SimulatedTheeTierApp.SKIP_SSH_ON_START;
-    
-    private FunctionFeed feed;
-    
-    @Override
-    public Class<?> getDriverInterface() {
-        return SimulatedMySqlSshDriver.class;
-    }
-
-    @Override
-    protected void connectSensors() {
-        boolean simulateExternalMonitoring = getConfig(SIMULATE_EXTERNAL_MONITORING);
-        if (simulateExternalMonitoring) {
-            sensors().set(DATASTORE_URL, String.format("mysql://%s:%s/", getAttribute(HOSTNAME), getAttribute(MYSQL_PORT)));
-            
-            feed = FunctionFeed.builder()
-                    .entity(this)
-                    .period(Duration.FIVE_SECONDS)
-                    .poll(new FunctionPollConfig<Boolean, Boolean>(SERVICE_UP)
-                            .callable(new Callable<Boolean>() {
-                                private int counter = 0;
-                                public Boolean call() {
-                                    sensors().set(QUERIES_PER_SECOND_FROM_MYSQL, (double)(counter++ % 100));
-                                    return true;
-                                }})
-                            .setOnFailureOrException(false))
-                    .build();
-        } else {
-            super.connectSensors();
-        }
-    }
-
-    public static class SimulatedMySqlSshDriver extends MySqlSshDriver {
-
-        private int counter = 0;
-        
-        public SimulatedMySqlSshDriver(SimulatedMySqlNodeImpl entity, SshMachineLocation machine) {
-            super(entity, machine);
-        }
-        
-        // simulate metrics, for if using ssh polling
-        @Override
-        public String getStatusCmd() {
-            if (entity.getConfig(SIMULATE_ENTITY)) {
-                return "echo Uptime: 2427  Threads: 1  Questions: 581  Slow queries: 0  Opens: 53  Flush tables: 1  Open tables: 35  Queries per second avg: "+(counter++ % 100);
-            } else {
-                return super.getStatusCmd();
-            }
-        }
-
-        @Override
-        public void install() {
-            if (entity.getConfig(SKIP_SSH_ON_START)) {
-                // no-op
-            } else {
-                super.install();
-            }
-        }
-        
-        // Not applying creation-script etc, as that requires launching msyqld (so would not scale for single-machine testing)
-        // This is a copy of super.customize, but with the mysqladmin-exec disabled
-        @Override
-        public void customize() {
-            if (!entity.getConfig(SIMULATE_ENTITY)) {
-                super.customize();
-                return;
-            } else if (entity.getConfig(SKIP_SSH_ON_START)) {
-                // no-op
-            } else {
-                copyDatabaseConfigScript();
-    
-                newScript(CUSTOMIZING)
-                    .updateTaskAndFailOnNonZeroResultCode()
-                    .body.append(
-                        "chmod 600 "+getConfigFile(),
-                        getBaseDir()+"/scripts/mysql_install_db "+
-                            "--basedir="+getBaseDir()+" --datadir="+getDataDir()+" "+
-                            "--defaults-file="+getConfigFile())
-                    .execute();
-    
-                // launch, then we will configure it
-                launch();
-    
-                CountdownTimer timer = Duration.seconds(20).countdownTimer();
-                boolean hasCreationScript = copyDatabaseCreationScript();
-                timer.waitForExpiryUnchecked();
-    
-                // DELIBERATELY SKIPPED FOR SCALABILITY TESTING ON SINGLE MACHINE
-                DynamicTasks.queue(
-                    SshEffectorTasks.ssh(
-                        "cd "+getRunDir(),
-                        "echo skipping exec of "+getBaseDir()+"/bin/mysqladmin --defaults-file="+getConfigFile()+" --password= password "+getPassword()
-                    ).summary("setting password"));
-    
-                if (hasCreationScript)
-                    executeScriptFromInstalledFileAsync("creation-script.sql");
-    
-                // not sure necessary to stop then subsequently launch, but seems safest
-                // (if skipping, use a flag in launch to indicate we've just launched it)
-                stop();
-            }
-        }
-
-        @Override
-        public void launch() {
-            if (!entity.getConfig(SIMULATE_ENTITY)) {
-                super.launch();
-                return;
-            }
-            
-            entity.sensors().set(MySqlNode.PID_FILE, getRunDir() + "/" + AbstractSoftwareProcessSshDriver.PID_FILENAME);
-            
-            if (entity.getConfig(SKIP_SSH_ON_START)) {
-                // minimal ssh, so that isRunning will subsequently work
-                newScript(MutableMap.of("usePidFile", true), LAUNCHING)
-                        .body.append(
-                                format("nohup sleep 100000 > %s 2>&1 < /dev/null &", getLogFile()))
-                        .execute();
-            } else {
-                newScript(MutableMap.of("usePidFile", true), LAUNCHING)
-                    .updateTaskAndFailOnNonZeroResultCode()
-                    .body.append(format("echo skipping normal exec of nohup %s/bin/mysqld --defaults-file=%s --user=`whoami` > %s 2>&1 < /dev/null &", getBaseDir(), getConfigFile(), getLogFile()))
-                    .body.append(format("nohup sleep 100000 > %s 2>&1 < /dev/null &", getLogFile()))
-                    .execute();
-            }
-        }
-
-        @Override
-        public ProcessTaskWrapper<Integer> executeScriptFromInstalledFileAsync(String filenameAlreadyInstalledAtServer) {
-            return DynamicTasks.queue(
-                    SshEffectorTasks.ssh(
-                                    "cd "+getRunDir(),
-                                    "echo skipping exec of "+getBaseDir()+"/bin/mysql --defaults-file="+getConfigFile()+" < "+filenameAlreadyInstalledAtServer)
-                            .summary("executing datastore script "+filenameAlreadyInstalledAtServer));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedNginxControllerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedNginxControllerImpl.java b/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedNginxControllerImpl.java
deleted file mode 100644
index c75c8ab..0000000
--- a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedNginxControllerImpl.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.load;
-
-import static java.lang.String.format;
-
-import java.net.URI;
-import java.util.Collection;
-import java.util.concurrent.Callable;
-
-import org.apache.brooklyn.api.entity.Group;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.feed.ConfigToAttributes;
-import org.apache.brooklyn.entity.proxy.nginx.NginxControllerImpl;
-import org.apache.brooklyn.entity.proxy.nginx.NginxSshDriver;
-import org.apache.brooklyn.entity.proxy.nginx.UrlMapping;
-import org.apache.brooklyn.feed.function.FunctionFeed;
-import org.apache.brooklyn.feed.function.FunctionPollConfig;
-import org.apache.brooklyn.feed.http.HttpFeed;
-import org.apache.brooklyn.feed.http.HttpPollConfig;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Networking;
-
-import com.google.common.base.Functions;
-
-/**
- * @see SimulatedJBoss7ServerImpl for description of purpose and configuration options.
- */
-public class SimulatedNginxControllerImpl extends NginxControllerImpl {
-
-    public static final ConfigKey<Boolean> SIMULATE_ENTITY = SimulatedTheeTierApp.SIMULATE_ENTITY;
-    public static final ConfigKey<Boolean> SIMULATE_EXTERNAL_MONITORING = SimulatedTheeTierApp.SIMULATE_EXTERNAL_MONITORING;
-    public static final ConfigKey<Boolean> SKIP_SSH_ON_START = SimulatedTheeTierApp.SKIP_SSH_ON_START;
-    
-    private HttpFeed httpFeed;
-    private FunctionFeed functionFeed;
-    
-    @Override
-    public Class<?> getDriverInterface() {
-        return SimulatedNginxSshDriver.class;
-    }
-
-    @Override
-    public void connectSensors() {
-        boolean simulateEntity = getConfig(SIMULATE_ENTITY);
-        boolean simulateExternalMonitoring = getConfig(SIMULATE_EXTERNAL_MONITORING);
-
-        if (!simulateEntity && !simulateExternalMonitoring) {
-            super.connectSensors();
-            return;
-        }
-
-        // From AbstractController.connectSensors
-        if (getUrl()==null) {
-            sensors().set(MAIN_URI, URI.create(inferUrl()));
-            sensors().set(ROOT_URL, inferUrl());
-        }
-        addServerPoolMemberTrackingPolicy();
-
-        // From NginxController.connectSensors
-        ConfigToAttributes.apply(this);
-
-        if (!simulateExternalMonitoring) {
-            // if simulating entity, then simulate work of periodic HTTP request; TODO but not parsing JSON response
-            String uriToPoll = (simulateEntity) ? "http://localhost:8081" : getAttribute(MAIN_URI).toString();
-            
-            httpFeed = HttpFeed.builder()
-                    .entity(this)
-                    .period(getConfig(HTTP_POLL_PERIOD))
-                    .baseUri(uriToPoll)
-                    .poll(new HttpPollConfig<Boolean>(SERVICE_UP)
-                            .onSuccess(Functions.constant(true))
-                            .onFailureOrException(Functions.constant(true)))
-                    .build();
-        }
-        
-        functionFeed = FunctionFeed.builder()
-                .entity(this)
-                .period(getConfig(HTTP_POLL_PERIOD))
-                .poll(new FunctionPollConfig<Boolean,Boolean>(SERVICE_UP)
-                        .callable(new Callable<Boolean>() {
-                            public Boolean call() {
-                                return true;
-                            }}))
-                .build();
-
-        // Can guarantee that parent/managementContext has been set
-        Group urlMappings = getConfig(URL_MAPPINGS);
-        if (urlMappings != null) {
-            // Listen to the targets of each url-mapping changing
-            subscriptions().subscribeToMembers(urlMappings, UrlMapping.TARGET_ADDRESSES, new SensorEventListener<Collection<String>>() {
-                    @Override public void onEvent(SensorEvent<Collection<String>> event) {
-                        updateNeeded();
-                    }
-                });
-
-            // Listen to url-mappings being added and removed
-            urlMappingsMemberTrackerPolicy = policies().add(PolicySpec.create(UrlMappingsMemberTrackerPolicy.class)
-                    .configure("group", urlMappings));
-        }
-    }
-
-    @Override
-    protected void disconnectSensors() {
-        super.disconnectSensors();
-        if (httpFeed != null) httpFeed.stop();
-        if (functionFeed != null) functionFeed.stop();
-    }
-
-    public static class SimulatedNginxSshDriver extends NginxSshDriver {
-        public SimulatedNginxSshDriver(SimulatedNginxControllerImpl entity, SshMachineLocation machine) {
-            super(entity, machine);
-        }
-
-        @Override
-        public void install() {
-            if (entity.getConfig(SKIP_SSH_ON_START)) {
-                // no-op
-            } else {
-                super.install();
-            }
-        }
-        
-        @Override
-        public void customize() {
-            if (entity.getConfig(SKIP_SSH_ON_START)) {
-                // no-op
-            } else {
-                super.customize();
-            }
-        }
-        
-        @Override
-        public void launch() {
-            if (!entity.getConfig(SIMULATE_ENTITY)) {
-                super.launch();
-                return;
-            }
-            
-            Networking.checkPortsValid(MutableMap.of("httpPort", getPort()));
-
-            if (entity.getConfig(SKIP_SSH_ON_START)) {
-                // minimal ssh, so that isRunning will subsequently work
-                newScript(MutableMap.of("usePidFile", getPidFile()), LAUNCHING)
-                        .body.append(
-                                format("mkdir -p %s/logs", getRunDir()),
-                                format("nohup sleep 100000 > %s 2>&1 < /dev/null &", getLogFileLocation()))
-                        .execute();
-            } else {
-                newScript(MutableMap.of("usePidFile", false), LAUNCHING)
-                        .body.append(
-                                format("cd %s", getRunDir()),
-                                "echo skipping exec of requireExecutable ./sbin/nginx",
-                                sudoBashCIfPrivilegedPort(getPort(), format(
-                                        "echo skipping exec of nohup ./sbin/nginx -p %s/ -c conf/server.conf > %s 2>&1 &", getRunDir(), getLogFileLocation())),
-                                format("nohup sleep 100000 > %s 2>&1 < /dev/null &", getLogFileLocation()),
-                                format("echo $! > "+getPidFile()),
-                                format("for i in {1..10}\n" +
-                                        "do\n" +
-                                        "    test -f %1$s && ps -p `cat %1$s` && exit\n" +
-                                        "    sleep 1\n" +
-                                        "done\n" +
-                                        "echo \"No explicit error launching nginx but couldn't find process by pid; continuing but may subsequently fail\"\n" +
-                                        "cat %2$s | tee /dev/stderr",
-                                        getPidFile(), getLogFileLocation()))
-                        .execute();
-            }
-        }
-
-        // Use pid file, because just simulating the run of nginx
-        @Override
-        public void stop() {
-            newScript(MutableMap.of("usePidFile", getPidFile()), STOPPING).execute();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedTheeTierApp.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedTheeTierApp.java b/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedTheeTierApp.java
deleted file mode 100644
index 0e41beb..0000000
--- a/brooklyn-library/qa/src/main/java/org/apache/brooklyn/qa/load/SimulatedTheeTierApp.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.qa.load;
-
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.attributeWhenReady;
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.formatString;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.java.JavaEntityMethods;
-import org.apache.brooklyn.entity.proxy.nginx.NginxController;
-import org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.DynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.JavaWebAppService;
-import org.apache.brooklyn.entity.webapp.WebAppService;
-import org.apache.brooklyn.entity.webapp.WebAppServiceConstants;
-import org.apache.brooklyn.entity.webapp.jboss.JBoss7Server;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy;
-import org.apache.brooklyn.policy.enricher.HttpLatencyDetector;
-import org.apache.brooklyn.util.CommandLineUtil;
-import org.apache.brooklyn.util.collections.MutableSet;
-
-import com.google.common.base.Function;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
-
-/**
- * A 3-tier app where all components are just "simulated" - they don't actually run 
- * real app-servers or databases, instead just executing a "sleep" command to simulate 
- * the running process.
- * 
- * This is useful for load testing, where we want to test the performance of Brooklyn
- * rather than the ability to host many running app-servers.
- * 
- * The app is based on WebClusterDatabaseExampleApp
- * 
- * @see SimulatedJBoss7ServerImpl for description of purpose and configuration options.
- */
-public class SimulatedTheeTierApp extends AbstractApplication {
-
-    public static final ConfigKey<Boolean> SIMULATE_ENTITY = ConfigKeys.newBooleanConfigKey("simulateEntity", "", true);
-    
-    public static final ConfigKey<Boolean> SIMULATE_EXTERNAL_MONITORING = ConfigKeys.newBooleanConfigKey("simulateExternalMonitoring", "", true);
-
-    public static final ConfigKey<Boolean> SKIP_SSH_ON_START = ConfigKeys.newBooleanConfigKey("skipSshOnStart", "", false);
-
-    public static final String WAR_PATH = "classpath://hello-world.war";
-    public static final String DB_TABLE = "visitors";
-    public static final String DB_USERNAME = "brooklyn";
-    public static final String DB_PASSWORD = "br00k11n";
-    public static final boolean USE_HTTPS = false;
-    
-    @Override
-    public void init() {
-        MySqlNode mysql = addChild(
-                EntitySpec.create(MySqlNode.class)
-                .impl(SimulatedMySqlNodeImpl.class));
-
-        ControlledDynamicWebAppCluster web = addChild(
-                EntitySpec.create(ControlledDynamicWebAppCluster.class)
-                .configure(ControlledDynamicWebAppCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).impl(SimulatedJBoss7ServerImpl.class))
-                .configure(ControlledDynamicWebAppCluster.CONTROLLER_SPEC, EntitySpec.create(NginxController.class).impl(SimulatedNginxControllerImpl.class))
-                        .configure(WebAppService.HTTP_PORT, PortRanges.fromString("8080+"))
-                        .configure(JavaWebAppService.ROOT_WAR, WAR_PATH)
-                        .configure(JavaEntityMethods.javaSysProp("brooklyn.example.db.url"), 
-                                formatString("jdbc:%s%s?user=%s\\&password=%s", 
-                                        attributeWhenReady(mysql, MySqlNode.DATASTORE_URL), DB_TABLE, DB_USERNAME, DB_PASSWORD))
-                        .configure(DynamicCluster.INITIAL_SIZE, 2)
-                        .configure(WebAppService.ENABLED_PROTOCOLS, ImmutableSet.of(USE_HTTPS ? "https" : "http")) );
-
-        web.getCluster().policies().add(AutoScalerPolicy.builder().
-                metric(DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW_PER_NODE).
-                metricRange(10, 100).
-                sizeRange(2, 5).
-                build());
-
-        enrichers().add(Enrichers.builder()
-                .propagating(Attributes.MAIN_URI, WebAppServiceConstants.ROOT_URL,
-                        DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW,
-                        HttpLatencyDetector.REQUEST_LATENCY_IN_SECONDS_IN_WINDOW)
-                .from(web)
-                .build());
-        
-        enrichers().add(Enrichers.builder()
-                .aggregating(Startable.SERVICE_UP)
-                .publishing(Startable.SERVICE_UP)
-                .fromHardcodedProducers(ImmutableList.of(web, mysql))
-                .computing(new Function<Collection<Boolean>, Boolean>() {
-                    @Override public Boolean apply(Collection<Boolean> input) {
-                        return input != null && input.size() == 2 && MutableSet.copyOf(input).equals(ImmutableSet.of(true));
-                    }})
-                .build());
-    }
-    
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", "localhost");
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                 .application(EntitySpec.create(StartableApplication.class, SimulatedTheeTierApp.class)
-                         .displayName("Brooklyn WebApp Cluster with Database example"))
-                 .webconsolePort(port)
-                 .location(location)
-                 .start();
-             
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}


[26/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNode.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNode.java
deleted file mode 100644
index e6580bb..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNode.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.rubyrep;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.database.DatastoreMixins;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-@Catalog(name = "RubyRep Node", description = "RubyRep is a database replication system", iconUrl = "classpath:///rubyrep-logo.jpeg")
-@ImplementedBy(RubyRepNodeImpl.class)
-public interface RubyRepNode extends SoftwareProcess {
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "1.2.0");
-
-    @SetFromFlag("downloadUrl")
-    public static final BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new StringAttributeSensorAndConfigKey(
-            Attributes.DOWNLOAD_URL, "http://files.rubyforge.vm.bytemark.co.uk/rubyrep/rubyrep-${version}.zip");
-
-    @SetFromFlag("configurationScriptUrl")
-    ConfigKey<String> CONFIGURATION_SCRIPT_URL = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.configScriptUrl",
-            "URL where RubyRep configuration can be found - disables other configuration options (except version)");
-
-    @SetFromFlag("templateUrl")
-    ConfigKey<String> TEMPLATE_CONFIGURATION_URL = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.templateConfigurationUrl", "Template file (in freemarker format) for the rubyrep.conf file",
-            "classpath://org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf");
-
-    @SetFromFlag("tables")
-    ConfigKey<String> TABLE_REGEXP = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.tableRegex", "Regular expression to select tables to sync using RubyRep", ".");
-
-    @SetFromFlag("replicationInterval")
-    ConfigKey<Integer> REPLICATION_INTERVAL = ConfigKeys.newIntegerConfigKey(
-            "database.rubyrep.replicationInterval", "Replication Interval", 30);
-
-    @SetFromFlag("startupTimeout")
-    ConfigKey<Integer> DATABASE_STARTUP_TIMEOUT = ConfigKeys.newIntegerConfigKey(
-            "database.rubyrep.startupTimeout", "Time to wait until databases have started up (in seconds)", 120);
-
-    // Left database
-
-    AttributeSensor<String> LEFT_DATASTORE_URL = Sensors.newSensorWithPrefix("left", DatastoreMixins.DATASTORE_URL);
-
-    @SetFromFlag("leftDatabase")
-    ConfigKey<? extends DatastoreCommon> LEFT_DATABASE = ConfigKeys.newConfigKey(DatastoreCommon.class,
-            "database.rubyrep.leftDatabase", "Brooklyn database entity to use as the left DBMS");
-
-    @SetFromFlag("leftDatabaseName")
-    ConfigKey<String> LEFT_DATABASE_NAME = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.leftDatabaseName", "name of database to use for left db");
-
-    @SetFromFlag("leftUsername")
-    ConfigKey<String> LEFT_USERNAME = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.leftUsername", "username to connect to left db");
-
-    @SetFromFlag("leftPassword")
-    ConfigKey<String> LEFT_PASSWORD = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.leftPassword", "password to connect to left db");
-
-    // Right database
-
-    AttributeSensor<String> RIGHT_DATASTORE_URL = Sensors.newSensorWithPrefix("right", DatastoreMixins.DATASTORE_URL);
-
-    @SetFromFlag("rightDatabase")
-    ConfigKey<? extends DatastoreCommon> RIGHT_DATABASE = ConfigKeys.newConfigKey(DatastoreCommon.class,
-            "database.rubyrep.rightDatabase", "Brooklyn database entity to use as the right DBMS");
-
-    @SetFromFlag("rightDatabaseName")
-    ConfigKey<String> RIGHT_DATABASE_NAME = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.rightDatabaseName", "name of database to use for right db");
-
-    @SetFromFlag("rightUsername")
-    ConfigKey<String> RIGHT_USERNAME = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.rightUsername", "username to connect to right db");
-
-    @SetFromFlag("rightPassword")
-    ConfigKey<String> RIGHT_PASSWORD = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.rightPassword", "password to connect to right db");
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNodeImpl.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNodeImpl.java
deleted file mode 100644
index 44f898a..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNodeImpl.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.rubyrep;
-
-import java.net.URI;
-
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.util.time.Duration;
-
-public class RubyRepNodeImpl extends SoftwareProcessImpl implements RubyRepNode {
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        connectServiceUpIsRunning();
-    }
-
-    @Override
-    public void disconnectSensors() {
-        disconnectServiceUpIsRunning();
-        super.disconnectSensors();
-    }
-
-    /**
-     * Set the database {@link DatastoreCommon#DATASTORE_URL urls} as attributes when they become available on the entities.
-     */
-    @Override
-    protected void preStart() {
-        super.preStart();
-
-        DatastoreCommon leftNode = getConfig(LEFT_DATABASE);
-        if (leftNode != null) {
-            sensors().set(LEFT_DATASTORE_URL, Entities.submit(this, DependentConfiguration.attributeWhenReady(leftNode, DatastoreCommon.DATASTORE_URL)).getUnchecked(getDatabaseStartupDelay()));
-        }
-
-        DatastoreCommon rightNode = getConfig(RIGHT_DATABASE);
-        if (rightNode != null) {
-            sensors().set(RIGHT_DATASTORE_URL, Entities.submit(this, DependentConfiguration.attributeWhenReady(rightNode, DatastoreCommon.DATASTORE_URL)).getUnchecked(getDatabaseStartupDelay()));
-        }
-    }
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return RubyRepDriver.class;
-    }
-
-    public Duration getDatabaseStartupDelay() {
-        return Duration.seconds(getConfig(DATABASE_STARTUP_TIMEOUT));
-    }
-
-    // Accessors used in freemarker template processing
-
-    public int getReplicationInterval() {
-        return getConfig(REPLICATION_INTERVAL);
-    }
-    
-    public String getTableRegex() {
-        return getConfig(TABLE_REGEXP);
-    }
-    
-    public URI getLeftDatabaseUrl() {
-        return URI.create(getAttribute(LEFT_DATASTORE_URL));
-    }
-    
-    public String getLeftDatabaseName() {
-        return getConfig(LEFT_DATABASE_NAME);
-    }
-
-    public String getLeftUsername() {
-        return getConfig(LEFT_USERNAME);
-    }
-
-    public String getLeftPassword() {
-        return getConfig(LEFT_PASSWORD);
-    }
-
-    public URI getRightDatabaseUrl() {
-        return URI.create(getAttribute(RIGHT_DATASTORE_URL));
-    }
-
-    public String getRightDatabaseName() {
-        return getConfig(RIGHT_DATABASE_NAME);
-    }
-
-    public String getRightUsername() {
-        return getConfig(RIGHT_USERNAME);
-    }
-
-    public String getRightPassword() {
-        return getConfig(RIGHT_PASSWORD);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepSshDriver.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepSshDriver.java
deleted file mode 100644
index 4d0a9ef..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepSshDriver.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.rubyrep;
-
-import static java.lang.String.format;
-
-import java.io.Reader;
-import java.net.URISyntaxException;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.stream.Streams;
-
-import com.google.common.collect.ImmutableList;
-
-public class RubyRepSshDriver extends AbstractSoftwareProcessSshDriver implements RubyRepDriver {
-
-    public static final Logger log = LoggerFactory.getLogger(RubyRepSshDriver.class);
-
-    public RubyRepSshDriver(EntityLocal entity, SshMachineLocation machine) {
-        super(entity, machine);
-
-        entity.sensors().set(Attributes.LOG_FILE_LOCATION, getLogFileLocation());
-    }
-
-    protected String getLogFileLocation() {
-        return Os.mergePaths(getRunDir(), "log", "rubyrep.log");
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("rubyrep-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = ImmutableList.<String>builder()
-                .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-                .add(BashCommands.INSTALL_UNZIP)
-                .add("unzip " + saveAs)
-                .build();
-
-        newScript(INSTALLING)
-                .body.append(commands)
-                .failOnNonZeroResultCode()
-                .execute();
-    }
-
-    @Override
-    public void customize() {
-        newScript(CUSTOMIZING)
-                .body.append(format("cp -R %s %s", getExpandedInstallDir(), getRunDir()))
-                .failOnNonZeroResultCode()
-                .execute();
-        try {
-            customizeConfiguration();
-        } catch (Exception e) {
-            log.error("Failed to configure rubyrep, replication is unlikely to succeed", e);
-        }
-    }
-
-    protected void customizeConfiguration() throws ExecutionException, InterruptedException, URISyntaxException {
-        log.info("Copying creation script " + getEntity().toString());
-
-        // TODO check these semantics are what we really want?
-        String configScriptUrl = entity.getConfig(RubyRepNode.CONFIGURATION_SCRIPT_URL);
-        Reader configContents;
-        if (configScriptUrl != null) {
-            // If set accept as-is
-            configContents = Streams.reader(resource.getResourceFromUrl(configScriptUrl));
-        } else {
-            String configScriptContents = processTemplate(entity.getConfig(RubyRepNode.TEMPLATE_CONFIGURATION_URL));
-            configContents = Streams.newReaderWithContents(configScriptContents);
-        }
-
-        getMachine().copyTo(configContents, getRunDir() + "/rubyrep.conf");
-    }
-
-    @Override
-    public void launch() {
-        newScript(MutableMap.of("usePidFile", true), LAUNCHING)
-                .body.append(format("nohup rubyrep-%s/jruby/bin/jruby rubyrep-%s/bin/rubyrep replicate -c rubyrep.conf > ./console 2>&1 &", getVersion(), getVersion()))
-                .execute();
-    }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of("usePidFile", true), CHECK_RUNNING).execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(MutableMap.of("usePidFile", true), STOPPING).execute();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/mariadb-logo-180x119.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/mariadb-logo-180x119.png b/brooklyn-library/software/database/src/main/resources/mariadb-logo-180x119.png
deleted file mode 100644
index cea7acd..0000000
Binary files a/brooklyn-library/software/database/src/main/resources/mariadb-logo-180x119.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/mysql-logo-110x57.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/mysql-logo-110x57.png b/brooklyn-library/software/database/src/main/resources/mysql-logo-110x57.png
deleted file mode 100644
index 797c21d..0000000
Binary files a/brooklyn-library/software/database/src/main/resources/mysql-logo-110x57.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml
deleted file mode 100644
index 42fcee5..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-# The Crate distribution comes with comprehensive instructions on available
-# configuration. Select sections are reproduced here.
-
-
-############################## Network And HTTP ###############################
-
-# Crate, by default, binds itself to the 0.0.0.0 address, and listens
-# on port [4200-4300] for HTTP traffic and on port [4300-4400] for node-to-node
-# communication. (the range means that if the port is busy, it will automatically
-# try the next port).
-
-# Set both 'bind_host' and 'publish_host':
-network.host: ${driver.subnetHostname}
-
-# Set a custom port for the node to node communication (4300 by default):
-transport.tcp.port: ${entity.port?c}
-
-# Set a custom port to listen for HTTP traffic:
-http.port: ${entity.httpPort?c}
-
-
-#################################### Paths ####################################
-
-# Path to directory where to store table data allocated for this node.
-path.data: ${driver.dataLocation}
-
-# Path to log files:
-path.logs: ${driver.runDir}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf
deleted file mode 100644
index d78f88e..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf
+++ /dev/null
@@ -1,19 +0,0 @@
-[client]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-user            = root
-password        = ${entity.password}
-
-# Here follows entries for some specific programs
-
-# The MariaDB server, which (confusingly) uses MySQL terminology for backwards compatibility
-[mysqld]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-basedir         = ${driver.baseDir}
-datadir         = ${driver.dataDir}
-bind-address    = 0.0.0.0
-# skip-networking
-
-# Custom configuration options
-${driver.mariaDbServerOptionsString}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini
deleted file mode 100644
index ee437ac..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini
+++ /dev/null
@@ -1,390 +0,0 @@
-;SQL Server 2012 Configuration File
-
-
-[OPTIONS]
-
-
-
-; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter. 
-
-
-
-ACTION="Install"
-
-; Detailed help for command line argument ROLE has not been defined yet.
-
-ROLE="AllFeatures_WithDefaults"
-
-
-; Detailed help for command line argument ENU has not been defined yet. 
-
-
-
-ENU="True"
-
-
-
-; Setup will not display any user interface. 
-
-
-
-QUIET="True"
-
- 
-
-; Setup will display progress only, without any user interaction. 
-
-
-
-QUIETSIMPLE="False"
-
-
-
-; Specify whether SQL Server Setup should discover and include product updates. The valid values are True and False or 1 and 0. By default SQL Server Setup will include updates that are found. 
-
-
-
-UpdateEnabled="False"
-
-
-
-; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, MDS, and Tools. The SQL feature will install the Database Engine, Replication, Full-Text, and Data Quality Services (DQS) server. The Tools feature will install Management Tools, Books online components, SQL Server Data Tools, and other shared components. 
-
-
-
-FEATURES="${config['mssql.features']}"
-
-
-
-; Specify the location where SQL Server Setup will obtain product updates. The valid values are "MU" to search Microsoft Update, a valid folder path, a relative path such as .\MyUpdates or a UNC share. By default SQL Server Setup will search Microsoft Update or a Windows Update service through the Window Server Update Services. 
-
-
-
-UpdateSource="MU"
-
-
-
-; Displays the command line parameters usage 
-
-
-
-HELP="False"
-
-
-
-; Specifies that the detailed Setup log should be piped to the console. 
-
-
-
-INDICATEPROGRESS="True"
-
-
-
-; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system. 
-
-
-
-X86="False"
-
-
-
-; Specify the root installation directory for shared components.  This directory remains unchanged after shared components are already installed. 
-
-
-
-INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
-
-
-
-; Specify the root installation directory for the WOW64 shared components.  This directory remains unchanged after WOW64 shared components are already installed. 
-
-
-
-INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
-
-
-
-; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), Analysis Services (AS), or Reporting Services (RS). 
-
-
-
-INSTANCENAME="MSSQLSERVER"
-
-
-
-; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will incorporate the instance ID of the SQL Server instance. 
-
-
-
-INSTANCEID="MSSQLSERVER"
-
-
-
-; Specify that SQL Server feature usage data can be collected and sent to Microsoft. Specify 1 or True to enable and 0 or False to disable this feature. 
-
-
-
-SQMREPORTING="False"
-
-
-; The account used by the Distributed Replay Controller service.
-
-CTLRSVCACCOUNT="NT Service\SQL Server Distributed Replay Controller"
-
-; The startup type for the Distributed Replay Controller service.
-
-CTLRSTARTUPTYPE="Manual"
-
-; The account used by the Distributed Replay Client service.
-
-CLTSVCACCOUNT="NT Service\SQL Server Distributed Replay Client"
-
-; The startup type for the Distributed Replay Client service.
-
-CLTSTARTUPTYPE="Manual"
-
-; The result directory for the Distributed Replay Client service.
-
-CLTRESULTDIR="C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\ResultDir"
-
-; The working directory for the Distributed Replay Client service.
-
-CLTWORKINGDIR="C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\WorkingDir"
-
-; RSInputSettings_RSInstallMode_Description
-
-RSINSTALLMODE="DefaultNativeMode"
-
-; RSInputSettings_RSInstallMode_Description
-
-RSSHPINSTALLMODE="SharePointFilesOnlyMode"
-
-; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to enable and 0 or False to disable this feature.
-
-
-
-; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to enable and 0 or False to disable this feature. 
-
-
-
-ERRORREPORTING="False"
-
-
-
-; Specify the installation directory. 
-
-
-
-INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
-
-
-
-; Agent account name 
-
-
-
-AGTSVCACCOUNT="NT Service\SQLSERVERAGENT"
-
-
-
-; Auto-start service after installation.  
-
-
-
-AGTSVCSTARTUPTYPE="Automatic"
-
-
-; Startup type for Integration Services.
-
-ISSVCSTARTUPTYPE="Automatic"
-
-; Account for Integration Services: Domain\User or system account.
-
-ISSVCACCOUNT="NT Service\MsDtsServer110"
-
-; The name of the account that the Analysis Services service runs under.
-
-ASSVCACCOUNT="NT Service\MSSQLServerOLAPService"
-
-; Controls the service startup type setting after the service has been created.
-
-ASSVCSTARTUPTYPE="Automatic"
-
-; The collation to be used by Analysis Services.
-
-ASCOLLATION="Latin1_General_CI_AS"
-
-; The location for the Analysis Services data files.
-
-ASDATADIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Data"
-
-; The location for the Analysis Services log files.
-
-ASLOGDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Log"
-
-; The location for the Analysis Services backup files.
-
-ASBACKUPDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Backup"
-
-; The location for the Analysis Services temporary files.
-
-ASTEMPDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Temp"
-
-; The location for the Analysis Services configuration files.
-
-ASCONFIGDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Config"
-
-; Specifies whether or not the MSOLAP provider is allowed to run in process.
-
-ASPROVIDERMSOLAP="1"
-
-; Specifies the list of administrator accounts that need to be provisioned.
-
-ASSYSADMINACCOUNTS="BUILTIN\Administrators"
-
-; Specifies the server mode of the Analysis Services instance. Valid values are MULTIDIMENSIONAL and TABULAR. The default value is MULTIDIMENSIONAL.
-
-ASSERVERMODE="MULTIDIMENSIONAL"
-
-; CM brick TCP communication port 
-
-
-
-COMMFABRICPORT="0"
-
-
-
-; How matrix will use private networks 
-
-
-
-COMMFABRICNETWORKLEVEL="0"
-
-
-
-; How inter brick communication will be protected 
-
-
-
-COMMFABRICENCRYPTION="0"
-
-
-
-; TCP port used by the CM brick 
-
-
-
-MATRIXCMBRICKCOMMPORT="0"
-
-
-
-; Startup type for the SQL Server service. 
-
-
-
-SQLSVCSTARTUPTYPE="Automatic"
-
-
-
-; Level to enable FILESTREAM feature at (0, 1, 2 or 3). 
-
-
-
-FILESTREAMLEVEL="0"
-
-
-
-; Set to "1" to enable RANU for SQL Server Express. 
-
-
-
-ENABLERANU="False"
-
-
-
-; Specifies a Windows collation or an SQL collation to use for the Database Engine. 
-
-
-
-SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
-
-
-
-; Account for SQL Server service: Domain\User or system account. 
-
-
-
-SQLSVCACCOUNT="NT Service\MSSQLSERVER"
-
-
-
-; Windows account(s) to provision as SQL Server system administrators. 
-
-
-
-SQLSYSADMINACCOUNTS="BUILTIN\Administrators"
-
-
-
-; The default is Windows Authentication. Use "SQL" for Mixed Mode Authentication. 
-
-
-
-SECURITYMODE="SQL"
-
-
-SAPWD="${config['mssql.sa.password']}"
-
-
-
-; Provision current user as a Database Engine system administrator for SQL Server 2012 Express. 
-
-
-
-ADDCURRENTUSERASSQLADMIN="False"
-
-
-
-; Specify 0 to disable or 1 to enable the TCP/IP protocol. 
-
-
-
-TCPENABLED="1"
-
-
-
-; Specify 0 to disable or 1 to enable the Named Pipes protocol. 
-
-
-
-NPENABLED="0"
-
-
-
-; Startup type for Browser Service. 
-
-
-
-BROWSERSVCSTARTUPTYPE="Disabled"
-
-
-; Specifies which account the report server NT service should execute under.  When omitted or when the value is empty string, the default built-in account for the current operating system.
-; The username part of RSSVCACCOUNT is a maximum of 20 characters long and
-; The domain part of RSSVCACCOUNT is a maximum of 254 characters long.
-
-RSSVCACCOUNT="NT Service\ReportServer"
-
-; Specifies how the startup mode of the report server NT service.  When
-; Manual - Service startup is manual mode (default).
-; Automatic - Service startup is automatic mode.
-; Disabled - Service is disabled
-
-RSSVCSTARTUPTYPE="Automatic"
-
-; Add description of input argument FTSVCACCOUNT
-
-FTSVCACCOUNT="NT Service\MSSQLFDLauncher"
-
-
-
-IAcceptSQLServerLicenseTerms="True"

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/checkrunningmssql.bat
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/checkrunningmssql.bat b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/checkrunningmssql.bat
deleted file mode 100644
index 34512c8..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/checkrunningmssql.bat
+++ /dev/null
@@ -1,23 +0,0 @@
-[#ftl]
-@echo off
-REM Licensed to the Apache Software Foundation (ASF) under one
-REM or more contributor license agreements.  See the NOTICE file
-REM distributed with this work for additional information
-REM regarding copyright ownership.  The ASF licenses this file
-REM to you under the Apache License, Version 2.0 (the
-REM "License"); you may not use this file except in compliance
-REM with the License.  You may obtain a copy of the License at
-REM
-REM   http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing,
-REM software distributed under the License is distributed on an
-REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-REM KIND, either express or implied.  See the License for the
-REM specific language governing permissions and limitations
-REM under the License.
-
-set serviceName=MSSQL\$${config['mssql.instance.name']}
-
-[#noparse]
-sc query %serviceName% | find "RUNNING"

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/configuremssql.ps1
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/configuremssql.ps1 b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/configuremssql.ps1
deleted file mode 100644
index 06522fd..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/configuremssql.ps1
+++ /dev/null
@@ -1,22 +0,0 @@
-[#ftl]
-#!ps1
-#
-# 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.
-#
-netsh advfirewall firewall add rule name=SQLPort dir=in protocol=tcp action=allow localport=1433 remoteip=any profile=any
-( Get-WmiObject -Namespace "root\Microsoft\SqlServer\ComputerManagement11" -Query "Select * from ServerNetworkProtocolProperty where ProtocolName='Tcp' and IPAddressName='IPAll' and PropertyName='TcpPort'" ).SetStringValue("1433")

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1 b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
deleted file mode 100644
index fcbf54a..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
+++ /dev/null
@@ -1,45 +0,0 @@
-[#ftl]
-#!ps1
-#
-# 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.
-#
-
-$Url = "${config['mssql.download.url']}"
-$Path = "C:\sql2008.iso"
-$Username = "${config['mssql.download.user']}"
-$Password = '${config['mssql.download.password']}'
-
-
-$WebClient = New-Object System.Net.WebClient
-$WebClient.Credentials = New-Object System.Net.Networkcredential($Username, $Password)
-$WebClient.DownloadFile( $url, $path )
-
-$mountResult = Mount-DiskImage $Path -PassThru
-$driveLetter = (($mountResult | Get-Volume).DriveLetter) + ":\"
-
-New-Item -ItemType Directory -Force -Path "C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\ResultDir"
-New-Item -ItemType Directory -Force -Path "C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\WorkingDir"
-
-Install-WindowsFeature NET-Framework-Core
-
-$pass = '${attribute['windows.password']}'
-$secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force
-$mycreds = New-Object System.Management.Automation.PSCredential ($($env:COMPUTERNAME + "\Administrator"), $secpasswd)
-
-$process = Start-Process ( $driveLetter + "setup.exe") -ArgumentList "/ConfigurationFile=C:\ConfigurationFile.ini" -Credential $mycreds -RedirectStandardOutput "C:\sqlout.txt" -RedirectStandardError "C:\sqlerr.txt" -Wait -PassThru
-exit $process.ExitCode

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/launchmssql.bat
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/launchmssql.bat b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/launchmssql.bat
deleted file mode 100644
index ad0deff..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/launchmssql.bat
+++ /dev/null
@@ -1,25 +0,0 @@
-[#ftl]
-@echo off
-REM Licensed to the Apache Software Foundation (ASF) under one
-REM or more contributor license agreements.  See the NOTICE file
-REM distributed with this work for additional information
-REM regarding copyright ownership.  The ASF licenses this file
-REM to you under the Apache License, Version 2.0 (the
-REM "License"); you may not use this file except in compliance
-REM with the License.  You may obtain a copy of the License at
-REM
-REM   http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing,
-REM software distributed under the License is distributed on an
-REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-REM KIND, either express or implied.  See the License for the
-REM specific language governing permissions and limitations
-REM under the License.
-
-set serviceName=MSSQL\$${config['mssql.instance.name']}
-
-[#noparse]
-sc stop %serviceName%
-sc config %serviceName% start=auto
-sc start %serviceName%

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
deleted file mode 100644
index c3d3c99..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
-name: mssql
-
-location:
-  jclouds:aws-ec2:us-west-2:
-    displayName: AWS Oregon (Windows)
-    imageId: us-west-2/ami-8fd3f9bf
-    hardwareId:  m3.medium
-    useJcloudsSshInit: false
-    templateOptions:
-      subnetId: subnet-a10e96c4
-      securityGroupIds: [['sg-a2d0c2c7']]
-      mapNewVolumeToDeviceName: ["/dev/sda1", 100, true]
-
-services:
-- type: org.apache.brooklyn.entity.software.base.VanillaWindowsProcess
-  brooklyn.config:
-    templates.install:
-      classpath://org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini: "C:\\ConfigurationFile.ini"
-      classpath://org/apache/brooklyn/entity/database/mssql/installmssql.ps1: "C:\\installmssql.ps1"
-      classpath://org/apache/brooklyn/entity/database/mssql/configuremssql.ps1: "C:\\configuremssql.ps1"
-      classpath://org/apache/brooklyn/entity/database/mssql/launchmssql.bat: "C:\\launchmssql.bat"
-      classpath://org/apache/brooklyn/entity/database/mssql/stopmssql.bat: "C:\\stopmssql.bat"
-    install.command: powershell -command "C:\\installmssql.ps1"
-    customize.command: powershell -command "C:\\configuremssql.ps1"
-    launch.command: "C:\\launchmssql.bat"
-    stop.command: "C:\\stopmssql.bat"
-    checkRunning.command: echo true
-
-    ## NOTE: Values must be supplied for the following
-    mssql.download.url:
-    mssql.download.user:
-    mssql.download.password:
-    mssql.sa.password:
-    mssql.instance.name:
-
-    ## The following is a list of *all* MSSQL features. Installation time and footprint can be greatly
-    ## reduced by removing unnecessary features
-    mssql.features: "SQLENGINE,REPLICATION,FULLTEXT,DQ,AS,RS,RS_SHP,DQC,BIDS,CONN,IS,BC,SDK,BOL,SSMS,ADV_SSMS,DREPLAY_CTLR,DREPLAY_CLT,SNAC_SDK"
-  provisioning.properties:
-    required.ports: 1433
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/stopmssql.bat
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/stopmssql.bat b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/stopmssql.bat
deleted file mode 100644
index 68358f1..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/stopmssql.bat
+++ /dev/null
@@ -1,24 +0,0 @@
-[#ftl]
-@echo off
-REM Licensed to the Apache Software Foundation (ASF) under one
-REM or more contributor license agreements.  See the NOTICE file
-REM distributed with this work for additional information
-REM regarding copyright ownership.  The ASF licenses this file
-REM to you under the Apache License, Version 2.0 (the
-REM "License"); you may not use this file except in compliance
-REM with the License.  You may obtain a copy of the License at
-REM
-REM   http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing,
-REM software distributed under the License is distributed on an
-REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-REM KIND, either express or implied.  See the License for the
-REM specific language governing permissions and limitations
-REM under the License.
-
-set serviceName=MSSQL\$${config['mssql.instance.name']}
-
-[#noparse]
-sc config %serviceName% start=demand
-sc stop %serviceName%

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
deleted file mode 100644
index 40b4086..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-[client]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-user            = root
-password        = ${entity.password}
-
-# Here follows entries for some specific programs
-
-# The MySQL server
-[mysqld]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-basedir         = ${driver.baseDir}
-datadir         = ${driver.dataDir}
-bind-address    = 0.0.0.0
-log_error       = ${driver.runDir}/mysql_error_${entity.getId()}.log
-log_warnings    = 2
-general_log      = ${config["mysql.general_log"]?string('on','off')}
-general_log_file = ${driver.runDir}/mysql_general_${entity.getId()}.log
-# skip-networking
-
-#Prevent the GRANT statement from automatically creating new user accounts if it would otherwise do so,
-#unless authentication information is specified
-sql_mode = NO_AUTO_CREATE_USER
-
-# Custom configuration options
-${driver.mySqlServerOptionsString}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
deleted file mode 100644
index 54a773b..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
+++ /dev/null
@@ -1,30 +0,0 @@
-[client]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-user            = root
-password        = ${entity.password}
-
-# Here follows entries for some specific programs
-
-# The MySQL server
-[mysqld]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-basedir         = ${driver.baseDir}
-datadir         = ${driver.dataDir}
-bind-address    = 0.0.0.0
-# skip-networking
-
-#Prevent the GRANT statement from automatically creating new user accounts if it would otherwise do so,
-#unless authentication information is specified
-sql_mode = NO_AUTO_CREATE_USER
-
-# Replication config
-server-id       = 1
-binlog-format   = mixed
-log-bin         = mysql-bin
-sync_binlog     = 1
-innodb_flush_log_at_trx_commit=1
-
-# Custom configuration options
-${driver.mySqlServerOptionsString}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
deleted file mode 100644
index b4af02a..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
+++ /dev/null
@@ -1,50 +0,0 @@
-[#ftl]
-[client]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-user            = root
-password        = ${entity.password}
-
-# Here follows entries for some specific programs
-
-# The MySQL server
-[mysqld]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-basedir         = ${driver.baseDir}
-datadir         = ${driver.dataDir}
-bind-address    = 0.0.0.0
-# skip-networking
-
-#Prevent the GRANT statement from automatically creating new user accounts if it would otherwise do so,
-#unless authentication information is specified
-sql_mode = NO_AUTO_CREATE_USER
-
-# Replication config
-server-id       = ${config["mysql.server_id"]}
-relay-log       = mysql-slave-${config["mysql.server_id"]}-relay
-relay-log-recovery = 1
-relay-log-info-repository = TABLE
-relay-log-purge = 1
-[#list config["mysql.slave.replicate_do_db"]! as db]
-replicate-do-db = ${db}
-[/#list]
-
-[#list config["mysql.slave.replicate_do_table"]! as db]
-replicate-do-table = ${db}
-[/#list]
-
-[#list config["mysql.slave.replicate_ignore_table"]! as db]
-replicate-ignore-table = ${db}
-[/#list]
-
-[#list config["mysql.slave.replicate_wild_do_table"]! as db]
-replicate-wild-do-table = ${db}
-[/#list]
-
-[#list config["mysql.slave.replicate_wild_ignore_table"]! as db]
-replicate-wild-ignore-table = ${db}
-[/#list]
-
-# Custom configuration options
-${driver.mySqlServerOptionsString}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf
deleted file mode 100644
index b6234c9..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf
+++ /dev/null
@@ -1,513 +0,0 @@
-[#ftl]
-#
-
-# -----------------------------
-# PostgreSQL configuration file
-# -----------------------------
-#
-# This file consists of lines of the form:
-#
-#   name = value
-#
-# (The "=" is optional.)  Whitespace may be used.  Comments are introduced with
-# "#" anywhere on a line.  The complete list of parameter names and allowed
-# values can be found in the PostgreSQL documentation.
-#
-# The commented-out settings shown in this file represent the default values.
-# Re-commenting a setting is NOT sufficient to revert it to the default value;
-# you need to reload the server.
-#
-# This file is read on server startup and when the server receives a SIGHUP
-# signal.  If you edit the file on a running system, you have to SIGHUP the
-# server for the changes to take effect, or use "pg_ctl reload".  Some
-# parameters, which are marked below, require a server shutdown and restart to
-# take effect.
-#
-# Any parameter can also be given as a command-line option to the server, e.g.,
-# "postgres -c log_connections=on".  Some parameters can be changed at run time
-# with the "SET" SQL command.
-#
-# Memory units:  kB = kilobytes        Time units:  ms  = milliseconds
-#                MB = megabytes                     s   = seconds
-#                GB = gigabytes                     min = minutes
-#                                                   h   = hours
-#                                                   d   = days
-
-
-#------------------------------------------------------------------------------
-# FILE LOCATIONS
-#------------------------------------------------------------------------------
-
-# The default values of these variables are driven from the -D command-line
-# option or PGDATA environment variable.
-
-data_directory = '${driver.dataDir}'       # use data in another directory
-                    # (change requires restart)
-#hba_file = '${driver.dataDir}/pg_hba.conf' # host-based authentication file
-                    # (change requires restart)
-#ident_file = '${driver.dataDir}/pg_ident.conf' # ident configuration file
-                    # (change requires restart)
-
-# If external_pid_file is not explicitly set, no extra PID file is written.
-external_pid_file = '${driver.pidFile}'       # write an extra PID file
-                    # (change requires restart)
-
-
-#------------------------------------------------------------------------------
-# CONNECTIONS AND AUTHENTICATION
-#------------------------------------------------------------------------------
-
-# - Connection Settings -
-
-listen_addresses = '${driver.hostname}'     # what IP address(es) to listen on;
-                    # comma-separated list of addresses;
-                    # defaults to 'localhost', '*' = all
-                    # (change requires restart)
-port = ${entity.postgreSqlPort?c}                # (change requires restart)
-max_connections = ${entity.maxConnections?c}           # (change requires restart)
-# Note:  Increasing max_connections costs ~400 bytes of shared memory per 
-# connection slot, plus lock space (see max_locks_per_transaction).
-#superuser_reserved_connections = 3 # (change requires restart)
-#unix_socket_directory = ''     # (change requires restart)
-#unix_socket_group = ''         # (change requires restart)
-#unix_socket_permissions = 0777     # begin with 0 to use octal notation
-                    # (change requires restart)
-#bonjour = off              # advertise server via Bonjour
-                    # (change requires restart)
-#bonjour_name = ''          # defaults to the computer name
-                    # (change requires restart)
-
-# - Security and Authentication -
-
-#authentication_timeout = 1min      # 1s-600s
-#ssl = off              # (change requires restart)
-#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'  # allowed SSL ciphers
-                    # (change requires restart)
-#password_encryption = on
-#db_user_namespace = off
-
-# Kerberos and GSSAPI
-#krb_server_keyfile = ''
-#krb_srvname = 'postgres'       # (Kerberos only)
-#krb_caseins_users = off
-
-# - TCP Keepalives -
-# see "man 7 tcp" for details
-
-#tcp_keepalives_idle = 0        # TCP_KEEPIDLE, in seconds;
-                    # 0 selects the system default
-#tcp_keepalives_interval = 0        # TCP_KEEPINTVL, in seconds;
-                    # 0 selects the system default
-#tcp_keepalives_count = 0       # TCP_KEEPCNT;
-                    # 0 selects the system default
-
-
-#------------------------------------------------------------------------------
-# RESOURCE USAGE (except WAL)
-#------------------------------------------------------------------------------
-
-# - Memory -
-
-shared_buffers = ${entity.sharedMemory}           # min 128kB
-                    # (change requires restart)
-#temp_buffers = 8MB         # min 800kB
-#max_prepared_transactions = 0      # zero disables the feature
-                    # (change requires restart)
-# Note:  Increasing max_prepared_transactions costs ~600 bytes of shared memory
-# per transaction slot, plus lock space (see max_locks_per_transaction).
-# It is not advisable to set max_prepared_transactions nonzero unless you
-# actively intend to use prepared transactions.
-#work_mem = 1MB             # min 64kB
-#maintenance_work_mem = 16MB        # min 1MB
-#max_stack_depth = 2MB          # min 100kB
-
-# - Kernel Resource Usage -
-
-#max_files_per_process = 1000       # min 25
-                    # (change requires restart)
-#shared_preload_libraries = ''      # (change requires restart)
-
-# - Cost-Based Vacuum Delay -
-
-#vacuum_cost_delay = 0ms        # 0-100 milliseconds
-#vacuum_cost_page_hit = 1       # 0-10000 credits
-#vacuum_cost_page_miss = 10     # 0-10000 credits
-#vacuum_cost_page_dirty = 20        # 0-10000 credits
-#vacuum_cost_limit = 200        # 1-10000 credits
-
-# - Background Writer -
-
-#bgwriter_delay = 200ms         # 10-10000ms between rounds
-#bgwriter_lru_maxpages = 100        # 0-1000 max buffers written/round
-#bgwriter_lru_multiplier = 2.0      # 0-10.0 multipler on buffers scanned/round
-
-# - Asynchronous Behavior -
-
-#effective_io_concurrency = 1       # 1-1000. 0 disables prefetching
-
-
-#------------------------------------------------------------------------------
-# WRITE AHEAD LOG
-#------------------------------------------------------------------------------
-
-# - Settings -
-
-#fsync = on             # turns forced synchronization on or off
-#synchronous_commit = on        # immediate fsync at commit
-#wal_sync_method = fsync        # the default is the first option 
-                    # supported by the operating system:
-                    #   open_datasync
-                    #   fdatasync
-                    #   fsync
-                    #   fsync_writethrough
-                    #   open_sync
-#full_page_writes = on          # recover from partial page writes
-#wal_buffers = 64kB         # min 32kB
-                    # (change requires restart)
-#wal_writer_delay = 200ms       # 1-10000 milliseconds
-
-#commit_delay = 0           # range 0-100000, in microseconds
-#commit_siblings = 5            # range 1-1000
-
-# - Checkpoints -
-
-#checkpoint_segments = 3        # in logfile segments, min 1, 16MB each
-#checkpoint_timeout = 5min      # range 30s-1h
-#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
-#checkpoint_warning = 30s       # 0 disables
-
-# - Archiving -
-
-#archive_mode = off     # allows archiving to be done
-                # (change requires restart)
-#archive_command = ''       # command to use to archive a logfile segment
-#archive_timeout = 0        # force a logfile segment switch after this
-                # number of seconds; 0 disables
-
-
-#------------------------------------------------------------------------------
-# QUERY TUNING
-#------------------------------------------------------------------------------
-
-# - Planner Method Configuration -
-
-#enable_bitmapscan = on
-#enable_hashagg = on
-#enable_hashjoin = on
-#enable_indexscan = on
-#enable_mergejoin = on
-#enable_nestloop = on
-#enable_seqscan = on
-#enable_sort = on
-#enable_tidscan = on
-
-# - Planner Cost Constants -
-
-#seq_page_cost = 1.0            # measured on an arbitrary scale
-#random_page_cost = 4.0         # same scale as above
-#cpu_tuple_cost = 0.01          # same scale as above
-#cpu_index_tuple_cost = 0.005       # same scale as above
-#cpu_operator_cost = 0.0025     # same scale as above
-#effective_cache_size = 128MB
-
-# - Genetic Query Optimizer -
-
-#geqo = on
-#geqo_threshold = 12
-#geqo_effort = 5            # range 1-10
-#geqo_pool_size = 0         # selects default based on effort
-#geqo_generations = 0           # selects default based on effort
-#geqo_selection_bias = 2.0      # range 1.5-2.0
-#geqo_seed = 0.0            # range 0.0-1.0
-
-# - Other Planner Options -
-
-#default_statistics_target = 100    # range 1-10000
-#constraint_exclusion = partition   # on, off, or partition
-#cursor_tuple_fraction = 0.1        # range 0.0-1.0
-#from_collapse_limit = 8
-#join_collapse_limit = 8        # 1 disables collapsing of explicit 
-                    # JOIN clauses
-
-
-#------------------------------------------------------------------------------
-# ERROR REPORTING AND LOGGING
-#------------------------------------------------------------------------------
-
-# - Where to Log -
-
-#log_destination = 'stderr'     # Valid values are combinations of
-                    # stderr, csvlog, syslog and eventlog,
-                    # depending on platform.  csvlog
-                    # requires logging_collector to be on.
-
-# This is used when logging to stderr:
-#logging_collector = off        # Enable capturing of stderr and csvlog
-                    # into log files. Required to be on for
-                    # csvlogs.
-                    # (change requires restart)
-
-# These are only used if logging_collector is on:
-#log_directory = 'pg_log'       # directory where log files are written,
-                    # can be absolute or relative to PGDATA
-#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'    # log file name pattern,
-                    # can include strftime() escapes
-#log_truncate_on_rotation = off     # If on, an existing log file of the
-                    # same name as the new log file will be
-                    # truncated rather than appended to.
-                    # But such truncation only occurs on
-                    # time-driven rotation, not on restarts
-                    # or size-driven rotation.  Default is
-                    # off, meaning append to existing files
-                    # in all cases.
-#log_rotation_age = 1d          # Automatic rotation of logfiles will
-                    # happen after that time.  0 disables.
-#log_rotation_size = 10MB       # Automatic rotation of logfiles will 
-                    # happen after that much log output.
-                    # 0 disables.
-
-# These are relevant when logging to syslog:
-#syslog_facility = 'LOCAL0'
-#syslog_ident = 'postgres'
-
-#silent_mode = off          # Run server silently.
-                    # DO NOT USE without syslog or
-                    # logging_collector
-                    # (change requires restart)
-
-
-# - When to Log -
-
-#client_min_messages = notice       # values in order of decreasing detail:
-                    #   debug5
-                    #   debug4
-                    #   debug3
-                    #   debug2
-                    #   debug1
-                    #   log
-                    #   notice
-                    #   warning
-                    #   error
-
-#log_min_messages = warning     # values in order of decreasing detail:
-                    #   debug5
-                    #   debug4
-                    #   debug3
-                    #   debug2
-                    #   debug1
-                    #   info
-                    #   notice
-                    #   warning
-                    #   error
-                    #   log
-                    #   fatal
-                    #   panic
-
-#log_error_verbosity = default      # terse, default, or verbose messages
-
-#log_min_error_statement = error    # values in order of decreasing detail:
-                    #   debug5
-                    #   debug4
-                    #   debug3
-                    #   debug2
-                    #   debug1
-                    #   info
-                    #   notice
-                    #   warning
-                    #   error
-                    #   log
-                    #   fatal
-                    #   panic (effectively off)
-
-#log_min_duration_statement = -1    # -1 is disabled, 0 logs all statements
-                    # and their durations, > 0 logs only
-                    # statements running at least this number
-                    # of milliseconds
-
-
-# - What to Log -
-
-#debug_print_parse = off
-#debug_print_rewritten = off
-#debug_print_plan = off
-#debug_pretty_print = on
-#log_checkpoints = off
-#log_connections = off
-#log_disconnections = off
-#log_duration = off
-#log_hostname = off
-#log_line_prefix = ''           # special values:
-                    #   %u = user name
-                    #   %d = database name
-                    #   %r = remote host and port
-                    #   %h = remote host
-                    #   %p = process ID
-                    #   %t = timestamp without milliseconds
-                    #   %m = timestamp with milliseconds
-                    #   %i = command tag
-                    #   %e = SQL state
-                    #   %c = session ID
-                    #   %l = session line number
-                    #   %s = session start timestamp
-                    #   %v = virtual transaction ID
-                    #   %x = transaction ID (0 if none)
-                    #   %q = stop here in non-session
-                    #        processes
-                    #   %% = '%'
-                    # e.g. '<%u%%%d> '
-#log_lock_waits = off           # log lock waits >= deadlock_timeout
-#log_statement = 'none'         # none, ddl, mod, all
-#log_temp_files = -1            # log temporary files equal or larger
-                    # than the specified size in kilobytes;
-                    # -1 disables, 0 logs all temp files
-#log_timezone = unknown         # actually, defaults to TZ environment
-                    # setting
-
-
-#------------------------------------------------------------------------------
-# RUNTIME STATISTICS
-#------------------------------------------------------------------------------
-
-# - Query/Index Statistics Collector -
-
-#track_activities = on
-#track_counts = on
-#track_functions = none         # none, pl, all
-#track_activity_query_size = 1024
-#update_process_title = on
-#stats_temp_directory = 'pg_stat_tmp'
-
-
-# - Statistics Monitoring -
-
-#log_parser_stats = off
-#log_planner_stats = off
-#log_executor_stats = off
-#log_statement_stats = off
-
-
-#------------------------------------------------------------------------------
-# AUTOVACUUM PARAMETERS
-#------------------------------------------------------------------------------
-
-#autovacuum = on            # Enable autovacuum subprocess?  'on' 
-                    # requires track_counts to also be on.
-#log_autovacuum_min_duration = -1   # -1 disables, 0 logs all actions and
-                    # their durations, > 0 logs only
-                    # actions running at least this number
-                    # of milliseconds.
-#autovacuum_max_workers = 3     # max number of autovacuum subprocesses
-#autovacuum_naptime = 1min      # time between autovacuum runs
-#autovacuum_vacuum_threshold = 50   # min number of row updates before
-                    # vacuum
-#autovacuum_analyze_threshold = 50  # min number of row updates before 
-                    # analyze
-#autovacuum_vacuum_scale_factor = 0.2   # fraction of table size before vacuum
-#autovacuum_analyze_scale_factor = 0.1  # fraction of table size before analyze
-#autovacuum_freeze_max_age = 200000000  # maximum XID age before forced vacuum
-                    # (change requires restart)
-#autovacuum_vacuum_cost_delay = 20ms    # default vacuum cost delay for
-                    # autovacuum, in milliseconds;
-                    # -1 means use vacuum_cost_delay
-#autovacuum_vacuum_cost_limit = -1  # default vacuum cost limit for
-                    # autovacuum, -1 means use
-                    # vacuum_cost_limit
-
-
-#------------------------------------------------------------------------------
-# CLIENT CONNECTION DEFAULTS
-#------------------------------------------------------------------------------
-
-# - Statement Behavior -
-
-#search_path = '"[#noparse]$user[/#noparse]",public'     # schema names
-#default_tablespace = ''        # a tablespace name, '' uses the default
-#temp_tablespaces = ''          # a list of tablespace names, '' uses
-                    # only default tablespace
-#check_function_bodies = on
-#default_do_language = 'plpgsql'
-#default_transaction_isolation = 'read committed'
-#default_transaction_read_only = off
-#session_replication_role = 'origin'
-#statement_timeout = 0          # in milliseconds, 0 is disabled
-#vacuum_freeze_min_age = 50000000
-#vacuum_freeze_table_age = 150000000
-#bytea_output = 'hex'           # hex, escape
-#xmlbinary = 'base64'
-#xmloption = 'content'
-
-# - Locale and Formatting -
-
-datestyle = 'iso, mdy'
-#intervalstyle = 'postgres'
-#timezone = unknown         # actually, defaults to TZ environment
-                    # setting
-#timezone_abbreviations = 'Default'     # Select the set of available time zone
-                    # abbreviations.  Currently, there are
-                    #   Default
-                    #   Australia
-                    #   India
-                    # You can create your own file in
-                    # share/timezonesets/.
-#extra_float_digits = 0         # min -15, max 3
-#client_encoding = sql_ascii        # actually, defaults to database
-                    # encoding
-
-# These settings are initialized by initdb, but they can be changed.
-lc_messages = 'en_US.UTF-8'         # locale for system error message
-                    # strings
-lc_monetary = 'en_US.UTF-8'         # locale for monetary formatting
-lc_numeric = 'en_US.UTF-8'          # locale for number formatting
-lc_time = 'en_US.UTF-8'             # locale for time formatting
-
-# default configuration for text search
-default_text_search_config = 'pg_catalog.english'
-
-# - Other Defaults -
-
-#dynamic_library_path = '[#noparse]$libdir[/#noparse]'
-#local_preload_libraries = ''
-
-
-#------------------------------------------------------------------------------
-# LOCK MANAGEMENT
-#------------------------------------------------------------------------------
-
-#deadlock_timeout = 1s
-#max_locks_per_transaction = 64     # min 10
-                    # (change requires restart)
-# Note:  Each lock table slot uses ~270 bytes of shared memory, and there are
-# max_locks_per_transaction * (max_connections + max_prepared_transactions)
-# lock table slots.
-
-
-#------------------------------------------------------------------------------
-# VERSION/PLATFORM COMPATIBILITY
-#------------------------------------------------------------------------------
-
-# - Previous PostgreSQL Versions -
-
-#add_missing_from = off
-#array_nulls = on
-#backslash_quote = safe_encoding    # on, off, or safe_encoding
-#default_with_oids = off
-#escape_string_warning = on
-#regex_flavor = advanced        # advanced, extended, or basic
-#sql_inheritance = on
-#standard_conforming_strings = off
-#synchronize_seqscans = on
-
-# - Other Platforms and Clients -
-
-#transform_null_equals = off
-
-
-#------------------------------------------------------------------------------
-# CUSTOMIZED OPTIONS
-#------------------------------------------------------------------------------
-
-#custom_variable_classes = ''       # list of custom variable class names
-
-# Lines that pgtune has had problems parsing
-
-log_line_prefix = 'user=%u,db=%d '

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf
deleted file mode 100644
index 12fed6f..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf
+++ /dev/null
@@ -1,28 +0,0 @@
-[#ftl]
-#
-
-RR::Initializer::run do |config|
-config.left = {
-:adapter  => '${entity.leftDatabaseUrl.scheme}', 
-:database => '${entity.leftDatabaseName}',
-:username => '${entity.leftUsername}',
-:password => '${entity.leftPassword}',
-:host     => '${entity.leftDatabaseUrl.host}',
-:port     => ${entity.leftDatabaseUrl.port?c}
-}
- 
-config.right ={
-:adapter  => '${entity.rightDatabaseUrl.scheme}', 
-:database => '${entity.rightDatabaseName}',
-:username => '${entity.rightUsername}',
-:password => '${entity.rightPassword}',
-:host     => '${entity.rightDatabaseUrl.host}',
-:port     => ${entity.rightDatabaseUrl.port?c}
-}
- 
-config.include_tables /${entity.tableRegex}/
-config.options[:replication_interval] = ${entity.replicationInterval?c}
-config.options[:logged_replication_events] = [
-:all_changes, 
-:all_conflicts
-]end

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/postgresql-logo-200px.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/postgresql-logo-200px.png b/brooklyn-library/software/database/src/main/resources/postgresql-logo-200px.png
deleted file mode 100644
index 966b3cb..0000000
Binary files a/brooklyn-library/software/database/src/main/resources/postgresql-logo-200px.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/VogellaExampleAccess.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/VogellaExampleAccess.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/VogellaExampleAccess.java
deleted file mode 100644
index 348f988..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/VogellaExampleAccess.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database;
-
-
-import java.sql.Connection;
-import java.sql.Date;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.Lists;
-
-/**
- * Basic JDBC Access test Class, based on the Vogella MySQL tutorial
- * http://www.vogella.de/articles/MySQLJava/article.html
- */
-public class VogellaExampleAccess {
-    public static final Logger log = LoggerFactory.getLogger(VogellaExampleAccess.class);
-
-    private Connection connect = null;
-    private Statement statement = null;
-    private final String url;
-    private final String dbName;
-
-    public VogellaExampleAccess(String driverClass, String url) throws ClassNotFoundException {
-        this(driverClass, url, "feedback");
-    }
-    
-    public VogellaExampleAccess(String driverClass, String url, String dbName) throws ClassNotFoundException {
-        // This will load the JDBC driver, each DB has its own driver
-        Class.forName(driverClass);
-        this.url = url;
-        this.dbName = dbName;
-    }
-
-    public void readModifyAndRevertDataBase() throws Exception {
-        connect();
-        readDataBase();
-        modifyDataBase();
-        revertDatabase();
-        close();
-    }
-
-    public void connect() throws Exception {
-        try {
-            // Setup the connection with the DB
-            String jdbcUrl = "jdbc:" + url + dbName + "?" + "user=sqluser&password=sqluserpw";
-            log.info("Connecting to " + jdbcUrl);
-            connect = DriverManager.getConnection(jdbcUrl);
-
-            // Statements allow to issue SQL queries to the database
-            statement = connect.createStatement();
-        } catch (Exception ex) {
-            close();
-            throw ex;
-        }
-    }
-
-    public List<List<String>> readDataBase() throws Exception {
-        return read("SELECT myuser, webpage, datum, summary, COMMENTS from COMMENTS");
-    }
-
-    public List<List<String>> read(String sql) throws SQLException {
-        List<List<String>> results = Lists.newArrayList();
-        // Result set get the result of the SQL query
-        ResultSet resultSet = statement.executeQuery(sql);
-        // ResultSet is initially before the first data set
-        while (resultSet.next()) {
-            List<String> row = Lists.newArrayList();
-            for (int i = 1; i <= resultSet.getMetaData().getColumnCount(); i++) {
-                row.add(resultSet.getObject(i).toString());
-            }
-            results.add(row);
-        }
-        // Should close resultsets
-        resultSet.close();
-        writeResultSet(results);
-        return results;
-    }
-
-    public void modifyDataBase() throws Exception {
-        // PreparedStatements can use variables and are more efficient
-        PreparedStatement preparedStatement = connect.prepareStatement("insert into  COMMENTS values (?, ?, ?, ?, ? , ?, ?)");
-        // "myuser, webpage, datum, summary, COMMENTS from FEEDBACK.COMMENTS");
-        // Parameters start with 1
-        preparedStatement.setInt(1, 2);
-        preparedStatement.setString(2, "Test");
-        preparedStatement.setString(3, "TestEmail");
-        preparedStatement.setString(4, "TestWebpage");
-        preparedStatement.setDate(5, new Date(new java.util.Date().getTime()));
-        preparedStatement.setString(6, "TestSummary");
-        preparedStatement.setString(7, "TestComment");
-        preparedStatement.executeUpdate();
-
-        writeResultSet(readDataBase());
-        preparedStatement.close();
-    }
-    public void execute(String cata, String sql, Object... args) throws Exception {
-        String prevCata = connect.getCatalog();
-        if (cata != null) {
-            connect.setCatalog(cata);
-        }
-        PreparedStatement preparedStatement = connect.prepareStatement(sql);
-        for (int i = 1; i <= args.length; i++) {
-            preparedStatement.setObject(i, args[i-1]);
-        }
-        preparedStatement.executeUpdate();
-
-        writeResultSet(readDataBase());
-        preparedStatement.close();
-        if (cata != null) {
-            connect.setCatalog(prevCata);
-        }
-    }
-
-    // Remove again the insert comment added by modifyDataBase()
-    public void revertDatabase() throws Exception {
-        PreparedStatement preparedStatement = connect
-                .prepareStatement("delete from COMMENTS where myuser= ? ; ");
-        preparedStatement.setString(1, "Test");
-        preparedStatement.executeUpdate();
-
-        ResultSet resultSet = statement.executeQuery("select * from COMMENTS");
-        writeMetaData(resultSet);
-        // Should close resultsets
-        resultSet.close();
-    }
-
-    private void writeMetaData(ResultSet resultSet) throws SQLException {
-        // Get some metadata from the database
-        log.debug("The columns in the table are: ");
-
-        log.debug("Table: " + resultSet.getMetaData().getTableName(1));
-        for (int i = 1; i <= resultSet.getMetaData().getColumnCount(); i++) {
-            log.debug("Column " + i + " " + resultSet.getMetaData().getColumnName(i));
-        }
-    }
-
-    private void writeResultSet(List<List<String>> resultSet) throws SQLException {
-        for (List<String> row : resultSet) {
-            String user = row.get(0);
-            String website = row.get(1);
-            String date = row.get(2);
-            String summary = row.get(3);
-            String comment = row.get(4);
-            log.debug("User: " + user);
-            log.debug("Website: " + website);
-            log.debug("Summary: " + summary);
-            log.debug("Date: " + date);
-            log.debug("Comment: " + comment);
-        }
-    }
-
-    public Set<String> getSchemas() throws SQLException {
-        ResultSet rs = statement.executeQuery("SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA");
-        Set<String> dbs = new HashSet<String>();
-        while (rs.next()) {
-            dbs.add(rs.getString(1));
-        }
-        return dbs;
-    }
-
-    // You should always close the statement and connection
-    public void close() throws Exception {
-        if (statement != null) {
-            statement.close();
-            statement = null;
-        }
-
-        if (connect != null) {
-            connect.close();
-            connect = null;
-        }
-    }
-}    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/crate/CrateNodeIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/crate/CrateNodeIntegrationTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/crate/CrateNodeIntegrationTest.java
deleted file mode 100644
index 10c72c1..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/crate/CrateNodeIntegrationTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.crate;
-
-import static org.testng.Assert.assertFalse;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-public class CrateNodeIntegrationTest {
-
-    private TestApplication app;
-    private LocalhostMachineProvisioningLocation localhostProvisioningLocation;
-
-    @BeforeMethod(alwaysRun = true)
-    public void setUp() throws Exception {
-        localhostProvisioningLocation = new LocalhostMachineProvisioningLocation();
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void tearDown() throws Exception {
-        if (app != null) Entities.destroyAll(app.getManagementContext());
-    }
-
-    @Test(groups = "Integration")
-    public void testCanStartAndStop() throws Exception {
-        CrateNode entity = app.createAndManageChild(EntitySpec.create(CrateNode.class));
-        app.start(ImmutableList.of(localhostProvisioningLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(entity, Startable.SERVICE_UP, true);
-        EntityTestUtils.assertAttributeEventuallyNonNull(entity, CrateNode.SERVER_NAME);
-
-        entity.stop();
-        assertFalse(entity.getAttribute(Startable.SERVICE_UP));
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbIntegrationTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbIntegrationTest.java
deleted file mode 100644
index 061ec02..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbIntegrationTest.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mariadb;
-
-import java.io.File;
-import java.net.InetAddress;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.mgmt.ManagementContext;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.internal.BrooklynProperties;
-import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.text.Strings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * Runs a slightly modified version of the popular Vogella MySQL tutorial,
- * from
- * http://www.vogella.de/articles/MySQLJava/article.html
- */
-public class MariaDbIntegrationTest {
-
-    public static final Logger log = LoggerFactory.getLogger(MariaDbIntegrationTest.class);
-    
-    protected BrooklynProperties brooklynProperties;
-    protected ManagementContext managementContext;
-    protected TestApplication tapp;
-    protected String hostname;
-    
-    @BeforeMethod(alwaysRun = true)
-    public void setUp() throws Exception {
-        // can start in AWS by running this -- or use brooklyn CLI/REST for most clouds, or programmatic/config for set of fixed IP machines
-        hostname = InetAddress.getLocalHost().getHostName();
-
-        brooklynProperties = BrooklynProperties.Factory.newDefault();
-        managementContext = new LocalManagementContext(brooklynProperties);
-        tapp = ApplicationBuilder.newManagedApp(TestApplication.class, managementContext);
-    }
-
-    @AfterMethod(alwaysRun=true)
-    public void ensureShutDown() throws Exception {
-        Entities.destroyAllCatching(managementContext);
-    }
-
-    //from http://www.vogella.de/articles/MySQLJava/article.html
-    public static final String CREATION_SCRIPT =
-            "CREATE DATABASE feedback; " +
-            "CREATE USER 'sqluser'@'localhost' IDENTIFIED BY 'sqluserpw'; " +
-            "GRANT USAGE ON *.* TO 'sqluser'@'localhost'; " +
-            "GRANT ALL PRIVILEGES ON feedback.* TO 'sqluser'@'localhost'; " +
-            "CREATE USER 'sqluser'@'%' IDENTIFIED BY 'sqluserpw'; " +
-            "GRANT USAGE ON *.* TO 'sqluser'@'%'; " +
-            "GRANT ALL PRIVILEGES ON feedback.* TO 'sqluser'@'%'; " +
-            "CREATE USER 'sqluser'@'$hostname' IDENTIFIED BY 'sqluserpw'; " +
-            "GRANT USAGE ON *.* TO 'sqluser'@'$hostname'; " +
-            "GRANT ALL PRIVILEGES ON feedback.* TO 'sqluser'@'$hostname'; " +
-            "FLUSH PRIVILEGES; " +
-            "USE feedback; " +
-            "CREATE TABLE COMMENTS ( " +
-                    "id INT NOT NULL AUTO_INCREMENT,  " +
-                    "MYUSER VARCHAR(30) NOT NULL, " +
-                    "EMAIL VARCHAR(30),  " +
-                    "WEBPAGE VARCHAR(100) NOT NULL,  " +
-                    "DATUM DATE NOT NULL,  " +
-                    "SUMMARY VARCHAR(40) NOT NULL, " +
-                    "COMMENTS VARCHAR(400) NOT NULL, " +
-                    "PRIMARY KEY (ID) " +
-                "); " +
-            "INSERT INTO COMMENTS values (default, 'lars', 'myemail@gmail.com','http://www.vogella.de', '2009-09-14 10:33:11', 'Summary','My first comment' );";
-
-    @Test(groups = "Integration")
-    public void test_localhost() throws Exception {
-        String dataDir = "/tmp/mariadb-data-" + Strings.makeRandomId(8);
-        MariaDbNode mariadb = tapp.createAndManageChild(EntitySpec.create(MariaDbNode.class)
-                .configure(MariaDbNode.MARIADB_SERVER_CONF, MutableMap.<String, Object>of("skip-name-resolve",""))
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, CREATION_SCRIPT)
-                .configure(MariaDbNode.DATA_DIR, dataDir));
-        LocalhostMachineProvisioningLocation location = new LocalhostMachineProvisioningLocation();
-
-        tapp.start(ImmutableList.of(location));
-        log.info("MariaDB started");
-
-        new VogellaExampleAccess("com.mysql.jdbc.Driver", mariadb.getAttribute(DatastoreCommon.DATASTORE_URL)).readModifyAndRevertDataBase();
-
-        log.info("Ran vogella MySQL example -- SUCCESS");
-
-        // Ensure the data directory was successfully overridden.
-        File dataDirFile = new File(dataDir);
-        File mariadbSubdirFile = new File(dataDirFile, "mysql");
-        Assert.assertTrue(mariadbSubdirFile.exists());
-
-        // Clean up.
-        dataDirFile.delete();
-    }
-}


[02/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainer.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainer.java b/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainer.java
deleted file mode 100644
index e605c08..0000000
--- a/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainer.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.osgi.karaf;
-
-import java.net.URISyntaxException;
-import java.util.Map;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.annotation.Effector;
-import org.apache.brooklyn.core.annotation.EffectorParam;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.config.MapConfigKey;
-import org.apache.brooklyn.core.effector.MethodEffector;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensor;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.java.UsesJava;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * This sets up a Karaf OSGi container
- */
-@Catalog(name="Karaf", description="Apache Karaf is a small OSGi based runtime which provides a lightweight container onto which various components and applications can be deployed.", iconUrl="classpath:///karaf-logo.png")
-@ImplementedBy(KarafContainerImpl.class)
-public interface KarafContainer extends SoftwareProcess, UsesJava, UsesJmx {
-    
-    // TODO Better way of setting/overriding defaults for config keys that are defined in super class SoftwareProcess
-
-    public static final String WRAP_SCHEME = "wrap";
-    public static final String FILE_SCHEME = "file";
-    public static final String MVN_SCHEME = "mvn";
-    public static final String HTTP_SCHEME = "http";
-
-    public static final MethodEffector<Map<Long,Map<String,?>>> LIST_BUNDLES = new MethodEffector(KarafContainer.class, "listBundles");
-    public static final MethodEffector<Long> INSTALL_BUNDLE = new MethodEffector<Long>(KarafContainer.class, "installBundle");
-    public static final MethodEffector<Void> UNINSTALL_BUNDLE = new MethodEffector<Void>(KarafContainer.class, "uninstallBundle");
-    public static final MethodEffector<Void> INSTALL_FEATURE = new MethodEffector<Void>(KarafContainer.class, "installFeature");
-    public static final MethodEffector<Void> UPDATE_SERVICE_PROPERTIES = new MethodEffector<Void>(KarafContainer.class, "updateServiceProperties");
-
-    @SetFromFlag("version")
-    public static final ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(
-            SoftwareProcess.SUGGESTED_VERSION, "2.3.0");
-
-    @SetFromFlag("downloadUrl")
-    public static final BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "http://apache.mirror.anlx.net/karaf/${version}/apache-karaf-${version}.tar.gz");
-
-    @SetFromFlag("karafName")
-    public static final BasicAttributeSensorAndConfigKey<String> KARAF_NAME = new BasicAttributeSensorAndConfigKey<String>(
-            String.class, "karaf.name", "Karaf instance name", "root");
-
-    // TODO too complicated? Used by KarafContainer; was in JavaApp; where should it be in brave new world?
-    public static final MapConfigKey<Map<String,String>> NAMED_PROPERTY_FILES = new MapConfigKey(
-            Map.class, "karaf.runtime.files", "Property files to be generated, referenced by name relative to runDir");
-
-    @SetFromFlag("jmxUser")
-    public static final BasicAttributeSensorAndConfigKey<String> JMX_USER = new BasicAttributeSensorAndConfigKey<String>(
-            UsesJmx.JMX_USER, "karaf");
-    
-    @SetFromFlag("jmxPassword")
-    public static final BasicAttributeSensorAndConfigKey<String> JMX_PASSWORD = new BasicAttributeSensorAndConfigKey<String>(
-            UsesJmx.JMX_PASSWORD, "karaf");
-        
-    @SetFromFlag("jmxPort")
-    public static final PortAttributeSensorAndConfigKey JMX_PORT = new PortAttributeSensorAndConfigKey(
-            UsesJmx.JMX_PORT, "44444+");
-
-    @SetFromFlag("rmiRegistryPort")
-    public static final PortAttributeSensorAndConfigKey RMI_REGISTRY_PORT = UsesJmx.RMI_REGISTRY_PORT;
-    
-    @SetFromFlag("jmxContext")
-    public static final BasicAttributeSensorAndConfigKey<String> JMX_CONTEXT = new BasicAttributeSensorAndConfigKey<String>(
-            UsesJmx.JMX_CONTEXT, "karaf-"+KARAF_NAME.getConfigKey().getDefaultValue());
-
-    public static final BasicAttributeSensor<Map> KARAF_INSTANCES = new BasicAttributeSensor<Map>(
-            Map.class, "karaf.admin.instances", "Karaf admin instances");
-    public static final BasicAttributeSensor<Boolean> KARAF_ROOT = new BasicAttributeSensor<Boolean>(
-            Boolean.class, "karaf.admin.isRoot", "Karaf admin isRoot");
-    public static final BasicAttributeSensor<String> KARAF_JAVA_OPTS = new BasicAttributeSensor<String>(
-            String.class, "karaf.admin.java_opts", "Karaf Java opts");
-    public static final BasicAttributeSensor<String> KARAF_INSTALL_LOCATION  = new BasicAttributeSensor<String>(
-            String.class, "karaf.admin.location", "Karaf install location");
-    public static final BasicAttributeSensor<Integer> KARAF_PID = new BasicAttributeSensor<Integer>(
-            Integer.class, "karaf.admin.pid", "Karaf instance PID");
-    public static final BasicAttributeSensor<Integer> KARAF_SSH_PORT = new BasicAttributeSensor<Integer>(
-            Integer.class, "karaf.admin.ssh_port", "Karaf SSH Port");
-    public static final BasicAttributeSensor<Integer> KARAF_RMI_REGISTRY_PORT = new BasicAttributeSensor<Integer>(
-            Integer.class, "karaf.admin.rmi_registry_port", "Karaf instance RMI registry port");
-    public static final BasicAttributeSensor<Integer> KARAF_RMI_SERVER_PORT = new BasicAttributeSensor<Integer>(
-            Integer.class, "karaf.admin.rmi_server_port", "Karaf RMI (JMX) server port");
-    public static final BasicAttributeSensor<String> KARAF_STATE = new BasicAttributeSensor<String>(
-            String.class, "karaf.admin.state", "Karaf instance state");
-
-    @Effector(description="Updates the OSGi Service's properties, adding (and overriding) the given key-value pairs")
-    public void updateServiceProperties(
-            @EffectorParam(name="serviceName", description="Name of the OSGi service") String serviceName, 
-            Map<String,String> additionalVals);
-    
-    @Effector(description="Installs the given OSGi feature")
-    public void installFeature(
-            @EffectorParam(name="featureName", description="Name of the feature - see org.apache.karaf:type=features#installFeature()") final String featureName) 
-            throws Exception;
-
-    @Effector(description="Lists all the karaf bundles")
-    public Map<Long,Map<String,?>> listBundles();
-    
-    /**
-     * throws URISyntaxException If bundle name is not a valid URI
-     */
-    @Effector(description="Deploys the given bundle, returning the bundle id - see osgi.core:type=framework#installBundle()")
-    public long installBundle(
-            @EffectorParam(name="bundle", description="URI of bundle to be deployed") String bundle) throws URISyntaxException;
-
-    @Effector(description="Undeploys the bundle with the given id")
-    public void uninstallBundle(
-            @EffectorParam(name="bundleId", description="Id of the bundle") Long bundleId);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainerImpl.java b/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainerImpl.java
deleted file mode 100644
index 92e5b2f..0000000
--- a/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainerImpl.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.osgi.karaf;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
-
-import javax.management.ObjectName;
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.CompositeDataSupport;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.TabularData;
-
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.core.annotation.Effector;
-import org.apache.brooklyn.core.annotation.EffectorParam;
-import org.apache.brooklyn.core.feed.ConfigToAttributes;
-import org.apache.brooklyn.entity.java.JmxSupport;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.jmx.JmxAttributePollConfig;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-import org.apache.brooklyn.feed.jmx.JmxHelper;
-import org.apache.brooklyn.feed.jmx.JmxValueFunctions;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.repeat.Repeater;
-import org.osgi.jmx.JmxConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Maps;
-
-/**
- * This sets up a Karaf OSGi container
- */
-public class KarafContainerImpl extends SoftwareProcessImpl implements KarafContainer {
-    
-    // TODO Better way of setting/overriding defaults for config keys that are defined in super class SoftwareProcess
-
-    private static final Logger LOG = LoggerFactory.getLogger(KarafContainerImpl.class);
-
-    public static final String KARAF_ADMIN = "org.apache.karaf:type=admin,name=%s";
-    public static final String KARAF_FEATURES = "org.apache.karaf:type=features,name=%s";
-
-    public static final String OSGI_BUNDLE_STATE = "osgi.core:type=bundleState,version=1.5";
-    public static final String OSGI_FRAMEWORK = "osgi.core:type=framework,version=1.5";
-    public static final String OSGI_COMPENDIUM = "osgi.compendium:service=cm,version=1.3";
-
-    protected JmxHelper jmxHelper;
-
-    private JmxFeed jmxFeed;
-    
-    public KarafContainerImpl() {
-        super();
-    }
-
-    @Override
-    public Class<KarafDriver> getDriverInterface() {
-        return KarafDriver.class;
-    }
-
-    @Override
-    public KarafDriver getDriver() {
-        return (KarafDriver) super.getDriver();
-    }
-    
-    @Override
-    public void init() {
-        super.init();
-        new JmxSupport(this, null).recommendJmxRmiCustomAgent();
-    }
-    
-    @Override
-    protected void postDriverStart() {
-        super.postDriverStart();
-        uploadPropertyFiles(getConfig(NAMED_PROPERTY_FILES));
-        
-        jmxHelper = new JmxHelper(this);
-        jmxHelper.connect(0); // i.e. don't block
-    }
-    
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-
-        //FIXME should have a better way of setting config -- firstly, not here!
-        //preferred style is to have config auto-applied to attributes, and have default values in their definition, not here
-        //use of "properties.{user,password}" is non-standard; is that requried? use default jmxUser, jmxPassword flags?
-        sensors().set(JMX_CONTEXT, String.format("karaf-%s", getConfig(KARAF_NAME.getConfigKey())));
-        
-        ConfigToAttributes.apply(this);
-
-        ObjectName karafAdminObjectName = JmxHelper.createObjectName(String.format(KARAF_ADMIN, getConfig(KARAF_NAME.getConfigKey())));
-        
-        jmxFeed = JmxFeed.builder()
-                .entity(this)
-                .helper(jmxHelper)
-                .period(500, TimeUnit.MILLISECONDS)
-                .pollAttribute(new JmxAttributePollConfig<Map>(KARAF_INSTANCES)
-                        .objectName(karafAdminObjectName)
-                        .attributeName("Instances")
-                        .onSuccess(new Function<Object, Map>() {
-                            @Override
-                            public Map apply(Object input) {
-                                return JmxValueFunctions.tabularDataToMap((TabularData)input);
-                            }
-                        })
-                        .onException(new Function<Exception,Map>() {
-                                @Override public Map apply(Exception input) {
-                                    // If MBean is unreachable, then mark as service-down
-                                    if (Boolean.TRUE.equals(getAttribute(SERVICE_UP))) {
-                                        LOG.debug("Entity "+this+" is not reachable on JMX");
-                                        sensors().set(SERVICE_UP, false);
-                                    }
-                                    return null;
-                                }}))
-                .build();
-
-        
-        
-        // INSTANCES aggregates data for the other sensors.
-        subscriptions().subscribe(this, KARAF_INSTANCES, new SensorEventListener<Map>() {
-                @Override public void onEvent(SensorEvent<Map> event) {
-                    Map<?,?> map = event.getValue();
-                    if (map == null) return;
-                    
-                    sensors().set(SERVICE_UP, "Started".equals(map.get("State")));
-                    sensors().set(KARAF_ROOT, (Boolean) map.get("Is Root"));
-                    sensors().set(KARAF_JAVA_OPTS, (String) map.get("JavaOpts"));
-                    sensors().set(KARAF_INSTALL_LOCATION, (String) map.get("Location"));
-                    sensors().set(KARAF_NAME, (String) map.get("Name"));
-                    sensors().set(KARAF_PID, (Integer) map.get("Pid"));
-                    sensors().set(KARAF_SSH_PORT, (Integer) map.get("Ssh Port"));
-                    sensors().set(KARAF_RMI_REGISTRY_PORT, (Integer) map.get("RMI Registry Port"));
-                    sensors().set(KARAF_RMI_SERVER_PORT, (Integer) map.get("RMI Server Port"));
-                    sensors().set(KARAF_STATE, (String) map.get("State"));
-                }});
-        
-    }
-
-    @Override
-    protected void disconnectSensors() {
-        super.disconnectSensors();
-        if (jmxFeed != null) jmxFeed.stop();
-    }
-    
-    @Override
-    protected void preStop() {
-        super.preStop();
-        
-        if (jmxHelper != null) jmxHelper.terminate();
-    }
-
-    @Effector(description="Updates the OSGi Service's properties, adding (and overriding) the given key-value pairs")
-    public void updateServiceProperties(
-            @EffectorParam(name="serviceName", description="Name of the OSGi service") String serviceName, 
-            Map<String,String> additionalVals) {
-        TabularData table = (TabularData) jmxHelper.operation(OSGI_COMPENDIUM, "getProperties", serviceName);
-        
-        try {
-            for (Map.Entry<String, String> entry: additionalVals.entrySet()) {
-                String key = entry.getKey();
-                String value = entry.getValue();
-                CompositeData data = new CompositeDataSupport(
-                        JmxConstants.PROPERTY_TYPE,
-                        MutableMap.of(JmxConstants.KEY, key, JmxConstants.TYPE, "String", JmxConstants.VALUE, value));
-                table.remove(data.getAll(new String[] {JmxConstants.KEY}));
-                table.put(data);
-            }
-        } catch (OpenDataException e) {
-            throw Exceptions.propagate(e);
-        }
-        
-        LOG.info("Updating monterey-service configuration with changes {}", additionalVals);
-        if (LOG.isTraceEnabled()) LOG.trace("Updating monterey-service configuration with new configuration {}", table);
-        
-        jmxHelper.operation(OSGI_COMPENDIUM, "update", serviceName, table);
-    }
-    
-    @Effector(description="Updates the OSGi Service's properties, adding (and overriding) the given key-value pairs")
-    public void installFeature(
-            @EffectorParam(name="featureName", description="Name of the feature - see org.apache.karaf:type=features#installFeature()") final String featureName) throws Exception {
-        
-        LOG.info("Installing feature {} via JMX", featureName);
-
-        Repeater.create("Wait for Karaf, to install feature "+featureName)
-                .limitIterationsTo(40)
-                .every(500, TimeUnit.MILLISECONDS)
-                .until(new Callable<Boolean>() {
-                        public Boolean call() {
-                            jmxHelper.operation(String.format(KARAF_FEATURES, getConfig(KARAF_NAME.getConfigKey())), "installFeature", featureName);
-                            return true;
-                        }})
-                .rethrowException()
-                .run();
-    }
-
-    public Map<Long,Map<String,?>> listBundles() {
-        TabularData table = (TabularData) jmxHelper.operation(OSGI_BUNDLE_STATE, "listBundles");
-        Map<List<?>, Map<String, Object>> map = JmxValueFunctions.tabularDataToMapOfMaps(table);
-        
-        Map<Long,Map<String,?>> result = Maps.newLinkedHashMap();
-        for (Map.Entry<List<?>, Map<String, Object>> entry : map.entrySet()) {
-            result.put((Long)entry.getKey().get(0), entry.getValue());
-        }
-        return result;
-    }
-    
-    /**
-     * throws URISyntaxException If bundle name is not a valid URI
-     */
-    @Effector(description="Deploys the given bundle, returning the bundle id - see osgi.core:type=framework#installBundle()")
-    public long installBundle(
-            @EffectorParam(name="bundle", description="URI of bundle to be deployed") String bundle) throws URISyntaxException {
-        
-        // TODO Consider switching to use either:
-        //  - org.apache.karaf:type=bundles#install(String), or 
-        //  - dropping file into $RUN_DIR/deploy (but that would be async)
-
-        URI uri = new URI(bundle);
-        boolean wrap = false;
-        if (WRAP_SCHEME.equals(uri.getScheme())) {
-            bundle = bundle.substring(WRAP_SCHEME.length() + 1);
-            uri = new URI(bundle);
-            wrap = true;
-        }
-        if (FILE_SCHEME.equals(uri.getScheme())) {
-            LOG.info("Deploying bundle {} via file copy", bundle);
-            File source = new File(uri);
-            String target = getDriver().getRunDir() + "/" + source.getName();
-            getDriver().copyResource(source, target);
-            return (Long) jmxHelper.operation(OSGI_FRAMEWORK, "installBundle", (wrap ? WRAP_SCHEME + ":" : "") + FILE_SCHEME + "://" + target);
-        } else {
-            LOG.info("Deploying bundle {} via JMX", bundle);
-            return (Long) jmxHelper.operation(OSGI_FRAMEWORK, "installBundle", (wrap ? WRAP_SCHEME + ":" : "") + bundle);
-        }
-    }
-
-    @Effector(description="Undeploys the bundle with the given id")
-    public void uninstallBundle(
-            @EffectorParam(name="bundleId", description="Id of the bundle") Long bundleId) {
-        
-        // TODO Consider switching to use either:
-        //  - org.apache.karaf:type=bundles#install(String), or 
-        //  - dropping file into $RUN_DIR/deploy (but that would be async)
-
-        jmxHelper.operation(OSGI_FRAMEWORK, "uninstallBundle", bundleId);
-    }
-
-    protected void uploadPropertyFiles(Map<String,Map<String,String>> propertyFiles) {
-        if (propertyFiles == null) return;
-        
-        for (Map.Entry<String,Map<String,String>> entry : propertyFiles.entrySet()) {
-            String file = entry.getKey();
-            Map<String,String> contents = entry.getValue();
-
-            Properties props = new Properties();
-            for (Map.Entry<String,String> prop : contents.entrySet()) {
-                props.setProperty(prop.getKey(), prop.getValue());
-            }
-            
-            File local = Os.writePropertiesToTempFile(props, "karaf-"+getId(), ".cfg");
-            local.setReadable(true);
-            try {
-                String remote = getDriver().getRunDir() + "/" + file;
-                getDriver().copyResource(local, remote);
-            } finally {
-                local.delete();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafDriver.java b/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafDriver.java
deleted file mode 100644
index ec90e45..0000000
--- a/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafDriver.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.osgi.karaf;
-
-import java.io.File;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-
-public interface KarafDriver extends JavaSoftwareProcessDriver {
-
-    public String getRunDir();
-
-    public int copyResource(File src, String destination);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafSshDriver.java b/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafSshDriver.java
deleted file mode 100644
index 35e8c22..0000000
--- a/brooklyn-library/software/osgi/src/main/java/org/apache/brooklyn/entity/osgi/karaf/KarafSshDriver.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.osgi.karaf;
-
-import static java.lang.String.format;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableList;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-import com.google.common.collect.ImmutableList;
-
-public class KarafSshDriver extends JavaSoftwareProcessSshDriver implements KarafDriver {
-
-    // TODO getJmxJavaSystemProperties(), don't set via JAVA_OPTS; set ourselves manually
-    // (karaf reads from props files)
-    // but do set "java.rmi.server.hostname"
-
-    public KarafSshDriver(KarafContainerImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public KarafContainerImpl getEntity() {
-        return (KarafContainerImpl) super.getEntity();
-    }
-
-    @Override
-    protected String getLogFileLocation() {
-        return Os.mergePaths(getRunDir(), "data", "karaf.out");
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("apache-karaf-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = ImmutableList.<String>builder()
-                .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-                .add(BashCommands.INSTALL_TAR)
-                .add("tar xzfv " + saveAs)
-                .build();
-
-        newScript(INSTALLING)
-                .body.append(commands)
-                .execute();
-    }
-
-    @Override
-    public void customize() {
-        Map<String, Object> ports = new HashMap<String, Object>();
-        ports.put("jmxPort", getJmxPort());
-        ports.put("rmiRegistryPort", getRmiRegistryPort());
-        Networking.checkPortsValid(ports);
-
-        newScript(CUSTOMIZING)
-                .body.append(
-                        format("cd %s", getRunDir()),
-                        format("cp -R %s/{bin,etc,lib,system,deploy} . || exit $!", getExpandedInstallDir()),
-                        format("sed -i.bk 's/rmiRegistryPort = 1099/rmiRegistryPort = %s/g' etc/org.apache.karaf.management.cfg", getRmiRegistryPort()),
-                        format("sed -i.bk 's/rmiServerPort = 44444/rmiServerPort = %s/g' etc/org.apache.karaf.management.cfg", getJmxPort())
-                    )
-                .execute();
-    }
-
-    @Override
-    public void launch() {
-        newScript(MutableMap.of(USE_PID_FILE, true), LAUNCHING)
-                .body.append("nohup ./bin/start")
-                .execute();
-    }
-
-    @Override
-    public boolean isRunning() {
-        // TODO Can we use the pidFile, auto-generated by launch?
-
-        Integer pid = entity.getAttribute(KarafContainer.KARAF_PID);
-        // This method is called on startup, before JMX is initialised, so pid won't always be available.
-        if (pid != null) {
-            return newScript(CHECK_RUNNING)
-                    .body.append(format("ps aux | grep 'karaf' | grep %s > /dev/null", pid))
-                    .execute() == 0;
-        } else {
-            // Simple method isn't available, use pid in instance.properties.
-            return newScript(CHECK_RUNNING)
-                    .body.append(
-                            format("cd %s/instances/",getRunDir()),
-                            "[ $(uname) = \"Darwin\" ] && pid=$(sed -n -e 's/.*pid=\\([0-9]*\\)$/\\1/p' instance.properties) || pid=$(sed -r -n -e 's/.*pid=([0-9]*)$/\\1/p' instance.properties)",
-                            "ps aux | grep 'karaf' | grep $(echo ${pid:-X}) > /dev/null"
-                        )
-                    .execute() == 0;
-        }
-    }
-
-    @Override
-    public void stop() {
-        newScript(STOPPING)
-                .environmentVariablesReset()
-                .body.append(format("%s/bin/stop",getRunDir()))
-                .execute();
-    }
-
-    @Override
-    public void kill() {
-        stop(); // TODO no pid file to easily do `kill -9`
-    }
-
-    @Override
-    protected List<String> getCustomJavaConfigOptions() {
-        return MutableList.<String>builder()
-                .addAll(super.getCustomJavaConfigOptions())
-                .add("-Xms200m")
-                .add("-Xmx800m")
-                .add("-XX:MaxPermSize=400m")
-                .build();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/osgi/src/main/java/org/osgi/jmx/Item.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/osgi/src/main/java/org/osgi/jmx/Item.java b/brooklyn-library/software/osgi/src/main/java/org/osgi/jmx/Item.java
deleted file mode 100644
index 900dc71..0000000
--- a/brooklyn-library/software/osgi/src/main/java/org/osgi/jmx/Item.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
- * 
- * Licensed 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.
- */
-package org.osgi.jmx;
-
-/*
- * BROOKLYN NOTE: This is a verbatim copy of the original in org.osgi.enterprise-4.2.0, 
- * reproduced here to avoid pulling in the rest of that bundle and its chain of dependencies.
- * The only difference is this comment and the suppress warnings.
- */
-
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import javax.management.openmbean.ArrayType;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.OpenType;
-import javax.management.openmbean.TabularType;
-
-/**
- * The item class enables the definition of open types in the appropriate
- * interfaces.
- * 
- * This class contains a number of methods that make it possible to create open
- * types for {@link CompositeType}, {@link TabularType}, and {@link ArrayType}.
- * The normal creation throws a checked exception, making it impossible to use
- * them in a static initializer. The constructors are also not very suitable
- * for static construction.
- * 
- * 
- * An Item instance describes an item in a Composite Type. It groups the triplet
- * of name, description, and Open Type. These Item instances allows the
- * definitions of an item to stay together.
- * 
- * @version $Revision: 8482 $
- * @Immutable
- */
-@SuppressWarnings({"unchecked","rawtypes"})
-public class Item {
-
-    /**
-     * The name of this item.
-     */
-    private final String name;
-
-    /**
-     * The description of this item.
-     */
-    private final String description;
-
-    /**
-     * The type of this item.
-     */
-    private final OpenType type;
-
-    /**
-     * Create a triple of name, description, and type. This triplet is used in
-     * the creation of a Composite Type.
-     * 
-     * @param name
-     *            The name of the item.
-     * @param description
-     *            The description of the item.
-     * @param type
-     *            The Open Type of this item.
-     * @param restrictions
-     *            Ignored, contains list of restrictions
-     */
-    public Item(String name, String description, OpenType type,
-            String... restrictions) {
-        this.name = name;
-        this.description = description;
-        this.type = type;
-    }
-
-    /**
-     * Create a Tabular Type.
-     * 
-     * @param name
-     *            The name of the Tabular Type.
-     * @param description
-     *            The description of the Tabular Type.
-     * @param rowType
-     *            The Open Type for a row
-     * @param index
-     *            The names of the items that form the index .
-     * @return A new Tabular Type composed from the parameters.
-     * @throws RuntimeException
-     *             when the Tabular Type throws an OpenDataException
-     */
-    static public TabularType tabularType(String name, String description,
-            CompositeType rowType, String... index) {
-        try {
-            return new TabularType(name, description, rowType, index);
-        } catch (OpenDataException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * Create a Composite Type
-     * 
-     * @param name
-     *            The name of the Tabular Type.
-     * @param description
-     *            The description of the Tabular Type.
-     * @param items
-     *            The items that describe the composite type.
-     * @return a new Composite Type
-     * @throws RuntimeException
-     *             when the Tabular Type throws an OpenDataException
-     */
-    static public CompositeType compositeType(String name, String description,
-            Item... items) {
-        return extend(null, name, description, items);
-    }
-
-    /**
-     * Return a new Array Type.
-     * 
-     * @param dim
-     *            The dimension
-     * @param elementType
-     *            The element type
-     * @return A new Array Type
-     */
-    public static ArrayType arrayType(int dim, OpenType elementType) {
-        try {
-            return new ArrayType(dim, elementType);
-        } catch (OpenDataException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * Extend a Composite Type by adding new items. Items can override items in
-     * the parent type.
-     * 
-     * @param parent
-     *            The parent type, can be {@code null}
-     * @param name
-     *            The name of the type
-     * @param description
-     *            The description of the type
-     * @param items
-     *            The items that should be added/override to the parent type
-     * @return A new Composite Type that extends the parent type
-     * @throws RuntimeException
-     *             when an OpenDataException is thrown
-     */
-    public static CompositeType extend(CompositeType parent, String name,
-            String description, Item... items) {
-        Set<Item> all = new LinkedHashSet<Item>();
-
-        if (parent != null) {
-            for (Object nm : parent.keySet()) {
-                String key = (String) nm;
-                all.add(new Item(key, parent.getDescription(key),
-                        parent.getType(key)));
-            }
-        }
-
-        Collections.addAll(all, items);
-
-        int size = all.size();
-        String names[] = new String[size];
-        String descriptions[] = new String[size];
-        OpenType types[] = new OpenType[size];
-
-        int m = 0;
-        for (Item item : all) {
-            names[m] = item.name;
-            descriptions[m] = item.description;
-            types[m] = item.type;
-            m++;
-        }
-
-        try {
-            return new CompositeType(name, description, names, descriptions,
-                    types);
-        } catch (OpenDataException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/osgi/src/main/java/org/osgi/jmx/JmxConstants.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/osgi/src/main/java/org/osgi/jmx/JmxConstants.java b/brooklyn-library/software/osgi/src/main/java/org/osgi/jmx/JmxConstants.java
deleted file mode 100644
index c4d64c8..0000000
--- a/brooklyn-library/software/osgi/src/main/java/org/osgi/jmx/JmxConstants.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Copyright (c) OSGi Alliance (2009, 2010). All Rights Reserved.
- * 
- * Licensed 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.
- */
-package org.osgi.jmx;
-
-/*
- * BROOKLYN NOTE: This is a verbatim copy of the original in org.osgi.enterprise-4.2.0, 
- * reproduced here to avoid pulling in the rest of that bundle and its chain of dependencies.
- * The only difference is this comment and the suppress warnings.
- */
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import javax.management.openmbean.ArrayType;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.SimpleType;
-import javax.management.openmbean.TabularType;
-
-/**
- * Constants for OSGi JMX Specification.
- * 
- * Additionally, this class contains a number of utility types that are used in
- * different places in the specification. These are {@link #LONG_ARRAY_TYPE},
- * {@link #STRING_ARRAY_TYPE}, and {@link #PROPERTIES_TYPE}.
- * 
- * @version $Revision: 8512 $
- * @Immutable
- */
-@SuppressWarnings("rawtypes")
-public class JmxConstants {
-
-    /*
-     * Empty constructor to make sure this is not used as an object.
-     */
-    private JmxConstants() {
-        // empty
-    }
-
-    /**
-     * The MBean Open type for an array of strings
-     */
-    public static final ArrayType       STRING_ARRAY_TYPE   = Item
-                                                                    .arrayType(
-                                                                            1,
-                                                                            SimpleType.STRING);
-    /**
-     * The MBean Open type for an array of longs
-     */
-    public static final ArrayType       LONG_ARRAY_TYPE     = Item
-                                                                    .arrayType(
-                                                                            1,
-                                                                            SimpleType.LONG);
-
-    /**
-     * For an encoded array we need to start with ARRAY_OF. This must be
-     * followed by one of the names in {@link #SCALAR}.
-     * 
-     */
-    public final static String          ARRAY_OF            = "Array of ";
-
-    /**
-     * For an encoded vector we need to start with ARRAY_OF. This must be
-     * followed by one of the names in {@link #SCALAR}.
-     */
-    public final static String          VECTOR_OF           = "Vector of ";
-
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * {@link java.lang.String}
-     */
-    public static final String          STRING              = "String";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * {@link java.lang.Integer}
-     */
-    public static final String          INTEGER             = "Integer";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * {@link java.lang.Long}
-     */
-    public static final String          LONG                = "Long";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * {@link java.lang.Float}
-     */
-    public static final String          FLOAT               = "Float";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * {@link java.lang.Double}
-     */
-    public static final String          DOUBLE              = "Double";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * {@link java.lang.Byte}
-     */
-    public static final String          BYTE                = "Byte";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * {@link java.lang.Short}
-     */
-    public static final String          SHORT               = "Short";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * {@link java.lang.Character}
-     */
-    public static final String          CHARACTER           = "Character";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * {@link java.lang.Boolean}
-     */
-    public static final String          BOOLEAN             = "Boolean";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * {@link java.math.BigDecimal}
-     */
-    public static final String          BIGDECIMAL          = "BigDecimal";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * {@link java.math.BigInteger}
-     */
-    public static final String          BIGINTEGER          = "BigInteger";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * the <code>double</code> primitive type.
-     */
-    public static final String          P_DOUBLE            = "double";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * the <code>float</code> primitive type.
-     */
-    public static final String          P_FLOAT             = "float";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * the <code>long</code> primitive type.
-     */
-    public static final String          P_LONG              = "long";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * the <code>int</code> primitive type.
-     */
-    public static final String          P_INT               = "int";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * the <code>short</code> primitive type.
-     */
-    public static final String          P_SHORT             = "short";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * the <code>byte</code> primitive type.
-     */
-    public static final String          P_BYTE              = "byte";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * the <code>char</code> primitive type.
-     */
-    public static final String          P_CHAR              = "char";
-    /**
-     * Value for {@link #PROPERTY_TYPE} value in the case of
-     * the <code>boolean</code> primitive type.
-     */
-    public static final String          P_BOOLEAN           = "boolean";
-
-    /**
-     * A set of all scalars that can be used in the {@link #TYPE} property of a
-     * {@link #PROPERTIES_TYPE}. This contains the following names:
-     * <ul>
-     * <li>{@link #BIGDECIMAL}</li>
-     * <li>{@link #BIGINTEGER}</li>
-     * <li>{@link #BOOLEAN}</li>
-     * <li>{@link #BYTE}</li>
-     * <li>{@link #CHARACTER}</li>
-     * <li>{@link #DOUBLE}</li>
-     * <li>{@link #FLOAT}</li>
-     * <li>{@link #INTEGER}</li>
-     * <li>{@link #LONG}</li>
-     * <li>{@link #SHORT}</li>
-     * <li>{@link #STRING}</li>
-     * <li>{@link #P_BYTE}</li>
-     * <li>{@link #P_CHAR}</li>
-     * <li>{@link #P_DOUBLE}</li>
-     * <li>{@link #P_FLOAT}</li>
-     * <li>{@link #P_INT}</li>
-     * <li>{@link #P_LONG}</li>
-     * <li>{@link #P_SHORT}</li>
-     */
-    public final static List<String>    SCALAR              = Collections
-                                                                    .unmodifiableList(Arrays
-                                                                            .asList(
-                                                                                    STRING,
-                                                                                    INTEGER,
-                                                                                    LONG,
-                                                                                    FLOAT,
-                                                                                    DOUBLE,
-                                                                                    BYTE,
-                                                                                    SHORT,
-                                                                                    CHARACTER,
-                                                                                    BOOLEAN,
-                                                                                    BIGDECIMAL,
-                                                                                    BIGINTEGER,
-                                                                                    P_BYTE,
-                                                                                    P_CHAR,
-                                                                                    P_SHORT,
-                                                                                    P_INT,
-                                                                                    P_LONG,
-                                                                                    P_DOUBLE,
-                                                                                    P_FLOAT));
-    /**
-     * The key KEY.
-     */
-    public static final String          KEY                 = "Key";
-    /**
-     * The key of a property. The key is {@link #KEY} and the type is
-     * {@link SimpleType#STRING}.
-     */
-    public static final Item            KEY_ITEM            = new Item(
-                                                                    KEY,
-                                                                    "The key of the property",
-                                                                    SimpleType.STRING);
-
-    /**
-     * The key VALUE.
-     */
-    public static final String          VALUE               = "Value";
-
-    /**
-     * The value of a property. The key is {@link #VALUE} and the type is
-     * {@link SimpleType#STRING}. A value will be encoded by the string given in
-     * {@link #TYPE}. The syntax for this type is given in {@link #TYPE_ITEM}.
-     */
-    public static final Item            VALUE_ITEM          = new Item(
-                                                                    VALUE,
-                                                                    "The value of the property",
-                                                                    SimpleType.STRING);
-
-    /**
-     * The key TYPE.
-     */
-    public static final String          TYPE                = "Type";
-
-    /**
-     * The type of the property. The key is {@link #TYPE} and the type is
-     * {@link SimpleType#STRING}. This string must follow the following syntax:
-     * 
-     * TYPE ::= ( 'Array of ' | 'Vector of ' )? {@link #SCALAR}
-     * 
-     */
-    public static final Item            TYPE_ITEM           = new Item(
-                                                                    TYPE,
-                                                                    "The type of the property",
-                                                                    SimpleType.STRING,
-                                                                    STRING,
-                                                                    INTEGER,
-                                                                    LONG,
-                                                                    FLOAT,
-                                                                    DOUBLE,
-                                                                    BYTE,
-                                                                    SHORT,
-                                                                    CHARACTER,
-                                                                    BOOLEAN,
-                                                                    BIGDECIMAL,
-                                                                    BIGINTEGER,
-                                                                    P_DOUBLE,
-                                                                    P_FLOAT,
-                                                                    P_LONG,
-                                                                    P_INT,
-                                                                    P_SHORT,
-                                                                    P_CHAR,
-                                                                    P_BYTE,
-                                                                    P_BOOLEAN);
-
-    /**
-     * A Composite Type describing a a single property. A property consists of
-     * the following items {@link #KEY_ITEM}, {@link #VALUE_ITEM}, and
-     * {@link #TYPE_ITEM}.
-     */
-    public static final CompositeType   PROPERTY_TYPE       = Item
-                                                                    .compositeType(
-                                                                            "PROPERTY",
-                                                                            "This type encapsulates a key/value pair with a type identifier",
-                                                                            KEY_ITEM,
-                                                                            VALUE_ITEM,
-                                                                            TYPE_ITEM);
-
-    /**
-     * Describes a map with properties. The row type is {@link #PROPERTY_TYPE}.
-     * The index is defined to the {@link #KEY} of the property.
-     */
-    public static final TabularType     PROPERTIES_TYPE     = Item
-                                                                    .tabularType(
-                                                                            "PROPERTIES",
-                                                                            "A table of PROPERTY",
-                                                                            PROPERTY_TYPE,
-                                                                            KEY);
-
-    /**
-     * The domain name of the core OSGi MBeans
-     */
-    public static final String          OSGI_CORE           = "osgi.core";
-
-    /**
-     * The domain name of the selected OSGi compendium MBeans
-     */
-    public static final String          OSGI_COMPENDIUM     = "osgi.compendium";
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/osgi/src/main/resources/karaf-logo.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/osgi/src/main/resources/karaf-logo.png b/brooklyn-library/software/osgi/src/main/resources/karaf-logo.png
deleted file mode 100644
index 8ae2f4f..0000000
Binary files a/brooklyn-library/software/osgi/src/main/resources/karaf-logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/osgi/src/test/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainerEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/osgi/src/test/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainerEc2LiveTest.java b/brooklyn-library/software/osgi/src/test/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainerEc2LiveTest.java
deleted file mode 100644
index e3d3090..0000000
--- a/brooklyn-library/software/osgi/src/test/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainerEc2LiveTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.osgi.karaf;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-public class KarafContainerEc2LiveTest extends AbstractEc2LiveTest {
-
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(KarafContainerEc2LiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        KarafContainer karaf = app.createAndManageChild(EntitySpec.create(KarafContainer.class)
-                .configure("name", Identifiers.makeRandomId(8))
-                .configure("displayName", "Karaf Test")
-                .configure("jmxPort", "8099+")
-                .configure("rmiRegistryPort", "9099+"));
-        
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(karaf, KarafContainer.SERVICE_UP, true);
-    }
-    
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this really does have test methods  
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/osgi/src/test/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainerTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/osgi/src/test/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainerTest.java b/brooklyn-library/software/osgi/src/test/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainerTest.java
deleted file mode 100644
index 624fc4e..0000000
--- a/brooklyn-library/software/osgi/src/test/java/org/apache/brooklyn/entity/osgi/karaf/KarafContainerTest.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.osgi.karaf;
-
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-
-import java.net.URL;
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.NoMachinesAvailableException;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.test.support.TestResourceUnavailableException;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.testng.Assert;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.collect.ImmutableList;
-
-public class KarafContainerTest extends BrooklynAppLiveTestSupport {
-
-    private static final String HELLO_WORLD_JAR = "/hello-world.jar";
-
-    LocalhostMachineProvisioningLocation localhost;
-    KarafContainer karaf;
-
-    @BeforeMethod(alwaysRun=true)
-    public void setUp() throws Exception {
-        super.setUp();
-        localhost = app.newLocalhostProvisioningLocation();
-    }
-
-    // FIXME Test failing in jenkins; not sure why. The karaf log shows the mbeans never being
-    // registered so we are never able to connect to them over jmx.
-    @Test(groups = {"Integration", "WIP"})
-    public void canStartupAndShutdown() throws Exception {
-        karaf = app.createAndManageChild(EntitySpec.create(KarafContainer.class)
-                .configure("name", Identifiers.makeRandomId(8))
-                .configure("displayName", "Karaf Test"));
-        
-        app.start(ImmutableList.of(localhost));
-        EntityTestUtils.assertAttributeEqualsEventually(karaf, Attributes.SERVICE_UP, true);
-        
-        Entities.dumpInfo(karaf);
-        final int pid = karaf.getAttribute(KarafContainer.KARAF_PID);
-        Entities.submit(app, SshEffectorTasks.requirePidRunning(pid).machine(localhost.obtain())).get();
-        
-        karaf.stop();
-        EntityTestUtils.assertAttributeEqualsEventually(karaf, Attributes.SERVICE_UP, false);
-        
-        Asserts.succeedsEventually(new Runnable() {
-            public void run() {
-                try {
-                    Assert.assertFalse(Entities.submit(app, SshEffectorTasks.isPidRunning(pid).machine(localhost.obtain())).get());
-                } catch (NoMachinesAvailableException e) {
-                    throw Exceptions.propagate(e);
-                }
-            }});
-    }
-    
-    @Test(groups = {"Integration", "WIP"})
-    public void canStartupAndShutdownExplicitJmx() throws Exception {
-        karaf = app.createAndManageChild(EntitySpec.create(KarafContainer.class)
-                .configure("name", Identifiers.makeRandomId(8))
-                .configure("displayName", "Karaf Test")
-                .configure("rmiRegistryPort", "8099+")
-                .configure("jmxPort", "9099+"));
-        
-        app.start(ImmutableList.of(localhost));
-        EntityTestUtils.assertAttributeEqualsEventually(karaf, Attributes.SERVICE_UP, true);
-        
-        karaf.stop();
-        EntityTestUtils.assertAttributeEqualsEventually(karaf, Attributes.SERVICE_UP, false);
-    }
-    
-    @Test(groups = {"Integration", "WIP"})
-    public void canStartupAndShutdownLegacyJmx() throws Exception {
-        karaf = app.createAndManageChild(EntitySpec.create(KarafContainer.class)
-                .configure("name", Identifiers.makeRandomId(8))
-                .configure("displayName", "Karaf Test")
-                .configure("jmxPort", "8099+")
-                .configure("rmiRegistryPort", "9099+"));
-            // NB: now the above parameters have the opposite semantics to before
-        
-        app.start(ImmutableList.of(localhost));
-        EntityTestUtils.assertAttributeEqualsEventually(karaf, Attributes.SERVICE_UP, true);
-        
-        karaf.stop();
-        EntityTestUtils.assertAttributeEqualsEventually(karaf, Attributes.SERVICE_UP, false);
-    }
-    
-    // FIXME Test failing in jenkins; not sure why. The karaf log shows the mbeans never being
-    // registered so we are never able to connect to them over jmx.
-    @Test(groups = {"Integration", "WIP"})
-    public void testCanInstallAndUninstallBundle() throws Exception {
-        TestResourceUnavailableException.throwIfResourceUnavailable(getClass(), HELLO_WORLD_JAR);
-        URL jarUrl = getClass().getResource(HELLO_WORLD_JAR);
-        assertNotNull(jarUrl);
-
-        karaf = app.createAndManageChild(EntitySpec.create(KarafContainer.class)
-            .configure("name", Identifiers.makeRandomId(8))
-            .configure("displayName", "Karaf Test")
-            .configure("jmxPort", "8099+")
-            .configure("rmiRegistryPort", "9099+"));
-        
-        app.start(ImmutableList.of(localhost));
-        
-        long bundleId = karaf.installBundle("wrap:"+jarUrl.toString());
-        
-        Map<Long, Map<String,?>> bundles = karaf.listBundles();
-        Map<String,?> bundle = bundles.get(bundleId);
-        assertNotNull(bundle, "expected="+bundleId+"; actual="+bundles.keySet());
-
-        // Undeploy: expect bundle to no longer be listed        
-        karaf.uninstallBundle(bundleId);
-        
-        Map<Long, Map<String,?>> bundles2 = karaf.listBundles();
-        Map<String,?> bundle2 = bundles2.get(bundleId);
-        assertNull(bundle2, "expectedAbsent="+bundleId+"; actual="+bundles2.keySet());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/osgi/src/test/resources/hello-world.jar
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/osgi/src/test/resources/hello-world.jar b/brooklyn-library/software/osgi/src/test/resources/hello-world.jar
deleted file mode 100644
index 956d621..0000000
Binary files a/brooklyn-library/software/osgi/src/test/resources/hello-world.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/osgi/src/test/resources/hello-world.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/osgi/src/test/resources/hello-world.txt b/brooklyn-library/software/osgi/src/test/resources/hello-world.txt
deleted file mode 100644
index f3060f0..0000000
--- a/brooklyn-library/software/osgi/src/test/resources/hello-world.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# 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.
-
-The file hello-world.jar is used by KarafContainerTest. It is a
-simple OSGi bundle that can be deployed.
-
-The jar contains its source code.
-
-Under Apache conventions, binary files are not part of the source
-release. If you are using the source release, you may add this file
-by copying it from the master repository, which is accessible on the
-web at https://github.com/apache/incubator-brooklyn

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/webapp/pom.xml b/brooklyn-library/software/webapp/pom.xml
deleted file mode 100644
index 434e808..0000000
--- a/brooklyn-library/software/webapp/pom.xml
+++ /dev/null
@@ -1,193 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>brooklyn-software-webapp</artifactId>
-    <packaging>jar</packaging>
-    <name>Brooklyn Web App Software Entities</name>
-    <description>
-		Brooklyn entities for Web App software processes
-	</description>
-
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.rat</groupId>
-                    <artifactId>apache-rat-plugin</artifactId>
-                    <configuration>
-                        <excludes combine.children="append">
-                            <!--
-                                Configuration artifacts (for installations) are based on templated defaults for 
-                                the given components. These are files "without any degree of creativity" from the
-                                perspective of the Brooklyn/Apache contribution.
-                            -->
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/webapp/jboss/jboss7-standalone.xml</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/webapp/jetty/jetty-brooklyn.xml</exclude>
-                        </excludes>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
-    
-    <dependencies>    
-        <!-- required for GeoScaling DNS (entity accesses management service via HTTP) -->
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>${httpclient.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>jtidy</artifactId>
-            <version>${jtidy.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-policy</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-utils-common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-utils-groovy</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpcore</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.code.findbugs</groupId>
-            <artifactId>jsr305</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <!-- test dependencies -->
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>mx4j</groupId>
-            <artifactId>mx4j-tools</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jms_1.1_spec</artifactId>
-            <version>${geronimo-jms_1.1_spec.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-database</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- bring in camp test deps for moved tests -->
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-camp</artifactId>
-            <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-camp</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- bring in jclouds for testing -->
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-locations-jclouds</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>${jclouds.groupId}</groupId>
-            <artifactId>jclouds-core</artifactId>
-            <version>${jclouds.version}</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/webapp/src/main/java/org/apache/brooklyn/entity/dns/AbstractGeoDnsService.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/webapp/src/main/java/org/apache/brooklyn/entity/dns/AbstractGeoDnsService.java b/brooklyn-library/software/webapp/src/main/java/org/apache/brooklyn/entity/dns/AbstractGeoDnsService.java
deleted file mode 100644
index 6e55d5d..0000000
--- a/brooklyn-library/software/webapp/src/main/java/org/apache/brooklyn/entity/dns/AbstractGeoDnsService.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.dns;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.Group;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.location.geo.HostGeoInfo;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-import com.google.common.reflect.TypeToken;
-
-public interface AbstractGeoDnsService extends Entity {
-    
-    @SetFromFlag("includeHomelessEntities")
-    ConfigKey<Boolean> INCLUDE_HOMELESS_ENTITIES = ConfigKeys.newBooleanConfigKey(
-            "geodns.includeHomeless", "Whether to include entities whose geo-coordinates cannot be inferred", false);
-
-    @SetFromFlag("useHostnames")
-    ConfigKey<Boolean> USE_HOSTNAMES = ConfigKeys.newBooleanConfigKey(
-            "geodns.useHostnames", "Whether to use the hostname for the returned value for routing, rather than IP address (defaults to true)", true);
-
-    @SetFromFlag("provider")
-    ConfigKey<Group> ENTITY_PROVIDER = ConfigKeys.newConfigKey(Group.class,
-            "geodns.entityProvider", "The group whose members should be tracked");
-
-    /** @see Lifecycle#RUNNING */
-    @SetFromFlag("filterForRunning")
-    ConfigKey<Boolean> FILTER_FOR_RUNNING = ConfigKeys.newBooleanConfigKey(
-            "geodns.filterForRunning", "Whether to only track targets whose status is \"RUNNING\"", true);
-
-    AttributeSensor<Lifecycle> SERVICE_STATE_ACTUAL = Attributes.SERVICE_STATE_ACTUAL;
-    AttributeSensor<Boolean> SERVICE_UP = Startable.SERVICE_UP;
-    AttributeSensor<String> HOSTNAME = Attributes.HOSTNAME;
-    AttributeSensor<String> ADDRESS = Attributes.ADDRESS;
-
-    AttributeSensor<Map<String,String>> TARGETS = Sensors.newSensor(new TypeToken<Map<String, String>>() {},
-            "geodns.targets", "Map of targets currently being managed (entity ID to URL)");
-
-    void setServiceState(Lifecycle state);
-    
-    /** sets target to be a group whose *members* will be searched (non-Group items not supported) */
-    // prior to 0.7.0 the API accepted non-group items, but did not handle them correctly
-    void setTargetEntityProvider(final Group entityProvider);
-    
-    /** should return the hostname which this DNS service is configuring */
-    String getHostname();
-    
-    Map<Entity, HostGeoInfo> getTargetHosts();
-}


[48/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/SingleWebServerExample.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/SingleWebServerExample.java b/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/SingleWebServerExample.java
deleted file mode 100644
index cec7a7e..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/SingleWebServerExample.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.entity.webapp.JavaWebAppService;
-import org.apache.brooklyn.entity.webapp.jboss.JBoss7Server;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-/** This example starts one web app on 8080, waits for a keypress, then stops it. */
-public class SingleWebServerExample extends AbstractApplication {
-
-    public static final Logger LOG = LoggerFactory.getLogger(SingleWebServerExample.class);
-
-    private static final String WAR_PATH = "classpath://hello-world-webapp.war";
-
-    @Override
-    public void initApp() {
-        addChild(EntitySpec.create(JBoss7Server.class)
-                .configure(JavaWebAppService.ROOT_WAR, WAR_PATH)
-                .configure(Attributes.HTTP_PORT, PortRanges.fromString("8080+")));
-    }
-
-    // Shows how to use ApplicationBuilder without sub-classing, but for CLI usage one should sub-class
-    public static void main(String[] argv) throws Exception {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", "localhost");
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(StartableApplication.class, SingleWebServerExample.class).displayName("Brooklyn WebApp example"))
-                .webconsolePort(port)
-                .location(location)
-                .start();
-         
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExample.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExample.java b/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExample.java
deleted file mode 100644
index 601537a..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExample.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.attributeWhenReady;
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.formatString;
-import static org.apache.brooklyn.entity.java.JavaEntityMethods.javaSysProp;
-
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.DynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.JavaWebAppService;
-import org.apache.brooklyn.entity.webapp.WebAppService;
-import org.apache.brooklyn.entity.webapp.WebAppServiceConstants;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy;
-import org.apache.brooklyn.policy.enricher.HttpLatencyDetector;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-
-/**
- * Launches a 3-tier app with nginx, clustered jboss, and mysql.
- **/
-public class WebClusterDatabaseExample extends AbstractApplication {
-    
-    public static final Logger LOG = LoggerFactory.getLogger(WebClusterDatabaseExample.class);
-    
-    public static final String WAR_PATH = "classpath://hello-world-sql-webapp.war";
-    
-    public static final String DB_SETUP_SQL_URL = "classpath://visitors-creation-script.sql";
-    
-    public static final String DB_TABLE = "visitors";
-    public static final String DB_USERNAME = "brooklyn";
-    public static final String DB_PASSWORD = "br00k11n";
-    
-    public static final AttributeSensor<Integer> APPSERVERS_COUNT = Sensors.newIntegerSensor( 
-            "appservers.count", "Number of app servers deployed");
-
-    @Override
-    public void initApp() {
-        MySqlNode mysql = addChild(EntitySpec.create(MySqlNode.class)
-                .configure("creationScriptUrl", DB_SETUP_SQL_URL));
-        
-        ControlledDynamicWebAppCluster web = addChild(EntitySpec.create(ControlledDynamicWebAppCluster.class)
-                .configure(WebAppService.HTTP_PORT, PortRanges.fromString("8080+"))
-                .configure(JavaWebAppService.ROOT_WAR, WAR_PATH)
-                .configure(javaSysProp("brooklyn.example.db.url"), 
-                        formatString("jdbc:%s%s?user=%s\\&password=%s", 
-                                attributeWhenReady(mysql, MySqlNode.DATASTORE_URL), 
-                                DB_TABLE, DB_USERNAME, DB_PASSWORD)) );
-
-        web.enrichers().add(HttpLatencyDetector.builder().
-                url(ControlledDynamicWebAppCluster.ROOT_URL).
-                rollup(10, TimeUnit.SECONDS).
-                build());
-
-        // simple scaling policy
-        web.getCluster().policies().add(AutoScalerPolicy.builder().
-                metric(DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW_PER_NODE).
-                metricRange(10, 100).
-                sizeRange(1, 5).
-                build());
-
-        // expose some KPI's
-        enrichers().add(Enrichers.builder()
-                .propagating(WebAppServiceConstants.ROOT_URL,
-                        DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW,
-                        HttpLatencyDetector.REQUEST_LATENCY_IN_SECONDS_IN_WINDOW)
-                .from(web)
-                .build());
-
-        enrichers().add(Enrichers.builder()
-                .propagating(ImmutableMap.of(DynamicWebAppCluster.GROUP_SIZE, APPSERVERS_COUNT))
-                .from(web)
-                .build());
-    }
-
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", "localhost");
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(StartableApplication.class, WebClusterDatabaseExample.class).displayName("Brooklyn WebApp Cluster with Database example"))
-                .webconsolePort(port)
-                .location(location)
-                .start();
-         
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleApp.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleApp.java b/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleApp.java
deleted file mode 100644
index 5c58fee..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleApp.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.attributeWhenReady;
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.formatString;
-
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.catalog.CatalogConfig;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.DynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.JavaWebAppService;
-import org.apache.brooklyn.entity.webapp.WebAppService;
-import org.apache.brooklyn.entity.webapp.WebAppServiceConstants;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.java.JavaEntityMethods;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy;
-import org.apache.brooklyn.policy.enricher.HttpLatencyDetector;
-import org.apache.brooklyn.util.CommandLineUtil;
-import org.apache.brooklyn.util.core.BrooklynMavenArtifacts;
-import org.apache.brooklyn.util.core.ResourceUtils;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
-
-/**
- * Launches a 3-tier app with nginx, clustered jboss, and mysql.
- * <p>
- * Includes some advanced features such as KPI / derived sensors,
- * and annotations for use in a catalog.
- * <p>
- * This variant also increases minimum size to 2.  
- * Note the policy min size must have the same value,
- * otherwise it fights with cluster set up trying to reduce the cluster size!
- **/
-@Catalog(name="Elastic Java Web + DB",
-    description="Deploys a WAR to a load-balanced elastic Java AppServer cluster, " +
-            "with an auto-scaling policy, " +
-            "wired to a database initialized with the provided SQL; " +
-            "defaults to a 'Hello World' chatroom app.",
-    iconUrl="classpath://brooklyn/demo/glossy-3d-blue-web-icon.png")
-public class WebClusterDatabaseExampleApp extends AbstractApplication implements StartableApplication {
-    
-    public static final Logger LOG = LoggerFactory.getLogger(WebClusterDatabaseExampleApp.class);
-    
-    public static final String DEFAULT_LOCATION = "localhost";
-
-    public static final String DEFAULT_WAR_PATH = ResourceUtils.create(WebClusterDatabaseExampleApp.class)
-            // take this war, from the classpath, or via maven if not on the classpath
-            .firstAvailableUrl(
-                    "classpath://hello-world-sql-webapp.war",
-                    BrooklynMavenArtifacts.localUrl("example", "brooklyn-example-hello-world-sql-webapp", "war"))
-            .or("classpath://hello-world-sql-webapp.war");
-    
-    @CatalogConfig(label="WAR (URL)", priority=2)
-    public static final ConfigKey<String> WAR_PATH = ConfigKeys.newConfigKey(
-        "app.war", "URL to the application archive which should be deployed", 
-        DEFAULT_WAR_PATH);    
-
-    // TODO to expose in catalog we need to let the keystore url be specified (not hard)
-    // and also confirm that this works for nginx (might be a bit fiddly);
-    // booleans in the gui are working (With checkbox)
-    @CatalogConfig(label="HTTPS")
-    public static final ConfigKey<Boolean> USE_HTTPS = ConfigKeys.newConfigKey(
-            "app.https", "Whether the application should use HTTPS only or just HTTP only (default)", false);
-    
-    public static final String DEFAULT_DB_SETUP_SQL_URL = "classpath://visitors-creation-script.sql";
-    
-    @CatalogConfig(label="DB Setup SQL (URL)", priority=1)
-    public static final ConfigKey<String> DB_SETUP_SQL_URL = ConfigKeys.newConfigKey(
-        "app.db_sql", "URL to the SQL script to set up the database", 
-        DEFAULT_DB_SETUP_SQL_URL);
-    
-    public static final String DB_TABLE = "visitors";
-    public static final String DB_USERNAME = "brooklyn";
-    public static final String DB_PASSWORD = "br00k11n";
-    
-    public static final AttributeSensor<Integer> APPSERVERS_COUNT = Sensors.newIntegerSensor( 
-            "appservers.count", "Number of app servers deployed");
-    public static final AttributeSensor<Double> REQUESTS_PER_SECOND_IN_WINDOW = 
-            WebAppServiceConstants.REQUESTS_PER_SECOND_IN_WINDOW;
-    public static final AttributeSensor<String> ROOT_URL = WebAppServiceConstants.ROOT_URL;
-
-    @Override
-    public void initApp() {
-        MySqlNode mysql = addChild(
-                EntitySpec.create(MySqlNode.class)
-                        .configure(MySqlNode.CREATION_SCRIPT_URL, Entities.getRequiredUrlConfig(this, DB_SETUP_SQL_URL)));
-
-        ControlledDynamicWebAppCluster web = addChild(
-                EntitySpec.create(ControlledDynamicWebAppCluster.class)
-                        .configure(WebAppService.HTTP_PORT, PortRanges.fromString("8080+"))
-                        // to specify a diferrent appserver:
-//                        .configure(ControlledDynamicWebAppCluster.MEMBER_SPEC, EntitySpec.create(TomcatServer.class))
-                        .configure(JavaWebAppService.ROOT_WAR, Entities.getRequiredUrlConfig(this, WAR_PATH))
-                        .configure(JavaEntityMethods.javaSysProp("brooklyn.example.db.url"), 
-                                formatString("jdbc:%s%s?user=%s\\&password=%s", 
-                                        attributeWhenReady(mysql, MySqlNode.DATASTORE_URL), DB_TABLE, DB_USERNAME, DB_PASSWORD))
-                        .configure(DynamicCluster.INITIAL_SIZE, 2)
-                        .configure(WebAppService.ENABLED_PROTOCOLS, ImmutableSet.of(getConfig(USE_HTTPS) ? "https" : "http")) );
-
-        web.enrichers().add(HttpLatencyDetector.builder()
-                .url(ROOT_URL)
-                .rollup(10, TimeUnit.SECONDS)
-                .build());
-        
-        web.getCluster().policies().add(AutoScalerPolicy.builder()
-                .metric(DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW_PER_NODE)
-                .metricRange(10, 100)
-                .sizeRange(2, 5)
-                .build());
-
-        enrichers().add(Enrichers.builder()
-                .propagating(WebAppServiceConstants.ROOT_URL,
-                        DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW,
-                        HttpLatencyDetector.REQUEST_LATENCY_IN_SECONDS_IN_WINDOW)
-                .from(web)
-                .build());
-
-        enrichers().add(Enrichers.builder()
-                .propagating(ImmutableMap.of(DynamicWebAppCluster.GROUP_SIZE, APPSERVERS_COUNT))
-                .from(web)
-                .build());
-    }
-    
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION);
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                 .application(EntitySpec.create(StartableApplication.class, WebClusterDatabaseExampleApp.class)
-                         .displayName("Brooklyn WebApp Cluster with Database example"))
-                 .webconsolePort(port)
-                 .location(location)
-                 .start();
-             
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterExample.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterExample.java b/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterExample.java
deleted file mode 100644
index e5a1ae2..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterExample.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.internal.BrooklynProperties;
-import org.apache.brooklyn.entity.proxy.nginx.NginxController;
-import org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.DynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.jboss.JBoss7Server;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-/**
- * Launches a clustered and load-balanced set of web servers.
- * Demonstrates syntax, so many of the options used here are the defaults.
- * (So the class could be much simpler, as in WebClusterExampleAlt.)
- * <p>
- * Requires: 
- * -Xmx512m -Xms128m -XX:MaxPermSize=256m
- * and brooklyn-all jar, and this jar or classes dir, on classpath. 
- **/
-public class WebClusterExample extends AbstractApplication {
-    public static final Logger LOG = LoggerFactory.getLogger(WebClusterExample.class);
-    
-    static BrooklynProperties config = BrooklynProperties.Factory.newDefault();
-
-    public static final String DEFAULT_LOCATION = "localhost";
-
-    public static final String WAR_PATH = "classpath://hello-world-webapp.war";
-
-    private NginxController nginxController;
-    private ControlledDynamicWebAppCluster web;
-    
-    @Override
-    public void initApp() {
-        nginxController = addChild(EntitySpec.create(NginxController.class)
-                //.configure("domain", "webclusterexample.brooklyn.local")
-                .configure("port", "8000+"));
-          
-        web = addChild(EntitySpec.create(ControlledDynamicWebAppCluster.class)
-                .displayName("WebApp cluster")
-                .configure(ControlledDynamicWebAppCluster.CONTROLLER, nginxController)
-                .configure(ControlledDynamicWebAppCluster.INITIAL_SIZE, 1)
-                .configure(ControlledDynamicWebAppCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class)
-                        .configure("httpPort", "8080+")
-                        .configure("war", WAR_PATH)));
-        
-        web.getCluster().policies().add(AutoScalerPolicy.builder()
-                .metric(DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW_PER_NODE)
-                .sizeRange(1, 5)
-                .metricRange(10, 100)
-                .build());
-    }
-    
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION);
-
-        // TODO Want to parse, to handle multiple locations
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(WebClusterExample.class).displayName("Brooklyn WebApp Cluster example"))
-                .webconsolePort(port)
-                .location(location)
-                .start();
-         
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/resources/logback-custom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/resources/logback-custom.xml b/brooklyn-library/examples/simple-web-cluster/src/main/resources/logback-custom.xml
deleted file mode 100644
index 02a8a82..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/resources/logback-custom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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.
--->
-<included>
-
-    <!--
-     
-        this file demonstrates how to customise logging, base on the placeholder 
-        logging-custom.xml included in brooklyn-logging-includes.
-
-    -->        
-  
-    <!-- include this category -->
-    <logger name="org.apache.brooklyn.demo" level="DEBUG"/>
-    
-    <!-- log to simple-web-cluster.log -->
-    <property name="logging.basename" scope="context" value="brooklyn-simple-web-cluster" />
-
-  <!--
-  
-       more customisation is possible by overriding the default-included
-       configuration files, such as logback-main.xml (entirely replacing configuration),
-       or e.g. brooklyn/logback-appender-file.xml (replacing the FILE logger config).
-       
-  -->
-
-</included>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/glossy-3d-blue-web-icon.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/glossy-3d-blue-web-icon.png b/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/glossy-3d-blue-web-icon.png
deleted file mode 100644
index 542a1de..0000000
Binary files a/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/glossy-3d-blue-web-icon.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-riak-todo.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-riak-todo.yaml b/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-riak-todo.yaml
deleted file mode 100644
index 958d29d..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-riak-todo.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-# 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.
-
-name: "Node.JS Todo Application"
-origin: "https://github.com/amirrajan/nodejs-todo/"
-location:
-  jclouds:aws-ec2:us-west-1:
-    imageId: us-west-1/ami-c33cdd87
-services:
-- type: org.apache.brooklyn.entity.nosql.riak.RiakCluster
-  initialSize: 2
-  id: mycluster
-  brooklyn.config:
-    provisioning.properties:
-      osFamily: centos
-      minCores: 4
-      minRam: 2048
-- type: org.apache.brooklyn.entity.webapp.nodejs.NodeJsWebAppService
-  id: nodejs-riak1
-  name: "Node.JS"
-  brooklyn.config:
-    gitRepoUrl:
-      "https://github.com/bostko/nodejs-todo.git"
-    appFileName: server.js
-    appName: nodejs-todo
-    nodePackages:
-    - basho-riak-client
-    env:
-      NODE_ENV: production
-      RIAK_NODES: >
-        $brooklyn:component("mycluster").attributeWhenReady("riak.cluster.nodeListPbPort")
-    launch.latch: $brooklyn:component("mycluster").attributeWhenReady("service.isUp")
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-todo.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-todo.yaml b/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-todo.yaml
deleted file mode 100644
index 6aab1db..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-todo.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
-# 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.
-
-id: nodejs-todo-application
-name: "Node.JS Todo Application"
-origin: "https://github.com/amirrajan/nodejs-todo/"
-locations:
-- jclouds:softlayer:ams01
-services:
-- type: org.apache.brooklyn.entity.nosql.redis.RedisStore
-  id: redis
-  name: "Redis"
-- type: org.apache.brooklyn.entity.webapp.nodejs.NodeJsWebAppService
-  id: nodejs
-  name: "Node.JS"
-  brooklyn.config:
-    gitRepoUrl:
-      "https://github.com/grkvlt/nodejs-todo/"
-    appFileName: server.js
-    appName: nodejs-todo
-    nodePackages:
-    - express
-    - ejs
-    - jasmine-node
-    - underscore
-    - method-override
-    - cookie-parser
-    - express-session
-    - body-parser
-    - cookie-session
-    - redis
-    - redis-url
-    - connect
-    env:
-      REDISTOGO_URL: >
-        $brooklyn:formatString("redis://%s:%d/",
-          component("redis").attributeWhenReady("host.subnet.hostname"),
-          component("redis").attributeWhenReady("redis.port"))
-    launch.latch: $brooklyn:component("redis").attributeWhenReady("service.isUp")
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/resources/visitors-creation-script.sql
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/resources/visitors-creation-script.sql b/brooklyn-library/examples/simple-web-cluster/src/main/resources/visitors-creation-script.sql
deleted file mode 100644
index 2422f8f..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/resources/visitors-creation-script.sql
+++ /dev/null
@@ -1,41 +0,0 @@
---
--- 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.
---
-create database visitors;
-use visitors;
-
-# not necessary to create user if we grant (and not supported in some dialects)
-# create user 'brooklyn' identified by 'br00k11n';
-
-grant usage on *.* to 'brooklyn'@'%' identified by 'br00k11n';
-
-# ''@localhost is sometimes set up, overriding brooklyn@'%', so do a second explicit grant
-grant usage on *.* to 'brooklyn'@'localhost' identified by 'br00k11n';
-
-grant all privileges on visitors.* to 'brooklyn'@'%';
-
-flush privileges;
-
-CREATE TABLE MESSAGES (
-        id BIGINT NOT NULL AUTO_INCREMENT,
-        NAME VARCHAR(30) NOT NULL,
-        MESSAGE VARCHAR(400) NOT NULL,
-        PRIMARY KEY (ID)
-    );
-
-INSERT INTO MESSAGES values (default, 'Isaac Asimov', 'I grew up in Brooklyn' );

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/test/java/org/apache/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/test/java/org/apache/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java b/brooklyn-library/examples/simple-web-cluster/src/test/java/org/apache/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java
deleted file mode 100644
index 349c268..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/test/java/org/apache/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.sensor.Enricher;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.mgmt.rebind.RebindOptions;
-import org.apache.brooklyn.core.mgmt.rebind.RebindTestFixture;
-import org.apache.brooklyn.enricher.stock.Propagator;
-import org.apache.brooklyn.entity.proxy.nginx.NginxController;
-import org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.DynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.tomcat.Tomcat8Server;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.test.HttpTestUtils;
-import org.apache.brooklyn.test.WebAppMonitor;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.time.Duration;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.java.JavaEntityMethods;
-import org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy;
-import org.apache.brooklyn.policy.enricher.HttpLatencyDetector;
-
-import com.google.common.base.Predicates;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Sets;
-
-
-public class RebindWebClusterDatabaseExampleAppIntegrationTest extends RebindTestFixture<StartableApplication> {
-
-    private static final Logger LOG = LoggerFactory.getLogger(RebindWebClusterDatabaseExampleAppIntegrationTest.class);
-
-    private Location origLoc;
-    private List<WebAppMonitor> webAppMonitors = new CopyOnWriteArrayList<WebAppMonitor>();
-    private ExecutorService executor;
-
-    @BeforeMethod(alwaysRun=true)
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        origLoc = origManagementContext.getLocationRegistry().resolve("localhost");
-        executor = Executors.newCachedThreadPool();
-        webAppMonitors.clear();
-    }
-    
-    @AfterMethod(alwaysRun=true)
-    @Override
-    public void tearDown() throws Exception {
-        for (WebAppMonitor monitor : webAppMonitors) {
-            monitor.terminate();
-        }
-        if (executor != null) executor.shutdownNow();
-        super.tearDown();
-    }
-    
-    @Override
-    protected StartableApplication createApp() {
-        StartableApplication result = origManagementContext.getEntityManager().createEntity(EntitySpec.create(StartableApplication.class)
-                .impl(WebClusterDatabaseExampleApp.class)
-                .configure(DynamicCluster.INITIAL_SIZE, 2));
-        return result;
-    }
-    
-    private WebAppMonitor newWebAppMonitor(String url, int expectedResponseCode) {
-        WebAppMonitor monitor = new WebAppMonitor(url)
-//              .delayMillis(0) FIXME Re-enable to fast polling
-                .expectedResponseCode(expectedResponseCode)
-                .logFailures(LOG);
-        webAppMonitors.add(monitor);
-        executor.execute(monitor);
-        return monitor;
-    }
-    
-    @Test(groups="Integration")
-    public void testRestoresSimpleApp() throws Exception {
-        origApp.start(ImmutableList.of(origLoc));
-        
-        assertAppFunctional(origApp);
-        
-        String clusterUrl = checkNotNull(origApp.getAttribute(WebClusterDatabaseExampleApp.ROOT_URL), "cluster url");
-        WebAppMonitor monitor = newWebAppMonitor(clusterUrl, 200);
-        
-        newApp = rebind(RebindOptions.create().terminateOrigManagementContext(true));
-        assertAppFunctional(newApp);
-
-        // expect no failures during rebind
-        monitor.assertNoFailures("hitting nginx url");
-        monitor.terminate();
-    }
-    
-    private void assertAppFunctional(StartableApplication app) throws Exception {
-        // expect standard config to (still) be set
-        assertNotNull(app.getConfig(WebClusterDatabaseExampleApp.WAR_PATH));
-        assertEquals(app.getConfig(WebClusterDatabaseExampleApp.USE_HTTPS), Boolean.FALSE);
-        assertNotNull(app.getConfig(WebClusterDatabaseExampleApp.DB_SETUP_SQL_URL));
-
-        // expect entities to be there
-        MySqlNode mysql = (MySqlNode) Iterables.find(app.getChildren(), Predicates.instanceOf(MySqlNode.class));
-        ControlledDynamicWebAppCluster web = (ControlledDynamicWebAppCluster) Iterables.find(app.getChildren(), Predicates.instanceOf(ControlledDynamicWebAppCluster.class));
-        final NginxController nginx = (NginxController) Iterables.find(web.getChildren(), Predicates.instanceOf(NginxController.class));
-        DynamicWebAppCluster webCluster = (DynamicWebAppCluster) Iterables.find(web.getChildren(), Predicates.instanceOf(DynamicWebAppCluster.class));
-        Collection<Entity> appservers = web.getMembers();
-        assertEquals(appservers.size(), 2);
-        String clusterUrl = checkNotNull(app.getAttribute(WebClusterDatabaseExampleApp.ROOT_URL), "cluster url");
-        String dbUrl = checkNotNull(mysql.getAttribute(MySqlNode.DATASTORE_URL), "database url");
-        final String expectedJdbcUrl = String.format("jdbc:%s%s?user=%s\\&password=%s", dbUrl, WebClusterDatabaseExampleApp.DB_TABLE, 
-                WebClusterDatabaseExampleApp.DB_USERNAME, WebClusterDatabaseExampleApp.DB_PASSWORD);
-
-        // expect web-app to be reachable, and wired up to database
-        HttpTestUtils.assertHttpStatusCodeEventuallyEquals(clusterUrl, 200);
-        for (Entity appserver : appservers) {
-            String appserverUrl = checkNotNull(appserver.getAttribute(Tomcat8Server.ROOT_URL), "appserver url of "+appserver);
-
-            HttpTestUtils.assertHttpStatusCodeEventuallyEquals(appserverUrl, 200);
-            assertEquals(expectedJdbcUrl, appserver.getConfig(JavaEntityMethods.javaSysProp("brooklyn.example.db.url")), "of "+appserver);
-        }
-
-        WebAppMonitor monitor = newWebAppMonitor(clusterUrl, 200);
-
-        // expect auto-scaler policy to be there, and to be functional (e.g. can trigger resize)
-        AutoScalerPolicy autoScalerPolicy = (AutoScalerPolicy) Iterables.find(webCluster.policies(), Predicates.instanceOf(AutoScalerPolicy.class));
-        
-        autoScalerPolicy.config().set(AutoScalerPolicy.MIN_POOL_SIZE, 3);
-        EntityTestUtils.assertGroupSizeEqualsEventually(web, 3);
-        final Collection<Entity> webMembersAfterGrow = web.getMembers();
-        
-        for (final Entity appserver : webMembersAfterGrow) {
-            Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TWO_MINUTES), new Runnable() {
-                @Override public void run() {
-                    String appserverUrl = checkNotNull(appserver.getAttribute(Tomcat8Server.ROOT_URL), "appserver url of "+appserver);
-                    HttpTestUtils.assertHttpStatusCodeEquals(appserverUrl, 200);
-                    assertEquals(expectedJdbcUrl, appserver.getConfig(JavaEntityMethods.javaSysProp("brooklyn.example.db.url")), "of "+appserver);
-                    Asserts.assertEqualsIgnoringOrder(nginx.getAttribute(NginxController.SERVER_POOL_TARGETS).keySet(), webMembersAfterGrow);
-                }});
-        }
-
-        // expect enrichers to be there
-        Iterables.find(web.enrichers(), Predicates.instanceOf(HttpLatencyDetector.class));
-        Iterable<Enricher> propagatorEnrichers = Iterables.filter(web.enrichers(), Predicates.instanceOf(Propagator.class));
-        assertEquals(Iterables.size(propagatorEnrichers), 3, "propagatorEnrichers="+propagatorEnrichers);
-
-        // Check we see evidence of the enrichers having an effect.
-        // Relying on WebAppMonitor to stimulate activity.
-        EntityTestUtils.assertAttributeEqualsEventually(app, WebClusterDatabaseExampleApp.APPSERVERS_COUNT, 3);
-        EntityTestUtils.assertAttributeChangesEventually(web, DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW);
-        EntityTestUtils.assertAttributeChangesEventually(app, DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW);
-        EntityTestUtils.assertAttributeChangesEventually(web, HttpLatencyDetector.REQUEST_LATENCY_IN_SECONDS_MOST_RECENT);
-        EntityTestUtils.assertAttributeChangesEventually(web, HttpLatencyDetector.REQUEST_LATENCY_IN_SECONDS_IN_WINDOW);
-
-        // Restore the web-cluster to its original size of 2
-        autoScalerPolicy.config().set(AutoScalerPolicy.MIN_POOL_SIZE, 2);
-        EntityTestUtils.assertGroupSizeEqualsEventually(web, 2);
-        
-        final Entity removedAppserver = Iterables.getOnlyElement(Sets.difference(ImmutableSet.copyOf(webMembersAfterGrow), ImmutableSet.copyOf(web.getMembers())));
-        Asserts.succeedsEventually(new Runnable() {
-            @Override public void run() {
-                assertFalse(Entities.isManaged(removedAppserver));
-            }});
-        
-        monitor.assertNoFailures("hitting nginx url");
-        monitor.terminate();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/.gitignore
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/.gitignore b/brooklyn-library/examples/webapps/hello-world-sql/.gitignore
deleted file mode 100644
index 84c048a..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build/

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/pom.xml b/brooklyn-library/examples/webapps/hello-world-sql/pom.xml
deleted file mode 100644
index 19ff3ed..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/pom.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>brooklyn-example-hello-world-sql-webapp</artifactId>
-    <packaging>war</packaging>
-    <name>hello-world-sql-webapp Maven Webapp</name>
-  
-    <parent>
-        <groupId>org.apache.brooklyn.example</groupId>
-        <artifactId>brooklyn-examples-webapps-parent</artifactId>
-        <version>0.9.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION -->
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-      <dependency>
-        <groupId>javax.servlet</groupId>
-        <artifactId>javax.servlet-api</artifactId>
-      </dependency>
-
-      <!-- The riak artifact has a dependency on jackson 2.2.2, but actually requires 2.4.2 to run... -->
-      <dependency>
-        <groupId>com.fasterxml.jackson.core</groupId>
-        <artifactId>jackson-core</artifactId>
-        <version>${fasterxml.jackson.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>com.fasterxml.jackson.core</groupId>
-        <artifactId>jackson-annotations</artifactId>
-        <version>${fasterxml.jackson.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>com.fasterxml.jackson.core</groupId>
-        <artifactId>jackson-databind</artifactId>
-        <version>${fasterxml.jackson.version}</version>
-        <exclusions>
-            <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-            <exclusion>
-                <groupId>com.fasterxml.jackson.core</groupId>
-                <artifactId>jackson-annotations</artifactId>
-            </exclusion>
-        </exclusions>
-      </dependency>
-      <dependency>
-        <groupId>com.fasterxml.jackson.datatype</groupId>
-        <artifactId>jackson-datatype-joda</artifactId>
-        <version>${fasterxml.jackson.version}</version>
-        <exclusions>
-            <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-            <exclusion>
-                <groupId>com.fasterxml.jackson.core</groupId>
-                <artifactId>jackson-annotations</artifactId>
-            </exclusion>
-        </exclusions>
-      </dependency>
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <version>${mysql-connector-java.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.mongodb</groupId>
-            <artifactId>mongo-java-driver</artifactId>
-            <version>${mongodb.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.basho.riak</groupId>
-            <artifactId>riak-client</artifactId>
-            <version>${riak.version}</version>
-            <exclusions>
-                <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-                <exclusion>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                    <artifactId>jackson-core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                    <artifactId>jackson-annotations</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.fasterxml.jackson.datatype</groupId>
-                    <artifactId>jackson-datatype-joda</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <finalName>brooklyn-example-hello-world-sql-webapp</finalName>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/WEB-INF/web.xml b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 8b6f078..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?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.
--->
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-
-<web-app>
-  <display-name>Archetype Created Web Application</display-name>
-</web-app>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/available.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/available.jsp b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/available.jsp
deleted file mode 100644
index ddb4bf4..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/available.jsp
+++ /dev/null
@@ -1,81 +0,0 @@
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample "Hello, World" Application</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed "Hello, World" Application</h1>
-<p>This is the home page for a sample application used to illustrate 
-how web applications can be deployed to multi-cloud environments using Brooklyn.
-</td>
-</tr>
-</table>
-
-<p>
-The following apps are available:
-<p>
-
-<ul>
-<%
-String url=System.getProperty("brooklyn.example.db.url");
-//URL should be supplied e.g. "-Dbrooklyn.example.db.url=jdbc:mysql://localhost/visitors?user=brooklyn&password=br00k11n"
-//(note quoting needed due to ampersand)
-if (url!=null) {
-%>
-<li><a href="db.jsp">SQL database chatroom</a></li>
-<% } %>
-
-<%
-String hadoop=System.getProperty("brooklyn.example.hadoop.site.xml.url");
-//URL should be supplied e.g. -Dbrooklyn.example.hadoop.site.xml.url=file://tmp/hadoop-site.xml
-if (hadoop!=null) {
-%>
-<li><a href="hadoop-chat.jsp">Hadoop chatroom</a></li>
-<li><a href="hadoop-wordcount.jsp">Hadoop wordcount</a> (inevitably!) run over the chats</li>
-<% } %>
-
-
-<%
-    String mongo=System.getProperty("brooklyn.example.mongodb.port");
-    if (mongo!=null) {
-%>
-<li><a href="mongo.jsp">MongoDB chatroom</a></li>
-<%
-    }
-    String riak=System.getProperty("brooklyn.example.riak.nodes");
-    if (riak != null) {
-%>
-<li><a href="riak.jsp">Riak chatroom</a></li>
-<% }
-if (hadoop==null && url==null && mongo==null && riak==null) {
-%>
-<li><i>None.</i> Try one of the other Brooklyn examples to see SQL or Hadoop.</li>
-<% } %>
-</ul>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/db.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/db.jsp b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/db.jsp
deleted file mode 100644
index 7e91b66..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/db.jsp
+++ /dev/null
@@ -1,123 +0,0 @@
-<%@ page language="java" import="java.sql.*"%>
-
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample Application Database JSP Page</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td align=center>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed WebApp (Database JSP)</h1>
-This is the output of a JSP page that is part of the Hello, World application,
-deployed by brooklyn, to show <b>SQL database interactivity</b>.
-</td>
-</tr>
-</table>
-
-<%
-String url=System.getProperty("brooklyn.example.db.url");
-//URL should be supplied e.g. ""-Dbrooklyn.example.db.url=jdbc:mysql://localhost/visitors?user=brooklyn&password=br00k11n"
-//(note quoting needed due to ampersand)
-if (url==null) {
-%>
-    <p>(There is no database included as part of this example.)</p>
-<% } else { /* begin database-enabled block */ %>
-
-<br/>
-<p>Visitors:</p>
-<ul>
-
-<%
-Connection con=null;
-ResultSet rst=null;
-Statement stmt=null;
-int i=0;
-
-try {
-  
-  String DRIVER = "com.mysql.jdbc.Driver";
-  Class.forName(DRIVER).newInstance();
-
-  con=DriverManager.getConnection(url);
-  stmt=con.createStatement();
-  
-  if (request.getParameter("name")!=null) {
-      //add a message
-      stmt.execute("INSERT INTO MESSAGES values (default, '"+
-              //better escaping and security desired... 
-              //this essentially does StringEscapeUtils.escapeSql (either brooklyn.util or apache commons)
-              request.getParameter("name").replaceAll("'", "''")+
-              "', '"+
-              request.getParameter("message").replaceAll("'", "''")+
-              "')");
-  }
-  
-  rst=stmt.executeQuery("select * from MESSAGES");
-  while (rst.next()) {
-%>
-    <li> <b><%= rst.getString(2) %></b>: <%= rst.getString(3) %> </li>
-<%
-    i++;
-  }
-} catch (Exception e) {
-  i=-1;
-%>
-  <li> <b>The database does not appear to be connected.</b> </li>
-  <li> ERROR: <%= e %> </li>
-<%
-} finally {
-  if (rst!=null) rst.close();
-  if (stmt!=null) stmt.close();
-  if (con!=null) con.close();
-}
-
-if (i==0) {
-%>
-  <li> <i>None.</i> </li>
-<%
-}
-%>
-
-</ul>
-
-<br/>
-
-<p>Please enter a message:</p>
-
-<form action="db.jsp" method="GET">
-  <table>
-    <tr><td>Name: </td><td><input type="text" name="name"></td></tr>
-    <tr><td>Message: </td><td><input type="text" name="message"></td></tr>
-  </table>
-  <input type="submit" value="Submit"/>
-</form>
-
-<% } /* end of database-enabled block */ %>
-
-<br/>
-<p>Click <a href="index.html">here</a> to go back to the main page.</p>
-
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-chat.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-chat.jsp b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-chat.jsp
deleted file mode 100644
index f7e61f4..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-chat.jsp
+++ /dev/null
@@ -1,110 +0,0 @@
-<%@ page language="java" import="java.sql.*"%>
-
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample Application HDFS JSP Page</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td align=center>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed WebApp (Database JSP)</h1>
-This is the output of a JSP page that is part of the Hello, World application,
-deployed by brooklyn, to show <b>hadoop hdfs used as the data store</b>.
-</td>
-</tr>
-</table>
-
-<%
-String hadoop=System.getProperty("brooklyn.example.hadoop.site.xml.url");
-if (hadoop==null) {
-%>
-    <p>(There is no hadoop included as part of this example.)</p>
-<% } else { /* begin hadoop-enabled block */ 
-
-
-try {
-    org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();
-    conf.setClassLoader(brooklyn.demo.webapp.hello.HadoopWordCount.class.getClassLoader());
-    conf.addResource(new java.net.URL(hadoop));
-    org.apache.hadoop.fs.FileSystem fsClient = org.apache.hadoop.fs.FileSystem.get(conf);
-    if (fsClient==null) throw new NullPointerException("Can't access fsClient at "+hadoop);
-    
-    if (request.getParameter("name")!=null) {
-        java.io.OutputStream os1 = fsClient.create(new org.apache.hadoop.fs.Path("chats", ""+System.currentTimeMillis()+"-"+((int)(Math.random()*10000))));
-        os1.write(request.getParameter("name").getBytes());
-        os1.write(" : ".getBytes());
-        os1.write(request.getParameter("message").getBytes());
-        os1.flush(); os1.close();
-    }
-%>
-    <br/>
-    <p>Visitors:</p>
-    <ul>
-<%
-    org.apache.hadoop.fs.FileStatus[] files = fsClient.listStatus(new org.apache.hadoop.fs.Path("chats"));
-    if (files==null) files = new org.apache.hadoop.fs.FileStatus[0]; 
-    for (org.apache.hadoop.fs.FileStatus f: files) {
-%>
-        <li> <%= brooklyn.demo.webapp.hello.DemoUtils.stringFromInputStream(fsClient.open(f.getPath())) %> </li>
-<%
-    }
-    if (files.length==0) {
-    %>
-      <li> <i>None.</i> </li>
-    <%
-    }
-    %>
-
-    </ul>
-    <br/>
-
-    <p>Please enter a message:</p>
-
-    <form action="hadoop-chat.jsp" method="GET">
-      <table>
-        <tr><td>Name: </td><td><input type="text" name="name"></td></tr>
-        <tr><td>Message: </td><td><input type="text" name="message"></td></tr>
-      </table>
-      <input type="submit" value="Submit"/>
-    </form>
-
-<%
-} catch (Exception e) {
-%>
-    <b>Error connecting to Hadoop.</b><br/>
-    ERROR: <%= e %><br/><br/>
-    <pre> <%= brooklyn.demo.webapp.hello.DemoUtils.getStackTrace(e) %></pre>
-<%
-}
-}
-%>
-
-    <br/>
-    <p>Click <a href="hadoop-wordcount.jsp">here</a> to run a map-reduce job counting the words in these comments.</p>
-    <p>Click <a href="index.html">here</a> to go back to the main page.</p>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-wordcount.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-wordcount.jsp b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-wordcount.jsp
deleted file mode 100644
index 570a659..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-wordcount.jsp
+++ /dev/null
@@ -1,114 +0,0 @@
-<%@ page language="java" import="java.sql.*"%>
-
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample Application Database JSP Page</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td align=center>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed WebApp (Database JSP)</h1>
-This is the output of a JSP page that is part of the Hello, World application,
-deployed by brooklyn, to show <b>a hadoop map-reduce task run<b>.
-</td>
-</tr>
-</table>
-
-<%
-String hadoop=System.getProperty("brooklyn.example.hadoop.site.xml.url");
-String hadoopJar=System.getProperty("brooklyn.example.hadoop.custom.jar.url");
-if (hadoop==null) {
-%>
-    <p>There is no hadoop included as part of this example. Set brooklyn.example.hadoop.site.xml.url to proceed.</p>
-<% } else if (hadoopJar==null) { 
-%>
-    <p>brooklyn.example.hadoop.custom.jar.url must be set to point to the Jar.</p>
-<%} else { /* begin hadoop-enabled block */ 
-
-try {
-    org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();
-    conf.setClassLoader(brooklyn.demo.webapp.hello.HadoopWordCount.class.getClassLoader());
-    conf.addResource(new java.net.URL(hadoop));
-    org.apache.hadoop.fs.FileSystem fsClient = org.apache.hadoop.fs.FileSystem.get(conf);
-    if (fsClient==null) throw new NullPointerException("Can't access fsClient at "+hadoop);
-
-    org.apache.hadoop.mapreduce.Job job = brooklyn.demo.webapp.hello.HadoopWordCount.makeJob(conf);
-    ((org.apache.hadoop.mapred.JobConf)job.getConfiguration()).setJar(hadoopJar);
-    org.apache.hadoop.fs.FileStatus[] files = fsClient.listStatus(new org.apache.hadoop.fs.Path("chats"));
-    if (files==null) files = new org.apache.hadoop.fs.FileStatus[0];
-    for (org.apache.hadoop.fs.FileStatus f: files) {
-        org.apache.hadoop.mapreduce.lib.input.FileInputFormat.addInputPath(job, f.getPath());
-    }
-    
-    org.apache.hadoop.fs.Path outp = new org.apache.hadoop.fs.Path("out-"+((int)(Math.random()*10000)));
-    org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.setOutputPath(job, outp);
-
-    boolean result = job.waitForCompletion(true);
-    
-    if (!result) {
-        %> <p><b></b><i>Map reduce job returned non-zero result code.</i></b></p> <%
-    }
-
-    %> <p>Output from map reduce is as follows:</p> <%
-    
-    files = fsClient.listStatus(outp);
-    if (files==null) files = new org.apache.hadoop.fs.FileStatus[0];
-    for (org.apache.hadoop.fs.FileStatus f: files) {
-        try {
-            if (!f.isDir() && f.getLen()>0) {
-                %>
-                <%= f.getPath() %>:<br/>
-                <pre><%= brooklyn.demo.webapp.hello.DemoUtils.stringFromInputStream(fsClient.open(f.getPath())) %></pre>
-                <%
-            }
-        } catch (Exception e) {
-            %> Error: <%= e %><%
-        }
-    }
-    if (files.length==0) {
-    %>
-      <i>No output.</i> </li>
-    <%
-    }
-    
-    fsClient.delete(outp, true);
-    
-} catch (Exception e) {
-%>
-    <b>Error connecting to Hadoop.</b><br/>
-    ERROR: <%= e %><br/>
-    <pre> <%= brooklyn.demo.webapp.hello.DemoUtils.getStackTrace(e) %></pre>
-<%
-} 
-}
-%>
-
-    <br/>
-    <p>Click <a href="hadoop-chat.jsp">here</a> to view the chat room.</p>
-    <p>Click <a href="index.html">here</a> to go back to the main page.</p>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/BrooklynBridge3Large.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/BrooklynBridge3Large.png b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/BrooklynBridge3Large.png
deleted file mode 100644
index 2f8253a..0000000
Binary files a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/BrooklynBridge3Large.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/bridge-small.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/bridge-small.png b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/bridge-small.png
deleted file mode 100644
index 4149c3c..0000000
Binary files a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/bridge-small.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/index.html b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/index.html
deleted file mode 100644
index 33b9bd9..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-<!--
-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.
--->
-
-<html>
-<head>
-<title>Sample "Hello, World" Application</title>
-<link rel="stylesheet" type="text/css" href="styles/main.css">
-</head>
-<body>
-<div id='main'>
-<div id="header">
-	<div class="header_text">
-		<h1>Sample Brooklyn Deployed "Hello, World" Application</h1>
-	</div>
-</div>
-	<div id="container">
-		<div class="text_row">
-		  <div class="app_info"><h3>This is the home page for a sample application used to illustrate 
-		how web applications can be deployed to multi-cloud environments using Brooklyn.</h3></div>
-		  <div class="illustrations"><p>See the available illustrations <a href="available.jsp">here</a>.</p></div>
-		</div>
-	</div>
-</div>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/mongo.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/mongo.jsp b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/mongo.jsp
deleted file mode 100644
index bad529f..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/mongo.jsp
+++ /dev/null
@@ -1,127 +0,0 @@
-<%@ page language="java" import="java.sql.*,com.mongodb.*"%>
-<%@ page import="java.util.Arrays" %>
-
-<html>
-<!--
-    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.
--->
-<head>
-    <title>Sample Application MongoDB JSP Page</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-    <tr>
-        <td align=center>
-            <img src="images/bridge-small.png">
-        </td>
-        <td>
-            <h1>Sample Brooklyn Deployed WebApp (MongoDB JSP)</h1>
-            This is the output of a JSP page that is part of the Hello, World application,
-            deployed by brooklyn, to show <b>MongoDB database interactivity</b>.
-        </td>
-    </tr>
-</table>
-
-<%
-String port=System.getProperty("brooklyn.example.mongodb.port");
-String username=System.getProperty("brooklyn.example.mongodb.username");
-String password=System.getProperty("brooklyn.example.mongodb.password");
-String authenticationDatabase=System.getProperty("brooklyn.example.mongodb.authenticationDatabase");
-//URL should be supplied e.g. ""-Dbrooklyn.example.db.url=jdbc:mysql://localhost/visitors?user=brooklyn&password=br00k11n"
-//(note quoting needed due to ampersand)
-if (port==null) {
-%>
-<p>(There is no database included as part of this example.)</p>
-<% } else { %>
-<br/>
-<p>Visitors:</p>
-<ul>
-
-<%
-/* begin database-enabled block */ }
-boolean authenticationEnabled = password != null && password.length() > 0;
-
-ServerAddress address = new ServerAddress("localhost", new Integer(port));
-
-MongoClientOptions connectionOptions = MongoClientOptions.builder()
-    .autoConnectRetry(true)
-    .socketKeepAlive(true)
-    .build();
-
-MongoClient client;
-
-if (authenticationEnabled) {
-    MongoCredential credential = MongoCredential.createMongoCRCredential(username, authenticationDatabase, password.toCharArray());
-    client = new MongoClient(address, Arrays.asList(credential),connectionOptions);
-} else {
-    client = new MongoClient(address, connectionOptions);
-}
-
-DB database = client.getDB("visitors");
-DBCollection messages =  database.getCollection("messages");
-int i=0;
-
-if (request.getParameter("name") != null) {
-    // add a message
-    DBObject newMessage = new BasicDBObject();
-    newMessage.put("name", request.getParameter("name"));
-    newMessage.put("message", request.getParameter("message"));
-    messages.save(newMessage);
-}
-
-DBCursor messageCursor = messages.find();
-
-try {
-    while (messageCursor.hasNext()) {
-        DBObject message = messageCursor.next();
-        i++;
-        %>
-            <li><b><%=message.get("name")%></b>: <%=message.get("message")%></li>
-        <%
-    }
-} finally {
-    messageCursor.close();
-}
-
-if (i==0) {
-%>
-    <li><i>None</i></li>
-<%
-}
-
-%>
-
-</ul>
-
-<br/>
-
-<p>Please enter a message:</p>
-
-<form action="mongo.jsp" method="GET">
-    <table>
-        <tr><td>Name: </td><td><input type="text" name="name"></td></tr>
-        <tr><td>Message: </td><td><input type="text" name="message"></td></tr>
-    </table>
-    <input type="submit" value="Submit"/>
-</form>
-
-<br/>
-<p>Click <a href="index.html">here</a> to go back to the main page.</p>
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/riak.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/riak.jsp b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/riak.jsp
deleted file mode 100644
index bfb296e..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/riak.jsp
+++ /dev/null
@@ -1,148 +0,0 @@
-<%@ page language="java" import="com.basho.riak.client.IRiakClient,com.basho.riak.client.RiakFactory,com.basho.riak.client.bucket.Bucket" %>
-<%@ page import="com.basho.riak.client.convert.RiakKey" %>
-<%@ page import="com.basho.riak.client.raw.http.HTTPClientConfig" %>
-<%@ page import="com.basho.riak.client.raw.http.HTTPClusterConfig" %>
-<%@ page import="org.joda.time.DateTime" %>
-<%@ page import="java.util.ArrayList" %>
-<%@ page import="java.util.Collections" %>
-<%@ page import="java.util.Comparator" %>
-<%@ page import="java.util.List" %>
-
-<html>
-<!--
-    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.
--->
-
-<%!
-    static class Message {
-        @RiakKey
-        public String id;
-        public String name;
-        public String message;
-        public DateTime dateTime;
-
-        public Message() {}
-
-        public Message(String name, String message) {
-            this.name = name;
-            this.message = message;
-            this.dateTime = DateTime.now();
-        }
-    }
-%>
-
-<head>
-    <title>Sample Application Riak JSP Page</title>
-</head>
-<body bgcolor="white">
-
-<table border="0">
-    <tr>
-        <td align=center>
-            <img src="images/bridge-small.png">
-        </td>
-        <td>
-            <h1>Sample Brooklyn Deployed WebApp (Riak JSP)</h1>
-            This is the output of a JSP page that is part of the Hello, World application,
-            deployed by brooklyn, to show <b>Riak database interactivity</b>.
-        </td>
-    </tr>
-</table>
-
-<%
-    String url = System.getProperty("brooklyn.example.riak.url");
-    if (url == null) {
-%>
-<% } else { %>
-<br/>
-
-<p>Visitors:</p>
-<ul>
-
-    <%
-        }
-
-        String[] riakNodes = System.getProperty("brooklyn.example.riak.nodes").split(",");
-        int maxConnections = 50;
-
-        HTTPClusterConfig httpClusterConfig = new HTTPClusterConfig(maxConnections);
-        HTTPClientConfig httpClientConfig = HTTPClientConfig.defaults();
-        httpClusterConfig.addHosts(httpClientConfig, riakNodes);
-
-        IRiakClient httpClient = RiakFactory.newClient(httpClusterConfig);
-
-        // If the bucket already exists, createBucket simply fetches the bucket
-        Bucket bucket = httpClient.createBucket("visitors").execute();
-
-        if (request.getParameter("name") != null) {
-            Message message = new Message(request.getParameter("name"), request.getParameter("message"));
-            bucket.store(message).withoutFetch().returnBody(true).execute();
-        }
-
-        List<Message> messages = new ArrayList<Message>();
-
-        for (String key : bucket.keys()) {
-            messages.add(bucket.fetch(key, Message.class).execute());
-        }
-
-        Collections.sort(messages, new Comparator<Message>() {
-            public int compare(Message m1, Message m2) {
-                return m1.dateTime.compareTo(m2.dateTime);
-            }
-        });
-
-        for (Message outMessage : messages) {
-            %>
-                <li><b><%=outMessage.name%></b>: <%=outMessage.message%></li>
-            <%
-        }
-
-        httpClient.shutdown();
-
-        if (messages.size() == 0) {
-            %>
-                <li><i>None</i></li>
-            <%
-        }
-    %>
-
-</ul>
-
-<br/>
-
-<p>Please enter a message:</p>
-
-<form action="riak.jsp" method="GET">
-    <table>
-        <tr>
-            <td>Name:</td>
-            <td><input type="text" name="name"></td>
-        </tr>
-        <tr>
-            <td>Message:</td>
-            <td><input type="text" name="message"></td>
-        </tr>
-    </table>
-    <input type="submit" value="Submit"/>
-</form>
-
-<br/>
-
-<p>Click <a href="index.html">here</a> to go back to the main page.</p>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/styles/main.css
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/styles/main.css b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/styles/main.css
deleted file mode 100644
index c52e212..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/styles/main.css
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.
-*/
-*{
-	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
-body{
-	padding: 0;
-	margin: 0;
-}
-#main{
-	background: url('../images/BrooklynBridge3Large.png') no-repeat fixed;
-	-webkit-background-size: cover;
-	-moz-background-size: cover;
-	-o-background-size: cover;
-	background-size: cover;
-	height: 100vh;
-	background-color: #6BB445;
-}
-#header{
-	text-align: center;
-}
-h1{
-	font-family: "open sans","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
-    text-transform: uppercase;
-    line-height: 105%;
-    letter-spacing: 1px;
-    font-weight: bold;
-    text-align: center;
-    margin: 20px 0 15px;
-    margin: 0;
-    padding-top: 20vh;
-}
-#container{
-	padding-top: 30vh;
-	text-align: center;
-	line-height: 140%;
-    font-family: "Noto Serif","open sans","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
-    font-weight: normal;
-    color: white;
-    text-shadow: #000 0px 0px 5px,   #000 0px 0px 5px,   #000 0px 0px 5px,
-	#000 0px 0px 5px,   #000 0px 0px 5px,   #000 0px 0px 5px;
-    font-style: italic;
-    margin-bottom: 45px;
-	width: 80%;
-	margin-left: 10%;
-}
-a{
-	color: #6BB445;
-}
-.text_row{
-	padding: 5%;
-}
-.illustrations{
-	padding-bottom: 5%;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/.gitignore
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/.gitignore b/brooklyn-library/examples/webapps/hello-world-webapp/.gitignore
deleted file mode 100644
index 84c048a..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build/

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/pom.xml b/brooklyn-library/examples/webapps/hello-world-webapp/pom.xml
deleted file mode 100644
index 559260e..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>war</packaging>
-    <artifactId>brooklyn-example-hello-world-webapp</artifactId>
-    <name>hello-world-webapp Maven Webapp</name>
-
-    <parent>
-        <groupId>org.apache.brooklyn.example</groupId>
-        <artifactId>brooklyn-examples-webapps-parent</artifactId>
-        <version>0.9.0-SNAPSHOT</version>   <!-- BROOKLYN_VERSION -->
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-      <dependency>
-        <groupId>javax.servlet</groupId>
-        <artifactId>javax.servlet-api</artifactId>
-      </dependency>
-    </dependencies>
-
-    <build>
-        <finalName>brooklyn-example-hello-world-webapp</finalName>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/WEB-INF/web.xml b/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 8b6f078..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?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.
--->
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-
-<web-app>
-  <display-name>Archetype Created Web Application</display-name>
-</web-app>


[04/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerEc2LiveTest.java
deleted file mode 100644
index 2ac3c57..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerEc2LiveTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.solr;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.solr.common.SolrDocument;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-public class SolrServerEc2LiveTest extends AbstractEc2LiveTest {
-
-    private static final Logger log = LoggerFactory.getLogger(SolrServerEc2LiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        log.info("Testing Solr on {}", loc);
-
-        SolrServer solr = app.createAndManageChild(EntitySpec.create(SolrServer.class)
-                .configure(SolrServer.SOLR_CORE_CONFIG, ImmutableMap.of("example", "classpath://solr/example.tgz")));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(solr, Startable.SERVICE_UP, true);
-
-        SolrJSupport client = new SolrJSupport(solr, "example");
-
-        Iterable<SolrDocument> results = client.getDocuments();
-        assertTrue(Iterables.isEmpty(results));
-
-        client.addDocument(MutableMap.<String, Object>of("id", "1", "description", "first"));
-        client.addDocument(MutableMap.<String, Object>of("id", "2", "description", "second"));
-        client.addDocument(MutableMap.<String, Object>of("id", "3", "description", "third"));
-        client.commit();
-
-        results = client.getDocuments();
-        assertEquals(Iterables.size(results), 3);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerIntegrationTest.java
deleted file mode 100644
index 67b69ce..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerIntegrationTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.solr;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.nosql.solr.SolrServer;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.solr.common.SolrDocument;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-/**
- * Solr integration tests.
- *
- * Test the operation of the {@link SolrServer} class.
- */
-public class SolrServerIntegrationTest extends AbstractSolrServerTest {
-
-    /**
-     * Test that a node starts and sets SERVICE_UP correctly.
-     */
-    @Test(groups = "Integration")
-    public void canStartupAndShutdown() {
-        solr = app.createAndManageChild(EntitySpec.create(SolrServer.class));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(solr, Startable.SERVICE_UP, true);
-        Entities.dumpInfo(app);
-
-        solr.stop();
-
-        EntityTestUtils.assertAttributeEqualsEventually(solr, Startable.SERVICE_UP, false);
-    }
-
-    /**
-     * Test that a core can be created and used with SolrJ client.
-     */
-    @Test(groups = "Integration")
-    public void testConnection() throws Exception {
-        solr = app.createAndManageChild(EntitySpec.create(SolrServer.class)
-                .configure(SolrServer.SOLR_CORE_CONFIG, ImmutableMap.of("example", "classpath://solr/example.tgz")));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(solr, Startable.SERVICE_UP, true);
-
-        SolrJSupport client = new SolrJSupport(solr, "example");
-
-        Iterable<SolrDocument> results = client.getDocuments();
-        assertTrue(Iterables.isEmpty(results));
-
-        client.addDocument(MutableMap.<String, Object>of("id", "1", "description", "first"));
-        client.addDocument(MutableMap.<String, Object>of("id", "2", "description", "second"));
-        client.addDocument(MutableMap.<String, Object>of("id", "3", "description", "third"));
-        client.commit();
-
-        results = client.getDocuments();
-        assertEquals(Iterables.size(results), 3);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerLiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerLiveTest.java
deleted file mode 100644
index 1352d1a..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerLiveTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.solr;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.nosql.solr.SolrServer;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.solr.common.SolrDocument;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-/**
- * Solr live tests.
- *
- * Test the operation of the {@link SolrServer} class using the jclouds {@code rackspace-cloudservers-uk}
- * and {@code aws-ec2} providers, with different OS images. The tests use the {@link SolrJSupport} class
- * to exercise the node, and will need to have {@code brooklyn.jclouds.provider.identity} and {@code .credential}
- * set, usually in the {@code .brooklyn/brooklyn.properties} file.
- */
-public class SolrServerLiveTest extends AbstractSolrServerTest {
-
-    private static final Logger log = LoggerFactory.getLogger(SolrServerLiveTest.class);
-
-    @DataProvider(name = "virtualMachineData")
-    public Object[][] provideVirtualMachineData() {
-        return new Object[][] { // ImageId, Provider, Region, Description (for logging)
-            new Object[] { "eu-west-1/ami-0307d674", "aws-ec2", "eu-west-1", "Ubuntu Server 14.04 LTS (HVM), SSD Volume Type" },
-            new Object[] { "LON/f9b690bf-88eb-43c2-99cf-391f2558732e", "rackspace-cloudservers-uk", "", "Ubuntu 12.04 LTS (Precise Pangolin)" }, 
-            new Object[] { "LON/a84b1592-6817-42da-a57c-3c13f3cfc1da", "rackspace-cloudservers-uk", "", "CentOS 6.5 (PVHVM)" }, 
-        };
-    }
-
-    @Test(groups = "Live", dataProvider = "virtualMachineData")
-    protected void testOperatingSystemProvider(String imageId, String provider, String region, String description) throws Exception {
-        log.info("Testing Solr on {}{} using {} ({})", new Object[] { provider, Strings.isNonEmpty(region) ? ":" + region : "", description, imageId });
-
-        Map<String, String> properties = MutableMap.of("imageId", imageId);
-        testLocation = app.getManagementContext().getLocationRegistry()
-                .resolve(provider + (Strings.isNonEmpty(region) ? ":" + region : ""), properties);
-        solr = app.createAndManageChild(EntitySpec.create(SolrServer.class)
-                .configure(SolrServer.SOLR_CORE_CONFIG, ImmutableMap.of("example", "classpath://solr/example.tgz")));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(solr, Startable.SERVICE_UP, true);
-
-        SolrJSupport client = new SolrJSupport(solr, "example");
-
-        Iterable<SolrDocument> results = client.getDocuments();
-        assertTrue(Iterables.isEmpty(results));
-
-        client.addDocument(MutableMap.<String, Object>of("id", "1", "description", "first"));
-        client.addDocument(MutableMap.<String, Object>of("id", "2", "description", "second"));
-        client.addDocument(MutableMap.<String, Object>of("id", "3", "description", "third"));
-        client.commit();
-
-        results = client.getDocuments();
-        assertEquals(Iterables.size(results), 3);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/mongodb-keyfile
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/mongodb-keyfile b/brooklyn-library/software/nosql/src/test/resources/mongodb-keyfile
deleted file mode 100644
index 6d4640a..0000000
--- a/brooklyn-library/software/nosql/src/test/resources/mongodb-keyfile
+++ /dev/null
@@ -1,16 +0,0 @@
-df1DzycxICi2RFa1xsDP5uiVcVtZ4EQBxffQ+FDuD4n81iOGW7pNOS49aH4t9PW6
-s0t+mASRnY/IVOsiTNT5VQWeMhf6b0/aYuXJp9ZZNQ9PmyA60a8x5x9K3YIoGYAd
-/RGenkIOIG9EjXnqTT1QgN66xVIUp8v2w0iuER0jiG+GcjBVVWGgqKcj6ZLQRecC
-6xSETYuJRbXdPanpnlk8oRYrtWFgcmQ8pl0/0hc/8i82PjTC8DdkqRqYQzhAvexh
-Fo8ZOPiS8xmiDWDsKBJscf6J5KKlgr/3ws0Kv5Qqxmq7oelAmZ+xRvyFBYbao3cz
-3XKBC9SBYfexnl25S9Ef94IV6bqls6SwQMTNS5W0sn3L/Mi55yEWFN44pcYCJ4ng
-oHMDaQyOC+Fi0rRcRduFZWYHlw7ibX0AaRQhwhh0YEbgFY2O7QoTNxwNycxLeKLr
-VMY8ZcTRzvmypAfetWHlwx97G+yXebCsZZ+TbAR/txficwmLFw/M5Qit8Op7YVFM
-zsrKnJZq/Ar8kLzw2UrIFfecaRl3hqT4CI8htaVW+fbc94RHNiZpHg5k/I+aNT45
-9uxRNNPcZiDln7ZV3skhVwQ0UeUZUBp0UZj33N2f/5JXxoRc5slb2mMFEKe+FH6a
-0M86QphH356jrIBSalm7duLAFzB8oyf7+JQgbpwooiO5D+KqIJevpwZXtjuaKVCU
-4bOJNq8AaJU6yjPNihHiGuGLv3/TmXP1Q8Cr4XSyzpv9pxZvvb0XYdlxWIQg0szv
-5QSTkgx6CCBoeDbVoWJh4bE3lobFponKC9o5j3nVAqPbxZocq6Lr6TWrXfwlNRcg
-Cvenxs8mjRQV7Hg7956P/dJtavN3UpSTwbius5h/oIf9ywBmVLNAIhbOS3kcacOC
-YlnJZGN+m1Wo9AvsmLz+yl5GB3W/zA4vUyhWnUY24BoKKEFYef594wi2sagz9TVC
-nLrWCE8djB9j4tudcz6PdFFhQHmB

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/solr/example.tgz
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/solr/example.tgz b/brooklyn-library/software/nosql/src/test/resources/solr/example.tgz
deleted file mode 100644
index 6236fc0..0000000
Binary files a/brooklyn-library/software/nosql/src/test/resources/solr/example.tgz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/solr/example.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/solr/example.txt b/brooklyn-library/software/nosql/src/test/resources/solr/example.txt
deleted file mode 100644
index 4e15549..0000000
--- a/brooklyn-library/software/nosql/src/test/resources/solr/example.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-The example tarball in this directory consists simply of the source files in this directory. It is included as a (tiny) binary to prevent build complication when aggregating them for upload to remote servers.

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/solr/example/conf/schema.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/solr/example/conf/schema.xml b/brooklyn-library/software/nosql/src/test/resources/solr/example/conf/schema.xml
deleted file mode 100644
index 467b4aa..0000000
--- a/brooklyn-library/software/nosql/src/test/resources/solr/example/conf/schema.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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.
--->
-<schema name="example" version="1.5">
-    <fields>
-        <field name="_version_" type="long" indexed="true" stored="true" />
-        <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
-        <field name="description" type="text_general" indexed="true" stored="true" />
-        <field name="comments" type="text_general" indexed="true" stored="true" />
-        <field name="author" type="text_general" indexed="true" stored="true" />
-        <field name="keywords" type="text_general" indexed="true" stored="true" />
-        <field name="category" type="text_general" indexed="true" stored="true" />
-        <field name="content" type="text_general" indexed="false" stored="true" multiValued="true" />
-        <field name="text" type="text_general" indexed="true" stored="false" multiValued="true" />
-    </fields>
-
-    <uniqueKey>id</uniqueKey>
-
-    <types>
-        <fieldType name="long" class="solr.TrieLongField" />
-        <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
-        <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
-            <analyzer type="index">
-                <tokenizer class="solr.StandardTokenizerFactory" />
-                <filter class="solr.LowerCaseFilterFactory" />
-            </analyzer>
-            <analyzer type="query">
-                <tokenizer class="solr.StandardTokenizerFactory" />
-                <filter class="solr.LowerCaseFilterFactory" />
-            </analyzer>
-        </fieldType>
-    </types>
-</schema>
-    


[49/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/CumulusRDFApplication.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/CumulusRDFApplication.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/CumulusRDFApplication.java
deleted file mode 100644
index 0e3780f..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/CumulusRDFApplication.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.catalog.CatalogConfig;
-import org.apache.brooklyn.api.effector.Effector;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.EnricherSpec;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.effector.EffectorBody;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.EntityInternal;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.entity.java.UsesJava;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraDatacenter;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraFabric;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraNode;
-import org.apache.brooklyn.entity.webapp.JavaWebAppService;
-import org.apache.brooklyn.entity.webapp.tomcat.TomcatServer;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.ha.ServiceFailureDetector;
-import org.apache.brooklyn.policy.ha.ServiceReplacer;
-import org.apache.brooklyn.policy.ha.ServiceRestarter;
-import org.apache.brooklyn.util.CommandLineUtil;
-import org.apache.brooklyn.util.collections.MutableList;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.ResourceUtils;
-import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.text.TemplateProcessor;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.text.StringEscapes.JavaStringEscapes;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.net.HostAndPort;
-
-/** CumulusRDF application with Cassandra cluster. */
-@Catalog(name="Cumulus RDF Application", description="CumulusRDF Application on a Tomcat server using a multi-region Cassandra fabric")
-public class CumulusRDFApplication extends AbstractApplication {
-
-    private static final Logger log = LoggerFactory.getLogger(CumulusRDFApplication.class);
-
-    @CatalogConfig(label="Cumulus Configuration File (URL)", priority=1)
-    public static final ConfigKey<String> CUMULUS_RDF_CONFIG_URL = ConfigKeys.newConfigKey(
-        "cumulus.config.url", "URL for the YAML configuration file for CumulusRDF", "classpath://cumulus.yaml");
-
-    @CatalogConfig(label="Cassandra Thrift Port", priority=1)
-    public static final ConfigKey<Integer> CASSANDRA_THRIFT_PORT = ConfigKeys.newConfigKey(
-        "cumulus.cassandra.port", "Port to contact the Cassandra cluster on", 9160);
-
-    @CatalogConfig(label="Cassandra Cluster Size", priority=1)
-    public static final ConfigKey<Integer> CASSANDRA_CLUSTER_SIZE = ConfigKeys.newConfigKey(
-        "cumulus.cassandra.cluster.size", "Initial size of the Cassandra cluster", 2);
-
-    @CatalogConfig(label="Multi-region Fabric", priority=1)
-    public static final ConfigKey<Boolean> MULTI_REGION_FABRIC = ConfigKeys.newConfigKey(
-        "cumulus.cassandra.fabric", "Deploy a multi-region Cassandra fabric", false);
-
-    // TODO Fails when given two locations
-    // public static final String DEFAULT_LOCATIONS = "[ jclouds:aws-ec2:us-east-1,jclouds:rackspace-cloudservers-uk ]";
-    public static final String DEFAULT_LOCATIONS = "jclouds:aws-ec2:us-east-1";
-
-    private Effector<Void> cumulusConfig = Effectors.effector(Void.class, "cumulusConfig")
-            .description("Configure the CumulusRDF web application")
-            .buildAbstract();
-
-    private Entity cassandra;
-    private TomcatServer webapp;
-    private HostAndPort endpoint;
-    private final Object endpointMutex = new Object();
-
-    /**
-     * Create the application entities:
-     * <ul>
-     * <li>A {@link CassandraFabric} of {@link CassandraDatacenter}s containing {@link CassandraNode}s
-     * <li>A {@link TomcatServer}
-     * </ul>
-     */
-    @Override
-    public void initApp() {
-        // Cassandra cluster
-        EntitySpec<CassandraDatacenter> clusterSpec = EntitySpec.create(CassandraDatacenter.class)
-                .configure(CassandraDatacenter.MEMBER_SPEC, EntitySpec.create(CassandraNode.class)
-                        //FIXME can probably use JMXMP_AND_RMI now, to deploy to GCE and elsewhere
-                        .configure(UsesJmx.JMX_AGENT_MODE, UsesJmx.JmxAgentModes.JMX_RMI_CUSTOM_AGENT)
-                        .configure(UsesJmx.JMX_PORT, PortRanges.fromString("11099+"))
-                        .configure(UsesJmx.RMI_REGISTRY_PORT, PortRanges.fromString("9001+"))
-                        .configure(CassandraNode.THRIFT_PORT, PortRanges.fromInteger(getConfig(CASSANDRA_THRIFT_PORT)))
-                        .enricher(EnricherSpec.create(ServiceFailureDetector.class))
-                        .policy(PolicySpec.create(ServiceRestarter.class)
-                                .configure(ServiceRestarter.FAILURE_SENSOR_TO_MONITOR, ServiceFailureDetector.ENTITY_FAILED)))
-                .policy(PolicySpec.create(ServiceReplacer.class)
-                        .configure(ServiceReplacer.FAILURE_SENSOR_TO_MONITOR, ServiceRestarter.ENTITY_RESTART_FAILED));
-
-        if (getConfig(MULTI_REGION_FABRIC)) {
-            cassandra = addChild(EntitySpec.create(CassandraFabric.class)
-                    .configure(CassandraDatacenter.CLUSTER_NAME, "Brooklyn")
-                    .configure(CassandraDatacenter.INITIAL_SIZE, getConfig(CASSANDRA_CLUSTER_SIZE)) // per location
-                    .configure(CassandraDatacenter.ENDPOINT_SNITCH_NAME, "org.apache.brooklyn.entity.nosql.cassandra.customsnitch.MultiCloudSnitch")
-                    .configure(CassandraNode.CUSTOM_SNITCH_JAR_URL, "classpath://org/apache/brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.jar")
-                    .configure(CassandraFabric.MEMBER_SPEC, clusterSpec));
-        } else {
-            cassandra = addChild(EntitySpec.create(clusterSpec)
-                    .configure(CassandraDatacenter.CLUSTER_NAME, "Brooklyn")
-                    .configure(CassandraDatacenter.INITIAL_SIZE, getConfig(CASSANDRA_CLUSTER_SIZE)));
-        }
-
-        // Tomcat web-app server
-        webapp = addChild(EntitySpec.create(TomcatServer.class)
-                .configure(UsesJmx.JMX_AGENT_MODE, UsesJmx.JmxAgentModes.JMX_RMI_CUSTOM_AGENT)
-                .configure(UsesJmx.JMX_PORT, PortRanges.fromString("11099+"))
-                .configure(UsesJmx.RMI_REGISTRY_PORT, PortRanges.fromString("9001+"))
-                .configure(JavaWebAppService.ROOT_WAR, "https://cumulusrdf.googlecode.com/svn/wiki/downloads/cumulusrdf-1.0.1.war")
-                .configure(UsesJava.JAVA_SYSPROPS, MutableMap.of("cumulusrdf.config-file", "/tmp/cumulus.yaml")));
-
-        // Add an effector to tomcat to reconfigure with a new YAML config file
-        ((EntityInternal) webapp).getMutableEntityType().addEffector(cumulusConfig, new EffectorBody<Void>() {
-            @Override
-            public Void call(ConfigBag parameters) {
-                // Process the YAML template given in the application config
-                String url = Entities.getRequiredUrlConfig(CumulusRDFApplication.this, CUMULUS_RDF_CONFIG_URL);
-                Map<String, Object> config;
-                synchronized (endpointMutex) {
-                    config = MutableMap.<String, Object>of("cassandraHostname", endpoint.getHostText(), "cassandraThriftPort", endpoint.getPort());
-                }
-                String contents = TemplateProcessor.processTemplateContents(ResourceUtils.create(CumulusRDFApplication.this).getResourceAsString(url), config);
-                // Copy the file contents to the remote machine
-                return DynamicTasks.queue(SshEffectorTasks.put("/tmp/cumulus.yaml").contents(contents)).get();
-            }
-        });
-
-        // Listen for HOSTNAME changes from the Cassandra fabric to show at least one node is available
-        subscriptions().subscribe(cassandra, CassandraDatacenter.HOSTNAME, new SensorEventListener<String>() {
-            @Override
-            public void onEvent(SensorEvent<String> event) {
-                if (Strings.isNonBlank(event.getValue())) {
-                    synchronized (endpointMutex) {
-                        String hostname = Entities.submit(CumulusRDFApplication.this, DependentConfiguration.attributeWhenReady(cassandra, CassandraDatacenter.HOSTNAME)).getUnchecked();
-                        Integer thriftPort = Entities.submit(CumulusRDFApplication.this, DependentConfiguration.attributeWhenReady(cassandra, CassandraDatacenter.THRIFT_PORT)).getUnchecked();
-                        HostAndPort current = HostAndPort.fromParts(hostname, thriftPort);
-
-                        // Check if the cluster access point has changed
-                        if (!current.equals(endpoint)) {
-                            log.info("Setting cluster endpoint to {}", current.toString());
-                            endpoint = current;
-
-                            // Reconfigure the CumulusRDF application and restart tomcat if necessary
-                            webapp.invoke(cumulusConfig, MutableMap.<String, Object>of());
-                            if (webapp.getAttribute(Startable.SERVICE_UP)) {
-                                webapp.restart();
-                            }
-                        }
-                    }
-                }
-            }
-        });
-    }
-
-    /**
-     * Controls the startup locations for the webapp and the cassandra fabric.
-     *
-     * @see AbstractApplication#start(Collection)
-     */
-    @Override
-    public void start(Collection<? extends Location> locations) {
-        addLocations(locations);
-
-        // The web application only needs to run in one location, use the first
-        // TODO use a multi-region web cluster
-        Collection<? extends Location> first = MutableList.copyOf(Iterables.limit(locations, 1));
-
-        ServiceStateLogic.setExpectedState(this, Lifecycle.STARTING);
-        try {
-            Entities.invokeEffector(this, cassandra, Startable.START, MutableMap.of("locations", locations)).getUnchecked();
-            Entities.invokeEffector(this, webapp, Startable.START, MutableMap.of("locations", first)).getUnchecked();
-        } catch (Exception e) {
-            throw Exceptions.propagate(e);
-        } finally {
-            ServiceStateLogic.setExpectedState(this, Lifecycle.RUNNING);
-        }
-        log.info("Started CumulusRDF in " + locations);
-    }
-
-
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String locations = CommandLineUtil.getCommandLineOption(args, "--locations", DEFAULT_LOCATIONS);
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(StartableApplication.class, CumulusRDFApplication.class).displayName("CumulusRDF application using Cassandra"))
-                .webconsolePort(port)
-                .locations(Strings.isBlank(locations) ? ImmutableList.<String>of() : JavaStringEscapes.unwrapJsonishListIfPossible(locations))
-                .start();
-
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/HighAvailabilityCassandraCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/HighAvailabilityCassandraCluster.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/HighAvailabilityCassandraCluster.java
deleted file mode 100644
index fbcd44d..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/HighAvailabilityCassandraCluster.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import java.util.List;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.catalog.CatalogConfig;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.EnricherSpec;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraDatacenter;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraNode;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.ha.ServiceFailureDetector;
-import org.apache.brooklyn.policy.ha.ServiceReplacer;
-import org.apache.brooklyn.policy.ha.ServiceRestarter;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-@Catalog(name="HA Cassandra Cluster Application", description="Deploy a Cassandra cluster with a High Availability architecture.")
-public class HighAvailabilityCassandraCluster extends AbstractApplication {
-
-    public static final String DEFAULT_LOCATION_SPEC = "aws-ec2:us-east-1";
- 
-    @CatalogConfig(label="Number of Availability Zones", priority=1)
-    public static final ConfigKey<Integer> NUM_AVAILABILITY_ZONES = ConfigKeys.newConfigKey(
-        "cassandra.cluster.numAvailabilityZones", "Number of availability zones to spread the cluster across", 3); 
-    
-    @CatalogConfig(label="Initial Cluster Size", priority=2)
-    public static final ConfigKey<Integer> CASSANDRA_CLUSTER_SIZE = ConfigKeys.newConfigKey(
-        "cassandra.cluster.initialSize", "Initial size of the Cassandra cluster", 6);      
-    
-    
-    @Override
-    public void initApp() {
-        addChild(EntitySpec.create(CassandraDatacenter.class)
-                .configure(CassandraDatacenter.CLUSTER_NAME, "Brooklyn")
-                .configure(CassandraDatacenter.INITIAL_SIZE, getConfig(CASSANDRA_CLUSTER_SIZE))
-                .configure(CassandraDatacenter.ENABLE_AVAILABILITY_ZONES, true)
-                .configure(CassandraDatacenter.NUM_AVAILABILITY_ZONES, getConfig(NUM_AVAILABILITY_ZONES))
-                //See https://github.com/brooklyncentral/brooklyn/issues/973
-                //.configure(CassandraCluster.AVAILABILITY_ZONE_NAMES, ImmutableList.of("us-east-1b", "us-east-1c", "us-east-1e"))
-                .configure(CassandraDatacenter.ENDPOINT_SNITCH_NAME, "GossipingPropertyFileSnitch")
-                .configure(CassandraDatacenter.MEMBER_SPEC, EntitySpec.create(CassandraNode.class)
-                        .enricher(EnricherSpec.create(ServiceFailureDetector.class))
-                        .policy(PolicySpec.create(ServiceRestarter.class)
-                                .configure(ServiceRestarter.FAILURE_SENSOR_TO_MONITOR, ServiceFailureDetector.ENTITY_FAILED)))
-                .policy(PolicySpec.create(ServiceReplacer.class)
-                        .configure(ServiceReplacer.FAILURE_SENSOR_TO_MONITOR, ServiceRestarter.ENTITY_RESTART_FAILED)));
-    }
-    
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION_SPEC);
-        
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                 .application(EntitySpec.create(StartableApplication.class, HighAvailabilityCassandraCluster.class)
-                         .displayName("Cassandra"))
-                 .webconsolePort(port)
-                 .location(location)
-                 .start();
-             
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/ResilientMongoDbApp.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/ResilientMongoDbApp.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/ResilientMongoDbApp.java
deleted file mode 100644
index 814231f..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/ResilientMongoDbApp.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBReplicaSet;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBServer;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.ha.ServiceFailureDetector;
-import org.apache.brooklyn.policy.ha.ServiceReplacer;
-import org.apache.brooklyn.policy.ha.ServiceRestarter;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-/**
- * Sample showing a MongoDB replica set with resilience policies attached at nodes and the cluster.
- **/
-@Catalog(name="Resilient MongoDB")
-public class ResilientMongoDbApp extends AbstractApplication implements StartableApplication {
-    
-    public static final Logger LOG = LoggerFactory.getLogger(ResilientMongoDbApp.class);
-    
-    public static final String DEFAULT_LOCATION = "named:gce-europe-west1";
-
-    @Override
-    public void initApp() {
-        MongoDBReplicaSet rs = addChild(
-                EntitySpec.create(MongoDBReplicaSet.class)
-                        .configure(MongoDBReplicaSet.INITIAL_SIZE, 3));
-        
-        initResilience(rs);
-        
-        enrichers().add(Enrichers.builder()
-                .propagating(MongoDBReplicaSet.REPLICA_SET_ENDPOINTS, MongoDBServer.REPLICA_SET_PRIMARY_ENDPOINT)
-                .from(rs)
-                .build());
-    }
-    
-    /** this attaches a policy at each MongoDB node listening for ENTITY_FAILED,
-     * attempting to _restart_ the process, and 
-     * failing that attempting to _replace_ the entity (e.g. a new VM), and 
-     * failing that setting the cluster "on-fire" */
-    protected void initResilience(MongoDBReplicaSet rs) {
-        subscriptions().subscribe(rs, DynamicCluster.MEMBER_ADDED, new SensorEventListener<Entity>() {
-            @Override
-            public void onEvent(SensorEvent<Entity> addition) {
-                initSoftwareProcess((SoftwareProcess)addition.getValue());
-            }
-        });
-        rs.policies().add(new ServiceReplacer(ServiceRestarter.ENTITY_RESTART_FAILED));
-    }
-
-    /** invoked whenever a new MongoDB server is added (the server may not be started yet) */
-    protected void initSoftwareProcess(SoftwareProcess p) {
-        p.enrichers().add(new ServiceFailureDetector());
-        p.policies().add(new ServiceRestarter(ServiceFailureDetector.ENTITY_FAILED));
-    }
-    
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION);
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                 .application(EntitySpec.create(StartableApplication.class, ResilientMongoDbApp.class)
-                         .displayName("Resilient MongoDB"))
-                 .webconsolePort(port)
-                 .location(location)
-                 .start();
-             
-        Entities.dumpInfo(launcher.getApplications());
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/RiakClusterExample.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/RiakClusterExample.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/RiakClusterExample.java
deleted file mode 100644
index 646d74e..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/RiakClusterExample.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import java.util.List;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.catalog.CatalogConfig;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.EnricherSpec;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.entity.nosql.riak.RiakCluster;
-import org.apache.brooklyn.entity.nosql.riak.RiakNode;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.ha.ServiceFailureDetector;
-import org.apache.brooklyn.policy.ha.ServiceRestarter;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-
-@Catalog(name = "Riak Cluster Application", description = "Riak ring deployment blueprint")
-public class RiakClusterExample extends AbstractApplication {
-
-    public static final String DEFAULT_LOCATION_SPEC = "aws-ec2:us-east-1";
-
-    @CatalogConfig(label = "Riak Ring Size")
-    public static final ConfigKey<Integer> RIAK_RING_SIZE = ConfigKeys.newConfigKey(
-            "riak.ring.size", "Initial size of the Riak Ring", 4);
-
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port = CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION_SPEC);
-        Preconditions.checkArgument(args.isEmpty(), "Unsupported args: " + args);
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(StartableApplication.class, RiakClusterExample.class))
-                .webconsolePort(port)
-                .location(location)
-                .start();
-
-        Entities.dumpInfo(launcher.getApplications());
-    }
-
-    public void initApp() {
-        addChild(EntitySpec.create(RiakCluster.class)
-                .configure(RiakCluster.INITIAL_SIZE, getConfig(RIAK_RING_SIZE))
-                .configure(RiakCluster.MEMBER_SPEC, EntitySpec.create(RiakNode.class)
-                        .enricher(EnricherSpec.create(ServiceFailureDetector.class))
-                        .policy(PolicySpec.create(ServiceRestarter.class)
-                                .configure(ServiceRestarter.FAILURE_SENSOR_TO_MONITOR, ServiceFailureDetector.ENTITY_FAILED))));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCassandraCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCassandraCluster.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCassandraCluster.java
deleted file mode 100644
index 65c189c..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCassandraCluster.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraDatacenter;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-public class SimpleCassandraCluster extends AbstractApplication {
-
-    private static final String DEFAULT_LOCATION = "localhost";
-
-    @Override
-    public void initApp() {
-        addChild(EntitySpec.create(CassandraDatacenter.class)
-                .configure(CassandraDatacenter.INITIAL_SIZE, 1)
-                .configure(CassandraDatacenter.CLUSTER_NAME, "Brooklyn"));
-    }
-    
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION);
-        
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                 .application(EntitySpec.create(StartableApplication.class, SimpleCassandraCluster.class)
-                         .displayName("Cassandra"))
-                         .webconsolePort(port)
-                 .location(location)
-                 .start();
-             
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCouchDBCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCouchDBCluster.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCouchDBCluster.java
deleted file mode 100644
index 1454ee6..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCouchDBCluster.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.entity.nosql.couchdb.CouchDBCluster;
-
-/** CouchDB cluster. */
-public class SimpleCouchDBCluster extends ApplicationBuilder {
-
-    /** Create entities. */
-    protected void doBuild() {
-        addChild(EntitySpec.create(CouchDBCluster.class)
-                .configure("initialSize", "2")
-                .configure("clusterName", "Brooklyn")
-                .configure("httpPort", "8000+"));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleMongoDBReplicaSet.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleMongoDBReplicaSet.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleMongoDBReplicaSet.java
deleted file mode 100644
index 949729a..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleMongoDBReplicaSet.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBReplicaSet;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBServer;
-
-public class SimpleMongoDBReplicaSet extends ApplicationBuilder {
-
-    protected void doBuild() {
-        addChild(EntitySpec.create(MongoDBReplicaSet.class)
-            .configure("name", "Simple MongoDB replica set")
-            .configure("initialSize", 3)
-            .configure("replicaSetName", "simple-replica-set")
-            .configure("memberSpec", EntitySpec.create(MongoDBServer.class)
-                    .configure("mongodbConfTemplateUrl", "classpath:///mongodb.conf")
-                    .configure("enableRestInterface", true)
-                    .configure("port", "27017+")));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleRedisCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleRedisCluster.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleRedisCluster.java
deleted file mode 100644
index c505940..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleRedisCluster.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.entity.nosql.redis.RedisCluster;
-
-/** Redis cluster. */
-public class SimpleRedisCluster extends ApplicationBuilder {
-
-    /** Create entities. */
-    protected void doBuild() {
-        addChild(EntitySpec.create(RedisCluster.class)
-                .configure("initialSize", "2")
-                .configure("clusterName", "Brooklyn"));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/StormSampleApp.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/StormSampleApp.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/StormSampleApp.java
deleted file mode 100644
index 062e044..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/StormSampleApp.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.entity.messaging.storm.StormDeployment;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-/**
- * Sample showing a storm analyticscluster
- **/
-@Catalog(name="Storm Sample App",
-description="Creates a Storm analytics cluster",
-    iconUrl="classpath://brooklyn/demo/glossy-3d-blue-web-icon.png")
-public class StormSampleApp extends AbstractApplication implements StartableApplication {
-
-    public static final Logger LOG = LoggerFactory.getLogger(StormSampleApp.class);
-
-    public static final String DEFAULT_LOCATION = "named:gce-europe-west1";
-
-    @Override
-    public void initApp() {
-        addChild(EntitySpec.create(StormDeployment.class)
-            .configure(StormDeployment.SUPERVISORS_COUNT, 2)
-            .configure(StormDeployment.ZOOKEEPERS_COUNT, 1));
-    }
-
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION);
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-            .application(EntitySpec.create(StartableApplication.class, StormSampleApp.class)
-                .displayName("Storm App"))
-                .webconsolePort(port)
-                .location(location)
-                .start();
-
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/WideAreaCassandraCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/WideAreaCassandraCluster.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/WideAreaCassandraCluster.java
deleted file mode 100644
index 2f0ce34..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/WideAreaCassandraCluster.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.catalog.CatalogConfig;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.EnricherSpec;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraDatacenter;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraFabric;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraNode;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.ha.ServiceFailureDetector;
-import org.apache.brooklyn.policy.ha.ServiceReplacer;
-import org.apache.brooklyn.policy.ha.ServiceRestarter;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-@Catalog(name="Wide Area Cassandra Cluster Application", description="Deploy a Cassandra cluster across multiple geographies.")
-public class WideAreaCassandraCluster extends AbstractApplication {
-
-    public static final String DEFAULT_LOCATION_SPEC = "aws-ec2:us-east-1,rackspace-cloudservers-uk";
-    
-    @CatalogConfig(label="Initial Cluster Size (per location)", priority=2)
-    public static final ConfigKey<Integer> CASSANDRA_CLUSTER_SIZE = ConfigKeys.newConfigKey(
-        "cassandra.cluster.initialSize", "Initial size of the Cassandra clusterss", 2);      
-    
-    
-    
-    @Override
-    public void initApp() {
-        addChild(EntitySpec.create(CassandraFabric.class)
-                .configure(CassandraDatacenter.CLUSTER_NAME, "Brooklyn")
-                .configure(CassandraDatacenter.INITIAL_SIZE, getConfig(CASSANDRA_CLUSTER_SIZE)) // per location
-                .configure(CassandraDatacenter.ENDPOINT_SNITCH_NAME, "org.apache.brooklyn.entity.nosql.cassandra.customsnitch.MultiCloudSnitch")
-                .configure(CassandraNode.CUSTOM_SNITCH_JAR_URL, "classpath://org/apache/brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.jar")
-                .configure(CassandraFabric.MEMBER_SPEC, EntitySpec.create(CassandraDatacenter.class)
-                        .configure(CassandraDatacenter.MEMBER_SPEC, EntitySpec.create(CassandraNode.class)
-                                .enricher(EnricherSpec.create(ServiceFailureDetector.class))
-                                .policy(PolicySpec.create(ServiceRestarter.class)
-                                        .configure(ServiceRestarter.FAILURE_SENSOR_TO_MONITOR, ServiceFailureDetector.ENTITY_FAILED)))
-                        .policy(PolicySpec.create(ServiceReplacer.class)
-                                .configure(ServiceReplacer.FAILURE_SENSOR_TO_MONITOR, ServiceRestarter.ENTITY_RESTART_FAILED))));
-    }
-    
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String locations = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION_SPEC);
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                 .application(EntitySpec.create(StartableApplication.class, WideAreaCassandraCluster.class)
-                         .displayName("Cassandra"))
-                 .webconsolePort(port)
-                 .locations(Arrays.asList(locations))
-                 .start();
-             
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/cumulus.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/cumulus.yaml b/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/cumulus.yaml
deleted file mode 100644
index 8772d37..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/cumulus.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
-[#ftl]
-#
-# 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.
-#
-storage-layout: "flat"
-cassandra-hosts: "${cassandraHostname}:${cassandraThriftPort?c}"
-cassandra-keyspace: "KeyspaceCumulus"
-proxy-mode: "false"
-triples-subject: -1
-triples-object: 5000
-query-limit: 50000

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/mongodb.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/mongodb.conf b/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/mongodb.conf
deleted file mode 100644
index 5237a54..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/mongodb.conf
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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.
-#
-
-# MongoDB configuration file
-
-# Startup configuration.
-verbose = v
-
-# Use less disk space.
-smallfiles = true
-
-# Disable journalling. By default:
-#  - journal is false on 32 and true on 64 bit systems.
-#  - nojournal is true on 32 and false on 64 bit systems.
-journal = false
-nojournal = true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/ha-cassandra-cluster.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/ha-cassandra-cluster.yaml b/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/ha-cassandra-cluster.yaml
deleted file mode 100644
index a260e74..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/ha-cassandra-cluster.yaml
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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.
-#
-# A YAML version of the HighAvailabilityCassandraCluster application
-#
-name: HA Cassandra cluster
-location: aws-ec2:us-east-1
-
-services:
-- type: org.apache.brooklyn.entity.nosql.cassandra.CassandraDatacenter
-  name: Brooklyn
-  brooklyn.config:
-    initialSize: 6
-    enableAvailabilityZones: true
-    # See https://github.com/brooklyncentral/brooklyn/issues/973
-    availabilityZoneNames:
-    - us-east-1b
-    - us-east-1c
-    - us-east-1e
-    numAvailabilityZones: 3
-    snitchName: GossipingPropertyFileSnitch
-    memberSpec:
-      $brooklyn:entitySpec:
-        type: org.apache.brooklyn.entity.nosql.cassandra.CassandraNode
-        brookyn.policies:
-        - type: org.apache.brooklyn.policy.ha.ServiceRestarter
-        brooklyn.enrichers:
-        - type: org.apache.brooklyn.policy.ha.ServiceFailureDetector
-  brooklyn.policies:
-  - type: org.apache.brooklyn.policy.ha.ServiceReplacer

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/simple-cassandra-cluster.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/simple-cassandra-cluster.yaml b/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/simple-cassandra-cluster.yaml
deleted file mode 100644
index 346ea78..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/simple-cassandra-cluster.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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.
-#
-# A YAML version of the SimpleCassandraCluster application
-#
-name: Simple Cassandra cluster
-location: localhost
-
-services:
-- type: org.apache.brooklyn.entity.nosql.cassandra.CassandraDatacenter
-  name: Brooklyn
-  brooklyn.config:
-    initialSize: 1

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/wide-area-cassandra-cluster.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/wide-area-cassandra-cluster.yaml b/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/wide-area-cassandra-cluster.yaml
deleted file mode 100644
index 91b785c..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/wide-area-cassandra-cluster.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# 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.
-#
-# A YAML version of the WideAreaCassandraCluster application
-#
-name: Wide Area Cassandra cluster
-locations:
-- aws-ec2:us-east-1
-- rackspace-cloudservers-uk
-
-services:
-- type: org.apache.brooklyn.entity.nosql.cassandra.CassandraFabric
-  name: Brooklyn
-  brooklyn.config:
-    initialSize: 2
-    snitchName: org.apache.brooklyn.entity.nosql.cassandra.customsnitch.MultiCloudSnitch
-    customSnitchJarUrl: classpath://org/apache/brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.jar
-    memberSpec:
-      $brooklyn:entitySpec:
-        type: org.apache.brooklyn.entity.nosql.cassandra.CassandraNode
-        brookyn.policies:
-        - type: org.apache.brooklyn.policy.ha.ServiceRestarter
-        brooklyn.enrichers:
-        - type: org.apache.brooklyn.policy.ha.ServiceFailureDetector
-    brooklyn.policies:
-    - type: org.apache.brooklyn.policy.ha.ServiceReplacer

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/.gitignore
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/.gitignore b/brooklyn-library/examples/simple-web-cluster/.gitignore
deleted file mode 100644
index 9a3d6d6..0000000
--- a/brooklyn-library/examples/simple-web-cluster/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-brooklyn-example-simple-web-cluster/
-brooklyn-example-simple-web-cluster.tar.gz

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/README.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/README.txt b/brooklyn-library/examples/simple-web-cluster/README.txt
deleted file mode 100644
index 598a4ce..0000000
--- a/brooklyn-library/examples/simple-web-cluster/README.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-Instructions for Running Examples
-=================================
-
-The commands below assume that the `brooklyn` script is on your $PATH, this project has been built,
-and you are in this directory.  Adjust to taste for other configurations.
-
-  export BROOKLYN_CLASSPATH=$(pwd)/target/classes
-  
-  # Three-tier: auto-scaling app-server cluster fronted by nginx, MySql backend wired up, on localhost
-  brooklyn launch --app org.apache.brooklyn.demo.WebClusterDatabaseExample --location localhost
-
-The above requires passwordless `ssh localhost` and requires `gcc` to build `nginx`.
-You could instead target your favourite cloud, where this has been tried and tested:
-
-  # Same three-tier, but in Amazon California, prompting for credentials
-  # (the location arg can be changed for any example, of course, and other clouds are available)
-  export JCLOUDS_AWS_EC2_IDENTITY=AKA50M30N3S1DFR0MAW55
-  export JCLOUDS_AWS_EC2_CREDENTIAL=aT0Ps3cr3tC0D3wh1chAW5w1llG1V3y0uTOus333
-  brooklyn launch --app brooklyn.demo.WebClusterDatabaseExample --location aws-ec2:us-west-1
-
-
-Other examples:
-
-  # A very simple app: a single web-server
-  brooklyn launch --app org.apache.brooklyn.demo.SingleWebServerExample --location localhost
-
-  # A simple app: just load-balancer and appservers
-  brooklyn launch --app org.apache.brooklyn.demo.WebClusterExample --location localhost
-
-  # Three-tier example
-  brooklyn launch --app org.apache.brooklyn.demo.WebClusterDatabaseExample --location localhost
-
-
-Redistributable embedded example:
-
-  # To build a redistributable tar.gz with a start.sh script
-  # which invokes the `main` method in the example class to start
-  # (the redistributable will be at:  target/brooklyn-*-bin.tar.gz )
-  mvn clean assembly:assembly
-
-For more information please visit https://brooklyn.incubator.apache.org/.
-
-----
-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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/pom.xml b/brooklyn-library/examples/simple-web-cluster/pom.xml
deleted file mode 100644
index 378ffbb..0000000
--- a/brooklyn-library/examples/simple-web-cluster/pom.xml
+++ /dev/null
@@ -1,164 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>jar</packaging>
-    <artifactId>brooklyn-example-simple-web-cluster</artifactId>
-    <name>Brooklyn Simple Web Cluster Example</name>
-
-    <!-- this is only needed for "mvn deploy"; the group and version can be extracted
-         and parent block removed to run this standalone -->
-    <parent>
-        <groupId>org.apache.brooklyn.example</groupId>
-        <artifactId>brooklyn-examples-parent</artifactId>
-        <version>0.9.0-SNAPSHOT</version>   <!-- BROOKLYN_VERSION -->
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-launcher</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-webapp</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-database</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-nosql</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-logback-xml</artifactId>
-            <version>${project.version}</version>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <!-- copy the WAR so it is available on the classpath for programmatic deployment -->
-                <executions>
-                    <execution>
-                        <id>copy</id>
-                        <phase>process-classes</phase>
-                        <goals>
-                            <goal>copy</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <!-- these can fail in eclipse trying to copy _from_ target/classes.
-                                         see http://jira.codehaus.org/browse/MDEP-259 -->
-                                <artifactItem>
-                                    <groupId>org.apache.brooklyn.example</groupId>
-                                    <artifactId>brooklyn-example-hello-world-webapp</artifactId>
-                                    <version>${project.version}</version>
-                                    <type>war</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>target/classes</outputDirectory>
-                                    <destFileName>hello-world-webapp.war</destFileName>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>org.apache.brooklyn.example</groupId>
-                                    <artifactId>brooklyn-example-hello-world-sql-webapp</artifactId>
-                                    <version>${project.version}</version>
-                                    <type>war</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>target/classes</outputDirectory>
-                                    <destFileName>hello-world-sql-webapp.war</destFileName>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <artifactId>maven-clean-plugin</artifactId>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${project.basedir}</directory>
-							<includes>
-                                <include>${project.artifactId}/</include>
-                                <include>brooklyn*.log</include>
-                                <include>brooklyn*.log.*</include>
-                                <include>stacktrace.log</include>
-                            </includes>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>            
-            <plugin>
-                <!-- optional, with this block, `mvn assembly:assembly` will build a redistributable tgz -->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptors>
-                        <descriptor>src/main/assembly/assembly.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-        
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/resources/jmeter-test-plan.jmx
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/resources/jmeter-test-plan.jmx b/brooklyn-library/examples/simple-web-cluster/resources/jmeter-test-plan.jmx
deleted file mode 100644
index 0eb1741..0000000
--- a/brooklyn-library/examples/simple-web-cluster/resources/jmeter-test-plan.jmx
+++ /dev/null
@@ -1,143 +0,0 @@
-<?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.
--->
-<jmeterTestPlan version="1.2" properties="2.1">
-  <hashTree>
-    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Brooklyn local webapp test - load for localhost:8000" enabled="true">
-      <stringProp name="TestPlan.comments"></stringProp>
-      <boolProp name="TestPlan.functional_mode">false</boolProp>
-      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
-      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-        <collectionProp name="Arguments.arguments"/>
-      </elementProp>
-      <stringProp name="TestPlan.user_define_classpath"></stringProp>
-    </TestPlan>
-    <hashTree>
-      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Test Group - hitting site with 8 threads" enabled="true">
-        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
-        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
-          <boolProp name="LoopController.continue_forever">false</boolProp>
-          <intProp name="LoopController.loops">-1</intProp>
-        </elementProp>
-        <stringProp name="ThreadGroup.num_threads">8</stringProp>
-        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
-        <longProp name="ThreadGroup.start_time">1326116677000</longProp>
-        <longProp name="ThreadGroup.end_time">1326116677000</longProp>
-        <boolProp name="ThreadGroup.scheduler">false</boolProp>
-        <stringProp name="ThreadGroup.duration"></stringProp>
-        <stringProp name="ThreadGroup.delay"></stringProp>
-      </ThreadGroup>
-      <hashTree>
-        <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Timer - frequency 50 reqs/sec per thread (20 ms delay)" enabled="true">
-          <stringProp name="ConstantTimer.delay">20</stringProp>
-        </ConstantTimer>
-        <hashTree/>
-        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Request - localhost:8000" enabled="true">
-          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-            <collectionProp name="Arguments.arguments"/>
-          </elementProp>
-          <stringProp name="HTTPSampler.domain">localhost</stringProp>
-          <stringProp name="HTTPSampler.port">8000</stringProp>
-          <stringProp name="HTTPSampler.connect_timeout"></stringProp>
-          <stringProp name="HTTPSampler.response_timeout"></stringProp>
-          <stringProp name="HTTPSampler.protocol"></stringProp>
-          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
-          <stringProp name="HTTPSampler.path"></stringProp>
-          <stringProp name="HTTPSampler.method">GET</stringProp>
-          <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
-          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
-          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
-          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
-          <boolProp name="HTTPSampler.monitor">false</boolProp>
-          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
-        </HTTPSampler>
-        <hashTree/>
-        <CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true">
-          <collectionProp name="CookieManager.cookies"/>
-          <boolProp name="CookieManager.clearEachIteration">false</boolProp>
-        </CookieManager>
-        <hashTree/>
-      </hashTree>
-      <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
-        <boolProp name="ResultCollector.error_logging">false</boolProp>
-        <objProp>
-          <name>saveConfig</name>
-          <value class="SampleSaveConfiguration">
-            <time>true</time>
-            <latency>true</latency>
-            <timestamp>true</timestamp>
-            <success>true</success>
-            <label>true</label>
-            <code>true</code>
-            <message>true</message>
-            <threadName>true</threadName>
-            <dataType>true</dataType>
-            <encoding>false</encoding>
-            <assertions>true</assertions>
-            <subresults>true</subresults>
-            <responseData>false</responseData>
-            <samplerData>false</samplerData>
-            <xml>true</xml>
-            <fieldNames>false</fieldNames>
-            <responseHeaders>false</responseHeaders>
-            <requestHeaders>false</requestHeaders>
-            <responseDataOnError>false</responseDataOnError>
-            <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
-            <assertionsResultsToSave>0</assertionsResultsToSave>
-            <bytes>true</bytes>
-          </value>
-        </objProp>
-        <stringProp name="filename"></stringProp>
-      </ResultCollector>
-      <hashTree/>
-      <ResultCollector guiclass="SplineVisualizer" testclass="ResultCollector" testname="Spline Visualizer" enabled="true">
-        <boolProp name="ResultCollector.error_logging">false</boolProp>
-        <objProp>
-          <name>saveConfig</name>
-          <value class="SampleSaveConfiguration">
-            <time>true</time>
-            <latency>true</latency>
-            <timestamp>true</timestamp>
-            <success>true</success>
-            <label>true</label>
-            <code>true</code>
-            <message>true</message>
-            <threadName>true</threadName>
-            <dataType>true</dataType>
-            <encoding>false</encoding>
-            <assertions>true</assertions>
-            <subresults>true</subresults>
-            <responseData>false</responseData>
-            <samplerData>false</samplerData>
-            <xml>true</xml>
-            <fieldNames>false</fieldNames>
-            <responseHeaders>false</responseHeaders>
-            <requestHeaders>false</requestHeaders>
-            <responseDataOnError>false</responseDataOnError>
-            <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
-            <assertionsResultsToSave>0</assertionsResultsToSave>
-            <bytes>true</bytes>
-          </value>
-        </objProp>
-        <stringProp name="filename"></stringProp>
-      </ResultCollector>
-      <hashTree/>
-    </hashTree>
-  </hashTree>
-</jmeterTestPlan>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/assembly/assembly.xml b/brooklyn-library/examples/simple-web-cluster/src/main/assembly/assembly.xml
deleted file mode 100644
index cbe7a08..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?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.
--->
-<assembly>
-    <id>bin</id>
-    <!-- Generates an archive containing the needed files; 
-         can add e.g. zip to the following
-         (but executable bit is not preserved) -->
-    <formats>
-        <format>tar.gz</format>
-    </formats>
-
-    <!-- Adds dependencies to zip package under lib directory -->
-    <dependencySets>
-        <dependencySet>
-            <!--
-               Project artifact is not copied under library directory since
-               it is added to the root directory of the zip package.
-           -->
-            <useProjectArtifact>false</useProjectArtifact>
-            <outputDirectory>lib</outputDirectory>
-            <unpack>false</unpack>
-        </dependencySet>
-    </dependencySets>
-
-    <fileSets>
-        <!--
-           Adds startup scripts to the root directory of zip package. The startup
-           scripts are located to src/main/scripts directory as stated by Maven
-           conventions.
-       -->
-        <fileSet>
-            <directory>src/main/assembly/scripts</directory>
-            <outputDirectory></outputDirectory>
-            <fileMode>0755</fileMode>
-            <includes>
-                <include>*</include>
-            </includes>
-        </fileSet>
-	<!-- add additional files (but not marked executable -->
-        <fileSet>
-            <directory>src/main/assembly/files</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>*</include>
-            </includes>
-        </fileSet>
-        <!-- adds jar package to the root directory of zip package -->
-        <fileSet>
-            <directory>target</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>*.jar</include>
-            </includes>
-        </fileSet>
-    </fileSets>
-</assembly>
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/assembly/files/README.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/assembly/files/README.txt b/brooklyn-library/examples/simple-web-cluster/src/main/assembly/files/README.txt
deleted file mode 100644
index cf49ea5..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/assembly/files/README.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-Brooklyn Example
-================
-
-To use, configure your cloud credentials then run  ./start.sh  in this directory.
-You can then access the management context in your browser, typically on  localhost:8081.
-
-
-### Cloud Credentials
-
-To run, you'll need to specify credentials for your preferred cloud.  This can be done 
-in `~/.brooklyn/brooklyn.properties`:
-
-    brooklyn.jclouds.aws-ec2.identity=AKXXXXXXXXXXXXXXXXXX
-    brooklyn.jclouds.aws-ec2.credential=secret01xxxxxxxxxxxxxxxxxxxxxxxxxxx
-
-Alternatively these can be set as shell environment parameters or JVM system properties.
-
-Many other clouds are supported also, as well as pre-existing machines ("bring your own nodes"),
-custom endpoints for private clouds, and specifying custom keys and passphrases.
-For more information see:
-
-    https://github.com/brooklyncentral/brooklyn/blob/master/docs/use/guide/defining-applications/common-usage.md#off-the-shelf-locations
-
-
-### Run
-
-Usage:
-
-    ./start.sh [--port 8081+] location
-
-Where location might be `localhost` (the defaul), or `aws-ec2:us-east-1`, `openstack:endpoint`, etc.
-
-----
-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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/assembly/scripts/start.sh
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/assembly/scripts/start.sh b/brooklyn-library/examples/simple-web-cluster/src/main/assembly/scripts/start.sh
deleted file mode 100755
index ec4f110..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/assembly/scripts/start.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-if [ -z "$BROOKLYN_APP_CLASS" ] ; then 
-    BROOKLYN_APP_CLASS=org.apache.brooklyn.demo.WebClusterDatabaseExample
-fi
-
-if [ -z "$JAVA" ] ; then 
-    JAVA=`which java`
-fi
-if [ ! -z "$JAVA_HOME" ] ; then 
-    JAVA=$JAVA_HOME/bin/java
-else
-    JAVA=`which java`
-fi
-if [ ! -x "$JAVA" ] ; then
-  echo Cannot find java. Set JAVA_HOME or add java to path.
-  exit 1
-fi
-
-if [[ ! `ls *.jar 2> /dev/null` || ! `ls lib/*.jar 2> /dev/null` ]] ; then
-  echo Command must be run from the directory where it is installed.
-  exit 1
-fi
-
-$JAVA -Xms256m -Xmx1024m -XX:MaxPermSize=1024m -classpath "*:lib/*" $BROOKLYN_APP_CLASS "$@"

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/NodeJsTodoApplication.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/NodeJsTodoApplication.java b/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/NodeJsTodoApplication.java
deleted file mode 100644
index 086f390..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/NodeJsTodoApplication.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.demo;
-
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.attributeWhenReady;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.entity.nosql.redis.RedisStore;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.entity.webapp.nodejs.NodeJsWebAppService;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Node.JS Todo Application
- */
-@Catalog(name="NodeJS Todo",
-        description="Node.js is a cross-platform runtime environment for server-side and networking applications. Node.js applications are written in JavaScript",
-        iconUrl="classpath://nodejs-logo.png")
-public class NodeJsTodoApplication extends AbstractApplication implements StartableApplication {
-
-    @Override
-    public void initApp() {
-        RedisStore redis = addChild(EntitySpec.create(RedisStore.class));
-
-        addChild(EntitySpec.create(NodeJsWebAppService.class)
-                .configure(NodeJsWebAppService.APP_GIT_REPOSITORY_URL, "https://github.com/grkvlt/nodejs-todo/")
-                .configure(NodeJsWebAppService.APP_FILE, "server.js")
-                .configure(NodeJsWebAppService.APP_NAME, "nodejs-todo")
-                .configure(NodeJsWebAppService.NODE_PACKAGE_LIST, ImmutableList.of("express", "ejs", "jasmine-node", "underscore", "method-override", "cookie-parser", "express-session", "body-parser", "cookie-session", "redis", "redis-url", "connect"))
-                .configure(SoftwareProcess.SHELL_ENVIRONMENT, ImmutableMap.<String, Object>of(
-                        "REDISTOGO_URL", DependentConfiguration.formatString("redis://%s:%d/",
-                                attributeWhenReady(redis, Attributes.HOSTNAME), attributeWhenReady(redis, RedisStore.REDIS_PORT))))
-                .configure(SoftwareProcess.LAUNCH_LATCH, attributeWhenReady(redis, Startable.SERVICE_UP)));
-    }
-
-}


[21/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormImpl.java
deleted file mode 100644
index 71f145c..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormImpl.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.storm;
-
-import javax.management.ObjectName;
-
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.entity.java.JavaAppUtils;
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-import org.apache.brooklyn.feed.jmx.JmxHelper;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class StormImpl extends SoftwareProcessImpl implements Storm {
-
-    private static final Logger log = LoggerFactory.getLogger(StormImpl.class);
-
-    public static final ObjectName STORM_MBEAN = JmxHelper.createObjectName("backtype.storm.daemon.nimbus:type=*");
-
-    private JmxHelper jmxHelper;
-    private volatile JmxFeed jmxFeed;
-    
-    public StormImpl() {}
-    
-    @Override
-    public String getHostname() { return getAttribute(HOSTNAME); }
-
-    @Override
-    public Role getRole() { return getConfig(ROLE); }
-
-    @Override
-    public String getStormConfigTemplateUrl() { return getConfig(STORM_CONFIG_TEMPLATE_URL); }   
-    
-    @Override
-    public Class<?> getDriverInterface() {
-        return StormDriver.class;
-    }
-
-    public String getRoleName() { return getRole().name().toLowerCase(); }
-
-    @Override
-    protected void preStart() {
-        setDefaultDisplayName("Storm Node ("+ getRoleName()+")");
-        super.preStart();
-    }
-    
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-
-        // give it plenty of time to start before we advertise ourselves
-        Time.sleep(Duration.TEN_SECONDS);
-
-        if (getRole() == Role.UI) {
-            sensors().set(STORM_UI_URL, "http://"+getAttribute(Attributes.HOSTNAME)+":"+getAttribute(UI_PORT)+"/");
-        }
-
-        if (((JavaSoftwareProcessDriver)getDriver()).isJmxEnabled()) {
-            jmxHelper = new JmxHelper(this);
-//            jmxFeed = JmxFeed.builder()
-//                    .entity(this)
-//                    .period(3000, TimeUnit.MILLISECONDS)
-//                    .helper(jmxHelper)
-//                    .pollAttribute(new JmxAttributePollConfig<Boolean>(SERVICE_UP_JMX)
-//                            .objectName(STORM_MBEAN)
-//                            .attributeName("Initialized")
-//                            .onSuccess(Functions.forPredicate(Predicates.notNull()))
-//                            .onException(Functions.constant(false)))
-//                    // TODO SERVICE_UP should really be a combo of JMX plus is running
-//                    .pollAttribute(new JmxAttributePollConfig<Boolean>(SERVICE_UP)
-//                            .objectName(STORM_MBEAN)
-//                            .attributeName("Initialized")
-//                            .onSuccess(Functions.forPredicate(Predicates.notNull()))
-//                            .onException(Functions.constant(false)))
-//                    .build();
-            jmxFeed = JavaAppUtils.connectMXBeanSensors(this);
-            
-            // FIXME for now we do service up based on pid check -- we get a warning that:
-            // JMX object backtype.storm.daemon.nimbus:type=* not found at service:jmx:jmxmp://108.59.82.105:31001
-            // (JMX is up fine, but no such object there)
-            connectServiceUpIsRunning();
-         } else {
-            // if not using JMX
-            log.warn("Storm running without JMX monitoring; limited visibility of service available");
-            connectServiceUpIsRunning();
-        }
-    }
-
-    @Override
-    public void disconnectSensors() {
-        super.disconnectSensors();
-        disconnectServiceUpIsRunning();
-        if (jmxFeed != null) jmxFeed.stop();
-        if (jmxHelper !=null) jmxHelper.terminate();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormSshDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormSshDriver.java
deleted file mode 100644
index 66578e6..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormSshDriver.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.storm;
-
-import static java.lang.String.format;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.location.Machines;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperEnsemble;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-
-import com.google.common.base.Optional;
-import com.google.common.base.Supplier;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public class StormSshDriver extends JavaSoftwareProcessSshDriver implements StormDriver {
-
-    private static final Logger log = LoggerFactory.getLogger(StormSshDriver.class);
-
-    public StormSshDriver(EntityLocal entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    public String getRoleName() {
-        return entity.getConfig(Storm.ROLE).name().toLowerCase();
-    }
-
-    public String getZeromqVersion() {
-        return entity.getConfig(Storm.ZEROMQ_VERSION);
-    }
-
-    public String getLocalDir() {
-        return Optional.fromNullable(entity.getConfig(Storm.LOCAL_DIR)).or(Os.mergePathsUnix(getRunDir(), "storm"));
-    }
-
-    public String getNimbusHostname() {
-        String result = entity.getConfig(Storm.NIMBUS_HOSTNAME);
-        if (result != null) return result;
-
-        Entity nimbus = entity.getConfig(Storm.NIMBUS_ENTITY);
-        if (nimbus == null) {
-            log.warn("No nimbus hostname available; using 'localhost'");
-            return "localhost";
-        }
-        return Entities.submit(entity, DependentConfiguration.attributeWhenReady(nimbus, Attributes.HOSTNAME)).getUnchecked();
-    }
-
-    public Integer getUiPort() {
-        return entity.getAttribute(Storm.UI_PORT);
-    }
-
-    public Map<String, Integer> getPortMap() {
-        return MutableMap.of("uiPort", getUiPort());
-    }
-
-    @Override
-    protected List<String> getCustomJavaConfigOptions() {
-        List<String> result = super.getCustomJavaConfigOptions();
-        if ("nimbus".equals(getRoleName()) || "supervisor".equals(getRoleName())) {
-            result.add("-verbose:gc");
-            result.add("-XX:+PrintGCTimeStamps");
-            result.add("-XX:+PrintGCDetails");
-        }
-
-        if ("ui".equals(getRoleName())) {
-            result.add("-Xmx768m");
-        }
-
-        return result;
-    }
-
-    public String getJvmOptsLine() {
-        return Optional.fromNullable(getShellEnvironment().get("JAVA_OPTS")).or("");
-    }
-    
-    public List<String> getZookeeperServers() {
-        ZooKeeperEnsemble zooKeeperEnsemble = entity.getConfig(Storm.ZOOKEEPER_ENSEMBLE);
-        Supplier<List<String>> supplier = Entities.attributeSupplierWhenReady(zooKeeperEnsemble, ZooKeeperEnsemble.ZOOKEEPER_SERVERS);
-        return supplier.get();
-    }
-
-    public String getStormConfigTemplateUrl() {
-        return entity.getConfig(Storm.STORM_CONFIG_TEMPLATE_URL);
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("storm-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-        
-        ImmutableList.Builder<String> commands= ImmutableList.<String> builder();
-        if (!getLocation().getOsDetails().isMac()) {
-            commands.add(BashCommands.installPackage(ImmutableMap.of(
-                        "yum", "libuuid-devel",
-                        "apt", "build-essential uuid-dev pkg-config libtool automake"), 
-                    "libuuid-devel"));
-            commands.add(BashCommands.ifExecutableElse0("yum", BashCommands.sudo("yum -y groupinstall 'Development Tools'")));
-        }
-        commands.add(BashCommands.installPackage(ImmutableMap.of("yum", "git"), "git"))
-                .add(BashCommands.INSTALL_UNZIP)
-                .addAll(installNativeDependencies())
-                .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-                .add("unzip " + saveAs)
-                .add("mkdir -p " + getLocalDir())
-                .add("chmod 777 " + getLocalDir()); // FIXME
-        newScript(INSTALLING)
-                .body.append(commands.build())
-                .gatherOutput()
-                .execute();
-    }
-
-    public String getPidFile() {
-        return Os.mergePathsUnix(getRunDir(), format("%s.pid", getRoleName()));
-    }
-
-    @Override
-    protected String getLogFileLocation() {
-        return Os.mergePathsUnix(getRunDir(), "logs", format("%s.log", getRoleName()));
-    }
-
-    @Override
-    public void launch() {
-        boolean needsSleep = false;
-        if (getRoleName().equals("supervisor")) {
-            Entity nimbus = entity.getConfig(Storm.NIMBUS_ENTITY);
-            if (nimbus == null) {
-                log.warn("No nimbus entity available; not blocking before starting supervisors");
-            } else {
-                Entities.waitForServiceUp(nimbus, entity.getConfig(SoftwareProcess.START_TIMEOUT));
-                needsSleep = true;
-            }
-        }
-
-        String subnetHostname = Machines.findSubnetOrPublicHostname(entity).get();
-        log.info("Launching " + entity + " with role " + getRoleName() + " and " + "hostname (public) " 
-                + getEntity().getAttribute(Attributes.HOSTNAME) + ", " + "hostname (subnet) " + subnetHostname + ")");
-
-        // ensure only one node at a time tries to start
-        // attempting to eliminate the causes of:
-        // 2013-12-12 09:21:45 supervisor [ERROR] Error on initialization of server mk-supervisor
-        // org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /assignments
-        // TODO use SoftwareProcess#START_LATCH instead here?
-
-        Object startMutex = Optional.fromNullable(entity.getConfig(Storm.START_MUTEX)).or(new Object());
-        synchronized (startMutex) {
-            if (needsSleep) {
-                // give 10s extra to make sure nimbus is ready; we see weird zookeeper no /assignments node error otherwise
-                // (this could be optimized by recording nimbus service_up time)
-                Time.sleep(Duration.TEN_SECONDS);
-            }
-            newScript(MutableMap.of(USE_PID_FILE, getPidFile()), LAUNCHING)
-                    .body.append(format("nohup ./bin/storm %s > %s 2>&1 &", getRoleName(), getLogFileLocation()))
-                    .execute();
-        }
-    }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of(USE_PID_FILE, getPidFile()), CHECK_RUNNING).execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(MutableMap.of(USE_PID_FILE, getPidFile()), STOPPING).execute();
-    }
-
-    @Override
-    public void customize() {
-        log.debug("Customizing {}", entity);
-        Networking.checkPortsValid(getPortMap());
-
-        newScript(CUSTOMIZING)
-                .body.append(format("cp -R %s/* .", getExpandedInstallDir()))
-                .execute();
-
-        String destinationConfigFile = Os.mergePathsUnix(getRunDir(), "conf/storm.yaml");
-        copyTemplate(getStormConfigTemplateUrl(), destinationConfigFile);
-    }
-
-    protected List<String> installNativeDependencies() {
-        String zeromqUrl = format("http://download.zeromq.org/zeromq-%s.tar.gz", getZeromqVersion());
-        String targz = format("zeromq-%s.tar.gz", getZeromqVersion());
-        String jzmq = "https://github.com/nathanmarz/jzmq.git";
-
-        ImmutableList.Builder<String> commands = ImmutableList.<String>builder();
-        if (getLocation().getOsDetails().isMac()) {
-            commands.add("export PATH=$PATH:/usr/local/bin")
-                   .add("export JAVA_HOME=$(/usr/libexec/java_home)")
-                   .add("cd " + getInstallDir())
-                   .add(BashCommands.installPackage(ImmutableMap.of("brew", "automake"), "make"))
-                   .add(BashCommands.installPackage(ImmutableMap.of("brew", "libtool"), "libtool"))
-                   .add(BashCommands.installPackage(ImmutableMap.of("brew", "pkg-config"), "pkg-config"))
-                   .add(BashCommands.installPackage(ImmutableMap.of("brew", "zeromq"), "zeromq"))
-                   .add("git clone https://github.com/asmaier/jzmq")
-                   .add("cd jzmq")
-                   .add("./autogen.sh")
-                   .add("./configure")
-                   .add("make")
-                   .add((BashCommands.sudo("make install")))
-                   .add("cd " + getInstallDir());
-        } else {
-            commands.add("export JAVA_HOME=$(dirname $(readlink -m `which java`))/../../ || export JAVA_HOME=/usr/lib/jvm/java")
-                   .add("cd " + getInstallDir())
-                   .add(BashCommands.commandToDownloadUrlAs(zeromqUrl, targz))
-                   .add("tar xzf " + targz)
-                   .add(format("cd zeromq-%s", getZeromqVersion()))
-                   .add("./configure")
-                   .add("make")
-                   .add((BashCommands.sudo("make install")))
-                   // install jzmq
-                   .add("cd " + getInstallDir())
-                   .add("git clone " + jzmq)
-                   .add("cd jzmq")
-                   .add("./autogen.sh")
-                   .add("./configure")
-                           
-                   // hack needed on ubuntu 12.04; ignore if it fails
-                   // see https://github.com/zeromq/jzmq/issues/114
-                   .add(BashCommands.ok(
-                       "pushd src ; touch classdist_noinst.stamp ; CLASSPATH=.:./.:$CLASSPATH "
-                       + "javac -d . org/zeromq/ZMQ.java org/zeromq/App.java org/zeromq/ZMQForwarder.java org/zeromq/EmbeddedLibraryTools.java org/zeromq/ZMQQueue.java org/zeromq/ZMQStreamer.java org/zeromq/ZMQException.java"))
-                   .add(BashCommands.ok("popd"))
-
-                   .add("make")
-                   .add((BashCommands.sudo("make install")))
-                   .add("cd " + getInstallDir());
-        }
-        return commands.build();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/AbstractZooKeeperImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/AbstractZooKeeperImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/AbstractZooKeeperImpl.java
deleted file mode 100644
index 60175c9..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/AbstractZooKeeperImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.zookeeper;
-
-import java.util.concurrent.TimeUnit;
-
-import javax.management.ObjectName;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.jmx.JmxAttributePollConfig;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-import org.apache.brooklyn.feed.jmx.JmxHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Functions;
-import com.google.common.base.Objects.ToStringHelper;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single Apache ZooKeeper instance.
- */
-public abstract class AbstractZooKeeperImpl extends SoftwareProcessImpl implements ZooKeeperNode {
-
-    @SuppressWarnings("unused")
-    private static final Logger log = LoggerFactory.getLogger(AbstractZooKeeperImpl.class);
-    private static final ObjectName ZOOKEEPER_MBEAN = JmxHelper.createObjectName("org.apache.ZooKeeperService:name0=StandaloneServer_port-1");
-
-    private volatile JmxFeed jmxFeed;
-
-    public AbstractZooKeeperImpl() {
-    }
-
-    @Override
-    public Integer getZookeeperPort() { return getAttribute(ZOOKEEPER_PORT); }
-
-    @Override
-    public String getHostname() { return getAttribute(HOSTNAME); }
-
-    @Override
-    public void waitForServiceUp(long duration, TimeUnit units) {
-        super.waitForServiceUp(duration, units);
-
-        if (((JavaSoftwareProcessDriver)getDriver()).isJmxEnabled()) {
-            // Wait for the MBean to exist
-            JmxHelper helper = new JmxHelper(this);
-            try {
-                helper.assertMBeanExistsEventually(ZOOKEEPER_MBEAN, units.toMillis(duration));
-            } finally {
-                helper.terminate();
-            }
-        }
-    }
-
-    @Override
-    protected void connectSensors() {
-        connectServiceUpIsRunning();
-
-        if (((JavaSoftwareProcessDriver)getDriver()).isJmxEnabled()) {
-            jmxFeed = JmxFeed.builder()
-                .entity(this)
-                .period(500, TimeUnit.MILLISECONDS)
-                .pollAttribute(new JmxAttributePollConfig<Long>(OUTSTANDING_REQUESTS)
-                        .objectName(ZOOKEEPER_MBEAN)
-                        .attributeName("OutstandingRequests")
-                        .onFailureOrException(Functions.constant(-1l)))
-                .pollAttribute(new JmxAttributePollConfig<Long>(PACKETS_RECEIVED)
-                        .objectName(ZOOKEEPER_MBEAN)
-                        .attributeName("PacketsReceived")
-                        .onFailureOrException(Functions.constant(-1l)))
-                .pollAttribute(new JmxAttributePollConfig<Long>(PACKETS_SENT)
-                        .objectName(ZOOKEEPER_MBEAN)
-                        .attributeName("PacketsSent")
-                        .onFailureOrException(Functions.constant(-1l)))
-                .build();
-        }
-    }
-
-    @Override
-    public void disconnectSensors() {
-        super.disconnectSensors();
-        disconnectServiceUpIsRunning();
-        if (jmxFeed != null) jmxFeed.stop();
-    }
-
-    @Override
-    protected ToStringHelper toStringHelper() {
-        return super.toStringHelper()
-                .add("zookeeperPort", getZookeeperPort());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperDriver.java
deleted file mode 100644
index b92e9da..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperDriver.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.zookeeper;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-
-public interface ZooKeeperDriver extends JavaSoftwareProcessDriver {
-
-    Integer getZooKeeperPort();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperEnsemble.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperEnsemble.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperEnsemble.java
deleted file mode 100644
index a5ba570..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperEnsemble.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.zookeeper;
-
-import java.util.List;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-import com.google.common.reflect.TypeToken;
-
-@Catalog(name="ZooKeeper ensemble", description="A cluster of ZooKeeper servers. "
-        + "Apache ZooKeeper enables highly reliable distributed coordination.")
-@ImplementedBy(ZooKeeperEnsembleImpl.class)
-public interface ZooKeeperEnsemble extends DynamicCluster {
-
-    @SetFromFlag("clusterName")
-    BasicAttributeSensorAndConfigKey<String> CLUSTER_NAME = new BasicAttributeSensorAndConfigKey<String>(String
-            .class, "zookeeper.cluster.name", "Name of the Zookeeper cluster", "BrooklynZookeeperCluster");
-
-    @SetFromFlag("initialSize")
-    public static final ConfigKey<Integer> INITIAL_SIZE = ConfigKeys.newConfigKeyWithDefault(DynamicCluster.INITIAL_SIZE, 3);
-
-    @SuppressWarnings("serial")
-    AttributeSensor<List<String>> ZOOKEEPER_SERVERS = Sensors.newSensor(new TypeToken<List<String>>() { },
-            "zookeeper.servers", "Hostnames to connect to cluster with");
-
-    String getClusterName();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperEnsembleImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperEnsembleImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperEnsembleImpl.java
deleted file mode 100644
index c2c3e3f..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperEnsembleImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.zookeeper;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityInternal;
-import org.apache.brooklyn.entity.group.AbstractMembershipTrackingPolicy;
-import org.apache.brooklyn.entity.group.DynamicClusterImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.Lists;
-
-public class ZooKeeperEnsembleImpl extends DynamicClusterImpl implements ZooKeeperEnsemble {
-
-    private static final Logger log = LoggerFactory.getLogger(ZooKeeperEnsembleImpl.class);
-    private static final AtomicInteger myId = new AtomicInteger();
-    
-    private MemberTrackingPolicy policy;
-
-    public ZooKeeperEnsembleImpl() {}
-
-    /**
-     * Sets the default {@link #MEMBER_SPEC} to describe the ZooKeeper nodes.
-     */
-    @Override
-    protected EntitySpec<?> getMemberSpec() {
-        return getConfig(MEMBER_SPEC, EntitySpec.create(ZooKeeperNode.class));
-    }
-
-    @Override
-    public String getClusterName() {
-        return getAttribute(CLUSTER_NAME);
-    }
-
-    @Override
-    public void init() {
-        log.info("Initializing the ZooKeeper Ensemble");
-        super.init();
-
-        policy = policies().add(PolicySpec.create(MemberTrackingPolicy.class)
-                .displayName("Members tracker")
-                .configure("group", this));
-    }
-
-    public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy {
-        @Override
-        protected void onEntityChange(Entity member) {
-        }
-
-        @Override
-        protected void onEntityAdded(Entity member) {
-            if (member.getAttribute(ZooKeeperNode.MY_ID) == null) {
-                ((EntityInternal) member).sensors().set(ZooKeeperNode.MY_ID, myId.incrementAndGet());
-            }
-        }
-
-        @Override
-        protected void onEntityRemoved(Entity member) {
-        }
-    };
-
-    @Override
-    protected void initEnrichers() {
-        super.initEnrichers();
-        
-    }
-    
-    @Override
-    public void start(Collection<? extends Location> locations) {
-        super.start(locations);
-        
-        List<String> zookeeperServers = Lists.newArrayList();
-        for (Entity zookeeper : getMembers()) {
-            zookeeperServers.add(zookeeper.getAttribute(Attributes.HOSTNAME));
-        }
-        sensors().set(ZOOKEEPER_SERVERS, zookeeperServers);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperNode.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperNode.java
deleted file mode 100644
index 18cb6c6..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperNode.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.zookeeper;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensor;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single Apache ZooKeeper instance.
- */
-@Catalog(name="ZooKeeper Node", description="Apache ZooKeeper is a server which enables "
-        + "highly reliable distributed coordination.")
-@ImplementedBy(ZooKeeperNodeImpl.class)
-public interface ZooKeeperNode extends SoftwareProcess {
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "3.4.5");
-    @SetFromFlag("zookeeperPort")
-    PortAttributeSensorAndConfigKey ZOOKEEPER_PORT = new PortAttributeSensorAndConfigKey("zookeeper.port", "Zookeeper port", "2181+");
-    @SetFromFlag("zookeeperLeaderPort")
-    PortAttributeSensorAndConfigKey ZOOKEEPER_LEADER_PORT = new PortAttributeSensorAndConfigKey("zookeeper.leader.port", "Zookeeper leader ports", "2888+");
-    @SetFromFlag("zookeeperElectionPort")
-    PortAttributeSensorAndConfigKey ZOOKEEPER_ELECTION_PORT = new PortAttributeSensorAndConfigKey("zookeeper.election.port", "Zookeeper election ports", "3888+");
-    @SetFromFlag("downloadUrl")
-    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "http://apache.fastbull.org/zookeeper/zookeeper-${version}/zookeeper-${version}.tar.gz");
-    /**
-     * Location of the ZK configuration file template to be copied to the server.
-     */
-    @SetFromFlag("zookeeperConfig")
-    ConfigKey<String> ZOOKEEPER_CONFIG_TEMPLATE = ConfigKeys.newStringConfigKey(
-            "zookeeper.configTemplate", "Zookeeper configuration template (in freemarker format)",
-            "classpath://org/apache/brooklyn/entity/messaging/zookeeper/zoo.cfg");
-    AttributeSensor<Long> OUTSTANDING_REQUESTS = new BasicAttributeSensor<Long>(Long.class, "zookeeper.outstandingRequests", "Outstanding request count");
-    AttributeSensor<Long> PACKETS_RECEIVED = new BasicAttributeSensor<Long>(Long.class, "zookeeper.packets.received", "Total packets received");
-    AttributeSensor<Long> PACKETS_SENT = new BasicAttributeSensor<Long>(Long.class, "zookeeper.packets.sent", "Total packets sent");
-    AttributeSensor<Integer> MY_ID = new BasicAttributeSensor<Integer>(Integer.class, "zookeeper.myid", "ZooKeeper node's myId");
-
-    Integer getZookeeperPort();
-
-    String getHostname();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperNodeImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperNodeImpl.java
deleted file mode 100644
index 275e101..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperNodeImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.zookeeper;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single standalone zookeeper instance.
- */
-public class ZooKeeperNodeImpl extends AbstractZooKeeperImpl implements ZooKeeperNode {
-
-    public ZooKeeperNodeImpl() {}
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return ZooKeeperDriver.class;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperSshDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperSshDriver.java
deleted file mode 100644
index fd1ba0b..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/zookeeper/ZooKeeperSshDriver.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.zookeeper;
-
-import static java.lang.String.format;
-
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ExecutionException;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-
-public class ZooKeeperSshDriver extends JavaSoftwareProcessSshDriver implements ZooKeeperDriver {
-
-    public ZooKeeperSshDriver(ZooKeeperNodeImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    protected String getLogFileLocation() { return Os.mergePathsUnix(getRunDir(), "console.out"); }
-
-    protected Map<String, Integer> getPortMap() {
-        return MutableMap.of("zookeeperPort", getZooKeeperPort());
-    }
-
-    protected String getConfigFileName() {
-        return entity.getConfig(ZooKeeperNode.ZOOKEEPER_CONFIG_TEMPLATE);
-    }
-
-    protected int getMyId() {
-        return entity.getAttribute(ZooKeeperNode.MY_ID);
-    }
-
-    // FIXME All for one, and one for all! If any node fails then we're stuck waiting for its hostname/port forever.
-    // Need a way to terminate the wait based on the entity going on-fire etc.
-    // FIXME Race in getMemebers. Should we change DynamicCluster.grow to create the members and only then call start on them all?
-    public List<ZooKeeperServerConfig> getZookeeperServers() throws ExecutionException, InterruptedException {
-        ZooKeeperEnsemble ensemble = (ZooKeeperEnsemble) entity.getParent();
-        List<ZooKeeperServerConfig> result = Lists.newArrayList();
-
-        for (Entity member : ensemble.getMembers()) {
-            Integer myid = Entities.attributeSupplierWhenReady(member, ZooKeeperNode.MY_ID).get();
-            String hostname = Entities.attributeSupplierWhenReady(member, ZooKeeperNode.HOSTNAME).get();
-            Integer port = Entities.attributeSupplierWhenReady(member, ZooKeeperNode.ZOOKEEPER_PORT).get();
-            Integer leaderPort = Entities.attributeSupplierWhenReady(member, ZooKeeperNode.ZOOKEEPER_LEADER_PORT).get();
-            Integer electionPort = Entities.attributeSupplierWhenReady(member, ZooKeeperNode.ZOOKEEPER_ELECTION_PORT).get();
-            result.add(new ZooKeeperServerConfig(myid, hostname, port, leaderPort, electionPort));
-        }
-        return result;
-    }
-
-    @Override
-    public Integer getZooKeeperPort() {
-        return getEntity().getAttribute(ZooKeeperNode.ZOOKEEPER_PORT);
-    }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of(USE_PID_FILE, getPidFile()), CHECK_RUNNING).execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(ImmutableMap.of(USE_PID_FILE, getPidFile()), STOPPING).execute();     
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("zookeeper-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = ImmutableList.<String> builder()
-                .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-                .add(BashCommands.INSTALL_TAR)
-                .add("tar xzfv " + saveAs)
-                .build();
-
-        newScript(INSTALLING)
-                .body.append(commands)
-                .execute();
-    }
-
-    @Override
-    public void customize() {
-        log.debug("Customizing {}", entity);
-        Networking.checkPortsValid(getPortMap());
-        newScript(CUSTOMIZING)
-                .body.append(
-                        format("cp -R %s/* .", getExpandedInstallDir()),
-                        format("mkdir %s/zookeeper", getRunDir()),
-                        format("echo %d > %s/zookeeper/myid", getMyId(), getRunDir())
-                    )
-                .execute();
-
-        String destinationConfigFile = Os.mergePathsUnix(getRunDir(), "conf/zoo.cfg");
-        copyTemplate(getConfigFileName(), destinationConfigFile);
-    }
-
-    public String getPidFile() { return Os.mergePathsUnix(getRunDir(), "zookeeper.pid"); }
-
-    @Override
-    public void launch() {
-        newScript(MutableMap.of(USE_PID_FILE, getPidFile()), LAUNCHING)
-                .body.append(format("nohup java $JAVA_OPTS -cp zookeeper-%s.jar:lib/*:conf org.apache.zookeeper.server.quorum.QuorumPeerMain conf/zoo.cfg > %s 2>&1 &", getVersion(), getLogFileLocation()))
-                .execute();
-    }
-
-    public static class ZooKeeperServerConfig {
-        private final Integer myid;
-        private final String hostname;
-        private final Integer port;
-        private final Integer leaderPort;
-        private final Integer electionPort;
-
-        public ZooKeeperServerConfig(Integer myid, String hostname, Integer port, Integer leaderPort, Integer electionPort) {
-            this.myid = myid;
-            this.hostname = hostname;
-            this.port = port;
-            this.leaderPort = leaderPort;
-            this.electionPort = electionPort;
-        }
-
-        public Integer getMyid() { return myid; }
-        public String getHostname() { return hostname; }
-        public Integer getPort() { return port; }
-        public Integer getLeaderPort() { return leaderPort; }
-        public Integer getElectionPort() { return electionPort; }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/resources/RabbitMQLogo.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/resources/RabbitMQLogo.png b/brooklyn-library/software/messaging/src/main/resources/RabbitMQLogo.png
deleted file mode 100644
index c5690ec..0000000
Binary files a/brooklyn-library/software/messaging/src/main/resources/RabbitMQLogo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/resources/activemq-logo.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/resources/activemq-logo.png b/brooklyn-library/software/messaging/src/main/resources/activemq-logo.png
deleted file mode 100644
index d514448..0000000
Binary files a/brooklyn-library/software/messaging/src/main/resources/activemq-logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/activemq/activemq.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/activemq/activemq.xml b/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/activemq/activemq.xml
deleted file mode 100644
index 52114d1..0000000
--- a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/activemq/activemq.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-[#ftl]
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Based on standard file from ActiveMQ Version 5.7.0 -->
-<!-- START SNIPPET: example -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-        <property name="locations">
-            <value>file:[#noparse]${activemq.conf}[/#noparse]/credentials.properties</value>
-        </property>
-    </bean>
-
-    <!--
-        The <broker> element is used to configure the ActiveMQ broker.
-    -->
-    <broker useJmx="true" xmlns="http://activemq.apache.org/schema/core" brokerName="${entity.brokerName}" dataDirectory="[#noparse]${activemq.data}[/#noparse]">
-
-        <!--
-            For better performances use VM cursor and small memory limit.
-            For more information, see:
-
-            http://activemq.apache.org/message-cursors.html
-
-            Also, if your producer is "hanging", it's probably due to producer flow control.
-            For more information, see:
-            http://activemq.apache.org/producer-flow-control.html
-        -->
-
-        <destinationPolicy>
-            <policyMap>
-              <policyEntries>
-                <policyEntry topic=">" producerFlowControl="true">
-                    <!-- The constantPendingMessageLimitStrategy is used to prevent
-                         slow topic consumers to block producers and affect other consumers
-                         by limiting the number of messages that are retained
-                         For more information, see:
-
-                         http://activemq.apache.org/slow-consumer-handling.html
-
-                    -->
-                  <pendingMessageLimitStrategy>
-                    <constantPendingMessageLimitStrategy limit="1000"/>
-                  </pendingMessageLimitStrategy>
-                </policyEntry>
-                <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
-                  <!-- Use VM cursor for better latency
-                       For more information, see:
-
-                       http://activemq.apache.org/message-cursors.html
-
-                  <pendingQueuePolicy>
-                    <vmQueueCursor/>
-                  </pendingQueuePolicy>
-                  -->
-                </policyEntry>
-              </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-
-        <!--
-            The managementContext is used to configure how ActiveMQ is exposed in
-            JMX. By default, ActiveMQ uses the MBean server that is started by
-            the JVM. For more information, see:
-
-            http://activemq.apache.org/jmx.html
-        -->
-        <managementContext>
-            [#if entity.jmxPort > 0]
-            <managementContext connectorPort="${entity.jmxPort?c}"/>
-            [#else]
-            <managementContext createConnector="false"/>
-            [/#if]
-        </managementContext>
-
-        <!--
-            Configure message persistence for the broker. The default persistence
-            mechanism is the KahaDB store (identified by the kahaDB tag).
-            For more information, see:
-
-            http://activemq.apache.org/persistence.html
-        -->
-        <persistenceAdapter>
-            <kahaDB directory="[#noparse]${activemq.data}[/#noparse]/kahadb"/>
-        </persistenceAdapter>
-
-
-          <!--
-            The systemUsage controls the maximum amount of space the broker will
-            use before slowing down producers. For more information, see:
-            http://activemq.apache.org/producer-flow-control.html
-            If using ActiveMQ embedded - the following limits could safely be used:
-
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-        -->
-          <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="64 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="100 gb"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="50 gb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-
-        <!--
-            The transport connectors expose ActiveMQ over a given protocol to
-            clients and other brokers. For more information, see:
-
-            http://activemq.apache.org/configuring-transports.html
-        -->
-        <transportConnectors>
-            <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:${entity.openWirePort?c}?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"/>
-        </transportConnectors>
-
-        <!-- destroy the spring context on shutdown to stop jetty -->
-        <shutdownHooks>
-            <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
-        </shutdownHooks>
-
-    </broker>
-
-    <!--
-        Enable web consoles, REST and Ajax APIs and demos
-
-        Take a look at [#noparse]${ACTIVEMQ_HOME}[/#noparse]/conf/jetty.xml for more details
-    -->
-    <import resource="jetty.xml"/>
-
-</beans>
-<!-- END SNIPPET: example -->

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/kafka/kafka-google-doorway.jpg
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/kafka/kafka-google-doorway.jpg b/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/kafka/kafka-google-doorway.jpg
deleted file mode 100644
index d600ef5..0000000
Binary files a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/kafka/kafka-google-doorway.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/kafka/server.properties
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/kafka/server.properties b/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/kafka/server.properties
deleted file mode 100644
index feb871f..0000000
--- a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/kafka/server.properties
+++ /dev/null
@@ -1,112 +0,0 @@
-[#ftl]
-#
-##
-# KafkaBroker configuration template for Brooklyn
-#
-# see kafka.server.KafkaConfig for additional details and defaults
-##
-
-############################# Server Basics #############################
-# The id of the broker. This must be set to a unique integer for each broker.
-broker.id=${entity.brokerId?c}
-
-############################# Socket Server Settings #############################
-
-# The port the socket server listens on
-port=${entity.kafkaPort?c}
-
-# Hostname the broker will bind to. If not set, the server will bind to all interfaces
-host.name=${driver.hostname}
-
-# Hostname the broker will advertise to producers and consumers. If not set, it uses the
-# value for "host.name" if configured.  Otherwise, it will use the value returned from
-# java.net.InetAddress.getCanonicalHostName().
-#advertised.host.name=<hostname routable by clients>
-
-# The port to publish to ZooKeeper for clients to use. If this is not set,
-# it will publish the same port that the broker binds to.
-#advertised.port=<port accessible by clients>
-
-# The number of threads handling network requests
-num.network.threads=3
- 
-# The number of threads doing disk I/O
-num.io.threads=8
-
-# The send buffer (SO_SNDBUF) used by the socket server
-socket.send.buffer.bytes=102400
-
-# The receive buffer (SO_RCVBUF) used by the socket server
-socket.receive.buffer.bytes=102400
-
-# The maximum size of a request that the socket server will accept (protection against OOM)
-max.socket.request.bytes=104857600
-
-
-############################# Log Basics #############################
-
-# The directory under which to store log files
-log.dir=${driver.runDir}/kafka-logs
-
-# The default number of log partitions per topic. More partitions allow greater
-# parallelism for consumption, but this will also result in more files across
-# the brokers.
-num.partitions=1
-
-# The number of threads per data directory to be used for log recovery at startup and flushing at shutdown.
-# This value is recommended to be increased for installations with data dirs located in RAID array.
-num.recovery.threads.per.data.dir=1
-
-############################# Log Flush Policy #############################
-
-# Messages are immediately written to the filesystem but by default we only fsync() to sync
-# the OS cache lazily. The following configurations control the flush of data to disk. 
-# There are a few important trade-offs here:
-#    1. Durability: Unflushed data may be lost if you are not using replication.
-#    2. Latency: Very large flush intervals may lead to latency spikes when the flush does occur as there will be a lot of data to flush.
-#    3. Throughput: The flush is generally the most expensive operation, and a small flush interval may lead to exceessive seeks. 
-# The settings below allow one to configure the flush policy to flush data after a period of time or
-# every N messages (or both). This can be done globally and overridden on a per-topic basis.
-
-# The number of messages to accept before forcing a flush of data to disk
-log.flush.interval.messages=10000
-
-# The maximum amount of time a message can sit in a log before we force a flush
-log.flush.interval.ms=1000
-
-############################# Log Retention Policy #############################
-
-# The following configurations control the disposal of log segments. The policy can
-# be set to delete segments after a period of time, or after a given size has accumulated.
-# A segment will be deleted whenever *either* of these criteria are met. Deletion always happens
-# from the end of the log.
-
-# The minimum age of a log file to be eligible for deletion
-log.retention.hours=168
-
-# A size-based retention policy for logs. Segments are pruned from the log as long as the remaining
-# segments don't drop below log.retention.bytes.
-#log.retention.bytes=1073741824
-
-# The maximum size of a log segment file. When this size is reached a new log segment will be created.
-log.segment.bytes=1073741824
-
-# The interval at which log segments are checked to see if they can be deleted according 
-# to the retention policies
-log.retention.check.interval.ms=300000
-
-# By default the log cleaner is disabled and the log retention policy will default to just delete segments after their retention expires.
-# If log.cleaner.enable=true is set the cleaner will be enabled and individual logs can then be marked for log compaction.
-log.cleaner.enable=false
-
-############################# Zookeeper #############################
-
-# Zookeeper connection string (see zookeeper docs for details).
-# This is a comma separated host:port pairs, each corresponding to a zk
-# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
-# You can also append an optional chroot string to the urls to specify the
-# root directory for all kafka znodes.
-zookeeper.connect=${entity.zookeeper.hostname}:${entity.zookeeper.zookeeperPort?c}
-
-# Timeout in ms for connecting to zookeeper
-zookeeper.connection.timeout.ms=1000000
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/kafka/zookeeper.properties
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/kafka/zookeeper.properties b/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/kafka/zookeeper.properties
deleted file mode 100644
index 646d2f1..0000000
--- a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/kafka/zookeeper.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-[#ftl]
-#
-
-##
-# KafkaZookeeper configuration template for Brooklyn
-##
-
-# the directory where the snapshot is stored.
-dataDir=${driver.runDir}/zookeeper
-# the port at which the clients will connect
-clientPort=${entity.zookeeperPort?c}
-# disable the per-ip limit on the number of connections since this is a non-production config
-maxClientCnxns=0

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/rabbit/rabbitmq.config
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/rabbit/rabbitmq.config b/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/rabbit/rabbitmq.config
deleted file mode 100644
index c350b65..0000000
--- a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/rabbit/rabbitmq.config
+++ /dev/null
@@ -1,6 +0,0 @@
-[
-<#if entity.enableManagementPlugin>
-    {rabbit, [{loopback_users, []}]},
-    {rabbitmq_mochiweb, [{listeners, [{mgmt, [{port, ${entity.managementPort?c}}]}]}]}
-</#if>
-].
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/storm/storm.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/storm/storm.yaml b/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/storm/storm.yaml
deleted file mode 100644
index 99f0c71..0000000
--- a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/storm/storm.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
-[#ftl]
-#
-# Storm Configuration
-[#if driver.zookeeperServers?has_content]
- storm.zookeeper.servers:
-[#list driver.zookeeperServers as zkServer]
-   - "${zkServer}"
-[/#list]
-[/#if]
-
- storm.local.dir: "${driver.localDir}"
-
-### ui.* configs are for the master
- ui.port: ${driver.uiPort?c}
- ui.childopts: "-Xmx768m"
-
-[#if driver.roleName == "ui"]
- nimbus.host: "${driver.nimbusHostname}"
-[/#if]
-
- nimbus.childopts: " ${driver.jvmOptsLine}"
- worker.childopts: " ${driver.jvmOptsLine}"
- supervisor.childopts: " ${driver.jvmOptsLine}" 
-  
-# ##### These may optionally be filled in:
-#    
-## List of custom serializations
-# topology.kryo.register:
-#     - org.mycompany.MyType
-#     - org.mycompany.MyType2: org.mycompany.MyType2Serializer
-#
-## List of custom kryo decorators
-# topology.kryo.decorators:
-#     - org.mycompany.MyDecorator
-#
-## Locations of the drpc servers
-# drpc.servers:
-#     - "server1"
-#     - "server2"

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/zookeeper/zoo.cfg
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/zookeeper/zoo.cfg b/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/zookeeper/zoo.cfg
deleted file mode 100644
index 79721a6..0000000
--- a/brooklyn-library/software/messaging/src/main/resources/org/apache/brooklyn/entity/messaging/zookeeper/zoo.cfg
+++ /dev/null
@@ -1,42 +0,0 @@
-[#ftl]
-#
-# 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.
-#
-
-##
-# ZooKeeper configuration template for Brooklyn
-##
-
-# The number of milliseconds of each tick
-tickTime=2000
-# The number of ticks that the initial
-# synchronization phase can take
-initLimit=10
-# The number of ticks that can pass between
-# sending a request and getting an acknowledgement
-syncLimit=5
-# the directory where the snapshot is stored.
-dataDir=${driver.runDir}/zookeeper
-# the port at which the clients will connect
-clientPort=${entity.zookeeperPort?c}
-# disable the per-ip limit on the number of connections since this is a non-production config
-maxClientCnxns=0
-
-[#list driver.zookeeperServers as zkServer]
-server.${zkServer.myid?c}=${zkServer.hostname}:${zkServer.leaderPort?c}:${zkServer.electionPort?c}
-[/#list]

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/resources/qpid-logo.jpeg
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/resources/qpid-logo.jpeg b/brooklyn-library/software/messaging/src/main/resources/qpid-logo.jpeg
deleted file mode 100644
index 91e7004..0000000
Binary files a/brooklyn-library/software/messaging/src/main/resources/qpid-logo.jpeg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/resources/redis-logo.jpeg
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/resources/redis-logo.jpeg b/brooklyn-library/software/messaging/src/main/resources/redis-logo.jpeg
deleted file mode 100644
index a14894b..0000000
Binary files a/brooklyn-library/software/messaging/src/main/resources/redis-logo.jpeg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQEc2LiveTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQEc2LiveTest.java
deleted file mode 100644
index 1210ef5..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQEc2LiveTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-public class ActiveMQEc2LiveTest extends AbstractEc2LiveTest {
-
-    /**
-     * Test that can install+start, and use, ActiveMQ.
-     */
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        String queueName = "testQueue";
-        int number = 10;
-        String content = "01234567890123456789012345678901";
-
-        // Start broker with a configured queue
-        ActiveMQBroker activeMQ = app.createAndManageChild(EntitySpec.create(ActiveMQBroker.class).configure("queue", queueName));
-        
-        app.start(ImmutableList.of(loc));
-        
-        EntityTestUtils.assertAttributeEqualsEventually(activeMQ, Startable.SERVICE_UP, true);
-
-        // Check queue created
-        assertEquals(ImmutableList.copyOf(activeMQ.getQueueNames()), ImmutableList.of(queueName));
-        assertEquals(activeMQ.getChildren().size(), 1);
-        assertEquals(activeMQ.getQueues().size(), 1);
-
-        // Get the named queue entity
-        ActiveMQQueue queue = activeMQ.getQueues().get(queueName);
-        assertNotNull(queue);
-
-        // Connect to broker using JMS and send messages
-        Connection connection = getActiveMQConnection(activeMQ);
-        clearQueue(connection, queueName);
-        EntityTestUtils.assertAttributeEqualsEventually(queue, ActiveMQQueue.QUEUE_DEPTH_MESSAGES, 0);
-        sendMessages(connection, number, queueName, content);
-
-        // Check messages arrived
-        EntityTestUtils.assertAttributeEqualsEventually(queue, ActiveMQQueue.QUEUE_DEPTH_MESSAGES, number);
-
-        connection.close();
-    }
-
-    private Connection getActiveMQConnection(ActiveMQBroker activeMQ) throws Exception {
-        int port = activeMQ.getAttribute(ActiveMQBroker.OPEN_WIRE_PORT);
-        String address = activeMQ.getAttribute(ActiveMQBroker.ADDRESS);
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(String.format("tcp://%s:%s", address, port));
-        Connection connection = factory.createConnection("admin", "activemq");
-        connection.start();
-        return connection;
-    }
-
-    private void sendMessages(Connection connection, int count, String queueName, String content) throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        org.apache.activemq.command.ActiveMQQueue destination = (org.apache.activemq.command.ActiveMQQueue) session.createQueue(queueName);
-        MessageProducer messageProducer = session.createProducer(destination);
-
-        for (int i = 0; i < count; i++) {
-            TextMessage message = session.createTextMessage(content);
-            messageProducer.send(message);
-        }
-
-        session.close();
-    }
-
-    private int clearQueue(Connection connection, String queueName) throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        org.apache.activemq.command.ActiveMQQueue destination = (org.apache.activemq.command.ActiveMQQueue) session.createQueue(queueName);
-        MessageConsumer messageConsumer = session.createConsumer(destination);
-
-        int received = 0;
-        while (messageConsumer.receive(500) != null) received++;
-
-        session.close();
-
-        return received;
-    }
-    
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this really does have test methods  
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQGoogleComputeLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQGoogleComputeLiveTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQGoogleComputeLiveTest.java
deleted file mode 100644
index f865cb1..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQGoogleComputeLiveTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import com.google.common.collect.ImmutableList;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.AbstractGoogleComputeLiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.Test;
-
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-
-public class ActiveMQGoogleComputeLiveTest extends AbstractGoogleComputeLiveTest {
-
-    /**
-     * Test that can install+start, and use, ActiveMQ.
-     */
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        String queueName = "testQueue";
-        int number = 10;
-        String content = "01234567890123456789012345678901";
-
-        // Start broker with a configured queue
-        ActiveMQBroker activeMQ = app.createAndManageChild(EntitySpec.create(ActiveMQBroker.class).configure("queue", queueName));
-        
-        app.start(ImmutableList.of(loc));
-        
-        EntityTestUtils.assertAttributeEqualsEventually(activeMQ, Startable.SERVICE_UP, true);
-
-        // Check queue created
-        assertEquals(ImmutableList.copyOf(activeMQ.getQueueNames()), ImmutableList.of(queueName));
-        assertEquals(activeMQ.getChildren().size(), 1);
-        assertEquals(activeMQ.getQueues().size(), 1);
-
-        // Get the named queue entity
-        ActiveMQQueue queue = activeMQ.getQueues().get(queueName);
-        assertNotNull(queue);
-
-        // Connect to broker using JMS and send messages
-        Connection connection = getActiveMQConnection(activeMQ);
-        clearQueue(connection, queueName);
-        EntityTestUtils.assertAttributeEqualsEventually(queue, ActiveMQQueue.QUEUE_DEPTH_MESSAGES, 0);
-        sendMessages(connection, number, queueName, content);
-
-        // Check messages arrived
-        EntityTestUtils.assertAttributeEqualsEventually(queue, ActiveMQQueue.QUEUE_DEPTH_MESSAGES, number);
-
-        connection.close();
-    }
-
-    private Connection getActiveMQConnection(ActiveMQBroker activeMQ) throws Exception {
-        int port = activeMQ.getAttribute(ActiveMQBroker.OPEN_WIRE_PORT);
-        String address = activeMQ.getAttribute(ActiveMQBroker.ADDRESS);
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(String.format("tcp://%s:%s", address, port));
-        Connection connection = factory.createConnection("admin", "activemq");
-        connection.start();
-        return connection;
-    }
-
-    private void sendMessages(Connection connection, int count, String queueName, String content) throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        org.apache.activemq.command.ActiveMQQueue destination = (org.apache.activemq.command.ActiveMQQueue) session.createQueue(queueName);
-        MessageProducer messageProducer = session.createProducer(destination);
-
-        for (int i = 0; i < count; i++) {
-            TextMessage message = session.createTextMessage(content);
-            messageProducer.send(message);
-        }
-
-        session.close();
-    }
-
-    private int clearQueue(Connection connection, String queueName) throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        org.apache.activemq.command.ActiveMQQueue destination = (org.apache.activemq.command.ActiveMQQueue) session.createQueue(queueName);
-        MessageConsumer messageConsumer = session.createConsumer(destination);
-
-        int received = 0;
-        while (messageConsumer.receive(500) != null) received++;
-
-        session.close();
-
-        return received;
-    }
-    
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this really does have test methods  
-}


[22/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeperSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeperSshDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeperSshDriver.java
deleted file mode 100644
index 5810bf7..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeperSshDriver.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import java.util.Map;
-
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-
-import static org.apache.brooklyn.util.text.StringEscapes.BashStringEscapes.escapeLiteralForDoubleQuotedBash;
-
-public class KafkaZooKeeperSshDriver extends AbstractfKafkaSshDriver implements KafkaZooKeeperDriver {
-
-    public KafkaZooKeeperSshDriver(KafkaZooKeeperImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    protected Map<String, Integer> getPortMap() {
-        return MutableMap.of("zookeeperPort", getZookeeperPort());
-    }
-
-    @Override
-    protected ConfigKey<String> getConfigTemplateKey() {
-        return KafkaZooKeeper.KAFKA_ZOOKEEPER_CONFIG_TEMPLATE;
-    }
-
-    @Override
-    protected String getConfigFileName() {
-        return "zookeeper.properties";
-    }
-
-    @Override
-    protected String getLaunchScriptName() {
-        return "zookeeper-server-start.sh";
-    }
-
-    @Override
-    protected String getTopicsScriptName() {
-        return "kafka-topics.sh";
-    }
-
-    @Override
-    protected String getProcessIdentifier() {
-        return "quorum\\.QuorumPeerMain";
-    }
-
-    @Override
-    public Integer getZookeeperPort() {
-        return getEntity().getAttribute(KafkaZooKeeper.ZOOKEEPER_PORT);
-    }
-
-    @Override
-    public void createTopic(String topic) {
-        String zookeeperUrl = getEntity().getAttribute(Attributes.HOSTNAME) + ":" + getZookeeperPort();
-        newScript(CUSTOMIZING)
-                .failOnNonZeroResultCode()
-                .body.append(String.format("./bin/%s  --create --zookeeper \"%s\" --replication-factor 1 --partitions 1 --topic \"%s\"",
-                                           getTopicsScriptName(),
-                                           escapeLiteralForDoubleQuotedBash(zookeeperUrl),
-                                           escapeLiteralForDoubleQuotedBash(topic)))
-                .execute();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidBroker.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidBroker.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidBroker.java
deleted file mode 100644
index 89189f7..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidBroker.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.qpid;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.messaging.MessageBroker;
-import org.apache.brooklyn.entity.messaging.amqp.AmqpServer;
-import org.apache.brooklyn.entity.messaging.jms.JMSBroker;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single Qpid broker instance, using AMQP 0-10.
- */
-@Catalog(name="Qpid Broker", description="Apache Qpid is an open-source messaging system, implementing the Advanced Message Queuing Protocol (AMQP)", iconUrl="classpath:///qpid-logo.jpeg")
-@ImplementedBy(QpidBrokerImpl.class)
-public interface QpidBroker extends SoftwareProcess, MessageBroker, UsesJmx, AmqpServer, JMSBroker<QpidQueue, QpidTopic> {
-
-    /* Qpid runtime file locations for convenience. */
-
-    public static final String CONFIG_XML = "etc/config.xml";
-    public static final String VIRTUALHOSTS_XML = "etc/virtualhosts.xml";
-    public static final String PASSWD = "etc/passwd";
-
-    @SetFromFlag("version")
-    public static final ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "0.20");
-    
-    @SetFromFlag("downloadUrl")
-    public static final BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            Attributes.DOWNLOAD_URL, "http://download.nextag.com/apache/qpid/${version}/qpid-java-broker-${version}.tar.gz");
-
-    @SetFromFlag("amqpPort")
-    public static final PortAttributeSensorAndConfigKey AMQP_PORT = AmqpServer.AMQP_PORT;
-
-    @SetFromFlag("virtualHost")
-    public static final BasicAttributeSensorAndConfigKey<String> VIRTUAL_HOST_NAME = AmqpServer.VIRTUAL_HOST_NAME;
-
-    @SetFromFlag("amqpVersion")
-    public static final BasicAttributeSensorAndConfigKey<String> AMQP_VERSION = new BasicAttributeSensorAndConfigKey<String>(
-            AmqpServer.AMQP_VERSION, AmqpServer.AMQP_0_10);
-    
-    @SetFromFlag("httpManagementPort")
-    public static final PortAttributeSensorAndConfigKey HTTP_MANAGEMENT_PORT = new PortAttributeSensorAndConfigKey("qpid.http-management.port", "Qpid HTTP management plugin port");
-
-    @SetFromFlag("jmxUser")
-    public static final BasicAttributeSensorAndConfigKey<String> JMX_USER = new BasicAttributeSensorAndConfigKey<String>(
-            UsesJmx.JMX_USER, "admin");
-    
-    @SetFromFlag("jmxPassword")
-    public static final BasicAttributeSensorAndConfigKey<String> JMX_PASSWORD = new BasicAttributeSensorAndConfigKey<String>(
-            UsesJmx.JMX_PASSWORD, "admin");
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidBrokerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidBrokerImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidBrokerImpl.java
deleted file mode 100644
index 67b132c..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidBrokerImpl.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.qpid;
-
-import static java.lang.String.format;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.entity.java.JmxSupport;
-import org.apache.brooklyn.entity.messaging.jms.JMSBrokerImpl;
-import org.apache.brooklyn.feed.jmx.JmxAttributePollConfig;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-import org.apache.brooklyn.feed.jmx.JmxHelper;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-import com.google.common.base.Objects.ToStringHelper;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single Qpid broker instance, using AMQP 0-10.
- */
-public class QpidBrokerImpl extends JMSBrokerImpl<QpidQueue, QpidTopic> implements QpidBroker {
-    private static final Logger log = LoggerFactory.getLogger(QpidBrokerImpl.class);
-
-    private volatile JmxFeed jmxFeed;
-
-    public QpidBrokerImpl() {
-        super();
-    }
-
-    public String getVirtualHost() { return getAttribute(VIRTUAL_HOST_NAME); }
-    public String getAmqpVersion() { return getAttribute(AMQP_VERSION); }
-    public Integer getAmqpPort() { return getAttribute(AMQP_PORT); }
-
-    public void setBrokerUrl() {
-        String urlFormat = "amqp://guest:guest@/%s?brokerlist='tcp://%s:%d'";
-        sensors().set(BROKER_URL, format(urlFormat, getAttribute(VIRTUAL_HOST_NAME), getAttribute(HOSTNAME), getAttribute(AMQP_PORT)));
-    }
-    
-    @Override
-    public void init() {
-        super.init();
-        new JmxSupport(this, null).recommendJmxRmiCustomAgent();
-    }
-
-    public void waitForServiceUp(long duration, TimeUnit units) {
-        super.waitForServiceUp(duration, units);
-
-        // Also wait for the MBean to exist (as used when creating queue/topic)
-        JmxHelper helper = new JmxHelper(this);
-        try {
-            String virtualHost = getConfig(QpidBroker.VIRTUAL_HOST_NAME);
-            ObjectName virtualHostManager = new ObjectName(format("org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=\"%s\"", virtualHost));
-            helper.connect();
-            helper.assertMBeanExistsEventually(virtualHostManager, units.toMillis(duration));
-        } catch (MalformedObjectNameException e) {
-            throw Exceptions.propagate(e);
-        } catch (IOException e) {
-            throw Exceptions.propagate(e);
-        } finally {
-            if (helper != null) helper.terminate();
-        }
-    }
-    
-    public QpidQueue createQueue(Map properties) {
-        QpidQueue result = addChild(EntitySpec.create(QpidQueue.class).configure(properties));
-        result.create();
-        return result;
-    }
-
-    public QpidTopic createTopic(Map properties) {
-        QpidTopic result = addChild(EntitySpec.create(QpidTopic.class).configure(properties));
-        result.create();
-        return result;
-    }
-
-    @Override
-    public Class getDriverInterface() {
-        return QpidDriver.class;
-    }
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        String serverInfoMBeanName = "org.apache.qpid:type=ServerInformation,name=ServerInformation";
-
-        jmxFeed = JmxFeed.builder()
-                .entity(this)
-                .period(500, TimeUnit.MILLISECONDS)
-                .pollAttribute(new JmxAttributePollConfig<Boolean>(SERVICE_UP)
-                        .objectName(serverInfoMBeanName)
-                        .attributeName("ProductVersion")
-                        .onSuccess(new Function<Object,Boolean>() {
-                                private boolean hasWarnedOfVersionMismatch;
-                                @Override public Boolean apply(Object input) {
-                                    if (input == null) return false;
-                                    if (!hasWarnedOfVersionMismatch && !getConfig(QpidBroker.SUGGESTED_VERSION).equals(input)) {
-                                        log.warn("Qpid version mismatch: ProductVersion is {}, requested version is {}", input, getConfig(QpidBroker.SUGGESTED_VERSION));
-                                        hasWarnedOfVersionMismatch = true;
-                                    }
-                                    return true;
-                                }})
-                        .onException(Functions.constant(false))
-                        .suppressDuplicates(true))
-                .build();
-    }
-
-    @Override
-    public void disconnectSensors() {
-        super.disconnectSensors();
-        if (jmxFeed != null) jmxFeed.stop();
-    }
-
-    @Override
-    protected ToStringHelper toStringHelper() {
-        return super.toStringHelper().add("amqpPort", getAmqpPort());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidDestination.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidDestination.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidDestination.java
deleted file mode 100644
index a73d079..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidDestination.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.qpid;
-
-import org.apache.brooklyn.entity.messaging.amqp.AmqpExchange;
-import org.apache.brooklyn.entity.messaging.jms.JMSDestination;
-
-public interface QpidDestination extends JMSDestination, AmqpExchange {
-    
-    public void create();
-    
-    /**
-     * Return the AMQP name for the queue.
-     */
-    public String getQueueName();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidDestinationImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidDestinationImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidDestinationImpl.java
deleted file mode 100644
index d475c5e..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidDestinationImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.qpid;
-
-import static java.lang.String.format;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.messaging.amqp.AmqpServer;
-import org.apache.brooklyn.entity.messaging.jms.JMSDestinationImpl;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-import org.apache.brooklyn.feed.jmx.JmxHelper;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-
-public abstract class QpidDestinationImpl extends JMSDestinationImpl implements QpidDestination {
-    public static final Logger log = LoggerFactory.getLogger(QpidDestination.class);
-    
-    @SetFromFlag
-    String virtualHost;
-
-    protected ObjectName virtualHostManager;
-    protected ObjectName exchange;
-    protected transient JmxHelper jmxHelper;
-    protected volatile JmxFeed jmxFeed;
-
-    public QpidDestinationImpl() {
-    }
-
-    @Override
-    public QpidBroker getParent() {
-        return (QpidBroker) super.getParent();
-    }
-    
-    @Override
-    public void onManagementStarting() {
-        super.onManagementStarting();
-        
-        // TODO Would be nice to share the JmxHelper for all destinations, so just one connection.
-        // But tricky for if brooklyn were distributed
-        try {
-            if (virtualHost == null) virtualHost = getConfig(QpidBroker.VIRTUAL_HOST_NAME);
-            sensors().set(QpidBroker.VIRTUAL_HOST_NAME, virtualHost);
-            virtualHostManager = new ObjectName(format("org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=\"%s\"", virtualHost));
-            jmxHelper = new JmxHelper((EntityLocal)getParent());
-        } catch (MalformedObjectNameException e) {
-            throw Exceptions.propagate(e);
-        }
-    }
-
-    @Override
-    protected void disconnectSensors() {
-        if (jmxFeed != null) jmxFeed.stop();
-    }
-
-    @Override
-    public void create() {
-        jmxHelper.operation(virtualHostManager, "createNewQueue", getName(), getParent().getAttribute(UsesJmx.JMX_USER), true);
-        jmxHelper.operation(exchange, "createNewBinding", getName(), getName());
-        connectSensors();
-    }
-    
-    @Override
-    public void delete() {
-        jmxHelper.operation(exchange, "removeBinding", getName(), getName());
-        jmxHelper.operation(virtualHostManager, "deleteQueue", getName());
-        disconnectSensors();
-    }
-
-    @Override
-    public String getQueueName() {
-
-        if (AmqpServer.AMQP_0_10.equals(getParent().getAmqpVersion())) {
-            return String.format("'%s'/'%s'; { assert: never }", getExchangeName(), getName());
-        } else {
-            return getName();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidDriver.java
deleted file mode 100644
index 225c8c9..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidDriver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.qpid;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-
-public interface QpidDriver extends JavaSoftwareProcessDriver {
-
-    Integer getAmqpPort();
-
-    String getAmqpVersion();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidQueue.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidQueue.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidQueue.java
deleted file mode 100644
index ed2ba36..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidQueue.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.qpid;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.entity.messaging.Queue;
-
-@ImplementedBy(QpidQueueImpl.class)
-public interface QpidQueue extends QpidDestination, Queue {
-    @Override
-    public String getExchangeName();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidQueueImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidQueueImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidQueueImpl.java
deleted file mode 100644
index 6362c54..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidQueueImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.qpid;
-
-import static java.lang.String.format;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import org.apache.brooklyn.entity.messaging.amqp.AmqpExchange;
-import org.apache.brooklyn.feed.jmx.JmxAttributePollConfig;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-
-public class QpidQueueImpl extends QpidDestinationImpl implements QpidQueue {
-    public QpidQueueImpl() {
-    }
-
-    @Override
-    public void onManagementStarting() {
-        super.onManagementStarting();
-        sensors().set(QUEUE_NAME, getName());
-        try {
-            exchange = new ObjectName(format("org.apache.qpid:type=VirtualHost.Exchange,VirtualHost=\"%s\",name=\"%s\",ExchangeType=direct", virtualHost, getExchangeName()));
-        } catch (MalformedObjectNameException e) {
-            throw Exceptions.propagate(e);
-        }
-    }
-
-    @Override
-    protected void connectSensors() {
-        String queue = format("org.apache.qpid:type=VirtualHost.Queue,VirtualHost=\"%s\",name=\"%s\"", virtualHost, getName());
-        
-        jmxFeed = JmxFeed.builder()
-                .entity(this)
-                .helper(jmxHelper)
-                .pollAttribute(new JmxAttributePollConfig<Integer>(QUEUE_DEPTH_BYTES)
-                        .objectName(queue)
-                        .attributeName("QueueDepth"))
-                .pollAttribute(new JmxAttributePollConfig<Integer>(QUEUE_DEPTH_MESSAGES)
-                        .objectName(queue)
-                        .attributeName("MessageCount"))
-                .build();
-    }
-
-    @Override
-    public String getExchangeName() {
-        return AmqpExchange.DIRECT;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidSshDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidSshDriver.java
deleted file mode 100644
index 3d1bc8f..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidSshDriver.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.qpid;
-
-import static java.lang.String.format;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-import com.google.common.collect.ImmutableMap;
-
-public class QpidSshDriver extends JavaSoftwareProcessSshDriver implements QpidDriver{
-
-    private static final Logger log = LoggerFactory.getLogger(QpidSshDriver.class);
-
-    public QpidSshDriver(QpidBrokerImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    protected String getLogFileLocation() { return Os.mergePaths(getRunDir(), "log", "qpid.log"); }
-
-    @Override
-    public Integer getAmqpPort() { return entity.getAttribute(QpidBroker.AMQP_PORT); }
-
-    @Override
-    public String getAmqpVersion() { return entity.getAttribute(QpidBroker.AMQP_VERSION); }
-
-    public Integer getHttpManagementPort() { return entity.getAttribute(QpidBroker.HTTP_MANAGEMENT_PORT); }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("qpid-broker-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = new LinkedList<String>();
-        commands.addAll( BashCommands.commandsToDownloadUrlsAs(urls, saveAs));
-        commands.add(BashCommands.INSTALL_TAR);
-        commands.add("tar xzfv "+saveAs);
-
-        newScript(INSTALLING)
-                .body.append(commands)
-                .execute();
-    }
-
-    @Override
-    public void customize() {
-        Networking.checkPortsValid(MutableMap.of("jmxPort", getJmxPort(), "amqpPort", getAmqpPort()));
-        newScript(CUSTOMIZING)
-                .body.append(
-                        format("cp -R %s/{bin,etc,lib} .", getExpandedInstallDir()),
-                        "mkdir lib/opt"
-                    )
-                .execute();
-    }
-
-    @Override
-    public void launch() {
-        newScript(ImmutableMap.of(USE_PID_FILE, false), LAUNCHING)
-                .body.append("nohup ./bin/qpid-server -b '*' > qpid-server-launch.log 2>&1 &")
-                .execute();
-    }
-
-    public String getPidFile() { return "qpid-server.pid"; }
-    
-    @Override
-    public boolean isRunning() {
-        return newScript(ImmutableMap.of(USE_PID_FILE, getPidFile()), CHECK_RUNNING).execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(ImmutableMap.of(USE_PID_FILE, getPidFile()), STOPPING).execute();
-    }
-
-    @Override
-    public void kill() {
-        newScript(ImmutableMap.of(USE_PID_FILE, getPidFile()), KILLING).execute();
-    }
-
-    @Override
-    public Map<String, Object> getCustomJavaSystemProperties() {
-        return MutableMap.<String, Object>builder()
-                .putAll(super.getCustomJavaSystemProperties())
-                .put("connector.port", getAmqpPort())
-                .put("management.enabled", "true")
-                .put("management.jmxport.registryServer", getRmiRegistryPort())
-                .put("management.jmxport.connectorServer", getJmxPort())
-                .put("management.http.enabled", Boolean.toString(getHttpManagementPort() != null))
-                .putIfNotNull("management.http.port", getHttpManagementPort())
-                .build();
-    }
-
-    @Override
-    public Map<String, String> getShellEnvironment() {
-        return MutableMap.<String, String>builder()
-                .putAll(super.getShellEnvironment())
-                .put("QPID_HOME", getRunDir())
-                .put("QPID_WORK", getRunDir())
-                .renameKey("JAVA_OPTS", "QPID_OPTS")
-                .build();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidTopic.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidTopic.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidTopic.java
deleted file mode 100644
index 1df9bb6..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidTopic.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.qpid;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.entity.messaging.Topic;
-
-@ImplementedBy(QpidTopicImpl.class)
-public interface QpidTopic extends QpidDestination, Topic {
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidTopicImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidTopicImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidTopicImpl.java
deleted file mode 100644
index 39b0667..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidTopicImpl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.qpid;
-
-import static java.lang.String.format;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import org.apache.brooklyn.entity.messaging.amqp.AmqpExchange;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-
-public class QpidTopicImpl extends QpidDestinationImpl implements QpidTopic {
-
-    public QpidTopicImpl() {
-    }
-
-    @Override
-    public void onManagementStarting() {
-        super.onManagementStarting();
-        sensors().set(TOPIC_NAME, getName());
-        try {
-            String virtualHost = getParent().getVirtualHost();
-            exchange = new ObjectName(format("org.apache.qpid:type=VirtualHost.Exchange,VirtualHost=\"%s\",name=\"%s\",ExchangeType=topic", virtualHost, getExchangeName()));
-        } catch (MalformedObjectNameException e) {
-            throw Exceptions.propagate(e);
-        }
-    }
-
-    // TODO sensors
-    @Override
-    public void connectSensors() {
-    }
-
-    @Override
-    public String getExchangeName() { return AmqpExchange.TOPIC; }
-
-    @Override
-    public String getTopicName() { return getQueueName(); }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitBroker.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitBroker.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitBroker.java
deleted file mode 100644
index 874bed8..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitBroker.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.rabbit;
-
-import java.util.Map;
-
-import com.google.common.annotations.Beta;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.messaging.MessageBroker;
-import org.apache.brooklyn.entity.messaging.amqp.AmqpServer;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single Rabbit MQ broker instance, using AMQP 0-9-1.
- */
-@Catalog(name="RabbitMQ Broker", description="RabbitMQ is an open source message broker software (i.e. message-oriented middleware) that implements the Advanced Message Queuing Protocol (AMQP) standard", iconUrl="classpath:///RabbitMQLogo.png")
-@ImplementedBy(RabbitBrokerImpl.class)
-public interface RabbitBroker extends SoftwareProcess, MessageBroker, AmqpServer {
-
-    @SetFromFlag("version")
-    public static final ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "3.6.0");
-
-    @SetFromFlag("downloadUrl")
-    public static final BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/rabbitmq-server-generic-unix-${version}.tar.xz");
-    
-    @SetFromFlag("erlangVersion")
-    public static final BasicConfigKey<String> ERLANG_VERSION = new BasicConfigKey<String>(String.class, "erlang.version", "Erlang runtime version", "18.2");
-
-    @SetFromFlag("erlangDebRepoUrl")
-    public static final BasicConfigKey<String> ERLANG_DEB_REPO_URL = new BasicConfigKey<String>(String.class, "erlang.deb.repo.url", 
-            "Deb file used to configure an external Erlang repository which provides up to date packages for Ubuntu/Debian", 
-            "http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb");
-
-    @SetFromFlag("rabbitmqConfigTemplateUrl")
-    ConfigKey<String> CONFIG_TEMPLATE_URL = ConfigKeys.newStringConfigKey(
-            "rabbitmq.templateUrl", "Template file (in freemarker format) for the rabbitmq.config config file",
-            "classpath://org/apache/brooklyn/entity/messaging/rabbit/rabbitmq.config");
-
-    @SetFromFlag("amqpPort")
-    public static final PortAttributeSensorAndConfigKey AMQP_PORT = AmqpServer.AMQP_PORT;
-
-    @SetFromFlag("virtualHost")
-    public static final BasicAttributeSensorAndConfigKey<String> VIRTUAL_HOST_NAME = AmqpServer.VIRTUAL_HOST_NAME;
-
-    @SetFromFlag("amqpVersion")
-    public static final BasicAttributeSensorAndConfigKey<String> AMQP_VERSION = new BasicAttributeSensorAndConfigKey<String>(
-            AmqpServer.AMQP_VERSION, AmqpServer.AMQP_0_9_1);
-
-    @SetFromFlag("managmentPort")
-    public static final PortAttributeSensorAndConfigKey MANAGEMENT_PORT = new PortAttributeSensorAndConfigKey(
-            "rabbitmq.management.port", "Port on which management interface will be available", "15672+");
-
-    public static AttributeSensor<String> MANAGEMENT_URL = Sensors.newStringSensor(
-            "rabbitmq.management.url", "Management URL is only available if management plugin flag is true");
-
-    @SetFromFlag("enableManagementPlugin")
-    public static final ConfigKey<Boolean> ENABLE_MANAGEMENT_PLUGIN = ConfigKeys.newBooleanConfigKey(
-            "rabbitmq.management.plugin", "Management plugin will be enabled", false);
-
-    RabbitQueue createQueue(Map properties);
-
-    // TODO required by RabbitDestination due to close-coupling between that and RabbitBroker; how best to improve?
-    @Beta
-    Map<String, String> getShellEnvironment();
-    
-    @Beta
-    String getRunDir();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitBrokerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitBrokerImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitBrokerImpl.java
deleted file mode 100644
index bdf7299..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitBrokerImpl.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.rabbit;
-
-import static java.lang.String.format;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Objects.ToStringHelper;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single Rabbit MQ broker instance, using AMQP 0-9-1.
- */
-public class RabbitBrokerImpl extends SoftwareProcessImpl implements RabbitBroker {
-    private static final Logger log = LoggerFactory.getLogger(RabbitBrokerImpl.class);
-
-    public String getVirtualHost() { return getAttribute(VIRTUAL_HOST_NAME); }
-    public String getAmqpVersion() { return getAttribute(AMQP_VERSION); }
-    public Integer getAmqpPort() { return getAttribute(AMQP_PORT); }
-
-    public RabbitBrokerImpl() {
-        super();
-    }
-
-    @Override
-    public RabbitDriver getDriver() {
-        return (RabbitDriver) super.getDriver();
-    }
-
-    @Override
-    public Map<String, String> getShellEnvironment() {
-        return getDriver().getShellEnvironment();
-    }
-    
-    @Override
-    public String getRunDir() {
-        return getDriver().getRunDir();
-    }
-    
-    @Override
-    protected void postStart() {
-        super.postStart();
-
-        getDriver().configure();
-
-        // TODO implement this using AMQP connection, no external mechanism available
-        // queueNames.each { String name -> addQueue(name) }
-    }
-
-    public void setBrokerUrl() {
-        String urlFormat = "amqp://guest:guest@%s:%d/%s";
-        sensors().set(BROKER_URL, format(urlFormat, getAttribute(HOSTNAME), getAttribute(AMQP_PORT), getAttribute(VIRTUAL_HOST_NAME)));
-    }
-
-    public RabbitQueue createQueue(Map properties) {
-        RabbitQueue result = addChild(EntitySpec.create(RabbitQueue.class).configure(properties));
-        result.create();
-        return result;
-    }
-
-    @Override
-    public Class<? extends RabbitDriver> getDriverInterface() {
-        return RabbitDriver.class;
-    }
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-
-        connectServiceUpIsRunning();
-
-        setBrokerUrl();
-
-        if (getEnableManagementPlugin()) {
-            sensors().set(MANAGEMENT_URL, format("http://%s:%s/", getAttribute(HOSTNAME), getAttribute(MANAGEMENT_PORT)));
-        }
-    }
-
-    @Override
-    public void disconnectSensors() {
-        super.disconnectSensors();
-        disconnectServiceUpIsRunning();
-    }
-
-    public boolean getEnableManagementPlugin() {
-        return Boolean.TRUE.equals(getConfig(ENABLE_MANAGEMENT_PLUGIN));
-    }
-
-    public Integer getManagementPort() {
-        return getAttribute(MANAGEMENT_PORT);
-    }
-
-    @Override
-    protected ToStringHelper toStringHelper() {
-        return super.toStringHelper().add("amqpPort", getAmqpPort());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitDestination.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitDestination.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitDestination.java
deleted file mode 100644
index 2756bf9..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitDestination.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.rabbit;
-
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.core.entity.AbstractEntity;
-import org.apache.brooklyn.entity.messaging.amqp.AmqpExchange;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-
-import com.google.common.base.Objects.ToStringHelper;
-import com.google.common.base.Predicates;
-import com.google.common.collect.Iterables;
-
-public abstract class RabbitDestination extends AbstractEntity implements AmqpExchange {
-    public static final Logger log = LoggerFactory.getLogger(RabbitDestination.class);
-    
-    private String virtualHost;
-    private String exchange;
-    protected SshMachineLocation machine;
-    protected Map<String,String> shellEnvironment;
-
-    public RabbitDestination() {
-    }
-
-    @Override
-    public void onManagementStarting() {
-        super.onManagementStarting();
-        
-        exchange = (getConfig(EXCHANGE_NAME) != null) ? getConfig(EXCHANGE_NAME) : getDefaultExchangeName();
-        virtualHost = getConfig(RabbitBroker.VIRTUAL_HOST_NAME);
-        sensors().set(RabbitBroker.VIRTUAL_HOST_NAME, virtualHost);
-        
-        machine = (SshMachineLocation) Iterables.find(getParent().getLocations(), Predicates.instanceOf(SshMachineLocation.class));
-        shellEnvironment = getParent().getShellEnvironment();
-    }
-
-    // FIXME Should return RabbitBroker; won't work if gets a proxy rather than "real" entity
-    @Override
-    public RabbitBroker getParent() {
-        return (RabbitBroker) super.getParent();
-    }
-    
-    public void create() {
-        connectSensors();
-    }
-    
-    public void delete() {
-        disconnectSensors();
-    }
-
-    protected void connectSensors() { }
-
-    protected void disconnectSensors() { }
-
-    public String getVirtualHost() {
-        return virtualHost;
-    }
-    
-    @Override
-    public String getExchangeName() { 
-        return exchange;
-    }
-    
-    public String getDefaultExchangeName() {
-        return AmqpExchange.DIRECT;
-    }
-
-    @Override
-    protected ToStringHelper toStringHelper() {
-        return super.toStringHelper().add("virtualHost", getParent().getVirtualHost()).add("exchange", getExchangeName());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitDriver.java
deleted file mode 100644
index 5b3ce2d..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitDriver.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.rabbit;
-
-import java.util.Map;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface RabbitDriver extends SoftwareProcessDriver {
-    
-    public void configure();
-    
-    public Map<String, String> getShellEnvironment();
-
-    public String getRunDir();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitQueue.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitQueue.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitQueue.java
deleted file mode 100644
index 03b3d68..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitQueue.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.rabbit;
-
-import org.apache.brooklyn.entity.messaging.Queue;
-import org.apache.brooklyn.feed.ssh.SshFeed;
-import org.apache.brooklyn.feed.ssh.SshPollConfig;
-import org.apache.brooklyn.feed.ssh.SshPollValue;
-
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-
-public class RabbitQueue extends RabbitDestination implements Queue {
-
-    private SshFeed sshFeed;
-
-    public RabbitQueue() {
-    }
-    
-    public String getName() {
-        return getDisplayName();
-    }
-
-    @Override
-    public void create() {
-        sensors().set(QUEUE_NAME, getName());
-        super.create();
-    }
-
-    @Override
-    protected void connectSensors() {
-        String runDir = getParent().getRunDir();
-        String cmd = String.format("%s/sbin/rabbitmqctl list_queues -p /%s  | grep '%s'", runDir, getVirtualHost(), getQueueName());
-        
-        sshFeed = SshFeed.builder()
-                .entity(this)
-                .machine(machine)
-                .poll(new SshPollConfig<Integer>(QUEUE_DEPTH_BYTES)
-                        .env(shellEnvironment)
-                        .command(cmd)
-                        .onFailure(Functions.constant(-1))
-                        .onSuccess(new Function<SshPollValue, Integer>() {
-                                @Override public Integer apply(SshPollValue input) {
-                                    return 0; // TODO parse out queue depth from output
-                                }}))
-                .poll(new SshPollConfig<Integer>(QUEUE_DEPTH_MESSAGES)
-                        .env(shellEnvironment)
-                        .command(cmd)
-                        .onFailure(Functions.constant(-1))
-                        .onSuccess(new Function<SshPollValue, Integer>() {
-                                @Override public Integer apply(SshPollValue input) {
-                                    return 0; // TODO parse out queue depth from output
-                                }}))
-                .build();
-    }
-    
-    @Override
-    protected void disconnectSensors() {
-        if (sshFeed != null) sshFeed.stop();
-        super.disconnectSensors();
-    }
-    
-    /**
-     * Return the AMQP name for the queue.
-     */
-    public String getQueueName() {
-        return getName();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitSshDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitSshDriver.java
deleted file mode 100644
index ad04d55..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitSshDriver.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.rabbit;
-
-import static java.lang.String.format;
-import static org.apache.brooklyn.util.ssh.BashCommands.*;
-
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.messaging.amqp.AmqpServer;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.text.Strings;
-
-/**
- * TODO javadoc
- */
-public class RabbitSshDriver extends AbstractSoftwareProcessSshDriver implements RabbitDriver {
-
-    private static final Logger log = LoggerFactory.getLogger(RabbitSshDriver.class);
-
-    // See http://fedoraproject.org/wiki/EPEL/FAQ#howtouse
-    private static final Map<String, String> CENTOS_VERSION_TO_EPEL_VERSION = ImmutableMap.of(
-        "5", "5-4",
-        "6", "6-8",
-        "7", "7-5"
-    );
-
-    public RabbitSshDriver(RabbitBrokerImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    protected String getLogFileLocation() { return getRunDir()+"/"+entity.getId()+".log"; }
-
-    public Integer getAmqpPort() { return entity.getAttribute(AmqpServer.AMQP_PORT); }
-
-    public String getVirtualHost() { return entity.getAttribute(AmqpServer.VIRTUAL_HOST_NAME); }
-
-    public String getErlangVersion() { return entity.getConfig(RabbitBroker.ERLANG_VERSION); }
-
-    @Override
-    public RabbitBrokerImpl getEntity() {
-        return (RabbitBrokerImpl) super.getEntity();
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("rabbitmq_server-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-
-        List<String> commands = ImmutableList.<String>builder()
-                // RabbitMQ recommends Erlang 18. Release notes state:
-                // ====
-                // Minimum required Erlang version is R16B03 for plain ("just TCP") connections for all protocols 
-                // and 17.5 for TLS ones (18.x is recommended for both).
-                // ====
-                //
-                // The recommended provider for up to date Erlang versions is Erlang Solutions now.
-                // Supported platforms by Erlang Solutions are: CentOS, RHEL, Ubuntu and Debian.
-                // 
-                // New Erlang versions for SUSE are provided via the openSUSE repositories
-                // 
-                // EPEL 6 provides only packages for Erlang 14, but EPEL 7 - Erlang 16
-                // 
-                .add(ifExecutableElse0("apt-get", getAptRepository()))
-                .add(ifExecutableElse0("yum", getYumRepository()))
-                .add(ifExecutableElse0("zypper", getZypperRepository()))
-                .add(installPackage( // NOTE only 'port' states the version of Erlang used, maybe remove this constraint?
-                        ImmutableMap.of(
-                                "port", "erlang@"+getErlangVersion()+"+ssl"),
-                                "erlang"))
-                .addAll(commandsToDownloadUrlsAs(urls, saveAs))
-                .add(installExecutable("tar"))
-                .add(format("tar xvf %s",saveAs))
-                .build();
-
-        newScript(INSTALLING).
-                failOnNonZeroResultCode().
-                body.append(commands).execute();
-    }
-
-    @Override
-    public void customize() {
-        Networking.checkPortsValid(MutableMap.of("amqpPort", getAmqpPort()));
-        ScriptHelper scriptHelper = newScript(CUSTOMIZING);
-
-        scriptHelper.body.append(
-                format("cp -R %s/* .", getExpandedInstallDir())
-        );
-
-        if (Boolean.TRUE.equals(entity.getConfig(RabbitBroker.ENABLE_MANAGEMENT_PLUGIN))) {
-            scriptHelper.body.append(
-                    "./sbin/rabbitmq-plugins enable rabbitmq_management"
-            );
-        }
-        scriptHelper.failOnNonZeroResultCode();
-        scriptHelper.execute();
-
-        copyTemplate(entity.getConfig(RabbitBroker.CONFIG_TEMPLATE_URL), getConfigPath() + ".config");
-    }
-
-    @Override
-    public void launch() {
-        newScript(MutableMap.of("usePidFile", false), LAUNCHING)
-            .body.append(
-                "nohup ./sbin/rabbitmq-server > console-out.log 2> console-err.log &",
-                "for i in {1..60}\n" +
-                    "do\n" +
-                     "    grep 'Starting broker... completed' console-out.log && exit\n" +
-                     "    sleep 1\n" +
-                     "done",
-                "echo \"Couldn't determine if rabbitmq-server is running\"",
-                "exit 1"
-            ).execute();
-    }
-
-    @Override
-    public void configure() {
-        newScript(CUSTOMIZING)
-            .body.append(
-                "./sbin/rabbitmqctl add_vhost "+getEntity().getVirtualHost(),
-                "./sbin/rabbitmqctl set_permissions -p "+getEntity().getVirtualHost()+" guest \".*\" \".*\" \".*\""
-            ).execute();
-    }
-
-    public String getPidFile() { return "rabbitmq.pid"; }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of("usePidFile", false), CHECK_RUNNING)
-                .body.append("./sbin/rabbitmqctl -q status")
-                .execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(MutableMap.of("usePidFile", false), STOPPING)
-                .body.append("./sbin/rabbitmqctl stop")
-                .execute();
-    }
-
-    @Override
-    public void kill() {
-        stop(); // TODO No pid file to easily do `kill -9`
-    }
-
-    @Override
-    public Map<String, String> getShellEnvironment() {
-        return MutableMap.<String, String>builder()
-                .putAll(super.getShellEnvironment())
-                .put("RABBITMQ_HOME", getRunDir())
-                .put("RABBITMQ_LOG_BASE", getRunDir())
-                .put("RABBITMQ_NODENAME", getEntity().getId())
-                .put("RABBITMQ_NODE_PORT", getAmqpPort().toString())
-                .put("RABBITMQ_PID_FILE", getRunDir()+"/"+getPidFile())
-                .put("RABBITMQ_CONFIG_FILE", getConfigPath())
-                .build();
-    }
-
-    private String getConfigPath() {
-        return getRunDir() + "/rabbitmq";
-    }
-
-    private String getYumRepository() {
-        String yumRepoFileName = "erlang_solutions.repo";
-        
-        // Version and architecture are only required for download of epel package on RHEL/Centos systems so pick sensible
-        // defaults if unavailable
-        //
-        // EPEL is still required as it is a prerequisite for the packages provided by Erlang Solutions
-        
-        String osMajorVersion = getMachine().getOsDetails().getVersion();
-        if (Strings.isBlank(osMajorVersion)) {
-            osMajorVersion = "7";
-        } else {
-            osMajorVersion = osMajorVersion.indexOf(".") > 0 ? osMajorVersion.substring(0, osMajorVersion.indexOf('.')) : osMajorVersion;
-            if (!CENTOS_VERSION_TO_EPEL_VERSION.keySet().contains(osMajorVersion)) {
-                osMajorVersion = "7";
-            }
-        }
-        String epelVersion = CENTOS_VERSION_TO_EPEL_VERSION.get(osMajorVersion);
-        String osArchitecture = getMachine().getOsDetails().getArch();
-        if (Strings.isBlank(osArchitecture)) {
-            osArchitecture = "x86_64";
-        }
-
-        // Erlang Solutions provide separate packages for RHEL and CentOS, but they are hosted in a single repo.
-        // E.g. - http://packages.erlang-solutions.com/rpm/centos/6/x86_64/
-        // 
-        // Erlang Solutions created a repo configuration RPM which can NOT be used on RedHat, because it has explicit checks for CentOS.
-        // 
-        // Bellow we are creating a repo file that works for CentOS and RedHat
-        return chainGroup(
-                sudo("yum -y update ca-certificates"),
-                sudo("rpm -Uvh --replacepkgs " + format("http://download.fedoraproject.org/pub/epel/%s/%s/epel-release-%s.noarch.rpm", osMajorVersion, osArchitecture, epelVersion)),
-                "( cat << 'EOF_BROOKLYN'\n"
-                   + "[erlang-solutions]\n"
-                   + "name=Centos / RHEL " + osMajorVersion + " - $basearch - Erlang Solutions\n"
-                   + "baseurl=http://packages.erlang-solutions.com/rpm/centos/" + osMajorVersion + "/$basearch\n"
-                   + "gpgcheck=0\n"
-                   + "gpgkey=http://packages.erlang-solutions.com/debian/erlang_solutions.asc\n"
-                   + "enabled=1\n"
-                   + "EOF_BROOKLYN\n"
-                   + ") > " + yumRepoFileName,
-                  sudo(format("mv %s /etc/yum.repos.d/", yumRepoFileName)),
-                  sudo(format("chown root:root /etc/yum.repos.d/%s", yumRepoFileName))
-            );
-    }
-
-    private String getAptRepository() {
-        String debFileName = "erlang-repo.deb";
-
-        return chainGroup(
-                INSTALL_WGET,
-                format("wget --quiet -O %s %s", debFileName, entity.getConfig(RabbitBroker.ERLANG_DEB_REPO_URL)),
-                sudo(format("dpkg -i %s", debFileName))
-            );
-    }
-
-    private String getZypperRepository() {
-        return chainGroup(
-                ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/devel:/languages:/erlang/SLE_11_SP3 erlang_sles_11")),
-                ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/devel:/languages:/erlang/openSUSE_11.4 erlang_suse_11")),
-                ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/devel:/languages:/erlang/openSUSE_12.3 erlang_suse_12")),
-                ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/devel:/languages:/erlang/openSUSE_13.1 erlang_suse_13")));
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/Storm.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/Storm.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/Storm.java
deleted file mode 100644
index 9b927cd..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/Storm.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.storm;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.config.render.RendererHints;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperEnsemble;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a Storm node (UI, Nimbus or Supervisor).
- */
-@Catalog(name="Storm Node", description="Apache Storm is a distributed realtime computation system. "
-        + "Storm makes it easy to reliably process unbounded streams of data, doing for realtime processing "
-        + "what Hadoop did for batch processing")
-@ImplementedBy(StormImpl.class)
-public interface Storm extends SoftwareProcess, UsesJmx {
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "0.8.2");
-
-    @SetFromFlag("nimbusHostname")
-    ConfigKey<String> NIMBUS_HOSTNAME = ConfigKeys.newStringConfigKey("storm.nimbus.hostname");
-    
-    @SetFromFlag("nimbusEntity")
-    ConfigKey<Entity> NIMBUS_ENTITY = ConfigKeys.newConfigKey(Entity.class, "storm.nimbus.entity");
-
-    @SetFromFlag("downloadUrl")
-    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "https://dl.dropboxusercontent.com/s/fl4kr7w0oc8ihdw/storm-${version}.zip");
-
-    ConfigKey<Object> START_MUTEX = ConfigKeys.newConfigKey(Object.class, "storm.start.mutex");
-
-    @SetFromFlag("role")
-    ConfigKey<Role> ROLE = ConfigKeys.newConfigKey(Role.class, "storm.role", "The Storm server role");
-
-    @SetFromFlag("localDir")
-    ConfigKey<String> LOCAL_DIR = ConfigKeys.newStringConfigKey("storm.local.dir", "Setting for Storm local dir");
-    
-    @SetFromFlag("uiPort")
-    PortAttributeSensorAndConfigKey UI_PORT = new PortAttributeSensorAndConfigKey("storm.ui.port", "Storm UI port", "8080+");
-
-    @SetFromFlag("thriftPort")
-    PortAttributeSensorAndConfigKey THRIFT_PORT = new PortAttributeSensorAndConfigKey("storm.thrift.port", "Storm Thrift port", "6627");
-
-    @SetFromFlag("zookeeperEnsemble")
-    ConfigKey<ZooKeeperEnsemble> ZOOKEEPER_ENSEMBLE = ConfigKeys.newConfigKey(ZooKeeperEnsemble.class,
-            "storm.zookeeper.ensemble", "Zookeeper ensemble entity");
-
-    @SetFromFlag("stormConfigTemplateUrl")
-    ConfigKey<String> STORM_CONFIG_TEMPLATE_URL = ConfigKeys.newStringConfigKey("storm.config.templateUrl",
-            "Template file (in freemarker format) for the storm.yaml config file",
-            "classpath://org/apache/brooklyn/entity/messaging/storm/storm.yaml");
-
-    @SetFromFlag("zeromqVersion")
-    ConfigKey<String> ZEROMQ_VERSION = ConfigKeys.newStringConfigKey("storm.zeromq.version", "zeromq version", "2.1.7");
-
-    AttributeSensor<Boolean> SERVICE_UP_JMX = Sensors.newBooleanSensor("storm.service.jmx.up", "Whether JMX is up for this service");
-
-    String getStormConfigTemplateUrl();
-
-    String getHostname();
-
-    Role getRole();
-    
-    enum Role { NIMBUS, SUPERVISOR, UI }
-
-    AttributeSensor<String> STORM_UI_URL = StormUiUrl.STORM_UI_URL;
-    
-    class StormUiUrl {
-        public static final AttributeSensor<String> STORM_UI_URL = Sensors.newStringSensor("storm.ui.url", "URL");
-
-        static {
-            RendererHints.register(STORM_UI_URL, RendererHints.namedActionWithUrl());
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormDeployment.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormDeployment.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormDeployment.java
deleted file mode 100644
index 7b95cca..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormDeployment.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.storm;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-@Catalog(name="Storm Deployment", description="A Storm cluster. Apache Storm is a distributed realtime computation system. "
-        + "Storm makes it easy to reliably process unbounded streams of data, doing for realtime processing "
-        + "what Hadoop did for batch processing")
-@ImplementedBy(StormDeploymentImpl.class)
-public interface StormDeployment extends Entity, Startable {
-
-    @SetFromFlag("supervisors.count")
-    ConfigKey<Integer> SUPERVISORS_COUNT = ConfigKeys.newConfigKey("storm.supervisors.count", "Number of supervisor nodes", 3);
-
-    @SetFromFlag("zookeepers.count")
-    ConfigKey<Integer> ZOOKEEPERS_COUNT = ConfigKeys.newConfigKey("storm.zookeepers.count", "Number of zookeeper nodes", 1);
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormDeploymentImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormDeploymentImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormDeploymentImpl.java
deleted file mode 100644
index 7b26ed9..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormDeploymentImpl.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.storm;
-
-import static org.apache.brooklyn.entity.messaging.storm.Storm.ROLE;
-import static org.apache.brooklyn.entity.messaging.storm.Storm.Role.NIMBUS;
-import static org.apache.brooklyn.entity.messaging.storm.Storm.Role.SUPERVISOR;
-import static org.apache.brooklyn.entity.messaging.storm.Storm.Role.UI;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.stock.BasicStartableImpl;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperEnsemble;
-import org.apache.brooklyn.util.core.ResourceUtils;
-
-public class StormDeploymentImpl extends BasicStartableImpl implements StormDeployment {
-
-    @SuppressWarnings("unused")
-    private static final Logger log = LoggerFactory.getLogger(StormDeploymentImpl.class);
-
-    @Override
-    public void init() {
-        super.init();
-        new ResourceUtils(this).checkUrlExists(Storm.STORM_CONFIG_TEMPLATE_URL.getDefaultValue());
-        
-        setDefaultDisplayName("Storm Deployment");
-        
-        ZooKeeperEnsemble zooKeeperEnsemble = addChild(EntitySpec.create(
-            ZooKeeperEnsemble.class).configure(
-                ZooKeeperEnsemble.INITIAL_SIZE, getConfig(ZOOKEEPERS_COUNT)));
-        
-        config().set(Storm.ZOOKEEPER_ENSEMBLE, zooKeeperEnsemble);
-        
-        Storm nimbus = addChild(EntitySpec.create(Storm.class).configure(ROLE, NIMBUS));
-        
-        config().set(Storm.NIMBUS_ENTITY, nimbus);
-        config().set(Storm.START_MUTEX, new Object());
-        
-        addChild(EntitySpec.create(DynamicCluster.class)
-            .configure(DynamicCluster.MEMBER_SPEC, 
-                EntitySpec.create(Storm.class).configure(ROLE, SUPERVISOR))
-            .configure(DynamicCluster.INITIAL_SIZE, getConfig(SUPERVISORS_COUNT))
-            .displayName("Storm Supervisor Cluster"));
-        
-        Storm ui = addChild(EntitySpec.create(Storm.class).configure(ROLE, UI));
-        
-        enrichers().add(Enrichers.builder()
-                .propagating(Storm.STORM_UI_URL)
-                .from(ui)
-                .build());
-        enrichers().add(Enrichers.builder()
-                .propagating(Attributes.HOSTNAME)
-                .from(nimbus)
-                .build());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormDriver.java
deleted file mode 100644
index 35bdd9f..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/storm/StormDriver.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.storm;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-
-public interface StormDriver extends JavaSoftwareProcessDriver {
-
-    String getJvmOptsLine();
-    
-}


[41/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-resource.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-resource.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-resource.js
deleted file mode 100644
index 1c4b71f..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-resource.js
+++ /dev/null
@@ -1,619 +0,0 @@
-/**
- * @license AngularJS v1.2.19
- * (c) 2010-2014 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-var $resourceMinErr = angular.$$minErr('$resource');
-
-// Helper functions and regex to lookup a dotted path on an object
-// stopping at undefined/null.  The path must be composed of ASCII
-// identifiers (just like $parse)
-var MEMBER_NAME_REGEX = /^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;
-
-function isValidDottedPath(path) {
-  return (path != null && path !== '' && path !== 'hasOwnProperty' &&
-      MEMBER_NAME_REGEX.test('.' + path));
-}
-
-function lookupDottedPath(obj, path) {
-  if (!isValidDottedPath(path)) {
-    throw $resourceMinErr('badmember', 'Dotted member path "@{0}" is invalid.', path);
-  }
-  var keys = path.split('.');
-  for (var i = 0, ii = keys.length; i < ii && obj !== undefined; i++) {
-    var key = keys[i];
-    obj = (obj !== null) ? obj[key] : undefined;
-  }
-  return obj;
-}
-
-/**
- * Create a shallow copy of an object and clear other fields from the destination
- */
-function shallowClearAndCopy(src, dst) {
-  dst = dst || {};
-
-  angular.forEach(dst, function(value, key){
-    delete dst[key];
-  });
-
-  for (var key in src) {
-    if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
-      dst[key] = src[key];
-    }
-  }
-
-  return dst;
-}
-
-/**
- * @ngdoc module
- * @name ngResource
- * @description
- *
- * # ngResource
- *
- * The `ngResource` module provides interaction support with RESTful services
- * via the $resource service.
- *
- *
- * <div doc-module-components="ngResource"></div>
- *
- * See {@link ngResource.$resource `$resource`} for usage.
- */
-
-/**
- * @ngdoc service
- * @name $resource
- * @requires $http
- *
- * @description
- * A factory which creates a resource object that lets you interact with
- * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.
- *
- * The returned resource object has action methods which provide high-level behaviors without
- * the need to interact with the low level {@link ng.$http $http} service.
- *
- * Requires the {@link ngResource `ngResource`} module to be installed.
- *
- * @param {string} url A parametrized URL template with parameters prefixed by `:` as in
- *   `/user/:username`. If you are using a URL with a port number (e.g.
- *   `http://example.com:8080/api`), it will be respected.
- *
- *   If you are using a url with a suffix, just add the suffix, like this:
- *   `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')`
- *   or even `$resource('http://example.com/resource/:resource_id.:format')`
- *   If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be
- *   collapsed down to a single `.`.  If you need this sequence to appear and not collapse then you
- *   can escape it with `/\.`.
- *
- * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in
- *   `actions` methods. If any of the parameter value is a function, it will be executed every time
- *   when a param value needs to be obtained for a request (unless the param was overridden).
- *
- *   Each key value in the parameter object is first bound to url template if present and then any
- *   excess keys are appended to the url search query after the `?`.
- *
- *   Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
- *   URL `/path/greet?salutation=Hello`.
- *
- *   If the parameter value is prefixed with `@` then the value of that parameter will be taken
- *   from the corresponding key on the data object (useful for non-GET operations).
- *
- * @param {Object.<Object>=} actions Hash with declaration of custom action that should extend
- *   the default set of resource actions. The declaration should be created in the format of {@link
- *   ng.$http#usage_parameters $http.config}:
- *
- *       {action1: {method:?, params:?, isArray:?, headers:?, ...},
- *        action2: {method:?, params:?, isArray:?, headers:?, ...},
- *        ...}
- *
- *   Where:
- *
- *   - **`action`** – {string} – The name of action. This name becomes the name of the method on
- *     your resource object.
- *   - **`method`** – {string} – HTTP request method. Valid methods are: `GET`, `POST`, `PUT`,
- *     `DELETE`, and `JSONP`.
- *   - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of
- *     the parameter value is a function, it will be executed every time when a param value needs to
- *     be obtained for a request (unless the param was overridden).
- *   - **`url`** – {string} – action specific `url` override. The url templating is supported just
- *     like for the resource-level urls.
- *   - **`isArray`** – {boolean=} – If true then the returned object for this action is an array,
- *     see `returns` section.
- *   - **`transformRequest`** –
- *     `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
- *     transform function or an array of such functions. The transform function takes the http
- *     request body and headers and returns its transformed (typically serialized) version.
- *   - **`transformResponse`** –
- *     `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
- *     transform function or an array of such functions. The transform function takes the http
- *     response body and headers and returns its transformed (typically deserialized) version.
- *   - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
- *     GET request, otherwise if a cache instance built with
- *     {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
- *     caching.
- *   - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that
- *     should abort the request when resolved.
- *   - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the
- *     XHR object. See
- *     [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)
- *     for more information.
- *   - **`responseType`** - `{string}` - see
- *     [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).
- *   - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -
- *     `response` and `responseError`. Both `response` and `responseError` interceptors get called
- *     with `http response` object. See {@link ng.$http $http interceptors}.
- *
- * @returns {Object} A resource "class" object with methods for the default set of resource actions
- *   optionally extended with custom `actions`. The default set contains these actions:
- *   ```js
- *   { 'get':    {method:'GET'},
- *     'save':   {method:'POST'},
- *     'query':  {method:'GET', isArray:true},
- *     'remove': {method:'DELETE'},
- *     'delete': {method:'DELETE'} };
- *   ```
- *
- *   Calling these methods invoke an {@link ng.$http} with the specified http method,
- *   destination and parameters. When the data is returned from the server then the object is an
- *   instance of the resource class. The actions `save`, `remove` and `delete` are available on it
- *   as  methods with the `$` prefix. This allows you to easily perform CRUD operations (create,
- *   read, update, delete) on server-side data like this:
- *   ```js
- *   var User = $resource('/user/:userId', {userId:'@id'});
- *   var user = User.get({userId:123}, function() {
- *     user.abc = true;
- *     user.$save();
- *   });
- *   ```
- *
- *   It is important to realize that invoking a $resource object method immediately returns an
- *   empty reference (object or array depending on `isArray`). Once the data is returned from the
- *   server the existing reference is populated with the actual data. This is a useful trick since
- *   usually the resource is assigned to a model which is then rendered by the view. Having an empty
- *   object results in no rendering, once the data arrives from the server then the object is
- *   populated with the data and the view automatically re-renders itself showing the new data. This
- *   means that in most cases one never has to write a callback function for the action methods.
- *
- *   The action methods on the class object or instance object can be invoked with the following
- *   parameters:
- *
- *   - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])`
- *   - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])`
- *   - non-GET instance actions:  `instance.$action([parameters], [success], [error])`
- *
- *   Success callback is called with (value, responseHeaders) arguments. Error callback is called
- *   with (httpResponse) argument.
- *
- *   Class actions return empty instance (with additional properties below).
- *   Instance actions return promise of the action.
- *
- *   The Resource instances and collection have these additional properties:
- *
- *   - `$promise`: the {@link ng.$q promise} of the original server interaction that created this
- *     instance or collection.
- *
- *     On success, the promise is resolved with the same resource instance or collection object,
- *     updated with data from server. This makes it easy to use in
- *     {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view
- *     rendering until the resource(s) are loaded.
- *
- *     On failure, the promise is resolved with the {@link ng.$http http response} object, without
- *     the `resource` property.
- *
- *     If an interceptor object was provided, the promise will instead be resolved with the value
- *     returned by the interceptor.
- *
- *   - `$resolved`: `true` after first server interaction is completed (either with success or
- *      rejection), `false` before that. Knowing if the Resource has been resolved is useful in
- *      data-binding.
- *
- * @example
- *
- * # Credit card resource
- *
- * ```js
-     // Define CreditCard class
-     var CreditCard = $resource('/user/:userId/card/:cardId',
-      {userId:123, cardId:'@id'}, {
-       charge: {method:'POST', params:{charge:true}}
-      });
-
-     // We can retrieve a collection from the server
-     var cards = CreditCard.query(function() {
-       // GET: /user/123/card
-       // server returns: [ {id:456, number:'1234', name:'Smith'} ];
-
-       var card = cards[0];
-       // each item is an instance of CreditCard
-       expect(card instanceof CreditCard).toEqual(true);
-       card.name = "J. Smith";
-       // non GET methods are mapped onto the instances
-       card.$save();
-       // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
-       // server returns: {id:456, number:'1234', name: 'J. Smith'};
-
-       // our custom method is mapped as well.
-       card.$charge({amount:9.99});
-       // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}
-     });
-
-     // we can create an instance as well
-     var newCard = new CreditCard({number:'0123'});
-     newCard.name = "Mike Smith";
-     newCard.$save();
-     // POST: /user/123/card {number:'0123', name:'Mike Smith'}
-     // server returns: {id:789, number:'0123', name: 'Mike Smith'};
-     expect(newCard.id).toEqual(789);
- * ```
- *
- * The object returned from this function execution is a resource "class" which has "static" method
- * for each action in the definition.
- *
- * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and
- * `headers`.
- * When the data is returned from the server then the object is an instance of the resource type and
- * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
- * operations (create, read, update, delete) on server-side data.
-
-   ```js
-     var User = $resource('/user/:userId', {userId:'@id'});
-     User.get({userId:123}, function(user) {
-       user.abc = true;
-       user.$save();
-     });
-   ```
- *
- * It's worth noting that the success callback for `get`, `query` and other methods gets passed
- * in the response that came from the server as well as $http header getter function, so one
- * could rewrite the above example and get access to http headers as:
- *
-   ```js
-     var User = $resource('/user/:userId', {userId:'@id'});
-     User.get({userId:123}, function(u, getResponseHeaders){
-       u.abc = true;
-       u.$save(function(u, putResponseHeaders) {
-         //u => saved user object
-         //putResponseHeaders => $http header getter
-       });
-     });
-   ```
- *
- * You can also access the raw `$http` promise via the `$promise` property on the object returned
- *
-   ```
-     var User = $resource('/user/:userId', {userId:'@id'});
-     User.get({userId:123})
-         .$promise.then(function(user) {
-           $scope.user = user;
-         });
-   ```
-
- * # Creating a custom 'PUT' request
- * In this example we create a custom method on our resource to make a PUT request
- * ```js
- *		var app = angular.module('app', ['ngResource', 'ngRoute']);
- *
- *		// Some APIs expect a PUT request in the format URL/object/ID
- *		// Here we are creating an 'update' method
- *		app.factory('Notes', ['$resource', function($resource) {
- *    return $resource('/notes/:id', null,
- *        {
- *            'update': { method:'PUT' }
- *        });
- *		}]);
- *
- *		// In our controller we get the ID from the URL using ngRoute and $routeParams
- *		// We pass in $routeParams and our Notes factory along with $scope
- *		app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',
-                                      function($scope, $routeParams, Notes) {
- *    // First get a note object from the factory
- *    var note = Notes.get({ id:$routeParams.id });
- *    $id = note.id;
- *
- *    // Now call update passing in the ID first then the object you are updating
- *    Notes.update({ id:$id }, note);
- *
- *    // This will PUT /notes/ID with the note object in the request payload
- *		}]);
- * ```
- */
-angular.module('ngResource', ['ng']).
-  factory('$resource', ['$http', '$q', function($http, $q) {
-
-    var DEFAULT_ACTIONS = {
-      'get':    {method:'GET'},
-      'save':   {method:'POST'},
-      'query':  {method:'GET', isArray:true},
-      'remove': {method:'DELETE'},
-      'delete': {method:'DELETE'}
-    };
-    var noop = angular.noop,
-        forEach = angular.forEach,
-        extend = angular.extend,
-        copy = angular.copy,
-        isFunction = angular.isFunction;
-
-    /**
-     * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
-     * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
-     * segments:
-     *    segment       = *pchar
-     *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
-     *    pct-encoded   = "%" HEXDIG HEXDIG
-     *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
-     *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
-     *                     / "*" / "+" / "," / ";" / "="
-     */
-    function encodeUriSegment(val) {
-      return encodeUriQuery(val, true).
-        replace(/%26/gi, '&').
-        replace(/%3D/gi, '=').
-        replace(/%2B/gi, '+');
-    }
-
-
-    /**
-     * This method is intended for encoding *key* or *value* parts of query component. We need a
-     * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't
-     * have to be encoded per http://tools.ietf.org/html/rfc3986:
-     *    query       = *( pchar / "/" / "?" )
-     *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
-     *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
-     *    pct-encoded   = "%" HEXDIG HEXDIG
-     *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
-     *                     / "*" / "+" / "," / ";" / "="
-     */
-    function encodeUriQuery(val, pctEncodeSpaces) {
-      return encodeURIComponent(val).
-        replace(/%40/gi, '@').
-        replace(/%3A/gi, ':').
-        replace(/%24/g, '$').
-        replace(/%2C/gi, ',').
-        replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
-    }
-
-    function Route(template, defaults) {
-      this.template = template;
-      this.defaults = defaults || {};
-      this.urlParams = {};
-    }
-
-    Route.prototype = {
-      setUrlParams: function(config, params, actionUrl) {
-        var self = this,
-            url = actionUrl || self.template,
-            val,
-            encodedVal;
-
-        var urlParams = self.urlParams = {};
-        forEach(url.split(/\W/), function(param){
-          if (param === 'hasOwnProperty') {
-            throw $resourceMinErr('badname', "hasOwnProperty is not a valid parameter name.");
-          }
-          if (!(new RegExp("^\\d+$").test(param)) && param &&
-               (new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) {
-            urlParams[param] = true;
-          }
-        });
-        url = url.replace(/\\:/g, ':');
-
-        params = params || {};
-        forEach(self.urlParams, function(_, urlParam){
-          val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];
-          if (angular.isDefined(val) && val !== null) {
-            encodedVal = encodeUriSegment(val);
-            url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), function(match, p1) {
-              return encodedVal + p1;
-            });
-          } else {
-            url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function(match,
-                leadingSlashes, tail) {
-              if (tail.charAt(0) == '/') {
-                return tail;
-              } else {
-                return leadingSlashes + tail;
-              }
-            });
-          }
-        });
-
-        // strip trailing slashes and set the url
-        url = url.replace(/\/+$/, '') || '/';
-        // then replace collapse `/.` if found in the last URL path segment before the query
-        // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x`
-        url = url.replace(/\/\.(?=\w+($|\?))/, '.');
-        // replace escaped `/\.` with `/.`
-        config.url = url.replace(/\/\\\./, '/.');
-
-
-        // set params - delegate param encoding to $http
-        forEach(params, function(value, key){
-          if (!self.urlParams[key]) {
-            config.params = config.params || {};
-            config.params[key] = value;
-          }
-        });
-      }
-    };
-
-
-    function resourceFactory(url, paramDefaults, actions) {
-      var route = new Route(url);
-
-      actions = extend({}, DEFAULT_ACTIONS, actions);
-
-      function extractParams(data, actionParams){
-        var ids = {};
-        actionParams = extend({}, paramDefaults, actionParams);
-        forEach(actionParams, function(value, key){
-          if (isFunction(value)) { value = value(); }
-          ids[key] = value && value.charAt && value.charAt(0) == '@' ?
-            lookupDottedPath(data, value.substr(1)) : value;
-        });
-        return ids;
-      }
-
-      function defaultResponseInterceptor(response) {
-        return response.resource;
-      }
-
-      function Resource(value){
-        shallowClearAndCopy(value || {}, this);
-      }
-
-      forEach(actions, function(action, name) {
-        var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);
-
-        Resource[name] = function(a1, a2, a3, a4) {
-          var params = {}, data, success, error;
-
-          /* jshint -W086 */ /* (purposefully fall through case statements) */
-          switch(arguments.length) {
-          case 4:
-            error = a4;
-            success = a3;
-            //fallthrough
-          case 3:
-          case 2:
-            if (isFunction(a2)) {
-              if (isFunction(a1)) {
-                success = a1;
-                error = a2;
-                break;
-              }
-
-              success = a2;
-              error = a3;
-              //fallthrough
-            } else {
-              params = a1;
-              data = a2;
-              success = a3;
-              break;
-            }
-          case 1:
-            if (isFunction(a1)) success = a1;
-            else if (hasBody) data = a1;
-            else params = a1;
-            break;
-          case 0: break;
-          default:
-            throw $resourceMinErr('badargs',
-              "Expected up to 4 arguments [params, data, success, error], got {0} arguments",
-              arguments.length);
-          }
-          /* jshint +W086 */ /* (purposefully fall through case statements) */
-
-          var isInstanceCall = this instanceof Resource;
-          var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data));
-          var httpConfig = {};
-          var responseInterceptor = action.interceptor && action.interceptor.response ||
-                                    defaultResponseInterceptor;
-          var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||
-                                    undefined;
-
-          forEach(action, function(value, key) {
-            if (key != 'params' && key != 'isArray' && key != 'interceptor') {
-              httpConfig[key] = copy(value);
-            }
-          });
-
-          if (hasBody) httpConfig.data = data;
-          route.setUrlParams(httpConfig,
-                             extend({}, extractParams(data, action.params || {}), params),
-                             action.url);
-
-          var promise = $http(httpConfig).then(function (response) {
-            var data = response.data,
-              promise = value.$promise;
-
-            if (data) {
-              // Need to convert action.isArray to boolean in case it is undefined
-              // jshint -W018
-              if (angular.isArray(data) !== (!!action.isArray)) {
-                throw $resourceMinErr('badcfg',
-                    'Error in resource configuration. Expected ' +
-                    'response to contain an {0} but got an {1}',
-                  action.isArray ? 'array' : 'object',
-                  angular.isArray(data) ? 'array' : 'object');
-              }
-              // jshint +W018
-              if (action.isArray) {
-                value.length = 0;
-                forEach(data, function (item) {
-                  if (typeof item === "object") {
-                    value.push(new Resource(item));
-                  } else {
-                    // Valid JSON values may be string literals, and these should not be converted
-                    // into objects. These items will not have access to the Resource prototype
-                    // methods, but unfortunately there
-                    value.push(item);
-                  }
-                });
-              } else {
-                shallowClearAndCopy(data, value);
-                value.$promise = promise;
-              }
-            }
-
-            value.$resolved = true;
-
-            response.resource = value;
-
-            return response;
-          }, function(response) {
-            value.$resolved = true;
-
-            (error||noop)(response);
-
-            return $q.reject(response);
-          });
-
-          promise = promise.then(
-              function(response) {
-                var value = responseInterceptor(response);
-                (success||noop)(value, response.headers);
-                return value;
-              },
-              responseErrorInterceptor);
-
-          if (!isInstanceCall) {
-            // we are creating instance / collection
-            // - set the initial promise
-            // - return the instance / collection
-            value.$promise = promise;
-            value.$resolved = false;
-
-            return value;
-          }
-
-          // instance call
-          return promise;
-        };
-
-
-        Resource.prototype['$' + name] = function(params, success, error) {
-          if (isFunction(params)) {
-            error = success; success = params; params = {};
-          }
-          var result = Resource[name].call(this, params, this, success, error);
-          return result.$promise || result;
-        };
-      });
-
-      Resource.bind = function(additionalParamDefaults){
-        return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);
-      };
-
-      return Resource;
-    }
-
-    return resourceFactory;
-  }]);
-
-
-})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-resource.min.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-resource.min.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-resource.min.js
deleted file mode 100644
index 17e607d..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-resource.min.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- AngularJS v1.2.19
- (c) 2010-2014 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(H,a,A){'use strict';function D(p,g){g=g||{};a.forEach(g,function(a,c){delete g[c]});for(var c in p)!p.hasOwnProperty(c)||"$"===c.charAt(0)&&"$"===c.charAt(1)||(g[c]=p[c]);return g}var v=a.$$minErr("$resource"),C=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;a.module("ngResource",["ng"]).factory("$resource",["$http","$q",function(p,g){function c(a,c){this.template=a;this.defaults=c||{};this.urlParams={}}function t(n,w,l){function r(h,d){var e={};d=x({},w,d);s(d,function(b,d){u(b)&&(b=b());var k;if(b&&
-b.charAt&&"@"==b.charAt(0)){k=h;var a=b.substr(1);if(null==a||""===a||"hasOwnProperty"===a||!C.test("."+a))throw v("badmember",a);for(var a=a.split("."),f=0,c=a.length;f<c&&k!==A;f++){var g=a[f];k=null!==k?k[g]:A}}else k=b;e[d]=k});return e}function e(a){return a.resource}function f(a){D(a||{},this)}var F=new c(n);l=x({},B,l);s(l,function(h,d){var c=/^(POST|PUT|PATCH)$/i.test(h.method);f[d]=function(b,d,k,w){var q={},n,l,y;switch(arguments.length){case 4:y=w,l=k;case 3:case 2:if(u(d)){if(u(b)){l=
-b;y=d;break}l=d;y=k}else{q=b;n=d;l=k;break}case 1:u(b)?l=b:c?n=b:q=b;break;case 0:break;default:throw v("badargs",arguments.length);}var t=this instanceof f,m=t?n:h.isArray?[]:new f(n),z={},B=h.interceptor&&h.interceptor.response||e,C=h.interceptor&&h.interceptor.responseError||A;s(h,function(a,b){"params"!=b&&("isArray"!=b&&"interceptor"!=b)&&(z[b]=G(a))});c&&(z.data=n);F.setUrlParams(z,x({},r(n,h.params||{}),q),h.url);q=p(z).then(function(b){var d=b.data,k=m.$promise;if(d){if(a.isArray(d)!==!!h.isArray)throw v("badcfg",
-h.isArray?"array":"object",a.isArray(d)?"array":"object");h.isArray?(m.length=0,s(d,function(b){"object"===typeof b?m.push(new f(b)):m.push(b)})):(D(d,m),m.$promise=k)}m.$resolved=!0;b.resource=m;return b},function(b){m.$resolved=!0;(y||E)(b);return g.reject(b)});q=q.then(function(b){var a=B(b);(l||E)(a,b.headers);return a},C);return t?q:(m.$promise=q,m.$resolved=!1,m)};f.prototype["$"+d]=function(b,a,k){u(b)&&(k=a,a=b,b={});b=f[d].call(this,b,this,a,k);return b.$promise||b}});f.bind=function(a){return t(n,
-x({},w,a),l)};return f}var B={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},E=a.noop,s=a.forEach,x=a.extend,G=a.copy,u=a.isFunction;c.prototype={setUrlParams:function(c,g,l){var r=this,e=l||r.template,f,p,h=r.urlParams={};s(e.split(/\W/),function(a){if("hasOwnProperty"===a)throw v("badname");!/^\d+$/.test(a)&&(a&&RegExp("(^|[^\\\\]):"+a+"(\\W|$)").test(e))&&(h[a]=!0)});e=e.replace(/\\:/g,":");g=g||{};s(r.urlParams,function(d,
-c){f=g.hasOwnProperty(c)?g[c]:r.defaults[c];a.isDefined(f)&&null!==f?(p=encodeURIComponent(f).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),e=e.replace(RegExp(":"+c+"(\\W|$)","g"),function(a,c){return p+c})):e=e.replace(RegExp("(/?):"+c+"(\\W|$)","g"),function(a,c,d){return"/"==d.charAt(0)?d:c+d})});e=e.replace(/\/+$/,"")||"/";e=e.replace(/\/\.(?=\w+($|\?))/,".");c.url=e.replace(/\/\\\./,
-"/.");s(g,function(a,e){r.urlParams[e]||(c.params=c.params||{},c.params[e]=a)})}};return t}])})(window,window.angular);
-//# sourceMappingURL=angular-resource.min.js.map

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-resource.min.js.map
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-resource.min.js.map b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-resource.min.js.map
deleted file mode 100644
index 984d89b..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-resource.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-resource.min.js",
-"lineCount":12,
-"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA6BtCC,QAASA,EAAmB,CAACC,CAAD,CAAMC,CAAN,CAAW,CACrCA,CAAA,CAAMA,CAAN,EAAa,EAEbJ,EAAAK,QAAA,CAAgBD,CAAhB,CAAqB,QAAQ,CAACE,CAAD,CAAQC,CAAR,CAAY,CACvC,OAAOH,CAAA,CAAIG,CAAJ,CADgC,CAAzC,CAIA,KAAKA,IAAIA,CAAT,GAAgBJ,EAAhB,CACM,CAAAA,CAAAK,eAAA,CAAmBD,CAAnB,CAAJ,EAAmD,GAAnD,GAAiCA,CAAAE,OAAA,CAAW,CAAX,CAAjC,EAA4E,GAA5E,GAA0DF,CAAAE,OAAA,CAAW,CAAX,CAA1D,GACEL,CAAA,CAAIG,CAAJ,CADF,CACaJ,CAAA,CAAII,CAAJ,CADb,CAKF,OAAOH,EAb8B,CA3BvC,IAAIM,EAAkBV,CAAAW,SAAA,CAAiB,WAAjB,CAAtB,CAKIC,EAAoB,iCAuTxBZ,EAAAa,OAAA,CAAe,YAAf,CAA6B,CAAC,IAAD,CAA7B,CAAAC,QAAA,CACU,WADV,CACuB,CAAC,OAAD,CAAU,IAAV,CAAgB,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAY,CAsDvDC,QAASA,EAAK,CAACC,CAAD,CAAWC,CAAX,CAAqB,CACjC,IAAAD,SAAA,CAAgBA,CAChB,KAAAC,SAAA,CAAgBA,CAAhB,EAA4B,EAC5B,KAAAC,UAAA,CAAiB,EAHgB,CAiEnCC,QAASA,EAAe,CAACC,CAAD,CAAMC,CAAN,CAAqBC,CAArB,CAA8B,CAKpDC,QAASA,EAAa,CAACC,CAAD,CAAOC,CAAP,CAAoB,CACxC,IAAIC,EAAM,EACVD,EAAA,CAAeE,CAAA,CAAO,EAAP,CAAWN,CAAX,CAA0BI,
 CAA1B,CACftB,EAAA,CAAQsB,CAAR,CAAsB,QAAQ,CAACrB,CAAD,CAAQC,CAAR,CAAY,CACpCuB,CAAA,CAAWxB,CAAX,CAAJ,GAAyBA,CAAzB,CAAiCA,CAAA,EAAjC,CACW,KAAA,CAAA,IAAAA,CAAA;AAASA,CAAAG,OAAT,EAA4C,GAA5C,EAAyBH,CAAAG,OAAA,CAAa,CAAb,CAAzB,CAAA,CACT,CAAA,CAAA,CAAA,KAAA,EAAA,CAAA,OAAA,CAAA,CAAA,CAlbV,IALgB,IAKhB,EAAuBsB,CAAvB,EALiC,EAKjC,GAAuBA,CAAvB,EALgD,gBAKhD,GAAuBA,CAAvB,EAJI,CAAAnB,CAAAoB,KAAA,CAAuB,GAAvB,CAImBD,CAJnB,CAIJ,CACE,KAAMrB,EAAA,CAAgB,WAAhB,CAAsEqB,CAAtE,CAAN,CAGF,IADIE,IAAAA,EAAOF,CAAAG,MAAA,CAAW,GAAX,CAAPD,CACKE,EAAI,CADTF,CACYG,EAAKH,CAAAI,OAArB,CAAkCF,CAAlC,CAAsCC,CAAtC,EAA4CE,CAA5C,GAAoDrC,CAApD,CAA+DkC,CAAA,EAA/D,CAAoE,CAClE,IAAI5B,EAAM0B,CAAA,CAAKE,CAAL,CACVG,EAAA,CAAe,IAAT,GAACA,CAAD,CAAiBA,CAAA,CAAI/B,CAAJ,CAAjB,CAA4BN,CAFgC,CA6ajD,CAAA,IACiCK,EAAAA,CAAAA,CAD5CsB,EAAA,CAAIrB,CAAJ,CAAA,CAAW,CAF6B,CAA1C,CAKA,OAAOqB,EARiC,CAW1CW,QAASA,EAA0B,CAACC,CAAD,CAAW,CAC5C,MAAOA,EAAAC,SADqC,CAI9CC,QAASA,EAAQ,CAACpC,CAAD,CAAO,CACtBJ,CAAA,CAAoBI,CAApB,EAA6B,EAA7B,CAAiC,IAAjC,CADsB,CAnBxB,IAAIqC
 ,EAAQ,IAAI1B,CAAJ,CAAUK,CAAV,CAEZE,EAAA,CAAUK,CAAA,CAAO,EAAP,CAAWe,CAAX,CAA4BpB,CAA5B,CAqBVnB,EAAA,CAAQmB,CAAR,CAAiB,QAAQ,CAACqB,CAAD,CAASC,CAAT,CAAe,CACtC,IAAIC,EAAU,qBAAAf,KAAA,CAA2Ba,CAAAG,OAA3B,CAEdN,EAAA,CAASI,CAAT,CAAA,CAAiB,QAAQ,CAACG,CAAD,CAAKC,CAAL,CAASC,CAAT,CAAaC,CAAb,CAAiB,CAAA,IACpCC,EAAS,EAD2B,CACvB3B,CADuB,CACjB4B,CADiB,CACRC,CAGhC,QAAOC,SAAAnB,OAAP,EACA,KAAK,CAAL,CACEkB,CACA,CADQH,CACR,CAAAE,CAAA,CAAUH,CAEZ,MAAK,CAAL,CACA,KAAK,CAAL,CACE,GAAIrB,CAAA,CAAWoB,CAAX,CAAJ,CAAoB,CAClB,GAAIpB,CAAA,CAAWmB,CAAX,CAAJ,CAAoB,CAClBK,CAAA;AAAUL,CACVM,EAAA,CAAQL,CACR,MAHkB,CAMpBI,CAAA,CAAUJ,CACVK,EAAA,CAAQJ,CARU,CAApB,IAUO,CACLE,CAAA,CAASJ,CACTvB,EAAA,CAAOwB,CACPI,EAAA,CAAUH,CACV,MAJK,CAMT,KAAK,CAAL,CACMrB,CAAA,CAAWmB,CAAX,CAAJ,CAAoBK,CAApB,CAA8BL,CAA9B,CACSF,CAAJ,CAAarB,CAAb,CAAoBuB,CAApB,CACAI,CADA,CACSJ,CACd,MACF,MAAK,CAAL,CAAQ,KACR,SACE,KAAMvC,EAAA,CAAgB,SAAhB,CAEJ8C,SAAAnB,OAFI,CAAN,CA9BF,CAoCA,IAAIoB,EAAiB,IAAjBA,WAAiCf,EAArC,CACIpC,EAAQmD,CAAA,CAAiB/B,CAAjB,CAAyBmB,CAAAa,QAAA,
 CAAiB,EAAjB,CAAsB,IAAIhB,CAAJ,CAAahB,CAAb,CAD3D,CAEIiC,EAAa,EAFjB,CAGIC,EAAsBf,CAAAgB,YAAtBD,EAA4Cf,CAAAgB,YAAArB,SAA5CoB,EACsBrB,CAJ1B,CAKIuB,EAA2BjB,CAAAgB,YAA3BC,EAAiDjB,CAAAgB,YAAAE,cAAjDD,EACsB7D,CAE1BI,EAAA,CAAQwC,CAAR,CAAgB,QAAQ,CAACvC,CAAD,CAAQC,CAAR,CAAa,CACxB,QAAX,EAAIA,CAAJ,GAA8B,SAA9B,EAAuBA,CAAvB,EAAkD,aAAlD,EAA2CA,CAA3C,IACEoD,CAAA,CAAWpD,CAAX,CADF,CACoByD,CAAA,CAAK1D,CAAL,CADpB,CADmC,CAArC,CAMIyC,EAAJ,GAAaY,CAAAjC,KAAb,CAA+BA,CAA/B,CACAiB,EAAAsB,aAAA,CAAmBN,CAAnB,CACmB9B,CAAA,CAAO,EAAP,CAAWJ,CAAA,CAAcC,CAAd,CAAoBmB,CAAAQ,OAApB,EAAqC,EAArC,CAAX,CAAqDA,CAArD,CADnB,CAEmBR,CAAAvB,IAFnB,CAII4C,EAAAA,CAAUnD,CAAA,CAAM4C,CAAN,CAAAQ,KAAA,CAAuB,QAAS,CAAC3B,CAAD,CAAW,CAAA,IACnDd,EAAOc,CAAAd,KAD4C,CAErDwC,EAAU5D,CAAA8D,SAEZ,IAAI1C,CAAJ,CAAU,CAGR,GAAI1B,CAAA0D,QAAA,CAAgBhC,CAAhB,CAAJ,GAA+B,CAAC,CAACmB,CAAAa,QAAjC,CACE,KAAMhD,EAAA,CAAgB,QAAhB;AAGJmC,CAAAa,QAAA,CAAiB,OAAjB,CAA2B,QAHvB,CAIJ1D,CAAA0D,QAAA,CAAgBhC,CAAhB,CAAA,CAAwB,OAAxB,CAAkC,QAJ9B,CAAN,CAOEmB,CAAAa,QAAJ,EACEpD,CAAA+B,
 OACA,CADe,CACf,CAAAhC,CAAA,CAAQqB,CAAR,CAAc,QAAS,CAAC2C,CAAD,CAAO,CACR,QAApB,GAAI,MAAOA,EAAX,CACE/D,CAAAgE,KAAA,CAAW,IAAI5B,CAAJ,CAAa2B,CAAb,CAAX,CADF,CAME/D,CAAAgE,KAAA,CAAWD,CAAX,CAP0B,CAA9B,CAFF,GAaEnE,CAAA,CAAoBwB,CAApB,CAA0BpB,CAA1B,CACA,CAAAA,CAAA8D,SAAA,CAAiBF,CAdnB,CAXQ,CA6BV5D,CAAAiE,UAAA,CAAkB,CAAA,CAElB/B,EAAAC,SAAA,CAAoBnC,CAEpB,OAAOkC,EArCgD,CAA3C,CAsCX,QAAQ,CAACA,CAAD,CAAW,CACpBlC,CAAAiE,UAAA,CAAkB,CAAA,CAEjB,EAAAhB,CAAA,EAAOiB,CAAP,EAAahC,CAAb,CAED,OAAOxB,EAAAyD,OAAA,CAAUjC,CAAV,CALa,CAtCR,CA8Cd0B,EAAA,CAAUA,CAAAC,KAAA,CACN,QAAQ,CAAC3B,CAAD,CAAW,CACjB,IAAIlC,EAAQsD,CAAA,CAAoBpB,CAApB,CACX,EAAAc,CAAA,EAASkB,CAAT,EAAelE,CAAf,CAAsBkC,CAAAkC,QAAtB,CACD,OAAOpE,EAHU,CADb,CAMNwD,CANM,CAQV,OAAKL,EAAL,CAWOS,CAXP,EAIE5D,CAAA8D,SAGO9D,CAHU4D,CAGV5D,CAFPA,CAAAiE,UAEOjE,CAFW,CAAA,CAEXA,CAAAA,CAPT,CAjHwC,CAgI1CoC,EAAAiC,UAAA,CAAmB,GAAnB,CAAyB7B,CAAzB,CAAA,CAAiC,QAAQ,CAACO,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAAyB,CAC5DzB,CAAA,CAAWuB,CAAX,CAAJ,GACEE,CAAmC,CAA3BD,CAA2B,CAAlBA,CAAkB,CAARD,CA
 AQ,CAAAA,CAAA,CAAS,EAD9C,CAGIuB,EAAAA,CAASlC,CAAA,CAASI,CAAT,CAAA+B,KAAA,CAAoB,IAApB,CAA0BxB,CAA1B,CAAkC,IAAlC,CAAwCC,CAAxC,CAAiDC,CAAjD,CACb,OAAOqB,EAAAR,SAAP,EAA0BQ,CALsC,CAnI5B,CAAxC,CA4IAlC,EAAAoC,KAAA,CAAgBC,QAAQ,CAACC,CAAD,CAAyB,CAC/C,MAAO3D,EAAA,CAAgBC,CAAhB;AAAqBO,CAAA,CAAO,EAAP,CAAWN,CAAX,CAA0ByD,CAA1B,CAArB,CAAyExD,CAAzE,CADwC,CAIjD,OAAOkB,EAxK6C,CArHtD,IAAIE,EAAkB,KACV,QAAQ,KAAR,CADU,MAEV,QAAQ,MAAR,CAFU,OAGV,QAAQ,KAAR,SAAuB,CAAA,CAAvB,CAHU,QAIV,QAAQ,QAAR,CAJU,CAKpB,QALoB,CAKV,QAAQ,QAAR,CALU,CAAtB,CAOI4B,EAAOxE,CAAAwE,KAPX,CAQInE,EAAUL,CAAAK,QARd,CASIwB,EAAS7B,CAAA6B,OATb,CAUImC,EAAOhE,CAAAgE,KAVX,CAWIlC,EAAa9B,CAAA8B,WA+CjBb,EAAA0D,UAAA,CAAkB,cACFV,QAAQ,CAACgB,CAAD,CAAS5B,CAAT,CAAiB6B,CAAjB,CAA4B,CAAA,IAC5CC,EAAO,IADqC,CAE5C7D,EAAM4D,CAAN5D,EAAmB6D,CAAAjE,SAFyB,CAG5CkE,CAH4C,CAI5CC,CAJ4C,CAM5CjE,EAAY+D,CAAA/D,UAAZA,CAA6B,EACjCf,EAAA,CAAQiB,CAAAY,MAAA,CAAU,IAAV,CAAR,CAAyB,QAAQ,CAACoD,CAAD,CAAO,CACtC,GAAc,gBAAd,GAAIA,CAAJ,CACE,KAAM5E,EAAA,CAAgB,SAAhB,CAAN,CAEI,CAAA,OAAAsB,K
 AAA,CAA0BsD,CAA1B,CAAN,GAA2CA,CAA3C,EACUC,MAAJ,CAAW,cAAX,CAA4BD,CAA5B,CAAoC,SAApC,CAAAtD,KAAA,CAAoDV,CAApD,CADN,IAEEF,CAAA,CAAUkE,CAAV,CAFF,CAEqB,CAAA,CAFrB,CAJsC,CAAxC,CASAhE,EAAA,CAAMA,CAAAkE,QAAA,CAAY,MAAZ,CAAoB,GAApB,CAENnC,EAAA,CAASA,CAAT,EAAmB,EACnBhD,EAAA,CAAQ8E,CAAA/D,UAAR,CAAwB,QAAQ,CAACqE,CAAD;AAAIC,CAAJ,CAAa,CAC3CN,CAAA,CAAM/B,CAAA7C,eAAA,CAAsBkF,CAAtB,CAAA,CAAkCrC,CAAA,CAAOqC,CAAP,CAAlC,CAAqDP,CAAAhE,SAAA,CAAcuE,CAAd,CACvD1F,EAAA2F,UAAA,CAAkBP,CAAlB,CAAJ,EAAsC,IAAtC,GAA8BA,CAA9B,EACEC,CACA,CAtCCO,kBAAA,CAqC6BR,CArC7B,CAAAI,QAAA,CACG,OADH,CACY,GADZ,CAAAA,QAAA,CAEG,OAFH,CAEY,GAFZ,CAAAA,QAAA,CAGG,MAHH,CAGW,GAHX,CAAAA,QAAA,CAIG,OAJH,CAIY,GAJZ,CAAAA,QAAA,CAKG,MALH,CAK8B,KAL9B,CAnBAA,QAAA,CACG,OADH,CACY,GADZ,CAAAA,QAAA,CAEG,OAFH,CAEY,GAFZ,CAAAA,QAAA,CAGG,OAHH,CAGY,GAHZ,CAyDD,CAAAlE,CAAA,CAAMA,CAAAkE,QAAA,CAAgBD,MAAJ,CAAW,GAAX,CAAiBG,CAAjB,CAA4B,SAA5B,CAAuC,GAAvC,CAAZ,CAAyD,QAAQ,CAACG,CAAD,CAAQC,CAAR,CAAY,CACjF,MAAOT,EAAP,CAAoBS,CAD6D,CAA7E,CAFR,EAMExE,CANF,CAMQA,CAAAkE,QAAA,CA
 AgBD,MAAJ,CAAW,OAAX,CAAsBG,CAAtB,CAAiC,SAAjC,CAA4C,GAA5C,CAAZ,CAA8D,QAAQ,CAACG,CAAD,CACxEE,CADwE,CACxDC,CADwD,CAClD,CACxB,MAAsB,GAAtB,EAAIA,CAAAvF,OAAA,CAAY,CAAZ,CAAJ,CACSuF,CADT,CAGSD,CAHT,CAG0BC,CAJF,CADpB,CARmC,CAA7C,CAoBA1E,EAAA,CAAMA,CAAAkE,QAAA,CAAY,MAAZ,CAAoB,EAApB,CAAN,EAAiC,GAGjClE,EAAA,CAAMA,CAAAkE,QAAA,CAAY,mBAAZ,CAAiC,GAAjC,CAENP,EAAA3D,IAAA,CAAaA,CAAAkE,QAAA,CAAY,QAAZ;AAAsB,IAAtB,CAIbnF,EAAA,CAAQgD,CAAR,CAAgB,QAAQ,CAAC/C,CAAD,CAAQC,CAAR,CAAY,CAC7B4E,CAAA/D,UAAA,CAAeb,CAAf,CAAL,GACE0E,CAAA5B,OACA,CADgB4B,CAAA5B,OAChB,EADiC,EACjC,CAAA4B,CAAA5B,OAAA,CAAc9C,CAAd,CAAA,CAAqBD,CAFvB,CADkC,CAApC,CAhDgD,CADlC,CAsOlB,OAAOe,EAlSgD,CAApC,CADvB,CA9TsC,CAArC,CAAA,CAqmBEtB,MArmBF,CAqmBUA,MAAAC,QArmBV;",
-"sources":["angular-resource.js"],
-"names":["window","angular","undefined","shallowClearAndCopy","src","dst","forEach","value","key","hasOwnProperty","charAt","$resourceMinErr","$$minErr","MEMBER_NAME_REGEX","module","factory","$http","$q","Route","template","defaults","urlParams","resourceFactory","url","paramDefaults","actions","extractParams","data","actionParams","ids","extend","isFunction","path","test","keys","split","i","ii","length","obj","defaultResponseInterceptor","response","resource","Resource","route","DEFAULT_ACTIONS","action","name","hasBody","method","a1","a2","a3","a4","params","success","error","arguments","isInstanceCall","isArray","httpConfig","responseInterceptor","interceptor","responseErrorInterceptor","responseError","copy","setUrlParams","promise","then","$promise","item","push","$resolved","noop","reject","headers","prototype","result","call","bind","Resource.bind","additionalParamDefaults","config","actionUrl","self","val","encodedVal","param","RegExp","replace","_","urlParam","isDefined",
 "encodeURIComponent","match","p1","leadingSlashes","tail"]
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-route.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-route.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-route.js
deleted file mode 100644
index 1fdafd3..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-route.js
+++ /dev/null
@@ -1,927 +0,0 @@
-/**
- * @license AngularJS v1.2.19
- * (c) 2010-2014 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-/**
- * @ngdoc module
- * @name ngRoute
- * @description
- *
- * # ngRoute
- *
- * The `ngRoute` module provides routing and deeplinking services and directives for angular apps.
- *
- * ## Example
- * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.
- *
- *
- * <div doc-module-components="ngRoute"></div>
- */
- /* global -ngRouteModule */
-var ngRouteModule = angular.module('ngRoute', ['ng']).
-                        provider('$route', $RouteProvider);
-
-/**
- * @ngdoc provider
- * @name $routeProvider
- * @kind function
- *
- * @description
- *
- * Used for configuring routes.
- *
- * ## Example
- * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.
- *
- * ## Dependencies
- * Requires the {@link ngRoute `ngRoute`} module to be installed.
- */
-function $RouteProvider(){
-  function inherit(parent, extra) {
-    return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra);
-  }
-
-  var routes = {};
-
-  /**
-   * @ngdoc method
-   * @name $routeProvider#when
-   *
-   * @param {string} path Route path (matched against `$location.path`). If `$location.path`
-   *    contains redundant trailing slash or is missing one, the route will still match and the
-   *    `$location.path` will be updated to add or drop the trailing slash to exactly match the
-   *    route definition.
-   *
-   *    * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up
-   *        to the next slash are matched and stored in `$routeParams` under the given `name`
-   *        when the route matches.
-   *    * `path` can contain named groups starting with a colon and ending with a star:
-   *        e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name`
-   *        when the route matches.
-   *    * `path` can contain optional named groups with a question mark: e.g.`:name?`.
-   *
-   *    For example, routes like `/color/:color/largecode/:largecode*\/edit` will match
-   *    `/color/brown/largecode/code/with/slashes/edit` and extract:
-   *
-   *    * `color: brown`
-   *    * `largecode: code/with/slashes`.
-   *
-   *
-   * @param {Object} route Mapping information to be assigned to `$route.current` on route
-   *    match.
-   *
-   *    Object properties:
-   *
-   *    - `controller` – `{(string|function()=}` – Controller fn that should be associated with
-   *      newly created scope or the name of a {@link angular.Module#controller registered
-   *      controller} if passed as a string.
-   *    - `controllerAs` – `{string=}` – A controller alias name. If present the controller will be
-   *      published to scope under the `controllerAs` name.
-   *    - `template` – `{string=|function()=}` – html template as a string or a function that
-   *      returns an html template as a string which should be used by {@link
-   *      ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.
-   *      This property takes precedence over `templateUrl`.
-   *
-   *      If `template` is a function, it will be called with the following parameters:
-   *
-   *      - `{Array.<Object>}` - route parameters extracted from the current
-   *        `$location.path()` by applying the current route
-   *
-   *    - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html
-   *      template that should be used by {@link ngRoute.directive:ngView ngView}.
-   *
-   *      If `templateUrl` is a function, it will be called with the following parameters:
-   *
-   *      - `{Array.<Object>}` - route parameters extracted from the current
-   *        `$location.path()` by applying the current route
-   *
-   *    - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should
-   *      be injected into the controller. If any of these dependencies are promises, the router
-   *      will wait for them all to be resolved or one to be rejected before the controller is
-   *      instantiated.
-   *      If all the promises are resolved successfully, the values of the resolved promises are
-   *      injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is
-   *      fired. If any of the promises are rejected the
-   *      {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. The map object
-   *      is:
-   *
-   *      - `key` – `{string}`: a name of a dependency to be injected into the controller.
-   *      - `factory` - `{string|function}`: If `string` then it is an alias for a service.
-   *        Otherwise if function, then it is {@link auto.$injector#invoke injected}
-   *        and the return value is treated as the dependency. If the result is a promise, it is
-   *        resolved before its value is injected into the controller. Be aware that
-   *        `ngRoute.$routeParams` will still refer to the previous route within these resolve
-   *        functions.  Use `$route.current.params` to access the new route parameters, instead.
-   *
-   *    - `redirectTo` – {(string|function())=} – value to update
-   *      {@link ng.$location $location} path with and trigger route redirection.
-   *
-   *      If `redirectTo` is a function, it will be called with the following parameters:
-   *
-   *      - `{Object.<string>}` - route parameters extracted from the current
-   *        `$location.path()` by applying the current route templateUrl.
-   *      - `{string}` - current `$location.path()`
-   *      - `{Object}` - current `$location.search()`
-   *
-   *      The custom `redirectTo` function is expected to return a string which will be used
-   *      to update `$location.path()` and `$location.search()`.
-   *
-   *    - `[reloadOnSearch=true]` - {boolean=} - reload route when only `$location.search()`
-   *      or `$location.hash()` changes.
-   *
-   *      If the option is set to `false` and url in the browser changes, then
-   *      `$routeUpdate` event is broadcasted on the root scope.
-   *
-   *    - `[caseInsensitiveMatch=false]` - {boolean=} - match routes without being case sensitive
-   *
-   *      If the option is set to `true`, then the particular route can be matched without being
-   *      case sensitive
-   *
-   * @returns {Object} self
-   *
-   * @description
-   * Adds a new route definition to the `$route` service.
-   */
-  this.when = function(path, route) {
-    routes[path] = angular.extend(
-      {reloadOnSearch: true},
-      route,
-      path && pathRegExp(path, route)
-    );
-
-    // create redirection for trailing slashes
-    if (path) {
-      var redirectPath = (path[path.length-1] == '/')
-            ? path.substr(0, path.length-1)
-            : path +'/';
-
-      routes[redirectPath] = angular.extend(
-        {redirectTo: path},
-        pathRegExp(redirectPath, route)
-      );
-    }
-
-    return this;
-  };
-
-   /**
-    * @param path {string} path
-    * @param opts {Object} options
-    * @return {?Object}
-    *
-    * @description
-    * Normalizes the given path, returning a regular expression
-    * and the original path.
-    *
-    * Inspired by pathRexp in visionmedia/express/lib/utils.js.
-    */
-  function pathRegExp(path, opts) {
-    var insensitive = opts.caseInsensitiveMatch,
-        ret = {
-          originalPath: path,
-          regexp: path
-        },
-        keys = ret.keys = [];
-
-    path = path
-      .replace(/([().])/g, '\\$1')
-      .replace(/(\/)?:(\w+)([\?\*])?/g, function(_, slash, key, option){
-        var optional = option === '?' ? option : null;
-        var star = option === '*' ? option : null;
-        keys.push({ name: key, optional: !!optional });
-        slash = slash || '';
-        return ''
-          + (optional ? '' : slash)
-          + '(?:'
-          + (optional ? slash : '')
-          + (star && '(.+?)' || '([^/]+)')
-          + (optional || '')
-          + ')'
-          + (optional || '');
-      })
-      .replace(/([\/$\*])/g, '\\$1');
-
-    ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : '');
-    return ret;
-  }
-
-  /**
-   * @ngdoc method
-   * @name $routeProvider#otherwise
-   *
-   * @description
-   * Sets route definition that will be used on route change when no other route definition
-   * is matched.
-   *
-   * @param {Object} params Mapping information to be assigned to `$route.current`.
-   * @returns {Object} self
-   */
-  this.otherwise = function(params) {
-    this.when(null, params);
-    return this;
-  };
-
-
-  this.$get = ['$rootScope',
-               '$location',
-               '$routeParams',
-               '$q',
-               '$injector',
-               '$http',
-               '$templateCache',
-               '$sce',
-      function($rootScope, $location, $routeParams, $q, $injector, $http, $templateCache, $sce) {
-
-    /**
-     * @ngdoc service
-     * @name $route
-     * @requires $location
-     * @requires $routeParams
-     *
-     * @property {Object} current Reference to the current route definition.
-     * The route definition contains:
-     *
-     *   - `controller`: The controller constructor as define in route definition.
-     *   - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for
-     *     controller instantiation. The `locals` contain
-     *     the resolved values of the `resolve` map. Additionally the `locals` also contain:
-     *
-     *     - `$scope` - The current route scope.
-     *     - `$template` - The current route template HTML.
-     *
-     * @property {Object} routes Object with all route configuration Objects as its properties.
-     *
-     * @description
-     * `$route` is used for deep-linking URLs to controllers and views (HTML partials).
-     * It watches `$location.url()` and tries to map the path to an existing route definition.
-     *
-     * Requires the {@link ngRoute `ngRoute`} module to be installed.
-     *
-     * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API.
-     *
-     * The `$route` service is typically used in conjunction with the
-     * {@link ngRoute.directive:ngView `ngView`} directive and the
-     * {@link ngRoute.$routeParams `$routeParams`} service.
-     *
-     * @example
-     * This example shows how changing the URL hash causes the `$route` to match a route against the
-     * URL, and the `ngView` pulls in the partial.
-     *
-     * Note that this example is using {@link ng.directive:script inlined templates}
-     * to get it working on jsfiddle as well.
-     *
-     * <example name="$route-service" module="ngRouteExample"
-     *          deps="angular-route.js" fixBase="true">
-     *   <file name="index.html">
-     *     <div ng-controller="MainController">
-     *       Choose:
-     *       <a href="Book/Moby">Moby</a> |
-     *       <a href="Book/Moby/ch/1">Moby: Ch1</a> |
-     *       <a href="Book/Gatsby">Gatsby</a> |
-     *       <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
-     *       <a href="Book/Scarlet">Scarlet Letter</a><br/>
-     *
-     *       <div ng-view></div>
-     *
-     *       <hr />
-     *
-     *       <pre>$location.path() = {{$location.path()}}</pre>
-     *       <pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre>
-     *       <pre>$route.current.params = {{$route.current.params}}</pre>
-     *       <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre>
-     *       <pre>$routeParams = {{$routeParams}}</pre>
-     *     </div>
-     *   </file>
-     *
-     *   <file name="book.html">
-     *     controller: {{name}}<br />
-     *     Book Id: {{params.bookId}}<br />
-     *   </file>
-     *
-     *   <file name="chapter.html">
-     *     controller: {{name}}<br />
-     *     Book Id: {{params.bookId}}<br />
-     *     Chapter Id: {{params.chapterId}}
-     *   </file>
-     *
-     *   <file name="script.js">
-     *     angular.module('ngRouteExample', ['ngRoute'])
-     *
-     *      .controller('MainController', function($scope, $route, $routeParams, $location) {
-     *          $scope.$route = $route;
-     *          $scope.$location = $location;
-     *          $scope.$routeParams = $routeParams;
-     *      })
-     *
-     *      .controller('BookController', function($scope, $routeParams) {
-     *          $scope.name = "BookController";
-     *          $scope.params = $routeParams;
-     *      })
-     *
-     *      .controller('ChapterController', function($scope, $routeParams) {
-     *          $scope.name = "ChapterController";
-     *          $scope.params = $routeParams;
-     *      })
-     *
-     *     .config(function($routeProvider, $locationProvider) {
-     *       $routeProvider
-     *        .when('/Book/:bookId', {
-     *         templateUrl: 'book.html',
-     *         controller: 'BookController',
-     *         resolve: {
-     *           // I will cause a 1 second delay
-     *           delay: function($q, $timeout) {
-     *             var delay = $q.defer();
-     *             $timeout(delay.resolve, 1000);
-     *             return delay.promise;
-     *           }
-     *         }
-     *       })
-     *       .when('/Book/:bookId/ch/:chapterId', {
-     *         templateUrl: 'chapter.html',
-     *         controller: 'ChapterController'
-     *       });
-     *
-     *       // configure html5 to get links working on jsfiddle
-     *       $locationProvider.html5Mode(true);
-     *     });
-     *
-     *   </file>
-     *
-     *   <file name="protractor.js" type="protractor">
-     *     it('should load and compile correct template', function() {
-     *       element(by.linkText('Moby: Ch1')).click();
-     *       var content = element(by.css('[ng-view]')).getText();
-     *       expect(content).toMatch(/controller\: ChapterController/);
-     *       expect(content).toMatch(/Book Id\: Moby/);
-     *       expect(content).toMatch(/Chapter Id\: 1/);
-     *
-     *       element(by.partialLinkText('Scarlet')).click();
-     *
-     *       content = element(by.css('[ng-view]')).getText();
-     *       expect(content).toMatch(/controller\: BookController/);
-     *       expect(content).toMatch(/Book Id\: Scarlet/);
-     *     });
-     *   </file>
-     * </example>
-     */
-
-    /**
-     * @ngdoc event
-     * @name $route#$routeChangeStart
-     * @eventType broadcast on root scope
-     * @description
-     * Broadcasted before a route change. At this  point the route services starts
-     * resolving all of the dependencies needed for the route change to occur.
-     * Typically this involves fetching the view template as well as any dependencies
-     * defined in `resolve` route property. Once  all of the dependencies are resolved
-     * `$routeChangeSuccess` is fired.
-     *
-     * @param {Object} angularEvent Synthetic event object.
-     * @param {Route} next Future route information.
-     * @param {Route} current Current route information.
-     */
-
-    /**
-     * @ngdoc event
-     * @name $route#$routeChangeSuccess
-     * @eventType broadcast on root scope
-     * @description
-     * Broadcasted after a route dependencies are resolved.
-     * {@link ngRoute.directive:ngView ngView} listens for the directive
-     * to instantiate the controller and render the view.
-     *
-     * @param {Object} angularEvent Synthetic event object.
-     * @param {Route} current Current route information.
-     * @param {Route|Undefined} previous Previous route information, or undefined if current is
-     * first route entered.
-     */
-
-    /**
-     * @ngdoc event
-     * @name $route#$routeChangeError
-     * @eventType broadcast on root scope
-     * @description
-     * Broadcasted if any of the resolve promises are rejected.
-     *
-     * @param {Object} angularEvent Synthetic event object
-     * @param {Route} current Current route information.
-     * @param {Route} previous Previous route information.
-     * @param {Route} rejection Rejection of the promise. Usually the error of the failed promise.
-     */
-
-    /**
-     * @ngdoc event
-     * @name $route#$routeUpdate
-     * @eventType broadcast on root scope
-     * @description
-     *
-     * The `reloadOnSearch` property has been set to false, and we are reusing the same
-     * instance of the Controller.
-     */
-
-    var forceReload = false,
-        $route = {
-          routes: routes,
-
-          /**
-           * @ngdoc method
-           * @name $route#reload
-           *
-           * @description
-           * Causes `$route` service to reload the current route even if
-           * {@link ng.$location $location} hasn't changed.
-           *
-           * As a result of that, {@link ngRoute.directive:ngView ngView}
-           * creates new scope, reinstantiates the controller.
-           */
-          reload: function() {
-            forceReload = true;
-            $rootScope.$evalAsync(updateRoute);
-          }
-        };
-
-    $rootScope.$on('$locationChangeSuccess', updateRoute);
-
-    return $route;
-
-    /////////////////////////////////////////////////////
-
-    /**
-     * @param on {string} current url
-     * @param route {Object} route regexp to match the url against
-     * @return {?Object}
-     *
-     * @description
-     * Check if the route matches the current url.
-     *
-     * Inspired by match in
-     * visionmedia/express/lib/router/router.js.
-     */
-    function switchRouteMatcher(on, route) {
-      var keys = route.keys,
-          params = {};
-
-      if (!route.regexp) return null;
-
-      var m = route.regexp.exec(on);
-      if (!m) return null;
-
-      for (var i = 1, len = m.length; i < len; ++i) {
-        var key = keys[i - 1];
-
-        var val = 'string' == typeof m[i]
-              ? decodeURIComponent(m[i])
-              : m[i];
-
-        if (key && val) {
-          params[key.name] = val;
-        }
-      }
-      return params;
-    }
-
-    function updateRoute() {
-      var next = parseRoute(),
-          last = $route.current;
-
-      if (next && last && next.$$route === last.$$route
-          && angular.equals(next.pathParams, last.pathParams)
-          && !next.reloadOnSearch && !forceReload) {
-        last.params = next.params;
-        angular.copy(last.params, $routeParams);
-        $rootScope.$broadcast('$routeUpdate', last);
-      } else if (next || last) {
-        forceReload = false;
-        $rootScope.$broadcast('$routeChangeStart', next, last);
-        $route.current = next;
-        if (next) {
-          if (next.redirectTo) {
-            if (angular.isString(next.redirectTo)) {
-              $location.path(interpolate(next.redirectTo, next.params)).search(next.params)
-                       .replace();
-            } else {
-              $location.url(next.redirectTo(next.pathParams, $location.path(), $location.search()))
-                       .replace();
-            }
-          }
-        }
-
-        $q.when(next).
-          then(function() {
-            if (next) {
-              var locals = angular.extend({}, next.resolve),
-                  template, templateUrl;
-
-              angular.forEach(locals, function(value, key) {
-                locals[key] = angular.isString(value) ?
-                    $injector.get(value) : $injector.invoke(value);
-              });
-
-              if (angular.isDefined(template = next.template)) {
-                if (angular.isFunction(template)) {
-                  template = template(next.params);
-                }
-              } else if (angular.isDefined(templateUrl = next.templateUrl)) {
-                if (angular.isFunction(templateUrl)) {
-                  templateUrl = templateUrl(next.params);
-                }
-                templateUrl = $sce.getTrustedResourceUrl(templateUrl);
-                if (angular.isDefined(templateUrl)) {
-                  next.loadedTemplateUrl = templateUrl;
-                  template = $http.get(templateUrl, {cache: $templateCache}).
-                      then(function(response) { return response.data; });
-                }
-              }
-              if (angular.isDefined(template)) {
-                locals['$template'] = template;
-              }
-              return $q.all(locals);
-            }
-          }).
-          // after route change
-          then(function(locals) {
-            if (next == $route.current) {
-              if (next) {
-                next.locals = locals;
-                angular.copy(next.params, $routeParams);
-              }
-              $rootScope.$broadcast('$routeChangeSuccess', next, last);
-            }
-          }, function(error) {
-            if (next == $route.current) {
-              $rootScope.$broadcast('$routeChangeError', next, last, error);
-            }
-          });
-      }
-    }
-
-
-    /**
-     * @returns {Object} the current active route, by matching it against the URL
-     */
-    function parseRoute() {
-      // Match a route
-      var params, match;
-      angular.forEach(routes, function(route, path) {
-        if (!match && (params = switchRouteMatcher($location.path(), route))) {
-          match = inherit(route, {
-            params: angular.extend({}, $location.search(), params),
-            pathParams: params});
-          match.$$route = route;
-        }
-      });
-      // No route matched; fallback to "otherwise" route
-      return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});
-    }
-
-    /**
-     * @returns {string} interpolation of the redirect path with the parameters
-     */
-    function interpolate(string, params) {
-      var result = [];
-      angular.forEach((string||'').split(':'), function(segment, i) {
-        if (i === 0) {
-          result.push(segment);
-        } else {
-          var segmentMatch = segment.match(/(\w+)(.*)/);
-          var key = segmentMatch[1];
-          result.push(params[key]);
-          result.push(segmentMatch[2] || '');
-          delete params[key];
-        }
-      });
-      return result.join('');
-    }
-  }];
-}
-
-ngRouteModule.provider('$routeParams', $RouteParamsProvider);
-
-
-/**
- * @ngdoc service
- * @name $routeParams
- * @requires $route
- *
- * @description
- * The `$routeParams` service allows you to retrieve the current set of route parameters.
- *
- * Requires the {@link ngRoute `ngRoute`} module to be installed.
- *
- * The route parameters are a combination of {@link ng.$location `$location`}'s
- * {@link ng.$location#search `search()`} and {@link ng.$location#path `path()`}.
- * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched.
- *
- * In case of parameter name collision, `path` params take precedence over `search` params.
- *
- * The service guarantees that the identity of the `$routeParams` object will remain unchanged
- * (but its properties will likely change) even when a route change occurs.
- *
- * Note that the `$routeParams` are only updated *after* a route change completes successfully.
- * This means that you cannot rely on `$routeParams` being correct in route resolve functions.
- * Instead you can use `$route.current.params` to access the new route's parameters.
- *
- * @example
- * ```js
- *  // Given:
- *  // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby
- *  // Route: /Chapter/:chapterId/Section/:sectionId
- *  //
- *  // Then
- *  $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'}
- * ```
- */
-function $RouteParamsProvider() {
-  this.$get = function() { return {}; };
-}
-
-ngRouteModule.directive('ngView', ngViewFactory);
-ngRouteModule.directive('ngView', ngViewFillContentFactory);
-
-
-/**
- * @ngdoc directive
- * @name ngView
- * @restrict ECA
- *
- * @description
- * # Overview
- * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by
- * including the rendered template of the current route into the main layout (`index.html`) file.
- * Every time the current route changes, the included view changes with it according to the
- * configuration of the `$route` service.
- *
- * Requires the {@link ngRoute `ngRoute`} module to be installed.
- *
- * @animations
- * enter - animation is used to bring new content into the browser.
- * leave - animation is used to animate existing content away.
- *
- * The enter and leave animation occur concurrently.
- *
- * @scope
- * @priority 400
- * @param {string=} onload Expression to evaluate whenever the view updates.
- *
- * @param {string=} autoscroll Whether `ngView` should call {@link ng.$anchorScroll
- *                  $anchorScroll} to scroll the viewport after the view is updated.
- *
- *                  - If the attribute is not set, disable scrolling.
- *                  - If the attribute is set without value, enable scrolling.
- *                  - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated
- *                    as an expression yields a truthy value.
- * @example
-    <example name="ngView-directive" module="ngViewExample"
-             deps="angular-route.js;angular-animate.js"
-             animations="true" fixBase="true">
-      <file name="index.html">
-        <div ng-controller="MainCtrl as main">
-          Choose:
-          <a href="Book/Moby">Moby</a> |
-          <a href="Book/Moby/ch/1">Moby: Ch1</a> |
-          <a href="Book/Gatsby">Gatsby</a> |
-          <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
-          <a href="Book/Scarlet">Scarlet Letter</a><br/>
-
-          <div class="view-animate-container">
-            <div ng-view class="view-animate"></div>
-          </div>
-          <hr />
-
-          <pre>$location.path() = {{main.$location.path()}}</pre>
-          <pre>$route.current.templateUrl = {{main.$route.current.templateUrl}}</pre>
-          <pre>$route.current.params = {{main.$route.current.params}}</pre>
-          <pre>$route.current.scope.name = {{main.$route.current.scope.name}}</pre>
-          <pre>$routeParams = {{main.$routeParams}}</pre>
-        </div>
-      </file>
-
-      <file name="book.html">
-        <div>
-          controller: {{book.name}}<br />
-          Book Id: {{book.params.bookId}}<br />
-        </div>
-      </file>
-
-      <file name="chapter.html">
-        <div>
-          controller: {{chapter.name}}<br />
-          Book Id: {{chapter.params.bookId}}<br />
-          Chapter Id: {{chapter.params.chapterId}}
-        </div>
-      </file>
-
-      <file name="animations.css">
-        .view-animate-container {
-          position:relative;
-          height:100px!important;
-          position:relative;
-          background:white;
-          border:1px solid black;
-          height:40px;
-          overflow:hidden;
-        }
-
-        .view-animate {
-          padding:10px;
-        }
-
-        .view-animate.ng-enter, .view-animate.ng-leave {
-          -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
-          transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
-
-          display:block;
-          width:100%;
-          border-left:1px solid black;
-
-          position:absolute;
-          top:0;
-          left:0;
-          right:0;
-          bottom:0;
-          padding:10px;
-        }
-
-        .view-animate.ng-enter {
-          left:100%;
-        }
-        .view-animate.ng-enter.ng-enter-active {
-          left:0;
-        }
-        .view-animate.ng-leave.ng-leave-active {
-          left:-100%;
-        }
-      </file>
-
-      <file name="script.js">
-        angular.module('ngViewExample', ['ngRoute', 'ngAnimate'])
-          .config(['$routeProvider', '$locationProvider',
-            function($routeProvider, $locationProvider) {
-              $routeProvider
-                .when('/Book/:bookId', {
-                  templateUrl: 'book.html',
-                  controller: 'BookCtrl',
-                  controllerAs: 'book'
-                })
-                .when('/Book/:bookId/ch/:chapterId', {
-                  templateUrl: 'chapter.html',
-                  controller: 'ChapterCtrl',
-                  controllerAs: 'chapter'
-                });
-
-              // configure html5 to get links working on jsfiddle
-              $locationProvider.html5Mode(true);
-          }])
-          .controller('MainCtrl', ['$route', '$routeParams', '$location',
-            function($route, $routeParams, $location) {
-              this.$route = $route;
-              this.$location = $location;
-              this.$routeParams = $routeParams;
-          }])
-          .controller('BookCtrl', ['$routeParams', function($routeParams) {
-            this.name = "BookCtrl";
-            this.params = $routeParams;
-          }])
-          .controller('ChapterCtrl', ['$routeParams', function($routeParams) {
-            this.name = "ChapterCtrl";
-            this.params = $routeParams;
-          }]);
-
-      </file>
-
-      <file name="protractor.js" type="protractor">
-        it('should load and compile correct template', function() {
-          element(by.linkText('Moby: Ch1')).click();
-          var content = element(by.css('[ng-view]')).getText();
-          expect(content).toMatch(/controller\: ChapterCtrl/);
-          expect(content).toMatch(/Book Id\: Moby/);
-          expect(content).toMatch(/Chapter Id\: 1/);
-
-          element(by.partialLinkText('Scarlet')).click();
-
-          content = element(by.css('[ng-view]')).getText();
-          expect(content).toMatch(/controller\: BookCtrl/);
-          expect(content).toMatch(/Book Id\: Scarlet/);
-        });
-      </file>
-    </example>
- */
-
-
-/**
- * @ngdoc event
- * @name ngView#$viewContentLoaded
- * @eventType emit on the current ngView scope
- * @description
- * Emitted every time the ngView content is reloaded.
- */
-ngViewFactory.$inject = ['$route', '$anchorScroll', '$animate'];
-function ngViewFactory(   $route,   $anchorScroll,   $animate) {
-  return {
-    restrict: 'ECA',
-    terminal: true,
-    priority: 400,
-    transclude: 'element',
-    link: function(scope, $element, attr, ctrl, $transclude) {
-        var currentScope,
-            currentElement,
-            previousElement,
-            autoScrollExp = attr.autoscroll,
-            onloadExp = attr.onload || '';
-
-        scope.$on('$routeChangeSuccess', update);
-        update();
-
-        function cleanupLastView() {
-          if(previousElement) {
-            previousElement.remove();
-            previousElement = null;
-          }
-          if(currentScope) {
-            currentScope.$destroy();
-            currentScope = null;
-          }
-          if(currentElement) {
-            $animate.leave(currentElement, function() {
-              previousElement = null;
-            });
-            previousElement = currentElement;
-            currentElement = null;
-          }
-        }
-
-        function update() {
-          var locals = $route.current && $route.current.locals,
-              template = locals && locals.$template;
-
-          if (angular.isDefined(template)) {
-            var newScope = scope.$new();
-            var current = $route.current;
-
-            // Note: This will also link all children of ng-view that were contained in the original
-            // html. If that content contains controllers, ... they could pollute/change the scope.
-            // However, using ng-view on an element with additional content does not make sense...
-            // Note: We can't remove them in the cloneAttchFn of $transclude as that
-            // function is called before linking the content, which would apply child
-            // directives to non existing elements.
-            var clone = $transclude(newScope, function(clone) {
-              $animate.enter(clone, null, currentElement || $element, function onNgViewEnter () {
-                if (angular.isDefined(autoScrollExp)
-                  && (!autoScrollExp || scope.$eval(autoScrollExp))) {
-                  $anchorScroll();
-                }
-              });
-              cleanupLastView();
-            });
-
-            currentElement = clone;
-            currentScope = current.scope = newScope;
-            currentScope.$emit('$viewContentLoaded');
-            currentScope.$eval(onloadExp);
-          } else {
-            cleanupLastView();
-          }
-        }
-    }
-  };
-}
-
-// This directive is called during the $transclude call of the first `ngView` directive.
-// It will replace and compile the content of the element with the loaded template.
-// We need this directive so that the element content is already filled when
-// the link function of another directive on the same element as ngView
-// is called.
-ngViewFillContentFactory.$inject = ['$compile', '$controller', '$route'];
-function ngViewFillContentFactory($compile, $controller, $route) {
-  return {
-    restrict: 'ECA',
-    priority: -400,
-    link: function(scope, $element) {
-      var current = $route.current,
-          locals = current.locals;
-
-      $element.html(locals.$template);
-
-      var link = $compile($element.contents());
-
-      if (current.controller) {
-        locals.$scope = scope;
-        var controller = $controller(current.controller, locals);
-        if (current.controllerAs) {
-          scope[current.controllerAs] = controller;
-        }
-        $element.data('$ngControllerController', controller);
-        $element.children().data('$ngControllerController', controller);
-      }
-
-      link(scope);
-    }
-  };
-}
-
-
-})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-route.min.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-route.min.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-route.min.js
deleted file mode 100644
index 026c935..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-route.min.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- AngularJS v1.2.19
- (c) 2010-2014 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(n,e,A){'use strict';function x(s,g,k){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,c,b,f,w){function y(){p&&(p.remove(),p=null);h&&(h.$destroy(),h=null);l&&(k.leave(l,function(){p=null}),p=l,l=null)}function v(){var b=s.current&&s.current.locals;if(e.isDefined(b&&b.$template)){var b=a.$new(),d=s.current;l=w(b,function(d){k.enter(d,null,l||c,function(){!e.isDefined(t)||t&&!a.$eval(t)||g()});y()});h=d.scope=b;h.$emit("$viewContentLoaded");h.$eval(u)}else y()}
-var h,l,p,t=b.autoscroll,u=b.onload||"";a.$on("$routeChangeSuccess",v);v()}}}function z(e,g,k){return{restrict:"ECA",priority:-400,link:function(a,c){var b=k.current,f=b.locals;c.html(f.$template);var w=e(c.contents());b.controller&&(f.$scope=a,f=g(b.controller,f),b.controllerAs&&(a[b.controllerAs]=f),c.data("$ngControllerController",f),c.children().data("$ngControllerController",f));w(a)}}}n=e.module("ngRoute",["ng"]).provider("$route",function(){function s(a,c){return e.extend(new (e.extend(function(){},
-{prototype:a})),c)}function g(a,e){var b=e.caseInsensitiveMatch,f={originalPath:a,regexp:a},k=f.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,e,b,c){a="?"===c?c:null;c="*"===c?c:null;k.push({name:b,optional:!!a});e=e||"";return""+(a?"":e)+"(?:"+(a?e:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");f.regexp=RegExp("^"+a+"$",b?"i":"");return f}var k={};this.when=function(a,c){k[a]=e.extend({reloadOnSearch:!0},c,a&&g(a,c));if(a){var b=
-"/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";k[b]=e.extend({redirectTo:a},g(b,c))}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce",function(a,c,b,f,g,n,v,h){function l(){var d=p(),m=r.current;if(d&&m&&d.$$route===m.$$route&&e.equals(d.pathParams,m.pathParams)&&!d.reloadOnSearch&&!u)m.params=d.params,e.copy(m.params,b),a.$broadcast("$routeUpdate",m);else if(d||m)u=!1,a.$broadcast("$routeChangeStart",
-d,m),(r.current=d)&&d.redirectTo&&(e.isString(d.redirectTo)?c.path(t(d.redirectTo,d.params)).search(d.params).replace():c.url(d.redirectTo(d.pathParams,c.path(),c.search())).replace()),f.when(d).then(function(){if(d){var a=e.extend({},d.resolve),c,b;e.forEach(a,function(d,c){a[c]=e.isString(d)?g.get(d):g.invoke(d)});e.isDefined(c=d.template)?e.isFunction(c)&&(c=c(d.params)):e.isDefined(b=d.templateUrl)&&(e.isFunction(b)&&(b=b(d.params)),b=h.getTrustedResourceUrl(b),e.isDefined(b)&&(d.loadedTemplateUrl=
-b,c=n.get(b,{cache:v}).then(function(a){return a.data})));e.isDefined(c)&&(a.$template=c);return f.all(a)}}).then(function(c){d==r.current&&(d&&(d.locals=c,e.copy(d.params,b)),a.$broadcast("$routeChangeSuccess",d,m))},function(c){d==r.current&&a.$broadcast("$routeChangeError",d,m,c)})}function p(){var a,b;e.forEach(k,function(f,k){var q;if(q=!b){var g=c.path();q=f.keys;var l={};if(f.regexp)if(g=f.regexp.exec(g)){for(var h=1,p=g.length;h<p;++h){var n=q[h-1],r="string"==typeof g[h]?decodeURIComponent(g[h]):
-g[h];n&&r&&(l[n.name]=r)}q=l}else q=null;else q=null;q=a=q}q&&(b=s(f,{params:e.extend({},c.search(),a),pathParams:a}),b.$$route=f)});return b||k[null]&&s(k[null],{params:{},pathParams:{}})}function t(a,c){var b=[];e.forEach((a||"").split(":"),function(a,d){if(0===d)b.push(a);else{var e=a.match(/(\w+)(.*)/),f=e[1];b.push(c[f]);b.push(e[2]||"");delete c[f]}});return b.join("")}var u=!1,r={routes:k,reload:function(){u=!0;a.$evalAsync(l)}};a.$on("$locationChangeSuccess",l);return r}]});n.provider("$routeParams",
-function(){this.$get=function(){return{}}});n.directive("ngView",x);n.directive("ngView",z);x.$inject=["$route","$anchorScroll","$animate"];z.$inject=["$compile","$controller","$route"]})(window,window.angular);
-//# sourceMappingURL=angular-route.min.js.map

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-route.min.js.map
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-route.min.js.map b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-route.min.js.map
deleted file mode 100644
index 3510eaf..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-route.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-route.min.js",
-"lineCount":13,
-"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAizBtCC,QAASA,EAAa,CAAIC,CAAJ,CAAcC,CAAd,CAA+BC,CAA/B,CAAyC,CAC7D,MAAO,UACK,KADL,UAEK,CAAA,CAFL,UAGK,GAHL,YAIO,SAJP,MAKCC,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAkBC,CAAlB,CAAwBC,CAAxB,CAA8BC,CAA9B,CAA2C,CAUrDC,QAASA,EAAe,EAAG,CACtBC,CAAH,GACEA,CAAAC,OAAA,EACA,CAAAD,CAAA,CAAkB,IAFpB,CAIGE,EAAH,GACEA,CAAAC,SAAA,EACA,CAAAD,CAAA,CAAe,IAFjB,CAIGE,EAAH,GACEZ,CAAAa,MAAA,CAAeD,CAAf,CAA+B,QAAQ,EAAG,CACxCJ,CAAA,CAAkB,IADsB,CAA1C,CAIA,CADAA,CACA,CADkBI,CAClB,CAAAA,CAAA,CAAiB,IALnB,CATyB,CAkB3BE,QAASA,EAAM,EAAG,CAAA,IACZC,EAASjB,CAAAkB,QAATD,EAA2BjB,CAAAkB,QAAAD,OAG/B,IAAIpB,CAAAsB,UAAA,CAFWF,CAEX,EAFqBA,CAAAG,UAErB,CAAJ,CAAiC,CAC3BC,IAAAA,EAAWjB,CAAAkB,KAAA,EAAXD,CACAH,EAAUlB,CAAAkB,QAkBdJ,EAAA,CAVYN,CAAAe,CAAYF,CAAZE,CAAsB,QAAQ,CAACA,CAAD,CAAQ,CAChDrB,CAAAsB,MAAA,CAAeD,CAAf,CAAsB,IAAtB,CAA4BT,CAA5B,EAA8CT,CAA9C,CAAwDoB,QAAuB,EAAG,CAC5E,CAAA5B,CAAAsB,UAAA,CAAkBO,CAAlB,CAAJ,EACOA,CADP,EACwB,CAAAtB,CAAAuB,MAAA,CAAYD,CAAZ,CADxB,EAEEzB,C
 AAA,EAH8E,CAAlF,CAMAQ,EAAA,EAPgD,CAAtCc,CAWZX,EAAA,CAAeM,CAAAd,MAAf,CAA+BiB,CAC/BT,EAAAgB,MAAA,CAAmB,oBAAnB,CACAhB,EAAAe,MAAA,CAAmBE,CAAnB,CAvB+B,CAAjC,IAyBEpB,EAAA,EA7Bc,CA5BmC;AAAA,IACjDG,CADiD,CAEjDE,CAFiD,CAGjDJ,CAHiD,CAIjDgB,EAAgBpB,CAAAwB,WAJiC,CAKjDD,EAAYvB,CAAAyB,OAAZF,EAA2B,EAE/BzB,EAAA4B,IAAA,CAAU,qBAAV,CAAiChB,CAAjC,CACAA,EAAA,EARqD,CALpD,CADsD,CA4E/DiB,QAASA,EAAwB,CAACC,CAAD,CAAWC,CAAX,CAAwBnC,CAAxB,CAAgC,CAC/D,MAAO,UACK,KADL,UAEM,IAFN,MAGCG,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAkB,CAAA,IAC1Ba,EAAUlB,CAAAkB,QADgB,CAE1BD,EAASC,CAAAD,OAEbZ,EAAA+B,KAAA,CAAcnB,CAAAG,UAAd,CAEA,KAAIjB,EAAO+B,CAAA,CAAS7B,CAAAgC,SAAA,EAAT,CAEPnB,EAAAoB,WAAJ,GACErB,CAAAsB,OAMA,CANgBnC,CAMhB,CALIkC,CAKJ,CALiBH,CAAA,CAAYjB,CAAAoB,WAAZ,CAAgCrB,CAAhC,CAKjB,CAJIC,CAAAsB,aAIJ,GAHEpC,CAAA,CAAMc,CAAAsB,aAAN,CAGF,CAHgCF,CAGhC,EADAjC,CAAAoC,KAAA,CAAc,yBAAd,CAAyCH,CAAzC,CACA,CAAAjC,CAAAqC,SAAA,EAAAD,KAAA,CAAyB,yBAAzB,CAAoDH,CAApD,CAPF,CAUAnC,EAAA,CAAKC,CAAL,CAlB8B,CAH3B,CADwD,CA32B7DuC,CAAAA,CAAgB9C,CAAA+C,OAAA,CAA
 e,SAAf,CAA0B,CAAC,IAAD,CAA1B,CAAAC,SAAA,CACa,QADb,CAkBpBC,QAAuB,EAAE,CACvBC,QAASA,EAAO,CAACC,CAAD,CAASC,CAAT,CAAgB,CAC9B,MAAOpD,EAAAqD,OAAA,CAAe,KAAKrD,CAAAqD,OAAA,CAAe,QAAQ,EAAG,EAA1B;AAA8B,WAAWF,CAAX,CAA9B,CAAL,CAAf,CAA0EC,CAA1E,CADuB,CA0IhCE,QAASA,EAAU,CAACC,CAAD,CAAOC,CAAP,CAAa,CAAA,IAC1BC,EAAcD,CAAAE,qBADY,CAE1BC,EAAM,cACUJ,CADV,QAEIA,CAFJ,CAFoB,CAM1BK,EAAOD,CAAAC,KAAPA,CAAkB,EAEtBL,EAAA,CAAOA,CAAAM,QAAA,CACI,UADJ,CACgB,MADhB,CAAAA,QAAA,CAEI,uBAFJ,CAE6B,QAAQ,CAACC,CAAD,CAAIC,CAAJ,CAAWC,CAAX,CAAgBC,CAAhB,CAAuB,CAC3DC,CAAAA,CAAsB,GAAX,GAAAD,CAAA,CAAiBA,CAAjB,CAA0B,IACrCE,EAAAA,CAAkB,GAAX,GAAAF,CAAA,CAAiBA,CAAjB,CAA0B,IACrCL,EAAAQ,KAAA,CAAU,MAAQJ,CAAR,UAAuB,CAAC,CAACE,CAAzB,CAAV,CACAH,EAAA,CAAQA,CAAR,EAAiB,EACjB,OAAO,EAAP,EACKG,CAAA,CAAW,EAAX,CAAgBH,CADrB,EAEI,KAFJ,EAGKG,CAAA,CAAWH,CAAX,CAAmB,EAHxB,GAIKI,CAJL,EAIa,OAJb,EAIwB,SAJxB,GAKKD,CALL,EAKiB,EALjB,EAMI,GANJ,EAOKA,CAPL,EAOiB,EAPjB,CAL+D,CAF5D,CAAAL,QAAA,CAgBI,YAhBJ,CAgBkB,MAhBlB,CAkBPF,EAAAU,OAAA,CAAiBC,MAAJ,CAAW,GAAX,CAAiBf,
 CAAjB,CAAwB,GAAxB,CAA6BE,CAAA,CAAc,GAAd,CAAoB,EAAjD,CACb,OAAOE,EA3BuB,CAtIhC,IAAIY,EAAS,EAqGb,KAAAC,KAAA,CAAYC,QAAQ,CAAClB,CAAD,CAAOmB,CAAP,CAAc,CAChCH,CAAA,CAAOhB,CAAP,CAAA,CAAevD,CAAAqD,OAAA,CACb,gBAAiB,CAAA,CAAjB,CADa,CAEbqB,CAFa,CAGbnB,CAHa,EAGLD,CAAA,CAAWC,CAAX,CAAiBmB,CAAjB,CAHK,CAOf,IAAInB,CAAJ,CAAU,CACR,IAAIoB;AAAuC,GACxB,EADCpB,CAAA,CAAKA,CAAAqB,OAAL,CAAiB,CAAjB,CACD,CAAXrB,CAAAsB,OAAA,CAAY,CAAZ,CAAetB,CAAAqB,OAAf,CAA2B,CAA3B,CAAW,CACXrB,CADW,CACL,GAEdgB,EAAA,CAAOI,CAAP,CAAA,CAAuB3E,CAAAqD,OAAA,CACrB,YAAaE,CAAb,CADqB,CAErBD,CAAA,CAAWqB,CAAX,CAAyBD,CAAzB,CAFqB,CALf,CAWV,MAAO,KAnByB,CA0ElC,KAAAI,UAAA,CAAiBC,QAAQ,CAACC,CAAD,CAAS,CAChC,IAAAR,KAAA,CAAU,IAAV,CAAgBQ,CAAhB,CACA,OAAO,KAFyB,CAMlC,KAAAC,KAAA,CAAY,CAAC,YAAD,CACC,WADD,CAEC,cAFD,CAGC,IAHD,CAIC,WAJD,CAKC,OALD,CAMC,gBAND,CAOC,MAPD,CAQR,QAAQ,CAACC,CAAD,CAAaC,CAAb,CAAwBC,CAAxB,CAAsCC,CAAtC,CAA0CC,CAA1C,CAAqDC,CAArD,CAA4DC,CAA5D,CAA4EC,CAA5E,CAAkF,CA2P5FC,QAASA,EAAW,EAAG,CAAA,IACjBC,EAAOC,CAAA,EADU,CAEjBC,EAAO1F,CAAAkB,QAEX,I
 AAIsE,CAAJ,EAAYE,CAAZ,EAAoBF,CAAAG,QAApB,GAAqCD,CAAAC,QAArC,EACO9F,CAAA+F,OAAA,CAAeJ,CAAAK,WAAf,CAAgCH,CAAAG,WAAhC,CADP,EAEO,CAACL,CAAAM,eAFR,EAE+B,CAACC,CAFhC,CAGEL,CAAAb,OAEA,CAFcW,CAAAX,OAEd,CADAhF,CAAAmG,KAAA,CAAaN,CAAAb,OAAb,CAA0BI,CAA1B,CACA,CAAAF,CAAAkB,WAAA,CAAsB,cAAtB,CAAsCP,CAAtC,CALF,KAMO,IAAIF,CAAJ,EAAYE,CAAZ,CACLK,CAeA,CAfc,CAAA,CAed,CAdAhB,CAAAkB,WAAA,CAAsB,mBAAtB;AAA2CT,CAA3C,CAAiDE,CAAjD,CAcA,EAbA1F,CAAAkB,QAaA,CAbiBsE,CAajB,GAXMA,CAAAU,WAWN,GAVQrG,CAAAsG,SAAA,CAAiBX,CAAAU,WAAjB,CAAJ,CACElB,CAAA5B,KAAA,CAAegD,CAAA,CAAYZ,CAAAU,WAAZ,CAA6BV,CAAAX,OAA7B,CAAf,CAAAwB,OAAA,CAAiEb,CAAAX,OAAjE,CAAAnB,QAAA,EADF,CAIEsB,CAAAsB,IAAA,CAAcd,CAAAU,WAAA,CAAgBV,CAAAK,WAAhB,CAAiCb,CAAA5B,KAAA,EAAjC,CAAmD4B,CAAAqB,OAAA,EAAnD,CAAd,CAAA3C,QAAA,EAMN,EAAAwB,CAAAb,KAAA,CAAQmB,CAAR,CAAAe,KAAA,CACO,QAAQ,EAAG,CACd,GAAIf,CAAJ,CAAU,CAAA,IACJvE,EAASpB,CAAAqD,OAAA,CAAe,EAAf,CAAmBsC,CAAAgB,QAAnB,CADL,CAEJC,CAFI,CAEMC,CAEd7G,EAAA8G,QAAA,CAAgB1F,CAAhB,CAAwB,QAAQ,CAAC2F,CAAD,CAAQ/C,CAAR,CAAa,CAC3C5C,CA
 AA,CAAO4C,CAAP,CAAA,CAAchE,CAAAsG,SAAA,CAAiBS,CAAjB,CAAA,CACVzB,CAAA0B,IAAA,CAAcD,CAAd,CADU,CACazB,CAAA2B,OAAA,CAAiBF,CAAjB,CAFgB,CAA7C,CAKI/G,EAAAsB,UAAA,CAAkBsF,CAAlB,CAA6BjB,CAAAiB,SAA7B,CAAJ,CACM5G,CAAAkH,WAAA,CAAmBN,CAAnB,CADN,GAEIA,CAFJ,CAEeA,CAAA,CAASjB,CAAAX,OAAT,CAFf,EAIWhF,CAAAsB,UAAA,CAAkBuF,CAAlB,CAAgClB,CAAAkB,YAAhC,CAJX,GAKM7G,CAAAkH,WAAA,CAAmBL,CAAnB,CAIJ,GAHEA,CAGF,CAHgBA,CAAA,CAAYlB,CAAAX,OAAZ,CAGhB,EADA6B,CACA,CADcpB,CAAA0B,sBAAA,CAA2BN,CAA3B,CACd,CAAI7G,CAAAsB,UAAA,CAAkBuF,CAAlB,CAAJ,GACElB,CAAAyB,kBACA;AADyBP,CACzB,CAAAD,CAAA,CAAWrB,CAAAyB,IAAA,CAAUH,CAAV,CAAuB,OAAQrB,CAAR,CAAvB,CAAAkB,KAAA,CACF,QAAQ,CAACW,CAAD,CAAW,CAAE,MAAOA,EAAAzE,KAAT,CADjB,CAFb,CATF,CAeI5C,EAAAsB,UAAA,CAAkBsF,CAAlB,CAAJ,GACExF,CAAA,UADF,CACwBwF,CADxB,CAGA,OAAOvB,EAAAiC,IAAA,CAAOlG,CAAP,CA3BC,CADI,CADlB,CAAAsF,KAAA,CAiCO,QAAQ,CAACtF,CAAD,CAAS,CAChBuE,CAAJ,EAAYxF,CAAAkB,QAAZ,GACMsE,CAIJ,GAHEA,CAAAvE,OACA,CADcA,CACd,CAAApB,CAAAmG,KAAA,CAAaR,CAAAX,OAAb,CAA0BI,CAA1B,CAEF,EAAAF,CAAAkB,WAAA,CAAsB,q
 BAAtB,CAA6CT,CAA7C,CAAmDE,CAAnD,CALF,CADoB,CAjCxB,CAyCK,QAAQ,CAAC0B,CAAD,CAAQ,CACb5B,CAAJ,EAAYxF,CAAAkB,QAAZ,EACE6D,CAAAkB,WAAA,CAAsB,mBAAtB,CAA2CT,CAA3C,CAAiDE,CAAjD,CAAuD0B,CAAvD,CAFe,CAzCrB,CA1BmB,CA+EvB3B,QAASA,EAAU,EAAG,CAAA,IAEhBZ,CAFgB,CAERwC,CACZxH,EAAA8G,QAAA,CAAgBvC,CAAhB,CAAwB,QAAQ,CAACG,CAAD,CAAQnB,CAAR,CAAc,CACxC,IAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,IAAA,EAAA,CAAA,KAAA,EAzGbK,EAAAA,CAyGac,CAzGNd,KAAX,KACIoB,EAAS,EAEb,IAsGiBN,CAtGZL,OAAL,CAGA,GADIoD,CACJ,CAmGiB/C,CApGTL,OAAAqD,KAAA,CAAkBC,CAAlB,CACR,CAAA,CAEA,IATqC,IAS5BC,EAAI,CATwB,CASrBC,EAAMJ,CAAA7C,OAAtB,CAAgCgD,CAAhC,CAAoCC,CAApC,CAAyC,EAAED,CAA3C,CAA8C,CAC5C,IAAI5D,EAAMJ,CAAA,CAAKgE,CAAL,CAAS,CAAT,CAAV,CAEIE,EAAM,QACA,EADY,MAAOL,EAAA,CAAEG,CAAF,CACnB,CAAFG,kBAAA,CAAmBN,CAAA,CAAEG,CAAF,CAAnB,CAAE;AACFH,CAAA,CAAEG,CAAF,CAEJ5D,EAAJ,EAAW8D,CAAX,GACE9C,CAAA,CAAOhB,CAAAgE,KAAP,CADF,CACqBF,CADrB,CAP4C,CAW9C,CAAA,CAAO9C,CAbP,CAAA,IAAQ,EAAA,CAAO,IAHf,KAAmB,EAAA,CAAO,IAsGT,EAAA,CAAA,CAAA,CAAA,CAAX,CAAA,CAAJ,GACEwC,CA
 GA,CAHQtE,CAAA,CAAQwB,CAAR,CAAe,QACb1E,CAAAqD,OAAA,CAAe,EAAf,CAAmB8B,CAAAqB,OAAA,EAAnB,CAAuCxB,CAAvC,CADa,YAETA,CAFS,CAAf,CAGR,CAAAwC,CAAA1B,QAAA,CAAgBpB,CAJlB,CAD4C,CAA9C,CASA,OAAO8C,EAAP,EAAgBjD,CAAA,CAAO,IAAP,CAAhB,EAAgCrB,CAAA,CAAQqB,CAAA,CAAO,IAAP,CAAR,CAAsB,QAAS,EAAT,YAAwB,EAAxB,CAAtB,CAZZ,CAkBtBgC,QAASA,EAAW,CAAC0B,CAAD,CAASjD,CAAT,CAAiB,CACnC,IAAIkD,EAAS,EACblI,EAAA8G,QAAA,CAAiBqB,CAAAF,CAAAE,EAAQ,EAARA,OAAA,CAAkB,GAAlB,CAAjB,CAAyC,QAAQ,CAACC,CAAD,CAAUR,CAAV,CAAa,CAC5D,GAAU,CAAV,GAAIA,CAAJ,CACEM,CAAA9D,KAAA,CAAYgE,CAAZ,CADF,KAEO,CACL,IAAIC,EAAeD,CAAAZ,MAAA,CAAc,WAAd,CAAnB,CACIxD,EAAMqE,CAAA,CAAa,CAAb,CACVH,EAAA9D,KAAA,CAAYY,CAAA,CAAOhB,CAAP,CAAZ,CACAkE,EAAA9D,KAAA,CAAYiE,CAAA,CAAa,CAAb,CAAZ,EAA+B,EAA/B,CACA,QAAOrD,CAAA,CAAOhB,CAAP,CALF,CAHqD,CAA9D,CAWA,OAAOkE,EAAAI,KAAA,CAAY,EAAZ,CAb4B,CA5VuD,IA8LxFpC,EAAc,CAAA,CA9L0E,CA+LxF/F,EAAS,QACCoE,CADD,QAcCgE,QAAQ,EAAG,CACjBrC,CAAA,CAAc,CAAA,CACdhB,EAAAsD,WAAA,CAAsB9C,CAAtB,CAFiB,CAdZ,CAoBbR,EAAA/C,IAAA,CAAe,wBAAf,CAAyCuD,CAAzC,CAEA,
 OAAOvF,EArNqF,CARlF,CA1LW,CAlBL,CAkkBpB2C,EAAAE,SAAA,CAAuB,cAAvB;AAoCAyF,QAA6B,EAAG,CAC9B,IAAAxD,KAAA,CAAYyD,QAAQ,EAAG,CAAE,MAAO,EAAT,CADO,CApChC,CAwCA5F,EAAA6F,UAAA,CAAwB,QAAxB,CAAkCzI,CAAlC,CACA4C,EAAA6F,UAAA,CAAwB,QAAxB,CAAkCvG,CAAlC,CAmLAlC,EAAA0I,QAAA,CAAwB,CAAC,QAAD,CAAW,eAAX,CAA4B,UAA5B,CA4ExBxG,EAAAwG,QAAA,CAAmC,CAAC,UAAD,CAAa,aAAb,CAA4B,QAA5B,CA53BG,CAArC,CAAA,CAy5BE7I,MAz5BF,CAy5BUA,MAAAC,QAz5BV;",
-"sources":["angular-route.js"],
-"names":["window","angular","undefined","ngViewFactory","$route","$anchorScroll","$animate","link","scope","$element","attr","ctrl","$transclude","cleanupLastView","previousElement","remove","currentScope","$destroy","currentElement","leave","update","locals","current","isDefined","$template","newScope","$new","clone","enter","onNgViewEnter","autoScrollExp","$eval","$emit","onloadExp","autoscroll","onload","$on","ngViewFillContentFactory","$compile","$controller","html","contents","controller","$scope","controllerAs","data","children","ngRouteModule","module","provider","$RouteProvider","inherit","parent","extra","extend","pathRegExp","path","opts","insensitive","caseInsensitiveMatch","ret","keys","replace","_","slash","key","option","optional","star","push","regexp","RegExp","routes","when","this.when","route","redirectPath","length","substr","otherwise","this.otherwise","params","$get","$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce","update
 Route","next","parseRoute","last","$$route","equals","pathParams","reloadOnSearch","forceReload","copy","$broadcast","redirectTo","isString","interpolate","search","url","then","resolve","template","templateUrl","forEach","value","get","invoke","isFunction","getTrustedResourceUrl","loadedTemplateUrl","response","all","error","match","m","exec","on","i","len","val","decodeURIComponent","name","string","result","split","segment","segmentMatch","join","reload","$evalAsync","$RouteParamsProvider","this.$get","directive","$inject"]
-}


[19/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/resources/qpid-test-config.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/resources/qpid-test-config.xml b/brooklyn-library/software/messaging/src/test/resources/qpid-test-config.xml
deleted file mode 100644
index 5fcb028..0000000
--- a/brooklyn-library/software/messaging/src/test/resources/qpid-test-config.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?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.
--->
-<broker>
-    <plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory>
-    <cache-directory>${QPID_HOME}/cache</cache-directory>
-	<connector>
-		<ssl>
-			<enabled>false</enabled>
-		</ssl>
-	</connector>
-	<management>
-		<enabled>true</enabled>
-		<ssl>
-			<enabled>false</enabled>
-		</ssl>
-	</management>
-	<security>
-		<pd-auth-manager>
-			<principal-database>
-				<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase
-				</class>
-				<attributes>
-					<attribute>
-						<name>passwordFile</name>
-						<value>${QPID_HOME}/etc/passwd</value>
-					</attribute>
-				</attributes>
-			</principal-database>
-		</pd-auth-manager>
-		<allow-all />
-		<msg-auth>false</msg-auth>
-	</security>
-	<virtualhosts>
-		<default>localhost</default>
-		<virtualhost>
-			<name>localhost</name>
-			<localhost>
-                <custom-exchanges>
-                    <class-name>monterey.qpid.plugin.exchanges.switcher.SwitcherExchangeType</class-name>
-                </custom-exchanges>
-				<store>
-					<class>org.apache.qpid.server.store.MemoryMessageStore</class>
-				</store>
-			</localhost>
-		</virtualhost>
-	</virtualhosts>
-	<queue>
-		<auto_register>true</auto_register>
-	</queue>
-	<status-updates>ON</status-updates>
-</broker>
-
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/monitoring/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/monitoring/pom.xml b/brooklyn-library/software/monitoring/pom.xml
deleted file mode 100644
index 299d788..0000000
--- a/brooklyn-library/software/monitoring/pom.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>jar</packaging>
-    
-    <artifactId>brooklyn-software-monitoring</artifactId>
-    
-    <name>Brooklyn Monitoring Software Entities</name>
-    <description>
-        Brooklyn entities for monitoring processes
-    </description>
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-utils-common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-utils-groovy</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-database</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <!-- bring in jclouds for testing -->
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-locations-jclouds</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitDriver.java b/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitDriver.java
deleted file mode 100644
index d088928..0000000
--- a/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitDriver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.monitoring.monit;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface MonitDriver extends SoftwareProcessDriver {
-
-    String getStatusCmd();
-
-    String getExpandedInstallDir();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitNode.java b/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitNode.java
deleted file mode 100644
index 2e3798c..0000000
--- a/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitNode.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.monitoring.monit;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.objs.HasShortName;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.reflect.TypeToken;
-
-@Catalog(name="Monit Node", description="Monit is a free open source utility for managing and monitoring, processes, programs, files, directories and filesystems on a UNIX system")
-@ImplementedBy(MonitNodeImpl.class)
-public interface MonitNode extends SoftwareProcess, HasShortName {
-    // e.g. https://mmonit.com/monit/dist/binary/5.6/monit-5.6-linux-x64.tar.gz
-    @SetFromFlag("downloadUrl")
-    public static final BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new StringAttributeSensorAndConfigKey(
-            Attributes.DOWNLOAD_URL, "https://mmonit.com/monit/dist/binary/${version}/monit-${version}-${driver.osTag}.tar.gz");
-    
-    @SetFromFlag("version")
-    public static final ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "5.9");
-    
-    @SetFromFlag("controlFileUrl")
-    public static final ConfigKey<String> CONTROL_FILE_URL = ConfigKeys.newStringConfigKey("monit.control.url", "URL where monit control (.monitrc) file can be found", "");
-
-    @SuppressWarnings("serial")
-    public static final ConfigKey<Map<String, Object>> CONTROL_FILE_SUBSTITUTIONS = ConfigKeys.newConfigKey(new TypeToken<Map<String, Object>>(){}, "monit.control.substitutions", 
-        "Additional substitutions to be used in the control file template", ImmutableMap.<String, Object>of());
-    
-    public static final AttributeSensor<String> MONIT_TARGET_PROCESS_NAME = Sensors.newStringSensor("monit.target.process.name");
-    
-    public static final AttributeSensor<String> MONIT_TARGET_PROCESS_STATUS = Sensors.newStringSensor("monit.target.process.status");
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitNodeImpl.java b/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitNodeImpl.java
deleted file mode 100644
index 2702994..0000000
--- a/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitNodeImpl.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.monitoring.monit;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.ssh.SshFeed;
-import org.apache.brooklyn.feed.ssh.SshPollConfig;
-import org.apache.brooklyn.feed.ssh.SshPollValue;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
-
-public class MonitNodeImpl extends SoftwareProcessImpl implements MonitNode {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(MonitNodeImpl.class);
-    
-    private SshFeed feed;
-    
-    public MonitNodeImpl() {
-    }
-    
-    public MonitNodeImpl(Map<?,?> flags) {
-        super(flags, null);
-    }
-    
-    public MonitNodeImpl(Map<?,?> flags, Entity parent) {
-        super(flags, parent);
-    }
-
-    @Override
-    public Class<? extends MonitDriver> getDriverInterface() {
-        return MonitDriver.class;
-    }
-    
-    @Override
-    public MonitDriver getDriver() {
-        return (MonitDriver) super.getDriver();
-    }
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        Location machine = Iterables.get(getLocations(), 0, null);
-        
-        if (machine instanceof SshMachineLocation) {
-            String cmd = getDriver().getStatusCmd();
-            feed = SshFeed.builder()
-                .entity(this)
-                .period(Duration.FIVE_SECONDS)
-                .machine((SshMachineLocation) machine)
-                .poll(new SshPollConfig<Boolean>(SERVICE_UP)
-                    .command(cmd)
-                    .setOnSuccess(true)
-                    .setOnFailureOrException(false))
-                .poll(new SshPollConfig<String>(MONIT_TARGET_PROCESS_NAME)
-                    .command(cmd)
-                    .onSuccess(new Function<SshPollValue, String>() {
-                        @Override
-                        public String apply(SshPollValue input) {
-                            String process = Strings.getFirstWordAfter(input.getStdout(), "Process");
-                            return process;
-                        }
-                    })
-                    .setOnFailureOrException(null))
-                .poll(new SshPollConfig<String>(MONIT_TARGET_PROCESS_STATUS)
-                    .command(cmd)
-                    .onSuccess(new Function<SshPollValue, String>() {
-                        @Override
-                        public String apply(SshPollValue input) {
-                            return Strings.trim(Strings.getRemainderOfLineAfter(input.getStdout(), "status"));
-                        }
-                    })
-                    .setOnFailureOrException(null))
-                .build();
-        } else {
-            LOG.warn("Location(s) {} not an ssh-machine location, so not polling for status; setting serviceUp immediately", getLocations());
-            sensors().set(SERVICE_UP, true);
-        }
-    }
-    
-    @Override
-    protected void disconnectSensors() {
-        if (feed != null) feed.stop();
-    }
-
-    @Override
-    public String getShortName() {
-        return "Monit";
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitSshDriver.java b/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitSshDriver.java
deleted file mode 100644
index e89ce90..0000000
--- a/brooklyn-library/software/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/monit/MonitSshDriver.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.monitoring.monit;
-
-import static java.lang.String.format;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.api.location.OsDetails;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public class MonitSshDriver extends AbstractSoftwareProcessSshDriver implements MonitDriver {
-    
-    private String remoteControlFilePath;
-    
-    public MonitSshDriver(MonitNodeImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("monit-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = ImmutableList.<String>builder()
-            .add(BashCommands.INSTALL_TAR)
-            .add(BashCommands.INSTALL_CURL)
-            .add(BashCommands.commandToDownloadUrlsAs(urls, saveAs))
-            .add(format("tar xfvz %s", saveAs))
-            .build();
-        
-        newScript(INSTALLING)
-            .failOnNonZeroResultCode()
-            .body
-            .append(commands)
-            .execute();
-    }
-
-    @Override
-    public void customize() {
-        newScript(CUSTOMIZING)
-            .body.append("echo copying control file")
-            .execute();  //create the directory
-        String controlFileUrl = getEntity().getConfig(MonitNode.CONTROL_FILE_URL);
-        remoteControlFilePath = getRunDir() + "/monit.monitrc";
-        copyTemplate(controlFileUrl, remoteControlFilePath, false, getEntity().getConfig(MonitNode.CONTROL_FILE_SUBSTITUTIONS));
-        // Monit demands the control file has permissions <= 0700
-        newScript(CUSTOMIZING)
-            .body.append("chmod 600 " + remoteControlFilePath)
-            .execute();
-    }
-
-    @Override
-    public void launch() {
-        // NOTE: executing monit in daemon mode will spawn a separate process for the monit daemon so the value of $! cannot be used
-        // instead we use the -p argument
-        String command = format("touch %s && nohup %s/bin/monit -c %s -p %s > out.log 2> err.log < /dev/null &", getMonitPidFile(),
-            getExpandedInstallDir(), remoteControlFilePath, getMonitPidFile());
-        newScript(MutableMap.of("usePidFile", false), LAUNCHING)
-            .updateTaskAndFailOnNonZeroResultCode()
-            .body.append(command)
-            .execute();
-    }
-    
-    @Override
-    public boolean isRunning() {
-        Map<String,?> flags = ImmutableMap.of("usePidFile", getMonitPidFile());
-        return newScript(flags, CHECK_RUNNING).execute() == 0;
-    }
-    
-    @Override
-    public void stop() {
-        new ScriptHelper(this, "Send SIGTERM to Monit process")
-            .body.append("kill -s SIGTERM `cat " + getMonitPidFile() + "`")
-            .execute();        
-    }
-    
-    protected String getMonitPidFile() {
-        // Monit seems to dislike starting with a relative path to a pid file.
-        return getRunDir() + "/" + AbstractSoftwareProcessSshDriver.PID_FILENAME;
-    }
-    
-    public String getMonitLogFile() {
-        return getRunDir() + "/monit.log";
-    }
-
-    public String getOsTag() {
-        OsDetails os = getLocation().getOsDetails();
-        if (os == null) {
-            // Default to 64 bit linux
-            return "linux-x64";
-        } else if (os.isMac()) {
-            return "macosx-universal";
-        } else {
-            String arch = os.is64bit() ? "x64" : "x86";
-            return "linux-" + arch;
-        }
-    }
-    
-    @Override
-    public String getStatusCmd() {
-        return format("%s/bin/monit -c %s status", getExpandedInstallDir(), remoteControlFilePath);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/monitoring/src/test/java/org/apache/brooklyn/entity/monitoring/monit/MonitIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/monitoring/src/test/java/org/apache/brooklyn/entity/monitoring/monit/MonitIntegrationTest.java b/brooklyn-library/software/monitoring/src/test/java/org/apache/brooklyn/entity/monitoring/monit/MonitIntegrationTest.java
deleted file mode 100644
index f19e6b9..0000000
--- a/brooklyn-library/software/monitoring/src/test/java/org/apache/brooklyn/entity/monitoring/monit/MonitIntegrationTest.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.monitoring.monit;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotEquals;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.charset.Charset;
-import java.util.Map;
-import java.util.concurrent.Callable;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.MachineDetails;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode;
-import org.apache.brooklyn.entity.software.base.SameServerEntity;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Function;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.io.Files;
-
-public class MonitIntegrationTest extends BrooklynAppLiveTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MonitIntegrationTest.class);
-    
-    LocalhostMachineProvisioningLocation loc;
-    Process testProcess;
-    
-    @BeforeMethod(alwaysRun=true)
-    public void setUp() throws Exception {
-        super.setUp();
-        loc = app.newLocalhostProvisioningLocation();
-        testProcess = (new ProcessBuilder()).command("vi", "monittest").start();
-    }
-
-    @AfterMethod(alwaysRun = true)
-    @Override
-    public void tearDown() throws Exception {
-        try {
-            super.tearDown();
-        } finally {
-            if (testProcess != null) {
-                testProcess.destroy();
-            }
-        }
-    }
-    
-    @Test(groups = "Integration")
-    public void test_localhost() throws Exception {
-        final MonitNode monitNode = app.createAndManageChild(EntitySpec.create(MonitNode.class)
-            .configure(MonitNode.CONTROL_FILE_URL, "classpath:///org/apache/brooklyn/entity/monitoring/monit/monit.monitrc"));
-        app.start(ImmutableSet.of(loc));
-        LOG.info("Monit started");
-        EntityTestUtils.assertAttributeEqualsEventually(monitNode, MonitNode.MONIT_TARGET_PROCESS_STATUS, "Running");
-    }
-    
-    @Test(groups = "Integration")
-    public void test_monitorMySql() throws Exception {
-        SameServerEntity sameServerEntity = app.createAndManageChild(EntitySpec.create(SameServerEntity.class));
-        MySqlNode mySqlNode = sameServerEntity.addChild(EntitySpec.create(MySqlNode.class));
-
-        Function<String, Map<String, Object>> controlFileSubstitutionsFunction = new Function<String, Map<String, Object>>() {
-            public Map<String, Object> apply(String input) {
-                return ImmutableMap.<String, Object>of("targetPidFile", input);
-            }
-        };
-        EntitySpec<MonitNode> monitSpec = EntitySpec.create(MonitNode.class)
-                .configure(MonitNode.CONTROL_FILE_URL, "classpath:///org/apache/brooklyn/entity/monitoring/monit/monitmysql.monitrc")
-                .configure(MonitNode.CONTROL_FILE_SUBSTITUTIONS, DependentConfiguration.valueWhenAttributeReady(mySqlNode,
-                        SoftwareProcess.PID_FILE, controlFileSubstitutionsFunction));
-        final MonitNode monitNode = sameServerEntity.addChild(monitSpec);
-
-        app.start(ImmutableSet.of(loc));
-        LOG.info("Monit and MySQL started");
-        EntityTestUtils.assertAttributeEqualsEventually(monitNode, MonitNode.MONIT_TARGET_PROCESS_STATUS, "Running");
-        mySqlNode.stop();
-        Asserts.succeedsEventually(new Runnable() {
-            @Override
-            public void run() {
-                String targetStatus = monitNode.getAttribute(MonitNode.MONIT_TARGET_PROCESS_STATUS);
-                LOG.debug("MonitNode target status: {}", targetStatus);
-                assertNotEquals(targetStatus, "Running");
-            }
-        });
-        mySqlNode.restart();
-        EntityTestUtils.assertAttributeEqualsEventually(monitNode, MonitNode.MONIT_TARGET_PROCESS_STATUS, "Running");
-    }
-    
-    @Test(groups = "Integration")
-    public void test_monitorMySqlAutoRestart() throws Exception {
-        // This runs on localhost; free to obtain another machine with impunity.
-        final String osFlavor;
-        MachineDetails machineDetails = app.getExecutionContext().submit(new Callable<MachineDetails>() {
-            public MachineDetails call() throws Exception {
-                return loc.obtain().getMachineDetails();
-            }}).get();
-        if (machineDetails.getOsDetails().isMac()) {
-            osFlavor = "osx10.6-x86_64";
-        } else if (machineDetails.getOsDetails().isWindows()) {
-            throw new UnsupportedOperationException("Windows not supported for test_monitorMySqlAutoRestart");
-        } else {
-            osFlavor = "linux2.6-x86_64"; // assume 64 bit linux
-        }
-        
-        // The monit node needs to know the installation and run directory of the mysql dir, so we need to specify it explicitly  
-        File tempDir = Files.createTempDir();
-        tempDir.deleteOnExit();
-        final String mySqlInstallDir = tempDir.getAbsolutePath() + "/install";
-        final String mySqlRunDir = tempDir.getAbsolutePath() + "/run";
-        final String mySqlDataDir = tempDir.getAbsolutePath() + "/data";
-        final String mySqlVersion = MySqlNode.SUGGESTED_VERSION.getDefaultValue();
-        
-        SameServerEntity sameServerEntity = app.createAndManageChild(EntitySpec.create(SameServerEntity.class));
-        final MySqlNode mySqlNode = sameServerEntity.addChild(EntitySpec.create(MySqlNode.class)
-            .configure(MySqlNode.INSTALL_DIR, mySqlInstallDir)
-            .configure(MySqlNode.RUN_DIR, mySqlRunDir)
-            .configure(MySqlNode.DATA_DIR, mySqlDataDir));
-
-        Function<String, Map<String, Object>> controlFileSubstitutionsFunction = new Function<String, Map<String, Object>>() {
-            public Map<String, Object> apply(String input) {
-                return ImmutableMap.<String, Object>of(
-                    "targetPidFile", input,
-                    "mySqlInstallDir", mySqlInstallDir,
-                    "mySqlRunDir", mySqlRunDir,
-                    "mySqlVersion", mySqlVersion,
-                    "mySqlOsFlavor", osFlavor
-                );
-            }
-        };
-        
-        final MonitNode monitNode = sameServerEntity.addChild(EntitySpec.create(MonitNode.class)
-                .configure(MonitNode.CONTROL_FILE_URL, "classpath:///org/apache/brooklyn/entity/monitoring/monit/monitmysqlwithrestart.monitrc")
-                .configure(MonitNode.CONTROL_FILE_SUBSTITUTIONS, DependentConfiguration.valueWhenAttributeReady(mySqlNode,
-                        SoftwareProcess.PID_FILE, controlFileSubstitutionsFunction)));
-
-        app.start(ImmutableSet.of(loc));
-        LOG.info("Monit and MySQL started");
-        final String[] initialPid = {""};
-        Asserts.succeedsEventually(new Runnable() {
-            @Override
-            public void run() {
-                String targetStatus = monitNode.getAttribute(MonitNode.MONIT_TARGET_PROCESS_STATUS);
-                LOG.debug("MonitNode target status: {}", targetStatus);
-                assertEquals(targetStatus, "Running");
-                try {
-                    initialPid[0] = Files.readFirstLine(new File(mySqlNode.getAttribute(SoftwareProcess.PID_FILE)), Charset.defaultCharset());
-                    LOG.debug("Initial PID: {}", initialPid[0]);
-                } catch (IOException e) {
-                    Asserts.fail("Could not read PID file: " + e);
-                }
-            }
-        });
-        mySqlNode.stop();
-        EntityTestUtils.assertAttributeEqualsEventually(monitNode, MonitNode.MONIT_TARGET_PROCESS_STATUS, "Running");
-
-        // NOTE: Do not manually restart the mySqlNode, it should be restarted by monit
-        Asserts.succeedsEventually(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    String pidFileLocation = mySqlNode.getAttribute(SoftwareProcess.PID_FILE);
-                    String newPid = Files.readFirstLine(new File(pidFileLocation), Charset.defaultCharset());
-                    LOG.debug("Old PID: {}, New PID: {} read from PID file: {}", new String[] {initialPid[0], newPid, pidFileLocation});
-                    assertNotEquals(initialPid[0], newPid, "Process PID has not changed");
-                } catch (IOException e) {
-                    Asserts.fail("Could not read PID file: " + e);
-                }
-                String targetStatus = monitNode.getAttribute(MonitNode.MONIT_TARGET_PROCESS_STATUS);
-                LOG.debug("MonitNode target status: {}", targetStatus);
-                assertEquals(targetStatus, "Running");
-            }
-        });
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/monitoring/src/test/resources/org/apache/brooklyn/entity/monitoring/monit/monit.monitrc
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/monitoring/src/test/resources/org/apache/brooklyn/entity/monitoring/monit/monit.monitrc b/brooklyn-library/software/monitoring/src/test/resources/org/apache/brooklyn/entity/monitoring/monit/monit.monitrc
deleted file mode 100644
index 4a8bbe2..0000000
--- a/brooklyn-library/software/monitoring/src/test/resources/org/apache/brooklyn/entity/monitoring/monit/monit.monitrc
+++ /dev/null
@@ -1,30 +0,0 @@
-[#ftl]
-#
-# 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.
-#
-
-set httpd port 2812 and use address localhost
-allow localhost
-set daemon 5
-set pidfile ${driver.runDir}/pid.txt
-set logfile ${driver.runDir}/monit.log
-
-check process vi
-	matching "vi monittest"
-	group test
-	
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/monitoring/src/test/resources/org/apache/brooklyn/entity/monitoring/monit/monitmysql.monitrc
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/monitoring/src/test/resources/org/apache/brooklyn/entity/monitoring/monit/monitmysql.monitrc b/brooklyn-library/software/monitoring/src/test/resources/org/apache/brooklyn/entity/monitoring/monit/monitmysql.monitrc
deleted file mode 100644
index b5bc4a6..0000000
--- a/brooklyn-library/software/monitoring/src/test/resources/org/apache/brooklyn/entity/monitoring/monit/monitmysql.monitrc
+++ /dev/null
@@ -1,29 +0,0 @@
-[#ftl]
-#
-# 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.
-#
-
-set httpd port 2812 and use address localhost
-allow localhost
-set daemon 5
-set pidfile ${driver.runDir}/pid.txt
-set logfile ${driver.runDir}/monit.log
-	
-check process mysqld with pidfile ${targetPidFile}
-	group database
-	
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/monitoring/src/test/resources/org/apache/brooklyn/entity/monitoring/monit/monitmysqlwithrestart.monitrc
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/monitoring/src/test/resources/org/apache/brooklyn/entity/monitoring/monit/monitmysqlwithrestart.monitrc b/brooklyn-library/software/monitoring/src/test/resources/org/apache/brooklyn/entity/monitoring/monit/monitmysqlwithrestart.monitrc
deleted file mode 100644
index ccd76dc..0000000
--- a/brooklyn-library/software/monitoring/src/test/resources/org/apache/brooklyn/entity/monitoring/monit/monitmysqlwithrestart.monitrc
+++ /dev/null
@@ -1,31 +0,0 @@
-[#ftl]
-#
-# 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.
-#
-
-set httpd port 2812 and use address localhost
-allow localhost
-set daemon 5
-set pidfile ${driver.runDir}/pid.txt
-set logfile ${driver.runDir}/monit.log
-	
-check process mysqld with pidfile ${targetPidFile}
-	group database
-	mode active
-    start program = "/bin/bash -c 'rm ${mySqlRunDir}/pid.txt ; ${mySqlInstallDir}/mysql-${mySqlVersion}-${mySqlOsFlavor}/bin/mysqld --defaults-file=${mySqlRunDir}/mymysql.cnf --user=root >> ${mySqlRunDir}/out.log 2>> ${mySqlRunDir}/err.log < /dev/null & echo $! > ${mySqlRunDir}/pid.txt'"
-    stop program = "/bin/bash -c 'kill -s SIGTERM $(cat ${mySqlRunDir}/pid.txt) ; kill -s KILL $(cat ${mySqlRunDir}/pid.txt) ; rm ${mySqlRunDir}/pid.txt'"

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/pom.xml b/brooklyn-library/software/network/pom.xml
deleted file mode 100644
index 3c785e6..0000000
--- a/brooklyn-library/software/network/pom.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>jar</packaging>
-    <artifactId>brooklyn-software-network</artifactId>
-    <name>Brooklyn Network Software Entities</name>
-    <description>
-        Brooklyn entities for network service software processes
-    </description>
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-utils-common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <!-- bring in jclouds for testing -->
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-locations-jclouds</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServer.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServer.java b/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServer.java
deleted file mode 100644
index f5b5e21..0000000
--- a/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServer.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import java.util.Map;
-
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-import com.google.common.collect.Multimap;
-import com.google.common.reflect.TypeToken;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.annotation.Effector;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.group.DynamicGroup;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.net.Cidr;
-
-/**
- * This sets up a BIND DNS server.
- */
-@Catalog(name="BIND", description="BIND is an Internet Domain Name Server.", iconUrl="classpath:///isc-logo.png")
-@ImplementedBy(BindDnsServerImpl.class)
-public interface BindDnsServer extends SoftwareProcess {
-
-    @SetFromFlag("filter")
-    ConfigKey<Predicate<? super Entity>> ENTITY_FILTER = ConfigKeys.newConfigKey(new TypeToken<Predicate<? super Entity>>() {},
-            "bind.entity.filter", "Filter for entities which will use the BIND DNS service for name resolution." +
-                    "Default is all instances of SoftwareProcess in the application.",
-            Predicates.instanceOf(SoftwareProcess.class));
-
-    @SetFromFlag("domainName")
-    ConfigKey<String> DOMAIN_NAME = ConfigKeys.newStringConfigKey(
-            "bind.domain.name", "The DNS domain name to serve", "brooklyn.local");
-
-    @SetFromFlag("reverseLookupNetwork")
-    ConfigKey<String> REVERSE_LOOKUP_NETWORK = ConfigKeys.newStringConfigKey(
-            "bind.reverse-lookup.address", "Network address for reverse lookup zone");
-
-    @SetFromFlag("subnet")
-    ConfigKey<String> MANAGEMENT_CIDR = ConfigKeys.newStringConfigKey(
-            "bind.access.cidr", "Subnet CIDR or ACL allowed to access DNS", "0.0.0.0/0");
-
-    @SetFromFlag("hostnameSensor")
-    ConfigKey<AttributeSensor<String>> HOSTNAME_SENSOR = ConfigKeys.newConfigKey(new TypeToken<AttributeSensor<String>>() {},
-            "bind.sensor.hostname", "Sensor on managed entities that reports the hostname");
-
-    PortAttributeSensorAndConfigKey DNS_PORT =
-            new PortAttributeSensorAndConfigKey("bind.port", "BIND DNS port for TCP and UDP", PortRanges.fromString("53"));
-
-    @SetFromFlag("zoneFileTemplate")
-    ConfigKey<String> DOMAIN_ZONE_FILE_TEMPLATE = ConfigKeys.newStringConfigKey(
-            "bind.template.domain-zone", "The BIND domain zone file to serve (as FreeMarker template)",
-            "classpath://org/apache/brooklyn/entity/network/bind/domain.zone");
-
-    @SetFromFlag("reverseZoneFileTemplate")
-    ConfigKey<String> REVERSE_ZONE_FILE_TEMPLATE = ConfigKeys.newStringConfigKey(
-            "bind.template.reverse-zone", "The BIND reverse lookup zone file to serve (as FreeMarker template)",
-            "classpath://org/apache/brooklyn/entity/network/bind/reverse.zone");
-
-    @SetFromFlag("namedConfTemplate")
-    ConfigKey<String> NAMED_CONF_TEMPLATE = ConfigKeys.newStringConfigKey(
-            "bind.template.named-conf", "The BIND named configuration file (as FreeMarker template)",
-            "classpath://org/apache/brooklyn/entity/network/bind/named.conf");
-
-    @SetFromFlag("updateRootZonesFile")
-    ConfigKey<Boolean> UPDATE_ROOT_ZONES_FILE = ConfigKeys.newBooleanConfigKey(
-            "bind.updateRootZones", "Instructs the entity to fetch the latest root zones file from ftp.rs.internic.net.",
-            Boolean.FALSE);
-
-
-    /* Reverse lookup attributes. */
-
-    AttributeSensor<Cidr> REVERSE_LOOKUP_CIDR = Sensors.newSensor(Cidr.class,
-            "bind.reverse-lookup.cidr", "The network CIDR that hosts must have for reverse lookup entries " +
-            "to be added (default uses server address /24)");
-
-    AttributeSensor<String> REVERSE_LOOKUP_DOMAIN = Sensors.newStringSensor(
-            "bind.reverse-lookup.domain", "The in-addr.arpa reverse lookup domain name");
-
-
-    /* Configuration applicable to clients of the BIND DNS service. */
-
-    @SetFromFlag("replaceResolvConf")
-    ConfigKey<Boolean> REPLACE_RESOLV_CONF = ConfigKeys.newBooleanConfigKey(
-            "bind.resolv-conf.replce", "Set to replace resolv.conf with the template (default is to use eth0 script)", Boolean.FALSE);
-
-    @SetFromFlag("interfaceConfigTemplate")
-    ConfigKey<String> INTERFACE_CONFIG_TEMPLATE = ConfigKeys.newStringConfigKey(
-            "bind.template.interface-cfg", "The network interface configuration file for clients (as FreeMarker template)",
-            "classpath://org/apache/brooklyn/entity/network/bind/ifcfg");
-
-    @SetFromFlag("interfaceConfigTemplate")
-    ConfigKey<String> RESOLV_CONF_TEMPLATE = ConfigKeys.newStringConfigKey(
-            "bind.template.resolv-conf", "The resolver configuration file for clients (as FreeMarker template)",
-            "classpath://org/apache/brooklyn/entity/network/bind/resolv.conf");
-
-    AttributeSensor<DynamicGroup> ENTITIES = Sensors.newSensor(DynamicGroup.class,
-            "bind.entities", "The entities being managed by this server");
-
-    AttributeSensor<Multimap<String, String>> ADDRESS_MAPPINGS = Sensors.newSensor(new TypeToken<Multimap<String, String>>() {},
-            "bind.mappings", "All address mappings maintained by the server, in form address -> [names]");
-
-    AttributeSensor<Map<String, String>> A_RECORDS = Sensors.newSensor(new TypeToken<Map<String, String>>() {},
-            "bind.records.a", "All A records for the server, in form name -> address");
-
-    AttributeSensor<Multimap<String, String>> CNAME_RECORDS = Sensors.newSensor(new TypeToken<Multimap<String, String>>() {},
-            "bind.records.cname", "All CNAME records for the server, in form name -> [names]");
-
-    AttributeSensor<Map<String, String>> PTR_RECORDS = Sensors.newSensor(new TypeToken<Map<String, String>>() {},
-            "bind.records.ptr", "All PTR records for the server, in form address -> name. Entries will be in REVERSE_LOOKUP_CIDR. " +
-                    "Entries are guaranteed to have an inverse mapping in A_RECORDS.");
-
-    AttributeSensor<Long> SERIAL = Sensors.newLongSensor(
-            "bind.serial", "A serial number guaranteed to be valid for use in a modified domain.zone or reverse.zone file");
-
-    public Multimap<String, String> getAddressMappings();
-
-    /**
-     * @return the IP to hostname mappings stored in this DNS server's conf file
-     * @deprecated since 0.7.0 use {@link #PTR_RECORDS} instead.
-     */
-    @Deprecated
-    @Effector(description="Gets the IP to hostname mappings stored in this DNS server's conf file")
-    public Map<String, String> getReverseMappings();
-
-    /**
-     * @return the predicate used to filter entities for the Bind server to manage.
-     */
-    Predicate<? super Entity> getEntityFilter();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerDriver.java b/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerDriver.java
deleted file mode 100644
index 8eb7d57..0000000
--- a/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerDriver.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-import com.google.common.annotations.VisibleForTesting;
-
-public interface BindDnsServerDriver extends SoftwareProcessDriver {
-
-    /**
-     * Uploads configuration files and restarts the service.
-     */
-    void updateBindConfiguration();
-
-    /**
-     * @return a support class appropriate for the machine the server is running on.
-     */
-    @VisibleForTesting
-    BindOsSupport getOsSupport();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerImpl.java b/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerImpl.java
deleted file mode 100644
index 2ee89e2..0000000
--- a/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerImpl.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.io.ByteArrayInputStream;
-import java.io.StringReader;
-import java.util.Collection;
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.Sensor;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.location.Machines;
-import org.apache.brooklyn.entity.group.AbstractMembershipTrackingPolicy;
-import org.apache.brooklyn.entity.group.DynamicGroup;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.CharMatcher;
-import com.google.common.base.Function;
-import com.google.common.base.Joiner;
-import com.google.common.base.Predicate;
-import com.google.common.base.Splitter;
-import com.google.common.collect.BiMap;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.HashBiMap;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableListMultimap;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableMultimap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Multimap;
-import com.google.common.collect.MultimapBuilder;
-import com.google.common.collect.Multimaps;
-
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.guava.Maybe;
-import org.apache.brooklyn.util.net.Cidr;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.text.Strings;
-
-/**
- * This sets up a BIND DNS server.
- * <p>
- * <b>NOTE</b> This entity has only been certified on <i>CentOS</i>, <i>RHEL</i>,
- * <i>Ubuntu</i> and <i>Debian</i> operating systems.
- */
-public class BindDnsServerImpl extends SoftwareProcessImpl implements BindDnsServer {
-
-    private static final Logger LOG = LoggerFactory.getLogger(BindDnsServerImpl.class);
-    private final Object serialMutex = new Object();
-
-    // As per RFC 952 and RFC 1123.
-    private static final CharMatcher DOMAIN_NAME_FIRST_CHAR_MATCHER = CharMatcher.inRange('a', 'z')
-                .or(CharMatcher.inRange('A', 'Z'))
-                .or(CharMatcher.inRange('0', '9'));
-    private static final CharMatcher DOMAIN_NAME_MATCHER = DOMAIN_NAME_FIRST_CHAR_MATCHER
-            .or(CharMatcher.is('-'));
-
-
-    private class HostnameTransformer implements Function<Entity, String> {
-        @Override
-        public String apply(Entity input) {
-            String hostname = input.getAttribute(getConfig(HOSTNAME_SENSOR));
-            hostname = DOMAIN_NAME_FIRST_CHAR_MATCHER.negate().trimFrom(hostname);
-            hostname = DOMAIN_NAME_MATCHER.negate().trimAndCollapseFrom(hostname, '-');
-            if (hostname.length() > 63) {
-                hostname = hostname.substring(0, 63);
-            }
-            return hostname;
-        }
-    }
-
-    public BindDnsServerImpl() {
-        super();
-    }
-
-    @Override
-    public void init() {
-        super.init();
-        checkNotNull(getConfig(HOSTNAME_SENSOR), "%s requires value for %s", getClass().getName(), HOSTNAME_SENSOR);
-        DynamicGroup entities = addChild(EntitySpec.create(DynamicGroup.class)
-                .configure(DynamicGroup.ENTITY_FILTER, getEntityFilter()));
-        sensors().set(ENTITIES, entities);
-        sensors().set(A_RECORDS, ImmutableMap.<String, String>of());
-        sensors().set(CNAME_RECORDS, ImmutableMultimap.<String, String>of());
-        sensors().set(PTR_RECORDS, ImmutableMap.<String, String>of());
-        sensors().set(ADDRESS_MAPPINGS, ImmutableMultimap.<String, String>of());
-        synchronized (serialMutex) {
-            sensors().set(SERIAL, System.currentTimeMillis());
-        }
-    }
-
-    @Override
-    public void postRebind() {
-        update();
-    }
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return BindDnsServerDriver.class;
-    }
-
-    @Override
-    public Multimap<String, String> getAddressMappings() {
-        return getAttribute(ADDRESS_MAPPINGS);
-    }
-
-    @Override
-    public Map<String, String> getReverseMappings() {
-        return getAttribute(PTR_RECORDS);
-    }
-
-    @Override
-    public BindDnsServerDriver getDriver() {
-        return (BindDnsServerDriver) super.getDriver();
-    }
-
-    @Override
-    public void connectSensors() {
-        connectServiceUpIsRunning();
-    }
-
-    @Override
-    public void disconnectSensors() {
-        super.disconnectSensors();
-        disconnectServiceUpIsRunning();
-    }
-
-    @Override
-    protected void preStart() {
-        String reverse = getConfig(REVERSE_LOOKUP_NETWORK);
-        if (Strings.isBlank(reverse)) reverse = getAttribute(ADDRESS);
-        sensors().set(REVERSE_LOOKUP_CIDR, new Cidr(reverse + "/24"));
-        String reverseLookupDomain = Joiner.on('.').join(Iterables.skip(Lists.reverse(Lists.newArrayList(
-                Splitter.on('.').split(reverse))), 1)) + ".in-addr.arpa";
-        sensors().set(REVERSE_LOOKUP_DOMAIN, reverseLookupDomain);
-
-        policies().add(PolicySpec.create(MemberTrackingPolicy.class)
-                .displayName("Address tracker")
-                .configure(AbstractMembershipTrackingPolicy.SENSORS_TO_TRACK, ImmutableSet.<Sensor<?>>of(getConfig(HOSTNAME_SENSOR)))
-                .configure(AbstractMembershipTrackingPolicy.GROUP, getEntities()));
-    }
-
-    @Override
-    public void postStart() {
-        update();
-    }
-
-    public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy {
-        @Override
-        protected void onEntityChange(Entity member) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("State of {} on change: {}", member, member.getAttribute(Attributes.SERVICE_STATE_ACTUAL).name());
-            }
-            ((BindDnsServerImpl) entity).update();
-        }
-        @Override
-        protected void onEntityAdded(Entity member) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("State of {} on added: {}", member, member.getAttribute(Attributes.SERVICE_STATE_ACTUAL).name());
-            }
-            ((BindDnsServerImpl) entity).configureResolver(member);
-        }
-    }
-
-    private class HasHostnameAndValidLifecycle implements Predicate<Entity> {
-        @Override
-        public boolean apply(Entity input) {
-            switch (input.getAttribute(Attributes.SERVICE_STATE_ACTUAL)) {
-            case STOPPED:
-            case STOPPING:
-            case DESTROYED:
-                return false;
-            }
-            return input.getAttribute(getConfig(HOSTNAME_SENSOR)) != null;
-        }
-    }
-
-    public void update() {
-        Lifecycle serverState = getAttribute(Attributes.SERVICE_STATE_ACTUAL);
-        if (Lifecycle.STOPPED.equals(serverState) || Lifecycle.STOPPING.equals(serverState)
-                || Lifecycle.DESTROYED.equals(serverState) || !getAttribute(Attributes.SERVICE_UP)) {
-            LOG.debug("Skipped update of {} when service state is {} and running is {}",
-                    new Object[]{this, getAttribute(Attributes.SERVICE_STATE_ACTUAL), getAttribute(SERVICE_UP)});
-            return;
-        }
-        synchronized (this) {
-            Iterable<Entity> availableEntities = FluentIterable.from(getEntities().getMembers())
-                    .filter(new HasHostnameAndValidLifecycle());
-            LOG.debug("{} updating with entities: {}", this, Iterables.toString(availableEntities));
-            ImmutableListMultimap<String, Entity> hostnameToEntity = Multimaps.index(availableEntities,
-                    new HostnameTransformer());
-
-            Map<String, String> octetToName = Maps.newHashMap();
-            BiMap<String, String> ipToARecord = HashBiMap.create();
-            Multimap<String, String> aRecordToCnames = MultimapBuilder.hashKeys().hashSetValues().build();
-            Multimap<String, String> ipToAllNames = MultimapBuilder.hashKeys().hashSetValues().build();
-
-            for (Map.Entry<String, Entity> e : hostnameToEntity.entries()) {
-                String domainName = e.getKey();
-                Maybe<SshMachineLocation> location = Machines.findUniqueMachineLocation(e.getValue().getLocations(), SshMachineLocation.class);
-                if (!location.isPresent()) {
-                    LOG.debug("Member {} of {} does not have an SSH location so will not be configured", e.getValue(), this);
-                    continue;
-                } else if (ipToARecord.inverse().containsKey(domainName)) {
-                    continue;
-                }
-
-                String address = location.get().getAddress().getHostAddress();
-                ipToAllNames.put(address, domainName);
-                if (!ipToARecord.containsKey(address)) {
-                    ipToARecord.put(address, domainName);
-                    if (getReverseLookupNetwork().contains(new Cidr(address + "/32"))) {
-                        String octet = Iterables.get(Splitter.on('.').split(address), 3);
-                        if (!octetToName.containsKey(octet)) octetToName.put(octet, domainName);
-                    }
-                } else {
-                    aRecordToCnames.put(ipToARecord.get(address), domainName);
-                }
-            }
-            sensors().set(A_RECORDS, ImmutableMap.copyOf(ipToARecord.inverse()));
-            sensors().set(PTR_RECORDS, ImmutableMap.copyOf(octetToName));
-            sensors().set(CNAME_RECORDS, Multimaps.unmodifiableMultimap(aRecordToCnames));
-            sensors().set(ADDRESS_MAPPINGS, Multimaps.unmodifiableMultimap(ipToAllNames));
-
-            // Update Bind configuration files and restart the service
-            getDriver().updateBindConfiguration();
-       }
-    }
-
-    protected void configureResolver(Entity entity) {
-        Maybe<SshMachineLocation> machine = Machines.findUniqueMachineLocation(entity.getLocations(), SshMachineLocation.class);
-        if (machine.isPresent()) {
-            if (getConfig(REPLACE_RESOLV_CONF)) {
-                machine.get().copyTo(new StringReader(getConfig(RESOLV_CONF_TEMPLATE)), "/etc/resolv.conf");
-            } else {
-                appendTemplate(getConfig(INTERFACE_CONFIG_TEMPLATE), "/etc/sysconfig/network-scripts/ifcfg-eth0", machine.get());
-                machine.get().execScript("reload network", ImmutableList.of(BashCommands.sudo("service network reload")));
-            }
-            LOG.info("configured resolver on {}", machine);
-        } else {
-            LOG.debug("{} can't configure resolver at {}: no SshMachineLocation", this, entity);
-        }
-    }
-
-    protected void appendTemplate(String template, String destination, SshMachineLocation machine) {
-        String content = ((BindDnsServerSshDriver) getDriver()).processTemplate(template);
-        String temp = "/tmp/template-" + Strings.makeRandomId(6);
-        machine.copyTo(new ByteArrayInputStream(content.getBytes()), temp);
-        machine.execScript("updating file", ImmutableList.of(
-                BashCommands.sudo(String.format("tee -a %s < %s", destination, temp)),
-                String.format("rm -f %s", temp)));
-    }
-
-
-    @Override
-    public Predicate<? super Entity> getEntityFilter() {
-        return getConfig(ENTITY_FILTER);
-    }
-
-    // Mostly used in templates
-    public String getManagementCidr() {
-        return getConfig(MANAGEMENT_CIDR);
-    }
-
-    public Integer getDnsPort() {
-        return getAttribute(DNS_PORT);
-    }
-
-    public String getDomainName() {
-        return getConfig(DOMAIN_NAME);
-    }
-
-    /**
-     * @return A serial number guaranteed to be valid for use in a modified domain.zone or reverse.zone file.
-     */
-    public long getSerial() {
-        synchronized (serialMutex) {
-            long next = getAttribute(SERIAL) + 1;
-            sensors().set(SERIAL, next);
-            return next;
-        }
-    }
-
-    public Cidr getReverseLookupNetwork() {
-        return getAttribute(REVERSE_LOOKUP_CIDR);
-    }
-
-    public String getReverseLookupDomain() {
-        return getAttribute(REVERSE_LOOKUP_DOMAIN);
-    }
-
-    public DynamicGroup getEntities() {
-        return getAttribute(ENTITIES);
-    }
-
-    public Map<String, String> getAddressRecords() {
-        return getAttribute(A_RECORDS);
-    }
-
-    public Multimap<String, String> getCanonicalNameRecords() {
-        return getAttribute(CNAME_RECORDS);
-    }
-
-    public Map<String, Collection<String>> getCnamesForTemplates() {
-        return getAttribute(CNAME_RECORDS).asMap();
-    }
-
-    public Map<String, String> getPointerRecords() {
-        return getAttribute(PTR_RECORDS);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerSshDriver.java b/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerSshDriver.java
deleted file mode 100644
index b9991c8..0000000
--- a/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerSshDriver.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import java.io.ByteArrayInputStream;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.net.Protocol;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.ssh.IptablesCommands;
-import org.apache.brooklyn.util.ssh.IptablesCommands.Chain;
-import org.apache.brooklyn.util.ssh.IptablesCommands.Policy;
-import org.apache.brooklyn.util.text.Strings;
-
-public class BindDnsServerSshDriver extends AbstractSoftwareProcessSshDriver implements BindDnsServerDriver {
-
-    private static final Logger LOG = LoggerFactory.getLogger(BindDnsServerSshDriver.class);
-    private volatile BindOsSupport osSupport;
-    private final Object osSupportMutex = new Object();
-
-    public BindDnsServerSshDriver(BindDnsServerImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public BindDnsServerImpl getEntity() {
-        return (BindDnsServerImpl) super.getEntity();
-    }
-
-    @Override
-    public void install() {
-        List<String> commands = ImmutableList.<String>builder()
-                .add(BashCommands.installPackage(MutableMap.of(
-                        "yum", "bind", "apt", "bind9"), "bind"))
-                .add(BashCommands.ok("which setenforce && " + BashCommands.sudo("setenforce 0")))
-                .build();
-        newScript(INSTALLING)
-                .failOnNonZeroResultCode()
-                .body.append(commands)
-                .execute();
-    }
-
-    @Override
-    public void customize() {
-        Integer dnsPort = getEntity().getDnsPort();
-        Map<String, Object> ports = MutableMap.<String, Object>of("dnsPort", dnsPort);
-        Networking.checkPortsValid(ports);
-
-        List<String> commands = Lists.newArrayList(
-                BashCommands.sudo("mkdir -p " + getDataDirectory() + " " + getDynamicDirectory() + " " + getOsSupport().getConfigDirectory()),
-                BashCommands.sudo("chown -R bind:bind " + getDataDirectory() + " " + getDynamicDirectory()),
-                // TODO determine name of ethernet interface if not eth0?
-                IptablesCommands.insertIptablesRule(Chain.INPUT, "eth0", Protocol.UDP, dnsPort, Policy.ACCEPT),
-                IptablesCommands.insertIptablesRule(Chain.INPUT, "eth0", Protocol.TCP, dnsPort, Policy.ACCEPT),
-                // TODO Iptables is not a service on Ubuntu
-                BashCommands.sudo("service iptables save"),
-                BashCommands.sudo("service iptables restart"));
-        if (getEntity().getConfig(BindDnsServer.UPDATE_ROOT_ZONES_FILE)) {
-            commands.add("wget --user=ftp --password=ftp ftp://ftp.rs.internic.net/domain/db.cache " +
-                    "-O " + getOsSupport().getRootZonesFile());
-        }
-        newScript(CUSTOMIZING)
-                .body.append(commands)
-                // fails if iptables is not a service, e.g. on ubuntu
-                //.failOnNonZeroResultCode()
-                .execute();
-
-        copyAsRoot("classpath://org/apache/brooklyn/entity/network/bind/rfc1912.zone", getRfc1912ZonesFile());
-        copyAsRoot("classpath://org/apache/brooklyn/entity/network/bind/named.localhost", Os.mergePathsUnix(getOsSupport().getConfigDirectory(), "named.localhost"));
-        copyAsRoot("classpath://org/apache/brooklyn/entity/network/bind/named.loopback", Os.mergePathsUnix(getOsSupport().getConfigDirectory(), "named.loopback"));
-        copyAsRoot("classpath://org/apache/brooklyn/entity/network/bind/named.empty", Os.mergePathsUnix(getOsSupport().getConfigDirectory(), "named.empty"));
-
-        newScript("Checking BIND configuration")
-                .body.append(BashCommands.sudo("named-checkconf"))
-                .failOnNonZeroResultCode()
-                .execute();
-    }
-
-    @Override
-    public void launch() {
-        newScript(MutableMap.of("usePidFile", false), LAUNCHING)
-                .body.append(BashCommands.sudo("service " + getOsSupport().getServiceName() + " start"))
-                .execute();
-    }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of("usePidFile", false), CHECK_RUNNING)
-                .body.append(BashCommands.sudo("service " + getOsSupport().getServiceName() + " status"))
-                .execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(MutableMap.of("usePidFile", false), STOPPING)
-                .body.append(BashCommands.sudo("service " + getOsSupport().getServiceName() + " stop"))
-                .execute();
-    }
-
-    @Override
-    public void updateBindConfiguration() {
-        LOG.debug("Updating bind configuration at " + getMachine());
-        copyAsRoot(entity.getConfig(BindDnsServer.NAMED_CONF_TEMPLATE), getOsSupport().getRootConfigFile());
-        copyAsRoot(entity.getConfig(BindDnsServer.DOMAIN_ZONE_FILE_TEMPLATE), getDomainZoneFile());
-        copyAsRoot(entity.getConfig(BindDnsServer.REVERSE_ZONE_FILE_TEMPLATE), getReverseZoneFile());
-        int result = getMachine().execScript("restart bind",
-                ImmutableList.of(BashCommands.sudo("service " + getOsSupport().getServiceName() + " restart")));
-        LOG.info("Updated named configuration and zone file for '{}' on {} (exit code {}).",
-                new Object[]{entity.getConfig(BindDnsServer.DOMAIN_NAME), entity, result});
-    }
-
-    private void copyAsRoot(String template, String destination) {
-        String content = processTemplate(template);
-        String temp = "/tmp/template-" + Strings.makeRandomId(6);
-        getMachine().copyTo(new ByteArrayInputStream(content.getBytes()), temp);
-        getMachine().execScript("copying file", ImmutableList.of(BashCommands.sudo(String.format("mv %s %s", temp, destination))));
-    }
-
-    /** @return The location on the server of the domain zone file */
-    public String getDomainZoneFile() {
-        return Os.mergePaths(getOsSupport().getConfigDirectory(), "domain.zone");
-    }
-
-    /** @return The location on the server of the reverse zone file */
-    public String getReverseZoneFile() {
-        return Os.mergePaths(getOsSupport().getConfigDirectory(), "reverse.zone");
-    }
-
-    public String getDataDirectory() {
-        return Os.mergePaths(getOsSupport().getWorkingDirectory(), "data");
-    }
-
-    public String getDynamicDirectory() {
-        return Os.mergePaths(getOsSupport().getWorkingDirectory(), "dynamic");
-    }
-
-    public String getRfc1912ZonesFile() {
-        return Os.mergePaths(getOsSupport().getConfigDirectory(), "rfc1912.zone");
-    }
-
-    public BindOsSupport getOsSupport() {
-        BindOsSupport result = osSupport;
-        if (result == null) {
-            synchronized (osSupportMutex) {
-                result = osSupport;
-                if (result == null) {
-                    boolean yumExists = newScript("testing for yum")
-                            .body.append(BashCommands.requireExecutable("yum"))
-                            .execute() == 0;
-                    osSupport = result = yumExists ? BindOsSupport.forRhel() : BindOsSupport.forDebian();
-                }
-            }
-        }
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindOsSupport.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindOsSupport.java b/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindOsSupport.java
deleted file mode 100644
index c48f8a3..0000000
--- a/brooklyn-library/software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindOsSupport.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import javax.annotation.concurrent.Immutable;
-
-/**
- * Provides operating system-specific information for working with the Bind service.
- */
-// Class would be package-private if Freemarker didn't complain vociferously.
-@Immutable
-public class BindOsSupport {
-
-    // Likewise would make these package-private and have no getters if Freemarker was ok with it.
-    private final String packageName;
-    private final String serviceName;
-    private final String rootConfigFile;
-    private final String configDirectory;
-    private final String workingDirectory;
-    private final String rootZonesFile;
-    private final String keysFile;
-
-    private BindOsSupport(
-            String packageName,
-            String serviceName,
-            String rootConfigFile,
-            String configDirectory,
-            String workingDirectory,
-            String rootZonesFile,
-            String keysFile) {
-        this.packageName = packageName;
-        this.serviceName = serviceName;
-        this.rootConfigFile = rootConfigFile;
-        this.configDirectory = configDirectory;
-        this.workingDirectory = workingDirectory;
-        this.rootZonesFile = rootZonesFile;
-        this.keysFile = keysFile;
-    }
-
-    /**
-     * @return support for RHEL-based operating systems.
-     */
-    public static BindOsSupport forRhel() {
-        return new BindOsSupport(
-                "bind",
-                "named",
-                "/etc/named.conf",
-                "/var/named",
-                "/var/named/data",
-                "/var/named/named.ca",
-                "/etc/named.iscdlv.key");
-    }
-
-    /**
-     * @return support for Debian-based operating systems.
-     */
-    public static BindOsSupport forDebian() {
-        return new BindOsSupport(
-                "bind9",
-                "bind9",
-                "/etc/bind/named.conf",
-                "/etc/bind",
-                "/var/cache/bind",
-                "/etc/bind/db.root",
-                "/etc/bind/bind.keys"
-        );
-    }
-
-    public String getPackageName() {
-        return packageName;
-    }
-
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    public String getRootConfigFile() {
-        return rootConfigFile;
-    }
-
-    public String getConfigDirectory() {
-        return configDirectory;
-    }
-
-    public String getWorkingDirectory() {
-        return workingDirectory;
-    }
-
-    public String getRootZonesFile() {
-        return rootZonesFile;
-    }
-
-    public String getKeysFile() {
-        return keysFile;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/resources/isc-logo.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/resources/isc-logo.png b/brooklyn-library/software/network/src/main/resources/isc-logo.png
deleted file mode 100644
index 44cdec6..0000000
Binary files a/brooklyn-library/software/network/src/main/resources/isc-logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/domain.zone
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/domain.zone b/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/domain.zone
deleted file mode 100644
index 671d234..0000000
--- a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/domain.zone
+++ /dev/null
@@ -1,46 +0,0 @@
-[#ftl]
-;;
-;; 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.
-;;
-;; Generated by Brooklyn on ${.now?string.short}
-;;
-;;
-[#noparse]$TTL[/#noparse] 86400
-@ IN SOA ns1.${entity.domainName}. root.${entity.domainName}. (
-    ${entity.serial?c} ; serial
-    3600 ; refresh
-    1800 ; retry
-    604800 ; expire
-    86400 ; ttl
-)
-@ IN NS ns1.${entity.domainName}.
-@ IN NS ns2.${entity.domainName}.
-ns1 IN A ${driver.address}
-ns2 IN A ${driver.address}
-
-;; Addresses
-[#list entity.addressRecords?keys as address]
-${address} IN A ${entity.addressRecords[address]}
-[/#list]
-
-;; Canonical names
-[#list entity.cnamesForTemplates?keys as aRecord]
-[#list entity.cnamesForTemplates[aRecord] as cname]
-${cname} IN CNAME ${aRecord}
-[/#list]
-[/#list]

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/ifcfg
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/ifcfg b/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/ifcfg
deleted file mode 100644
index b8b310d..0000000
--- a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/ifcfg
+++ /dev/null
@@ -1,24 +0,0 @@
-[#ftl]
-#
-# 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.
-#
-# Generated by Brooklyn on ${.now?string.short}
-#
-DOMAIN=${entity.domainName}
-DNS1=${driver.address}
-DNS2=8.8.8.8
\ No newline at end of file


[38/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular.min.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular.min.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular.min.js
deleted file mode 100644
index 89ea8f9..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular.min.js
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- AngularJS v1.2.19
- (c) 2010-2014 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(T,V,s){'use strict';function v(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.2.19/"+(b?b+"/":"")+a;for(c=1;c<arguments.length;c++)a=a+(1==c?"?":"&")+"p"+(c-1)+"="+encodeURIComponent("function"==typeof arguments[c]?arguments[c].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[c]?"undefined":"string"!=typeof arguments[c]?JSON.stringify(arguments[c]):arguments[c]);return Error(a)}}function db(b){if(null==b||Ea(b))return!1;
-var a=b.length;return 1===b.nodeType&&a?!0:y(b)||L(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function q(b,a,c){var d;if(b)if(O(b))for(d in b)"prototype"==d||("length"==d||"name"==d||b.hasOwnProperty&&!b.hasOwnProperty(d))||a.call(c,b[d],d);else if(b.forEach&&b.forEach!==q)b.forEach(a,c);else if(db(b))for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function Vb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function Tc(b,
-a,c){for(var d=Vb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function Wb(b){return function(a,c){b(c,a)}}function eb(){for(var b=ka.length,a;b;){b--;a=ka[b].charCodeAt(0);if(57==a)return ka[b]="A",ka.join("");if(90==a)ka[b]="0";else return ka[b]=String.fromCharCode(a+1),ka.join("")}ka.unshift("0");return ka.join("")}function Xb(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function E(b){var a=b.$$hashKey;q(arguments,function(a){a!==b&&q(a,function(a,c){b[c]=a})});Xb(b,a);return b}function Z(b){return parseInt(b,
-10)}function Yb(b,a){return E(new (E(function(){},{prototype:b})),a)}function A(){}function Fa(b){return b}function $(b){return function(){return b}}function D(b){return"undefined"===typeof b}function B(b){return"undefined"!==typeof b}function U(b){return null!=b&&"object"===typeof b}function y(b){return"string"===typeof b}function xb(b){return"number"===typeof b}function Oa(b){return"[object Date]"===xa.call(b)}function O(b){return"function"===typeof b}function fb(b){return"[object RegExp]"===xa.call(b)}
-function Ea(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function Uc(b){return!(!b||!(b.nodeName||b.prop&&b.attr&&b.find))}function Vc(b,a,c){var d=[];q(b,function(b,g,f){d.push(a.call(c,b,g,f))});return d}function Pa(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Qa(b,a){var c=Pa(b,a);0<=c&&b.splice(c,1);return a}function Ga(b,a,c,d){if(Ea(b)||b&&b.$evalAsync&&b.$watch)throw Ra("cpws");if(a){if(b===a)throw Ra("cpi");c=c||[];
-d=d||[];if(U(b)){var e=Pa(c,b);if(-1!==e)return d[e];c.push(b);d.push(a)}if(L(b))for(var g=a.length=0;g<b.length;g++)e=Ga(b[g],null,c,d),U(b[g])&&(c.push(b[g]),d.push(e)),a.push(e);else{var f=a.$$hashKey;q(a,function(b,c){delete a[c]});for(g in b)e=Ga(b[g],null,c,d),U(b[g])&&(c.push(b[g]),d.push(e)),a[g]=e;Xb(a,f)}}else(a=b)&&(L(b)?a=Ga(b,[],c,d):Oa(b)?a=new Date(b.getTime()):fb(b)?a=RegExp(b.source):U(b)&&(a=Ga(b,{},c,d)));return a}function la(b,a){if(L(b)){a=a||[];for(var c=0;c<b.length;c++)a[c]=
-b[c]}else if(U(b))for(c in a=a||{},b)!yb.call(b,c)||"$"===c.charAt(0)&&"$"===c.charAt(1)||(a[c]=b[c]);return a||b}function ya(b,a){if(b===a)return!0;if(null===b||null===a)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&"object"==c)if(L(b)){if(!L(a))return!1;if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ya(b[d],a[d]))return!1;return!0}}else{if(Oa(b))return Oa(a)&&b.getTime()==a.getTime();if(fb(b)&&fb(a))return b.toString()==a.toString();if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&
-a.$watch||Ea(b)||Ea(a)||L(a))return!1;c={};for(d in b)if("$"!==d.charAt(0)&&!O(b[d])){if(!ya(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c.hasOwnProperty(d)&&"$"!==d.charAt(0)&&a[d]!==s&&!O(a[d]))return!1;return!0}return!1}function Zb(){return V.securityPolicy&&V.securityPolicy.isActive||V.querySelector&&!(!V.querySelector("[ng-csp]")&&!V.querySelector("[data-ng-csp]"))}function zb(b,a){var c=2<arguments.length?za.call(arguments,2):[];return!O(a)||a instanceof RegExp?a:c.length?function(){return arguments.length?
-a.apply(b,c.concat(za.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}}function Wc(b,a){var c=a;"string"===typeof b&&"$"===b.charAt(0)?c=s:Ea(a)?c="$WINDOW":a&&V===a?c="$DOCUMENT":a&&(a.$evalAsync&&a.$watch)&&(c="$SCOPE");return c}function sa(b,a){return"undefined"===typeof b?s:JSON.stringify(b,Wc,a?"  ":null)}function $b(b){return y(b)?JSON.parse(b):b}function Sa(b){"function"===typeof b?b=!0:b&&0!==b.length?(b=I(""+b),b=!("f"==b||"0"==b||"false"==
-b||"no"==b||"n"==b||"[]"==b)):b=!1;return b}function ga(b){b=x(b).clone();try{b.empty()}catch(a){}var c=x("<div>").append(b).html();try{return 3===b[0].nodeType?I(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+I(b)})}catch(d){return I(c)}}function ac(b){try{return decodeURIComponent(b)}catch(a){}}function bc(b){var a={},c,d;q((b||"").split("&"),function(b){b&&(c=b.split("="),d=ac(c[0]),B(d)&&(b=B(c[1])?ac(c[1]):!0,a[d]?L(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}
-function Ab(b){var a=[];q(b,function(b,d){L(b)?q(b,function(b){a.push(Aa(d,!0)+(!0===b?"":"="+Aa(b,!0)))}):a.push(Aa(d,!0)+(!0===b?"":"="+Aa(b,!0)))});return a.length?a.join("&"):""}function gb(b){return Aa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Aa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function Xc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,f=["ng:app",
-"ng-app","x-ng-app","data-ng-app"],k=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;q(f,function(a){f[a]=!0;c(V.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(q(b.querySelectorAll("."+a),c),q(b.querySelectorAll("."+a+"\\:"),c),q(b.querySelectorAll("["+a+"]"),c))});q(d,function(a){if(!e){var b=k.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):q(a.attributes,function(b){!e&&f[b.name]&&(e=a,g=b.value)})}});e&&a(e,g?[g]:[])}function cc(b,a){var c=function(){b=x(b);if(b.injector()){var c=
-b[0]===V?"document":ga(b);throw Ra("btstrpd",c);}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");c=dc(a);c.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",function(a,b,c,d,e){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(T&&!d.test(T.name))return c();T.name=T.name.replace(d,"");Ta.resumeBootstrap=function(b){q(b,function(b){a.push(b)});c()}}function hb(b,a){a=a||"_";return b.replace(Yc,function(b,
-d){return(d?a:"")+b.toLowerCase()})}function Bb(b,a,c){if(!b)throw Ra("areq",a||"?",c||"required");return b}function Ua(b,a,c){c&&L(b)&&(b=b[b.length-1]);Bb(O(b),a,"not a function, got "+(b&&"object"===typeof b?b.constructor.name||"Object":typeof b));return b}function Ba(b,a){if("hasOwnProperty"===b)throw Ra("badname",a);}function ec(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,g=a.length,f=0;f<g;f++)d=a[f],b&&(b=(e=b)[d]);return!c&&O(b)?zb(e,b):b}function Cb(b){var a=b[0];b=b[b.length-1];if(a===
-b)return x(a);var c=[a];do{a=a.nextSibling;if(!a)break;c.push(a)}while(a!==b);return x(c)}function Zc(b){var a=v("$injector"),c=v("ng");b=b.angular||(b.angular={});b.$$minErr=b.$$minErr||v;return b.module||(b.module=function(){var b={};return function(e,g,f){if("hasOwnProperty"===e)throw c("badname","module");g&&b.hasOwnProperty(e)&&(b[e]=null);return b[e]||(b[e]=function(){function b(a,d,e){return function(){c[e||"push"]([a,d,arguments]);return p}}if(!g)throw a("nomod",e);var c=[],d=[],l=b("$injector",
-"invoke"),p={_invokeQueue:c,_runBlocks:d,requires:g,name:e,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:b("$provide","value"),constant:b("$provide","constant","unshift"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:l,run:function(a){d.push(a);return this}};f&&l(f);return p}())}}())}function $c(b){E(b,{bootstrap:cc,
-copy:Ga,extend:E,equals:ya,element:x,forEach:q,injector:dc,noop:A,bind:zb,toJson:sa,fromJson:$b,identity:Fa,isUndefined:D,isDefined:B,isString:y,isFunction:O,isObject:U,isNumber:xb,isElement:Uc,isArray:L,version:ad,isDate:Oa,lowercase:I,uppercase:Ha,callbacks:{counter:0},$$minErr:v,$$csp:Zb});Va=Zc(T);try{Va("ngLocale")}catch(a){Va("ngLocale",[]).provider("$locale",bd)}Va("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:cd});a.provider("$compile",fc).directive({a:dd,input:gc,textarea:gc,
-form:ed,script:fd,select:gd,style:hd,option:id,ngBind:jd,ngBindHtml:kd,ngBindTemplate:ld,ngClass:md,ngClassEven:nd,ngClassOdd:od,ngCloak:pd,ngController:qd,ngForm:rd,ngHide:sd,ngIf:td,ngInclude:ud,ngInit:vd,ngNonBindable:wd,ngPluralize:xd,ngRepeat:yd,ngShow:zd,ngStyle:Ad,ngSwitch:Bd,ngSwitchWhen:Cd,ngSwitchDefault:Dd,ngOptions:Ed,ngTransclude:Fd,ngModel:Gd,ngList:Hd,ngChange:Id,required:hc,ngRequired:hc,ngValue:Jd}).directive({ngInclude:Kd}).directive(Db).directive(ic);a.provider({$anchorScroll:Ld,
-$animate:Md,$browser:Nd,$cacheFactory:Od,$controller:Pd,$document:Qd,$exceptionHandler:Rd,$filter:jc,$interpolate:Sd,$interval:Td,$http:Ud,$httpBackend:Vd,$location:Wd,$log:Xd,$parse:Yd,$rootScope:Zd,$q:$d,$sce:ae,$sceDelegate:be,$sniffer:ce,$templateCache:de,$timeout:ee,$window:fe,$$rAF:ge,$$asyncCallback:he})}])}function Wa(b){return b.replace(ie,function(a,b,d,e){return e?d.toUpperCase():d}).replace(je,"Moz$1")}function Eb(b,a,c,d){function e(b){var e=c&&b?[this.filter(b)]:[this],m=a,h,l,p,n,r,
-t;if(!d||null!=b)for(;e.length;)for(h=e.shift(),l=0,p=h.length;l<p;l++)for(n=x(h[l]),m?n.triggerHandler("$destroy"):m=!m,r=0,n=(t=n.children()).length;r<n;r++)e.push(Ca(t[r]));return g.apply(this,arguments)}var g=Ca.fn[b],g=g.$original||g;e.$original=g;Ca.fn[b]=e}function S(b){if(b instanceof S)return b;y(b)&&(b=aa(b));if(!(this instanceof S)){if(y(b)&&"<"!=b.charAt(0))throw Fb("nosel");return new S(b)}if(y(b)){var a=b;b=V;var c;if(c=ke.exec(a))b=[b.createElement(c[1])];else{var d=b,e;b=d.createDocumentFragment();
-c=[];if(Gb.test(a)){d=b.appendChild(d.createElement("div"));e=(le.exec(a)||["",""])[1].toLowerCase();e=ea[e]||ea._default;d.innerHTML="<div>&#160;</div>"+e[1]+a.replace(me,"<$1></$2>")+e[2];d.removeChild(d.firstChild);for(a=e[0];a--;)d=d.lastChild;a=0;for(e=d.childNodes.length;a<e;++a)c.push(d.childNodes[a]);d=b.firstChild;d.textContent=""}else c.push(d.createTextNode(a));b.textContent="";b.innerHTML="";b=c}Hb(this,b);x(V.createDocumentFragment()).append(this)}else Hb(this,b)}function Ib(b){return b.cloneNode(!0)}
-function Ia(b){kc(b);var a=0;for(b=b.childNodes||[];a<b.length;a++)Ia(b[a])}function lc(b,a,c,d){if(B(d))throw Fb("offargs");var e=ma(b,"events");ma(b,"handle")&&(D(a)?q(e,function(a,c){Xa(b,c,a);delete e[c]}):q(a.split(" "),function(a){D(c)?(Xa(b,a,e[a]),delete e[a]):Qa(e[a]||[],c)}))}function kc(b,a){var c=b.ng339,d=Ya[c];d&&(a?delete Ya[c].data[a]:(d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),lc(b)),delete Ya[c],b.ng339=s))}function ma(b,a,c){var d=b.ng339,d=Ya[d||-1];if(B(c))d||(b.ng339=
-d=++ne,d=Ya[d]={}),d[a]=c;else return d&&d[a]}function mc(b,a,c){var d=ma(b,"data"),e=B(c),g=!e&&B(a),f=g&&!U(a);d||f||ma(b,"data",d={});if(e)d[a]=c;else if(g){if(f)return d&&d[a];E(d,a)}else return d}function Jb(b,a){return b.getAttribute?-1<(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" "):!1}function ib(b,a){a&&b.setAttribute&&q(a.split(" "),function(a){b.setAttribute("class",aa((" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+aa(a)+" ",
-" ")))})}function jb(b,a){if(a&&b.setAttribute){var c=(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");q(a.split(" "),function(a){a=aa(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});b.setAttribute("class",aa(c))}}function Hb(b,a){if(a){a=a.nodeName||!B(a.length)||Ea(a)?[a]:a;for(var c=0;c<a.length;c++)b.push(a[c])}}function nc(b,a){return kb(b,"$"+(a||"ngController")+"Controller")}function kb(b,a,c){b=x(b);9==b[0].nodeType&&(b=b.find("html"));for(a=L(a)?a:[a];b.length;){for(var d=b[0],e=
-0,g=a.length;e<g;e++)if((c=b.data(a[e]))!==s)return c;b=x(d.parentNode||11===d.nodeType&&d.host)}}function oc(b){for(var a=0,c=b.childNodes;a<c.length;a++)Ia(c[a]);for(;b.firstChild;)b.removeChild(b.firstChild)}function pc(b,a){var c=lb[a.toLowerCase()];return c&&qc[b.nodeName]&&c}function oe(b,a){var c=function(c,e){c.preventDefault||(c.preventDefault=function(){c.returnValue=!1});c.stopPropagation||(c.stopPropagation=function(){c.cancelBubble=!0});c.target||(c.target=c.srcElement||V);if(D(c.defaultPrevented)){var g=
-c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented||!1===c.returnValue};var f=la(a[e||c.type]||[]);q(f,function(a){a.call(b,c)});8>=P?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function Ja(b,a){var c=typeof b,d;"function"==c||"object"==c&&null!==b?"function"==typeof(d=
-b.$$hashKey)?d=b.$$hashKey():d===s&&(d=b.$$hashKey=(a||eb)()):d=b;return c+":"+d}function Za(b,a){if(a){var c=0;this.nextUid=function(){return++c}}q(b,this.put,this)}function rc(b){var a,c;"function"===typeof b?(a=b.$inject)||(a=[],b.length&&(c=b.toString().replace(pe,""),c=c.match(qe),q(c[1].split(re),function(b){b.replace(se,function(b,c,d){a.push(d)})})),b.$inject=a):L(b)?(c=b.length-1,Ua(b[c],"fn"),a=b.slice(0,c)):Ua(b,"fn",!0);return a}function dc(b){function a(a){return function(b,c){if(U(b))q(b,
-Wb(a));else return a(b,c)}}function c(a,b){Ba(a,"service");if(O(b)||L(b))b=p.instantiate(b);if(!b.$get)throw $a("pget",a);return l[a+k]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[],c,d,g,k;q(a,function(a){if(!h.get(a)){h.put(a,!0);try{if(y(a))for(c=Va(a),b=b.concat(e(c.requires)).concat(c._runBlocks),d=c._invokeQueue,g=0,k=d.length;g<k;g++){var f=d[g],m=p.get(f[0]);m[f[1]].apply(m,f[2])}else O(a)?b.push(p.invoke(a)):L(a)?b.push(p.invoke(a)):Ua(a,"module")}catch(l){throw L(a)&&(a=
-a[a.length-1]),l.message&&(l.stack&&-1==l.stack.indexOf(l.message))&&(l=l.message+"\n"+l.stack),$a("modulerr",a,l.stack||l.message||l);}}});return b}function g(a,b){function c(d){if(a.hasOwnProperty(d)){if(a[d]===f)throw $a("cdep",d+" <- "+m.join(" <- "));return a[d]}try{return m.unshift(d),a[d]=f,a[d]=b(d)}catch(e){throw a[d]===f&&delete a[d],e;}finally{m.shift()}}function d(a,b,e){var g=[],k=rc(a),f,m,h;m=0;for(f=k.length;m<f;m++){h=k[m];if("string"!==typeof h)throw $a("itkn",h);g.push(e&&e.hasOwnProperty(h)?
-e[h]:c(h))}L(a)&&(a=a[f]);return a.apply(b,g)}return{invoke:d,instantiate:function(a,b){var c=function(){},e;c.prototype=(L(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return U(e)||O(e)?e:c},get:c,annotate:rc,has:function(b){return l.hasOwnProperty(b+k)||a.hasOwnProperty(b)}}}var f={},k="Provider",m=[],h=new Za([],!0),l={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),value:a(function(a,b){return d(a,$(b))}),constant:a(function(a,
-b){Ba(a,"constant");l[a]=b;n[a]=b}),decorator:function(a,b){var c=p.get(a+k),d=c.$get;c.$get=function(){var a=r.invoke(d,c);return r.invoke(b,null,{$delegate:a})}}}},p=l.$injector=g(l,function(){throw $a("unpr",m.join(" <- "));}),n={},r=n.$injector=g(n,function(a){a=p.get(a+k);return r.invoke(a.$get,a)});q(e(b),function(a){r.invoke(a||A)});return r}function Ld(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;
-q(a,function(a){b||"a"!==I(a.nodeName)||(b=a)});return b}function g(){var b=c.hash(),d;b?(d=f.getElementById(b))?d.scrollIntoView():(d=e(f.getElementsByName(b)))?d.scrollIntoView():"top"===b&&a.scrollTo(0,0):a.scrollTo(0,0)}var f=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(g)});return g}]}function he(){this.$get=["$$rAF","$timeout",function(b,a){return b.supported?function(a){return b(a)}:function(b){return a(b,0,!1)}}]}function te(b,a,c,d){function e(a){try{a.apply(null,
-za.call(arguments,1))}finally{if(t--,0===t)for(;J.length;)try{J.pop()()}catch(b){c.error(b)}}}function g(a,b){(function ba(){q(w,function(a){a()});u=b(ba,a)})()}function f(){z=null;K!=k.url()&&(K=k.url(),q(ha,function(a){a(k.url())}))}var k=this,m=a[0],h=b.location,l=b.history,p=b.setTimeout,n=b.clearTimeout,r={};k.isMock=!1;var t=0,J=[];k.$$completeOutstandingRequest=e;k.$$incOutstandingRequestCount=function(){t++};k.notifyWhenNoOutstandingRequests=function(a){q(w,function(a){a()});0===t?a():J.push(a)};
-var w=[],u;k.addPollFn=function(a){D(u)&&g(100,p);w.push(a);return a};var K=h.href,Q=a.find("base"),z=null;k.url=function(a,c){h!==b.location&&(h=b.location);l!==b.history&&(l=b.history);if(a){if(K!=a)return K=a,d.history?c?l.replaceState(null,"",a):(l.pushState(null,"",a),Q.attr("href",Q.attr("href"))):(z=a,c?h.replace(a):h.href=a),k}else return z||h.href.replace(/%27/g,"'")};var ha=[],N=!1;k.onUrlChange=function(a){if(!N){if(d.history)x(b).on("popstate",f);if(d.hashchange)x(b).on("hashchange",f);
-else k.addPollFn(f);N=!0}ha.push(a);return a};k.baseHref=function(){var a=Q.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var M={},ca="",C=k.baseHref();k.cookies=function(a,b){var d,e,g,k;if(a)b===s?m.cookie=escape(a)+"=;path="+C+";expires=Thu, 01 Jan 1970 00:00:00 GMT":y(b)&&(d=(m.cookie=escape(a)+"="+escape(b)+";path="+C).length+1,4096<d&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"));else{if(m.cookie!==ca)for(ca=m.cookie,
-d=ca.split("; "),M={},g=0;g<d.length;g++)e=d[g],k=e.indexOf("="),0<k&&(a=unescape(e.substring(0,k)),M[a]===s&&(M[a]=unescape(e.substring(k+1))));return M}};k.defer=function(a,b){var c;t++;c=p(function(){delete r[c];e(a)},b||0);r[c]=!0;return c};k.defer.cancel=function(a){return r[a]?(delete r[a],n(a),e(A),!0):!1}}function Nd(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new te(b,d,a,c)}]}function Od(){this.$get=function(){function b(b,d){function e(a){a!=p&&(n?n==a&&
-(n=a.n):n=a,g(a.n,a.p),g(a,p),p=a,p.n=null)}function g(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(b in a)throw v("$cacheFactory")("iid",b);var f=0,k=E({},d,{id:b}),m={},h=d&&d.capacity||Number.MAX_VALUE,l={},p=null,n=null;return a[b]={put:function(a,b){if(h<Number.MAX_VALUE){var c=l[a]||(l[a]={key:a});e(c)}if(!D(b))return a in m||f++,m[a]=b,f>h&&this.remove(n.key),b},get:function(a){if(h<Number.MAX_VALUE){var b=l[a];if(!b)return;e(b)}return m[a]},remove:function(a){if(h<Number.MAX_VALUE){var b=l[a];if(!b)return;
-b==p&&(p=b.p);b==n&&(n=b.n);g(b.n,b.p);delete l[a]}delete m[a];f--},removeAll:function(){m={};f=0;l={};p=n=null},destroy:function(){l=k=m=null;delete a[b]},info:function(){return E({},k,{size:f})}}}var a={};b.info=function(){var b={};q(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function de(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function fc(b,a){var c={},d="Directive",e=/^\s*directive\:\s*([\d\w_\-]+)\s+(.*)$/,g=/(([\d\w_\-]+)(?:\:([^;]+))?;?)/,
-f=/^(on[a-z]+|formaction)$/;this.directive=function m(a,e){Ba(a,"directive");y(a)?(Bb(e,"directiveFactory"),c.hasOwnProperty(a)||(c[a]=[],b.factory(a+d,["$injector","$exceptionHandler",function(b,d){var e=[];q(c[a],function(c,g){try{var f=b.invoke(c);O(f)?f={compile:$(f)}:!f.compile&&f.link&&(f.compile=$(f.link));f.priority=f.priority||0;f.index=g;f.name=f.name||a;f.require=f.require||f.controller&&f.name;f.restrict=f.restrict||"A";e.push(f)}catch(m){d(m)}});return e}])),c[a].push(e)):q(a,Wb(m));
-return this};this.aHrefSanitizationWhitelist=function(b){return B(b)?(a.aHrefSanitizationWhitelist(b),this):a.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(b){return B(b)?(a.imgSrcSanitizationWhitelist(b),this):a.imgSrcSanitizationWhitelist()};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,b,l,p,n,r,t,J,w,u,K,Q){function z(a,b,c,d,e){a instanceof
-x||(a=x(a));q(a,function(b,c){3==b.nodeType&&b.nodeValue.match(/\S+/)&&(a[c]=x(b).wrap("<span></span>").parent()[0])});var g=N(a,b,a,c,d,e);ha(a,"ng-scope");return function(b,c,d,e){Bb(b,"scope");var f=c?Ka.clone.call(a):a;q(d,function(a,b){f.data("$"+b+"Controller",a)});d=0;for(var m=f.length;d<m;d++){var h=f[d].nodeType;1!==h&&9!==h||f.eq(d).data("$scope",b)}c&&c(f,b);g&&g(b,f,f,e);return f}}function ha(a,b){try{a.addClass(b)}catch(c){}}function N(a,b,c,d,e,g){function f(a,c,d,e){var g,h,l,r,p,
-n,t;g=c.length;var w=Array(g);for(p=0;p<g;p++)w[p]=c[p];t=p=0;for(n=m.length;p<n;t++)h=w[t],c=m[p++],g=m[p++],l=x(h),c?(c.scope?(r=a.$new(),l.data("$scope",r)):r=a,l=c.transcludeOnThisElement?M(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?M(a,b):null,c(g,r,h,d,l)):g&&g(a,h.childNodes,s,e)}for(var m=[],h,l,r,p,n=0;n<a.length;n++)h=new Kb,l=ca(a[n],[],h,0===n?d:s,e),(g=l.length?H(l,a[n],h,b,c,null,[],[],g):null)&&g.scope&&ha(x(a[n]),"ng-scope"),h=g&&g.terminal||!(r=a[n].childNodes)||!r.length?
-null:N(r,g?(g.transcludeOnThisElement||!g.templateOnThisElement)&&g.transclude:b),m.push(g,h),p=p||g||h,g=null;return p?f:null}function M(a,b,c){return function(d,e,g){var f=!1;d||(d=a.$new(),f=d.$$transcluded=!0);e=b(d,e,g,c);if(f)e.on("$destroy",function(){d.$destroy()});return e}}function ca(a,b,c,d,f){var h=c.$attr,m;switch(a.nodeType){case 1:ba(b,na(La(a).toLowerCase()),"E",d,f);for(var l,r,p,n=a.attributes,t=0,w=n&&n.length;t<w;t++){var J=!1,K=!1;l=n[t];if(!P||8<=P||l.specified){m=l.name;r=
-aa(l.value);l=na(m);if(p=W.test(l))m=hb(l.substr(6),"-");var u=l.replace(/(Start|End)$/,"");l===u+"Start"&&(J=m,K=m.substr(0,m.length-5)+"end",m=m.substr(0,m.length-6));l=na(m.toLowerCase());h[l]=m;if(p||!c.hasOwnProperty(l))c[l]=r,pc(a,l)&&(c[l]=!0);S(a,b,r,l);ba(b,l,"A",d,f,J,K)}}a=a.className;if(y(a)&&""!==a)for(;m=g.exec(a);)l=na(m[2]),ba(b,l,"C",d,f)&&(c[l]=aa(m[3])),a=a.substr(m.index+m[0].length);break;case 3:v(b,a.nodeValue);break;case 8:try{if(m=e.exec(a.nodeValue))l=na(m[1]),ba(b,l,"M",
-d,f)&&(c[l]=aa(m[2]))}catch(z){}}b.sort(D);return b}function C(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ia("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return x(d)}function G(a,b,c){return function(d,e,g,f,m){e=C(e[0],b,c);return a(d,e,g,f,m)}}function H(a,c,d,e,g,f,m,p,n){function w(a,b,c,d){if(a){c&&(a=G(a,c,d));a.require=F.require;a.directiveName=oa;if(M===F||F.$$isolateScope)a=
-tc(a,{isolateScope:!0});m.push(a)}if(b){c&&(b=G(b,c,d));b.require=F.require;b.directiveName=oa;if(M===F||F.$$isolateScope)b=tc(b,{isolateScope:!0});p.push(b)}}function J(a,b,c,d){var e,g="data",f=!1;if(y(b)){for(;"^"==(e=b.charAt(0))||"?"==e;)b=b.substr(1),"^"==e&&(g="inheritedData"),f=f||"?"==e;e=null;d&&"data"===g&&(e=d[b]);e=e||c[g]("$"+b+"Controller");if(!e&&!f)throw ia("ctreq",b,a);}else L(b)&&(e=[],q(b,function(b){e.push(J(a,b,c,d))}));return e}function K(a,e,g,f,n){function w(a,b){var c;2>
-arguments.length&&(b=a,a=s);Da&&(c=ca);return n(a,b,c)}var u,R,z,Q,G,C,ca={},mb;u=c===g?d:la(d,new Kb(x(g),d.$attr));R=u.$$element;if(M){var ba=/^\s*([@=&])(\??)\s*(\w*)\s*$/;f=x(g);C=e.$new(!0);!H||H!==M&&H!==M.$$originalDirective?f.data("$isolateScopeNoTemplate",C):f.data("$isolateScope",C);ha(f,"ng-isolate-scope");q(M.scope,function(a,c){var d=a.match(ba)||[],g=d[3]||c,f="?"==d[2],d=d[1],m,l,p,n;C.$$isolateBindings[c]=d+g;switch(d){case "@":u.$observe(g,function(a){C[c]=a});u.$$observers[g].$$scope=
-e;u[g]&&(C[c]=b(u[g])(e));break;case "=":if(f&&!u[g])break;l=r(u[g]);n=l.literal?ya:function(a,b){return a===b};p=l.assign||function(){m=C[c]=l(e);throw ia("nonassign",u[g],M.name);};m=C[c]=l(e);C.$watch(function(){var a=l(e);n(a,C[c])||(n(a,m)?p(e,a=C[c]):C[c]=a);return m=a},null,l.literal);break;case "&":l=r(u[g]);C[c]=function(a){return l(e,a)};break;default:throw ia("iscp",M.name,c,a);}})}mb=n&&w;N&&q(N,function(a){var b={$scope:a===M||a.$$isolateScope?C:e,$element:R,$attrs:u,$transclude:mb},
-c;G=a.controller;"@"==G&&(G=u[a.name]);c=t(G,b);ca[a.name]=c;Da||R.data("$"+a.name+"Controller",c);a.controllerAs&&(b.$scope[a.controllerAs]=c)});f=0;for(z=m.length;f<z;f++)try{Q=m[f],Q(Q.isolateScope?C:e,R,u,Q.require&&J(Q.directiveName,Q.require,R,ca),mb)}catch(F){l(F,ga(R))}f=e;M&&(M.template||null===M.templateUrl)&&(f=C);a&&a(f,g.childNodes,s,n);for(f=p.length-1;0<=f;f--)try{Q=p[f],Q(Q.isolateScope?C:e,R,u,Q.require&&J(Q.directiveName,Q.require,R,ca),mb)}catch(B){l(B,ga(R))}}n=n||{};for(var u=
--Number.MAX_VALUE,Q,N=n.controllerDirectives,M=n.newIsolateScopeDirective,H=n.templateDirective,ba=n.nonTlbTranscludeDirective,D=!1,E=!1,Da=n.hasElementTranscludeDirective,v=d.$$element=x(c),F,oa,X,T=e,S,P=0,pa=a.length;P<pa;P++){F=a[P];var W=F.$$start,Y=F.$$end;W&&(v=C(c,W,Y));X=s;if(u>F.priority)break;if(X=F.scope)Q=Q||F,F.templateUrl||(I("new/isolated scope",M,F,v),U(X)&&(M=F));oa=F.name;!F.templateUrl&&F.controller&&(X=F.controller,N=N||{},I("'"+oa+"' controller",N[oa],F,v),N[oa]=F);if(X=F.transclude)D=
-!0,F.$$tlb||(I("transclusion",ba,F,v),ba=F),"element"==X?(Da=!0,u=F.priority,X=C(c,W,Y),v=d.$$element=x(V.createComment(" "+oa+": "+d[oa]+" ")),c=v[0],nb(g,x(za.call(X,0)),c),T=z(X,e,u,f&&f.name,{nonTlbTranscludeDirective:ba})):(X=x(Ib(c)).contents(),v.empty(),T=z(X,e));if(F.template)if(E=!0,I("template",H,F,v),H=F,X=O(F.template)?F.template(v,d):F.template,X=Z(X),F.replace){f=F;X=Gb.test(X)?x(aa(X)):[];c=X[0];if(1!=X.length||1!==c.nodeType)throw ia("tplrt",oa,"");nb(g,v,c);pa={$attr:{}};X=ca(c,[],
-pa);var ue=a.splice(P+1,a.length-(P+1));M&&sc(X);a=a.concat(X).concat(ue);B(d,pa);pa=a.length}else v.html(X);if(F.templateUrl)E=!0,I("template",H,F,v),H=F,F.replace&&(f=F),K=A(a.splice(P,a.length-P),v,d,g,D&&T,m,p,{controllerDirectives:N,newIsolateScopeDirective:M,templateDirective:H,nonTlbTranscludeDirective:ba}),pa=a.length;else if(F.compile)try{S=F.compile(v,d,T),O(S)?w(null,S,W,Y):S&&w(S.pre,S.post,W,Y)}catch($){l($,ga(v))}F.terminal&&(K.terminal=!0,u=Math.max(u,F.priority))}K.scope=Q&&!0===Q.scope;
-K.transcludeOnThisElement=D;K.templateOnThisElement=E;K.transclude=T;n.hasElementTranscludeDirective=Da;return K}function sc(a){for(var b=0,c=a.length;b<c;b++)a[b]=Yb(a[b],{$$isolateScope:!0})}function ba(b,e,g,f,h,r,p){if(e===h)return null;h=null;if(c.hasOwnProperty(e)){var n;e=a.get(e+d);for(var t=0,w=e.length;t<w;t++)try{n=e[t],(f===s||f>n.priority)&&-1!=n.restrict.indexOf(g)&&(r&&(n=Yb(n,{$$start:r,$$end:p})),b.push(n),h=n)}catch(J){l(J)}}return h}function B(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;
-q(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});q(b,function(b,g){"class"==g?(ha(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==g?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==g.charAt(0)||a.hasOwnProperty(g)||(a[g]=b,d[g]=c[g])})}function A(a,b,c,d,e,g,f,m){var h=[],l,r,t=b[0],w=a.shift(),J=E({},w,{templateUrl:null,transclude:null,replace:null,$$originalDirective:w}),K=O(w.templateUrl)?w.templateUrl(b,
-c):w.templateUrl;b.empty();p.get(u.getTrustedResourceUrl(K),{cache:n}).success(function(p){var n,u;p=Z(p);if(w.replace){p=Gb.test(p)?x(aa(p)):[];n=p[0];if(1!=p.length||1!==n.nodeType)throw ia("tplrt",w.name,K);p={$attr:{}};nb(d,b,n);var z=ca(n,[],p);U(w.scope)&&sc(z);a=z.concat(a);B(c,p)}else n=t,b.html(p);a.unshift(J);l=H(a,n,c,e,b,w,g,f,m);q(d,function(a,c){a==n&&(d[c]=b[0])});for(r=N(b[0].childNodes,e);h.length;){p=h.shift();u=h.shift();var Q=h.shift(),G=h.shift(),z=b[0];if(u!==t){var C=u.className;
-m.hasElementTranscludeDirective&&w.replace||(z=Ib(n));nb(Q,x(u),z);ha(x(z),C)}u=l.transcludeOnThisElement?M(p,l.transclude,G):G;l(r,p,z,d,u)}h=null}).error(function(a,b,c,d){throw ia("tpload",d.url);});return function(a,b,c,d,e){a=e;h?(h.push(b),h.push(c),h.push(d),h.push(a)):(l.transcludeOnThisElement&&(a=M(b,l.transclude,e)),l(r,b,c,d,a))}}function D(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function I(a,b,c,d){if(b)throw ia("multidir",b.name,
-c.name,a,ga(d));}function v(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){var b=a.parent().length;b&&ha(a.parent(),"ng-binding");return function(a,c){var e=c.parent(),g=e.data("$binding")||[];g.push(d);e.data("$binding",g);b||ha(e,"ng-binding");a.$watch(d,function(a){c[0].nodeValue=a})}}})}function T(a,b){if("srcdoc"==b)return u.HTML;var c=La(a);if("xlinkHref"==b||"FORM"==c&&"action"==b||"IMG"!=c&&("src"==b||"ngSrc"==b))return u.RESOURCE_URL}function S(a,c,d,e){var g=b(d,!0);if(g){if("multiple"===
-e&&"SELECT"===La(a))throw ia("selmulti",ga(a));c.push({priority:100,compile:function(){return{pre:function(c,d,m){d=m.$$observers||(m.$$observers={});if(f.test(e))throw ia("nodomevents");if(g=b(m[e],!0,T(a,e)))m[e]=g(c),(d[e]||(d[e]=[])).$$inter=!0,(m.$$observers&&m.$$observers[e].$$scope||c).$watch(g,function(a,b){"class"===e&&a!=b?m.$updateClass(a,b):m.$set(e,a)})}}}})}}function nb(a,b,c){var d=b[0],e=b.length,g=d.parentNode,f,m;if(a)for(f=0,m=a.length;f<m;f++)if(a[f]==d){a[f++]=c;m=f+e-1;for(var h=
-a.length;f<h;f++,m++)m<h?a[f]=a[m]:delete a[f];a.length-=e-1;break}g&&g.replaceChild(c,d);a=V.createDocumentFragment();a.appendChild(d);c[x.expando]=d[x.expando];d=1;for(e=b.length;d<e;d++)g=b[d],x(g).remove(),a.appendChild(g),delete b[d];b[0]=c;b.length=1}function tc(a,b){return E(function(){return a.apply(null,arguments)},a,b)}var Kb=function(a,b){this.$$element=a;this.$attr=b||{}};Kb.prototype={$normalize:na,$addClass:function(a){a&&0<a.length&&K.addClass(this.$$element,a)},$removeClass:function(a){a&&
-0<a.length&&K.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=uc(a,b),d=uc(b,a);0===c.length?K.removeClass(this.$$element,d):0===d.length?K.addClass(this.$$element,c):K.setClass(this.$$element,c,d)},$set:function(a,b,c,d){var e=pc(this.$$element[0],a);e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=hb(a,"-"));e=La(this.$$element);if("A"===e&&"href"===a||"IMG"===e&&"src"===a)this[a]=b=Q(b,"src"===a);!1!==c&&(null===b||b===s?this.$$element.removeAttr(d):
-this.$$element.attr(d,b));(c=this.$$observers)&&q(c[a],function(a){try{a(b)}catch(c){l(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);J.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var Da=b.startSymbol(),pa=b.endSymbol(),Z="{{"==Da||"}}"==pa?Fa:function(a){return a.replace(/\{\{/g,Da).replace(/}}/g,pa)},W=/^ngAttr[A-Z]/;return z}]}function na(b){return Wa(b.replace(ve,""))}function uc(b,a){var c="",d=b.split(/\s+/),e=a.split(/\s+/),
-g=0;a:for(;g<d.length;g++){for(var f=d[g],k=0;k<e.length;k++)if(f==e[k])continue a;c+=(0<c.length?" ":"")+f}return c}function Pd(){var b={},a=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(a,d){Ba(a,"controller");U(a)?E(b,a):b[a]=d};this.$get=["$injector","$window",function(c,d){return function(e,g){var f,k,m;y(e)&&(f=e.match(a),k=f[1],m=f[3],e=b.hasOwnProperty(k)?b[k]:ec(g.$scope,k,!0)||ec(d,k,!0),Ua(e,k,!0));f=c.instantiate(e,g);if(m){if(!g||"object"!==typeof g.$scope)throw v("$controller")("noscp",
-k||e.name,m);g.$scope[m]=f}return f}}]}function Qd(){this.$get=["$window",function(b){return x(b.document)}]}function Rd(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function vc(b){var a={},c,d,e;if(!b)return a;q(b.split("\n"),function(b){e=b.indexOf(":");c=I(aa(b.substr(0,e)));d=aa(b.substr(e+1));c&&(a[c]=a[c]?a[c]+(", "+d):d)});return a}function wc(b){var a=U(b)?b:s;return function(c){a||(a=vc(b));return c?a[I(c)]||null:a}}function xc(b,a,c){if(O(c))return c(b,
-a);q(c,function(c){b=c(b,a)});return b}function Ud(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d={"Content-Type":"application/json;charset=utf-8"},e=this.defaults={transformResponse:[function(d){y(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=$b(d)));return d}],transformRequest:[function(a){return U(a)&&"[object File]"!==xa.call(a)&&"[object Blob]"!==xa.call(a)?sa(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:la(d),put:la(d),patch:la(d)},xsrfCookieName:"XSRF-TOKEN",
-xsrfHeaderName:"X-XSRF-TOKEN"},g=this.interceptors=[],f=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,d,p,n){function r(a){function b(a){var d=E({},a,{data:xc(a.data,a.headers,c.transformResponse)});return 200<=a.status&&300>a.status?d:p.reject(d)}var c={method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse},d=function(a){function b(a){var c;q(a,function(b,d){O(b)&&(c=b(),null!=c?a[d]=
-c:delete a[d])})}var c=e.headers,d=E({},a.headers),g,f,c=E({},c.common,c[I(a.method)]);b(c);b(d);a:for(g in c){a=I(g);for(f in d)if(I(f)===a)continue a;d[g]=c[g]}return d}(a);E(c,a);c.headers=d;c.method=Ha(c.method);var g=[function(a){d=a.headers;var c=xc(a.data,wc(d),a.transformRequest);D(a.data)&&q(d,function(a,b){"content-type"===I(b)&&delete d[b]});D(a.withCredentials)&&!D(e.withCredentials)&&(a.withCredentials=e.withCredentials);return t(a,c,d).then(b,b)},s],f=p.when(c);for(q(u,function(a){(a.request||
-a.requestError)&&g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){a=g.shift();var m=g.shift(),f=f.then(a,m)}f.success=function(a){f.then(function(b){a(b.data,b.status,b.headers,c)});return f};f.error=function(a){f.then(null,function(b){a(b.data,b.status,b.headers,c)});return f};return f}function t(c,g,f){function h(a,b,c,e){G&&(200<=a&&300>a?G.put(x,[a,b,vc(c),e]):G.remove(x));n(b,a,c,e);d.$$phase||d.$apply()}function n(a,b,d,e){b=
-Math.max(b,0);(200<=b&&300>b?u.resolve:u.reject)({data:a,status:b,headers:wc(d),config:c,statusText:e})}function t(){var a=Pa(r.pendingRequests,c);-1!==a&&r.pendingRequests.splice(a,1)}var u=p.defer(),q=u.promise,G,H,x=J(c.url,c.params);r.pendingRequests.push(c);q.then(t,t);(c.cache||e.cache)&&(!1!==c.cache&&"GET"==c.method)&&(G=U(c.cache)?c.cache:U(e.cache)?e.cache:w);if(G)if(H=G.get(x),B(H)){if(H.then)return H.then(t,t),H;L(H)?n(H[1],H[0],la(H[2]),H[3]):n(H,200,{},"OK")}else G.put(x,q);D(H)&&((H=
-Lb(c.url)?b.cookies()[c.xsrfCookieName||e.xsrfCookieName]:s)&&(f[c.xsrfHeaderName||e.xsrfHeaderName]=H),a(c.method,x,g,h,f,c.timeout,c.withCredentials,c.responseType));return q}function J(a,b){if(!b)return a;var c=[];Tc(b,function(a,b){null===a||D(a)||(L(a)||(a=[a]),q(a,function(a){U(a)&&(a=sa(a));c.push(Aa(b)+"="+Aa(a))}))});0<c.length&&(a+=(-1==a.indexOf("?")?"?":"&")+c.join("&"));return a}var w=c("$http"),u=[];q(g,function(a){u.unshift(y(a)?n.get(a):n.invoke(a))});q(f,function(a,b){var c=y(a)?
-n.get(a):n.invoke(a);u.splice(b,0,{response:function(a){return c(p.when(a))},responseError:function(a){return c(p.reject(a))}})});r.pendingRequests=[];(function(a){q(arguments,function(a){r[a]=function(b,c){return r(E(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){q(arguments,function(a){r[a]=function(b,c,d){return r(E(d||{},{method:a,url:b,data:c}))}})})("post","put");r.defaults=e;return r}]}function we(b){if(8>=P&&(!b.match(/^(get|post|head|put|delete|options)$/i)||!T.XMLHttpRequest))return new T.ActiveXObject("Microsoft.XMLHTTP");
-if(T.XMLHttpRequest)return new T.XMLHttpRequest;throw v("$httpBackend")("noxhr");}function Vd(){this.$get=["$browser","$window","$document",function(b,a,c){return xe(b,we,b.defer,a.angular.callbacks,c[0])}]}function xe(b,a,c,d,e){function g(a,b,c){var g=e.createElement("script"),f=null;g.type="text/javascript";g.src=a;g.async=!0;f=function(a){Xa(g,"load",f);Xa(g,"error",f);e.body.removeChild(g);g=null;var k=-1,t="unknown";a&&("load"!==a.type||d[b].called||(a={type:"error"}),t=a.type,k="error"===a.type?
-404:200);c&&c(k,t)};ob(g,"load",f);ob(g,"error",f);8>=P&&(g.onreadystatechange=function(){y(g.readyState)&&/loaded|complete/.test(g.readyState)&&(g.onreadystatechange=null,f({type:"load"}))});e.body.appendChild(g);return f}var f=-1;return function(e,m,h,l,p,n,r,t){function J(){u=f;Q&&Q();z&&z.abort()}function w(a,d,e,g,f){N&&c.cancel(N);Q=z=null;0===d&&(d=e?200:"file"==ta(m).protocol?404:0);a(1223===d?204:d,e,g,f||"");b.$$completeOutstandingRequest(A)}var u;b.$$incOutstandingRequestCount();m=m||b.url();
-if("jsonp"==I(e)){var K="_"+(d.counter++).toString(36);d[K]=function(a){d[K].data=a;d[K].called=!0};var Q=g(m.replace("JSON_CALLBACK","angular.callbacks."+K),K,function(a,b){w(l,a,d[K].data,"",b);d[K]=A})}else{var z=a(e);z.open(e,m,!0);q(p,function(a,b){B(a)&&z.setRequestHeader(b,a)});z.onreadystatechange=function(){if(z&&4==z.readyState){var a=null,b=null,c="";u!==f&&(a=z.getAllResponseHeaders(),b="response"in z?z.response:z.responseText);u===f&&10>P||(c=z.statusText);w(l,u||z.status,b,a,c)}};r&&
-(z.withCredentials=!0);if(t)try{z.responseType=t}catch(s){if("json"!==t)throw s;}z.send(h||null)}if(0<n)var N=c(J,n);else n&&n.then&&n.then(J)}}function Sd(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function g(g,h,l){for(var p,n,r=0,t=[],J=g.length,w=!1,u=[];r<J;)-1!=(p=g.indexOf(b,r))&&-1!=(n=g.indexOf(a,p+f))?(r!=p&&t.push(g.substring(r,p)),t.push(r=c(w=g.substring(p+
-f,n))),r.exp=w,r=n+k,w=!0):(r!=J&&t.push(g.substring(r)),r=J);(J=t.length)||(t.push(""),J=1);if(l&&1<t.length)throw yc("noconcat",g);if(!h||w)return u.length=J,r=function(a){try{for(var b=0,c=J,f;b<c;b++){if("function"==typeof(f=t[b]))if(f=f(a),f=l?e.getTrusted(l,f):e.valueOf(f),null==f)f="";else switch(typeof f){case "string":break;case "number":f=""+f;break;default:f=sa(f)}u[b]=f}return u.join("")}catch(k){a=yc("interr",g,k.toString()),d(a)}},r.exp=g,r.parts=t,r}var f=b.length,k=a.length;g.startSymbol=
-function(){return b};g.endSymbol=function(){return a};return g}]}function Td(){this.$get=["$rootScope","$window","$q",function(b,a,c){function d(d,f,k,m){var h=a.setInterval,l=a.clearInterval,p=c.defer(),n=p.promise,r=0,t=B(m)&&!m;k=B(k)?k:0;n.then(null,null,d);n.$$intervalId=h(function(){p.notify(r++);0<k&&r>=k&&(p.resolve(r),l(n.$$intervalId),delete e[n.$$intervalId]);t||b.$apply()},f);e[n.$$intervalId]=p;return n}var e={};d.cancel=function(b){return b&&b.$$intervalId in e?(e[b.$$intervalId].reject("canceled"),
-a.clearInterval(b.$$intervalId),delete e[b.$$intervalId],!0):!1};return d}]}function bd(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "),
-SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function Mb(b){b=b.split("/");for(var a=b.length;a--;)b[a]=
-gb(b[a]);return b.join("/")}function zc(b,a,c){b=ta(b,c);a.$$protocol=b.protocol;a.$$host=b.hostname;a.$$port=Z(b.port)||ye[b.protocol]||null}function Ac(b,a,c){var d="/"!==b.charAt(0);d&&(b="/"+b);b=ta(b,c);a.$$path=decodeURIComponent(d&&"/"===b.pathname.charAt(0)?b.pathname.substring(1):b.pathname);a.$$search=bc(b.search);a.$$hash=decodeURIComponent(b.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function qa(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function ab(b){var a=
-b.indexOf("#");return-1==a?b:b.substr(0,a)}function Nb(b){return b.substr(0,ab(b).lastIndexOf("/")+1)}function Bc(b,a){this.$$html5=!0;a=a||"";var c=Nb(b);zc(b,this,b);this.$$parse=function(a){var e=qa(c,a);if(!y(e))throw Ob("ipthprfx",a,c);Ac(e,this,b);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Ab(this.$$search),b=this.$$hash?"#"+gb(this.$$hash):"";this.$$url=Mb(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$rewrite=function(d){var e;
-if((e=qa(b,d))!==s)return d=e,(e=qa(a,e))!==s?c+(qa("/",e)||e):b+d;if((e=qa(c,d))!==s)return c+e;if(c==d+"/")return c}}function Pb(b,a){var c=Nb(b);zc(b,this,b);this.$$parse=function(d){var e=qa(b,d)||qa(c,d),e="#"==e.charAt(0)?qa(a,e):this.$$html5?e:"";if(!y(e))throw Ob("ihshprfx",d,a);Ac(e,this,b);d=this.$$path;var g=/^\/[A-Z]:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));g.exec(e)||(d=(e=g.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Ab(this.$$search),e=this.$$hash?
-"#"+gb(this.$$hash):"";this.$$url=Mb(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$rewrite=function(a){if(ab(b)==ab(a))return a}}function Qb(b,a){this.$$html5=!0;Pb.apply(this,arguments);var c=Nb(b);this.$$rewrite=function(d){var e;if(b==ab(d))return d;if(e=qa(c,d))return b+a+e;if(c===d+"/")return c};this.$$compose=function(){var c=Ab(this.$$search),e=this.$$hash?"#"+gb(this.$$hash):"";this.$$url=Mb(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+a+this.$$url}}function pb(b){return function(){return this[b]}}
-function Cc(b,a){return function(c){if(D(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Wd(){var b="",a=!1;this.hashPrefix=function(a){return B(a)?(b=a,this):b};this.html5Mode=function(b){return B(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function f(a){c.$broadcast("$locationChangeSuccess",k.absUrl(),a)}var k,m,h=d.baseHref(),l=d.url(),p;a?(p=l.substring(0,l.indexOf("/",l.indexOf("//")+2))+(h||"/"),m=e.history?Bc:Qb):(p=
-ab(l),m=Pb);k=new m(p,"#"+b);k.$$parse(k.$$rewrite(l));g.on("click",function(a){if(!a.ctrlKey&&!a.metaKey&&2!=a.which){for(var e=x(a.target);"a"!==I(e[0].nodeName);)if(e[0]===g[0]||!(e=e.parent())[0])return;var f=e.prop("href");U(f)&&"[object SVGAnimatedString]"===f.toString()&&(f=ta(f.animVal).href);if(m===Qb){var h=e.attr("href")||e.attr("xlink:href");if(0>h.indexOf("://"))if(f="#"+b,"/"==h[0])f=p+f+h;else if("#"==h[0])f=p+f+(k.path()||"/")+h;else{for(var l=k.path().split("/"),h=h.split("/"),n=
-0;n<h.length;n++)"."!=h[n]&&(".."==h[n]?l.pop():h[n].length&&l.push(h[n]));f=p+f+l.join("/")}}l=k.$$rewrite(f);f&&(!e.attr("target")&&l&&!a.isDefaultPrevented())&&(a.preventDefault(),l!=d.url()&&(k.$$parse(l),c.$apply(),T.angular["ff-684208-preventDefault"]=!0))}});k.absUrl()!=l&&d.url(k.absUrl(),!0);d.onUrlChange(function(a){k.absUrl()!=a&&(c.$evalAsync(function(){var b=k.absUrl();k.$$parse(a);c.$broadcast("$locationChangeStart",a,b).defaultPrevented?(k.$$parse(b),d.url(b)):f(b)}),c.$$phase||c.$digest())});
-var n=0;c.$watch(function(){var a=d.url(),b=k.$$replace;n&&a==k.absUrl()||(n++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",k.absUrl(),a).defaultPrevented?k.$$parse(a):(d.url(k.absUrl(),b),f(a))}));k.$$replace=!1;return n});return k}]}function Xd(){var b=!0,a=this;this.debugEnabled=function(a){return B(a)?(b=a,this):b};this.$get=["$window",function(c){function d(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&
-(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=c.console||{},e=b[a]||b.log||A;a=!1;try{a=!!e.apply}catch(m){}return a?function(){var a=[];q(arguments,function(b){a.push(d(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){b&&c.apply(a,arguments)}}()}}]}function da(b,a){if("__defineGetter__"===b||"__defineSetter__"===b||"__lookupGetter__"===b||"__lookupSetter__"===
-b||"__proto__"===b)throw ja("isecfld",a);return b}function Ma(b,a){if(b){if(b.constructor===b)throw ja("isecfn",a);if(b.document&&b.location&&b.alert&&b.setInterval)throw ja("isecwindow",a);if(b.children&&(b.nodeName||b.prop&&b.attr&&b.find))throw ja("isecdom",a);if(b===Object)throw ja("isecobj",a);}return b}function qb(b,a,c,d,e){e=e||{};a=a.split(".");for(var g,f=0;1<a.length;f++){g=da(a.shift(),d);var k=b[g];k||(k={},b[g]=k);b=k;b.then&&e.unwrapPromises&&(ua(d),"$$v"in b||function(a){a.then(function(b){a.$$v=
-b})}(b),b.$$v===s&&(b.$$v={}),b=b.$$v)}g=da(a.shift(),d);Ma(b,d);Ma(b[g],d);return b[g]=c}function Dc(b,a,c,d,e,g,f){da(b,g);da(a,g);da(c,g);da(d,g);da(e,g);return f.unwrapPromises?function(f,m){var h=m&&m.hasOwnProperty(b)?m:f,l;if(null==h)return h;(h=h[b])&&h.then&&(ua(g),"$$v"in h||(l=h,l.$$v=s,l.then(function(a){l.$$v=a})),h=h.$$v);if(!a)return h;if(null==h)return s;(h=h[a])&&h.then&&(ua(g),"$$v"in h||(l=h,l.$$v=s,l.then(function(a){l.$$v=a})),h=h.$$v);if(!c)return h;if(null==h)return s;(h=h[c])&&
-h.then&&(ua(g),"$$v"in h||(l=h,l.$$v=s,l.then(function(a){l.$$v=a})),h=h.$$v);if(!d)return h;if(null==h)return s;(h=h[d])&&h.then&&(ua(g),"$$v"in h||(l=h,l.$$v=s,l.then(function(a){l.$$v=a})),h=h.$$v);if(!e)return h;if(null==h)return s;(h=h[e])&&h.then&&(ua(g),"$$v"in h||(l=h,l.$$v=s,l.then(function(a){l.$$v=a})),h=h.$$v);return h}:function(g,f){var h=f&&f.hasOwnProperty(b)?f:g;if(null==h)return h;h=h[b];if(!a)return h;if(null==h)return s;h=h[a];if(!c)return h;if(null==h)return s;h=h[c];if(!d)return h;
-if(null==h)return s;h=h[d];return e?null==h?s:h=h[e]:h}}function ze(b,a){da(b,a);return function(a,d){return null==a?s:(d&&d.hasOwnProperty(b)?d:a)[b]}}function Ae(b,a,c){da(b,c);da(a,c);return function(c,e){if(null==c)return s;c=(e&&e.hasOwnProperty(b)?e:c)[b];return null==c?s:c[a]}}function Ec(b,a,c){if(Rb.hasOwnProperty(b))return Rb[b];var d=b.split("."),e=d.length,g;if(a.unwrapPromises||1!==e)if(a.unwrapPromises||2!==e)if(a.csp)g=6>e?Dc(d[0],d[1],d[2],d[3],d[4],c,a):function(b,g){var f=0,k;do k=
-Dc(d[f++],d[f++],d[f++],d[f++],d[f++],c,a)(b,g),g=s,b=k;while(f<e);return k};else{var f="var p;\n";q(d,function(b,d){da(b,c);f+="if(s == null) return undefined;\ns="+(d?"s":'((k&&k.hasOwnProperty("'+b+'"))?k:s)')+'["'+b+'"];\n'+(a.unwrapPromises?'if (s && s.then) {\n pw("'+c.replace(/(["\r\n])/g,"\\$1")+'");\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n':"")});var f=f+"return s;",k=new Function("s","k","pw",f);k.toString=$(f);g=a.unwrapPromises?
-function(a,b){return k(a,b,ua)}:k}else g=Ae(d[0],d[1],c);else g=ze(d[0],c);"hasOwnProperty"!==b&&(Rb[b]=g);return g}function Yd(){var b={},a={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=function(b){return B(b)?(a.unwrapPromises=!!b,this):a.unwrapPromises};this.logPromiseWarnings=function(b){return B(b)?(a.logPromiseWarnings=b,this):a.logPromiseWarnings};this.$get=["$filter","$sniffer","$log",function(c,d,e){a.csp=d.csp;ua=function(b){a.logPromiseWarnings&&!Fc.hasOwnProperty(b)&&
-(Fc[b]=!0,e.warn("[$parse] Promise found in the expression `"+b+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))};return function(d){var e;switch(typeof d){case "string":if(b.hasOwnProperty(d))return b[d];e=new Sb(a);e=(new bb(e,c,a)).parse(d);"hasOwnProperty"!==d&&(b[d]=e);return e;case "function":return d;default:return A}}}]}function $d(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return Be(function(a){b.$evalAsync(a)},a)}]}function Be(b,a){function c(a){return a}
-function d(a){return f(a)}var e=function(){var f=[],h,l;return l={resolve:function(a){if(f){var c=f;f=s;h=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],h.then(a[0],a[1],a[2])})}},reject:function(a){l.resolve(k(a))},notify:function(a){if(f){var c=f;f.length&&b(function(){for(var b,d=0,e=c.length;d<e;d++)b=c[d],b[2](a)})}},promise:{then:function(b,g,k){var l=e(),J=function(d){try{l.resolve((O(b)?b:c)(d))}catch(e){l.reject(e),a(e)}},w=function(b){try{l.resolve((O(g)?g:d)(b))}catch(c){l.reject(c),
-a(c)}},u=function(b){try{l.notify((O(k)?k:c)(b))}catch(d){a(d)}};f?f.push([J,w,u]):h.then(J,w,u);return l.promise},"catch":function(a){return this.then(null,a)},"finally":function(a){function b(a,c){var d=e();c?d.resolve(a):d.reject(a);return d.promise}function d(e,g){var f=null;try{f=(a||c)()}catch(k){return b(k,!1)}return f&&O(f.then)?f.then(function(){return b(e,g)},function(a){return b(a,!1)}):b(e,g)}return this.then(function(a){return d(a,!0)},function(a){return d(a,!1)})}}}},g=function(a){return a&&
-O(a.then)?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},f=function(a){var b=e();b.reject(a);return b.promise},k=function(c){return{then:function(g,f){var k=e();b(function(){try{k.resolve((O(f)?f:d)(c))}catch(b){k.reject(b),a(b)}});return k.promise}}};return{defer:e,reject:f,when:function(k,h,l,p){var n=e(),r,t=function(b){try{return(O(h)?h:c)(b)}catch(d){return a(d),f(d)}},J=function(b){try{return(O(l)?l:d)(b)}catch(c){return a(c),f(c)}},w=function(b){try{return(O(p)?
-p:c)(b)}catch(d){a(d)}};b(function(){g(k).then(function(a){r||(r=!0,n.resolve(g(a).then(t,J,w)))},function(a){r||(r=!0,n.resolve(J(a)))},function(a){r||n.notify(w(a))})});return n.promise},all:function(a){var b=e(),c=0,d=L(a)?[]:{};q(a,function(a,e){c++;g(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise}}}function ge(){this.$get=["$window","$timeout",function(b,a){var c=b.requestAnimationFrame||
-b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame,d=b.cancelAnimationFrame||b.webkitCancelAnimationFrame||b.mozCancelAnimationFrame||b.webkitCancelRequestAnimationFrame,e=!!c,g=e?function(a){var b=c(a);return function(){d(b)}}:function(b){var c=a(b,16.66,!1);return function(){a.cancel(c)}};g.supported=e;return g}]}function Zd(){var b=10,a=v("$rootScope"),c=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(d,
-e,g,f){function k(){this.$id=eb();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$postDigestQueue=[];this.$$listeners={};this.$$listenerCount={};this.$$isolateBindings={}}function m(b){if(n.$$phase)throw a("inprog",n.$$phase);n.$$phase=b}function h(a,b){var c=g(a);Ua(c,b);return c}function l(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&
-delete a.$$listenerCount[c];while(a=a.$parent)}function p(){}k.prototype={constructor:k,$new:function(a){a?(a=new k,a.$root=this.$root,a.$$asyncQueue=this.$$asyncQueue,a.$$postDigestQueue=this.$$postDigestQueue):(this.$$childScopeClass||(this.$$childScopeClass=function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$id=eb();this.$$childScopeClass=null},this.$$childScopeClass.prototype=this),a=new this.$$childScopeClass);
-a["this"]=a;a.$parent=this;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,d){var e=h(a,"watch"),g=this.$$watchers,f={fn:b,last:p,get:e,exp:a,eq:!!d};c=null;if(!O(b)){var k=h(b||A,"listener");f.fn=function(a,b,c){k(c)}}if("string"==typeof a&&e.constant){var m=f.fn;f.fn=function(a,b,c){m.call(this,a,b,c);Qa(g,f)}}g||(g=this.$$watchers=[]);g.unshift(f);return function(){Qa(g,f);c=null}},
-$watchCollection:function(a,b){var c=this,d,e,f,k=1<b.length,h=0,m=g(a),l=[],n={},p=!0,q=0;return this.$watch(function(){d=m(c);var a,b;if(U(d))if(db(d))for(e!==l&&(e=l,q=e.length=0,h++),a=d.length,q!==a&&(h++,e.length=q=a),b=0;b<a;b++)e[b]!==e[b]&&d[b]!==d[b]||e[b]===d[b]||(h++,e[b]=d[b]);else{e!==n&&(e=n={},q=0,h++);a=0;for(b in d)d.hasOwnProperty(b)&&(a++,e.hasOwnProperty(b)?e[b]!==d[b]&&(h++,e[b]=d[b]):(q++,e[b]=d[b],h++));if(q>a)for(b in h++,e)e.hasOwnProperty(b)&&!d.hasOwnProperty(b)&&(q--,
-delete e[b])}else e!==d&&(e=d,h++);return h},function(){p?(p=!1,b(d,d,c)):b(d,f,c);if(k)if(U(d))if(db(d)){f=Array(d.length);for(var a=0;a<d.length;a++)f[a]=d[a]}else for(a in f={},d)yb.call(d,a)&&(f[a]=d[a]);else f=d})},$digest:function(){var d,g,f,k,h=this.$$asyncQueue,l=this.$$postDigestQueue,q,z,s=b,N,M=[],x,C,G;m("$digest");c=null;do{z=!1;for(N=this;h.length;){try{G=h.shift(),G.scope.$eval(G.expression)}catch(H){n.$$phase=null,e(H)}c=null}a:do{if(k=N.$$watchers)for(q=k.length;q--;)try{if(d=k[q])if((g=
-d.get(N))!==(f=d.last)&&!(d.eq?ya(g,f):"number"===typeof g&&"number"===typeof f&&isNaN(g)&&isNaN(f)))z=!0,c=d,d.last=d.eq?Ga(g,null):g,d.fn(g,f===p?g:f,N),5>s&&(x=4-s,M[x]||(M[x]=[]),C=O(d.exp)?"fn: "+(d.exp.name||d.exp.toString()):d.exp,C+="; newVal: "+sa(g)+"; oldVal: "+sa(f),M[x].push(C));else if(d===c){z=!1;break a}}catch(B){n.$$phase=null,e(B)}if(!(k=N.$$childHead||N!==this&&N.$$nextSibling))for(;N!==this&&!(k=N.$$nextSibling);)N=N.$parent}while(N=k);if((z||h.length)&&!s--)throw n.$$phase=null,
-a("infdig",b,sa(M));}while(z||h.length);for(n.$$phase=null;l.length;)try{l.shift()()}catch(v){e(v)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this!==n&&(q(this.$$listenerCount,zb(null,l,this)),a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a.$$childTail==this&&(a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=
-this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=null,this.$$listeners={},this.$$watchers=this.$$asyncQueue=this.$$postDigestQueue=[],this.$destroy=this.$digest=this.$apply=A,this.$on=this.$watch=function(){return A})}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a){n.$$phase||n.$$asyncQueue.length||f.defer(function(){n.$$asyncQueue.length&&n.$digest()});this.$$asyncQueue.push({scope:this,expression:a})},$$postDigest:function(a){this.$$postDigestQueue.push(a)},
-$apply:function(a){try{return m("$apply"),this.$eval(a)}catch(b){e(b)}finally{n.$$phase=null;try{n.$digest()}catch(c){throw e(c),c;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){c[Pa(c,b)]=null;l(e,1,a)}},$emit:function(a,b){var c=[],d,g=this,f=!1,k={name:a,targetScope:g,stopPropagation:function(){f=!0},preventDefault:function(){k.defaultPrevented=
-!0},defaultPrevented:!1},h=[k].concat(za.call(arguments,1)),m,l;do{d=g.$$listeners[a]||c;k.currentScope=g;m=0;for(l=d.length;m<l;m++)if(d[m])try{d[m].apply(null,h)}catch(n){e(n)}else d.splice(m,1),m--,l--;if(f)break;g=g.$parent}while(g);return k},$broadcast:function(a,b){for(var c=this,d=this,g={name:a,targetScope:this,preventDefault:function(){g.defaultPrevented=!0},defaultPrevented:!1},f=[g].concat(za.call(arguments,1)),k,h;c=d;){g.currentScope=c;d=c.$$listeners[a]||[];k=0;for(h=d.length;k<h;k++)if(d[k])try{d[k].apply(null,
-f)}catch(m){e(m)}else d.splice(k,1),k--,h--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}return g}};var n=new k;return n}]}function cd(){var b=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*(https?|ftp|file):|data:image\//;this.aHrefSanitizationWhitelist=function(a){return B(a)?(b=a,this):b};this.imgSrcSanitizationWhitelist=function(b){return B(b)?(a=b,this):a};this.$get=function(){return function(c,d){var e=d?a:b,g;if(!P||8<=
-P)if(g=ta(c).href,""!==g&&!g.match(e))return"unsafe:"+g;return c}}}function Ce(b){if("self"===b)return b;if(y(b)){if(-1<b.indexOf("***"))throw va("iwcard",b);b=b.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08").replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return RegExp("^"+b+"$")}if(fb(b))return RegExp("^"+b.source+"$");throw va("imatcher");}function Gc(b){var a=[];B(b)&&q(b,function(b){a.push(Ce(b))});return a}function be(){this.SCE_CONTEXTS=fa;var b=["self"],a=[];this.resourceUrlWhitelist=
-function(a){arguments.length&&(b=Gc(a));return b};this.resourceUrlBlacklist=function(b){arguments.length&&(a=Gc(b));return a};this.$get=["$injector",function(c){function d(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var e=function(a){throw va("unsafe");};c.has("$sanitize")&&(e=c.get("$sanitize"));
-var g=d(),f={};f[fa.HTML]=d(g);f[fa.CSS]=d(g);f[fa.URL]=d(g);f[fa.JS]=d(g);f[fa.RESOURCE_URL]=d(f[fa.URL]);return{trustAs:function(a,b){var c=f.hasOwnProperty(a)?f[a]:null;if(!c)throw va("icontext",a,b);if(null===b||b===s||""===b)return b;if("string"!==typeof b)throw va("itype",a);return new c(b)},getTrusted:function(c,d){if(null===d||d===s||""===d)return d;var g=f.hasOwnProperty(c)?f[c]:null;if(g&&d instanceof g)return d.$$unwrapTrustedValue();if(c===fa.RESOURCE_URL){var g=ta(d.toString()),l,p,n=
-!1;l=0;for(p=b.length;l<p;l++)if("self"===b[l]?Lb(g):b[l].exec(g.href)){n=!0;break}if(n)for(l=0,p=a.length;l<p;l++)if("self"===a[l]?Lb(g):a[l].exec(g.href)){n=!1;break}if(n)return d;throw va("insecurl",d.toString());}if(c===fa.HTML)return e(d);throw va("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}function ae(){var b=!0;this.enabled=function(a){arguments.length&&(b=!!a);return b};this.$get=["$parse","$sniffer","$sceDelegate",function(a,c,d){if(b&&c.msie&&8>c.msieDocumentMode)throw va("iequirks");
-var e=la(fa);e.isEnabled=function(){return b};e.trustAs=d.trustAs;e.getTrusted=d.getTrusted;e.valueOf=d.valueOf;b||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=Fa);e.parseAs=function(b,c){var d=a(c);return d.literal&&d.constant?d:function(a,c){return e.getTrusted(b,d(a,c))}};var g=e.parseAs,f=e.getTrusted,k=e.trustAs;q(fa,function(a,b){var c=I(b);e[Wa("parse_as_"+c)]=function(b){return g(a,b)};e[Wa("get_trusted_"+c)]=function(b){return f(a,b)};e[Wa("trust_as_"+c)]=function(b){return k(a,
-b)}});return e}]}function ce(){this.$get=["$window","$document",function(b,a){var c={},d=Z((/android (\d+)/.exec(I((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),g=a[0]||{},f=g.documentMode,k,m=/^(Moz|webkit|O|ms)(?=[A-Z])/,h=g.body&&g.body.style,l=!1,p=!1;if(h){for(var n in h)if(l=m.exec(n)){k=l[0];k=k.substr(0,1).toUpperCase()+k.substr(1);break}k||(k="WebkitOpacity"in h&&"webkit");l=!!("transition"in h||k+"Transition"in h);p=!!("animation"in h||k+"Animation"in
-h);!d||l&&p||(l=y(g.body.style.webkitTransition),p=y(g.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hashchange:"onhashchange"in b&&(!f||7<f),hasEvent:function(a){if("input"==a&&9==P)return!1;if(D(c[a])){var b=g.createElement("div");c[a]="on"+a in b}return c[a]},csp:Zb(),vendorPrefix:k,transitions:l,animations:p,android:d,msie:P,msieDocumentMode:f}}]}function ee(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,k,
-m){var h=c.defer(),l=h.promise,p=B(m)&&!m;k=a.defer(function(){try{h.resolve(e())}catch(a){h.reject(a),d(a)}finally{delete g[l.$$timeoutId]}p||b.$apply()},k);l.$$timeoutId=k;g[k]=h;return l}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),delete g[b.$$timeoutId],a.defer.cancel(b.$$timeoutId)):!1};return e}]}function ta(b,a){var c=b;P&&(W.setAttribute("href",c),c=W.href);W.setAttribute("href",c);return{href:W.href,protocol:W.protocol?W.protocol.replace(/:$/,
-""):"",host:W.host,search:W.search?W.search.replace(/^\?/,""):"",hash:W.hash?W.hash.replace(/^#/,""):"",hostname:W.hostname,port:W.port,pathname:"/"===W.pathname.charAt(0)?W.pathname:"/"+W.pathname}}function Lb(b){b=y(b)?ta(b):b;return b.protocol===Hc.protocol&&b.host===Hc.host}function fe(){this.$get=$(T)}function jc(b){function a(d,e){if(U(d)){var g={};q(d,function(b,c){g[c]=a(c,b)});return g}return b.factory(d+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+
-c)}}];a("currency",Ic);a("date",Jc);a("filter",De);a("json",Ee);a("limitTo",Fe);a("lowercase",Ge);a("number",Kc);a("orderBy",Lc);a("uppercase",He)}function De(){return function(b,a,c){if(!L(b))return b;var d=typeof c,e=[];e.check=function(a){for(var b=0;b<e.length;b++)if(!e[b](a))return!1;return!0};"function"!==d&&(c="boolean"===d&&c?function(a,b){return Ta.equals(a,b)}:function(a,b){if(a&&b&&"object"===typeof a&&"object"===typeof b){for(var d in a)if("$"!==d.charAt(0)&&yb.call(a,d)&&c(a[d],b[d]))return!0;
-return!1}b=(""+b).toLowerCase();return-1<(""+a).toLowerCase().indexOf(b)});var g=function(a,b){if("string"==typeof b&&"!"===b.charAt(0))return!g(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return c(a,b);case "object":switch(typeof b){case "object":return c(a,b);default:for(var d in a)if("$"!==d.charAt(0)&&g(a[d],b))return!0}return!1;case "array":for(d=0;d<a.length;d++)if(g(a[d],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a=
-{$:a};case "object":for(var f in a)(function(b){"undefined"!==typeof a[b]&&e.push(function(c){return g("$"==b?c:c&&c[b],a[b])})})(f);break;case "function":e.push(a);break;default:return b}d=[];for(f=0;f<b.length;f++){var k=b[f];e.check(k)&&d.push(k)}return d}}function Ic(b){var a=b.NUMBER_FORMATS;return function(b,d){D(d)&&(d=a.CURRENCY_SYM);return Mc(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,d)}}function Kc(b){var a=b.NUMBER_FORMATS;return function(b,d){return Mc(b,a.PATTERNS[0],
-a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Mc(b,a,c,d,e){if(null==b||!isFinite(b)||U(b))return"";var g=0>b;b=Math.abs(b);var f=b+"",k="",m=[],h=!1;if(-1!==f.indexOf("e")){var l=f.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&l[3]>e+1?(f="0",b=0):(k=f,h=!0)}if(h)0<e&&(-1<b&&1>b)&&(k=b.toFixed(e));else{f=(f.split(Nc)[1]||"").length;D(e)&&(e=Math.min(Math.max(a.minFrac,f),a.maxFrac));b=+(Math.round(+(b.toString()+"e"+e)).toString()+"e"+-e);b=(""+b).split(Nc);f=b[0];b=b[1]||"";var l=0,p=a.lgSize,n=a.gSize;if(f.length>=
-p+n)for(l=f.length-p,h=0;h<l;h++)0===(l-h)%n&&0!==h&&(k+=c),k+=f.charAt(h);for(h=l;h<f.length;h++)0===(f.length-h)%p&&0!==h&&(k+=c),k+=f.charAt(h);for(;b.length<e;)b+="0";e&&"0"!==e&&(k+=d+b.substr(0,e))}m.push(g?a.negPre:a.posPre);m.push(k);m.push(g?a.negSuf:a.posSuf);return m.join("")}function Tb(b,a,c){var d="";0>b&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function Y(b,a,c,d){c=c||0;return function(e){e=e["get"+b]();if(0<c||e>-c)e+=c;0===e&&-12==c&&(e=
-12);return Tb(e,a,d)}}function rb(b,a){return function(c,d){var e=c["get"+b](),g=Ha(a?"SHORT"+b:b);return d[g][e]}}function Jc(b){function a(a){var b;if(b=a.match(c)){a=new Date(0);var g=0,f=0,k=b[8]?a.setUTCFullYear:a.setFullYear,m=b[8]?a.setUTCHours:a.setHours;b[9]&&(g=Z(b[9]+b[10]),f=Z(b[9]+b[11]));k.call(a,Z(b[1]),Z(b[2])-1,Z(b[3]));g=Z(b[4]||0)-g;f=Z(b[5]||0)-f;k=Z(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));m.call(a,g,f,k,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
-return function(c,e){var g="",f=[],k,m;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;y(c)&&(c=Ie.test(c)?Z(c):a(c));xb(c)&&(c=new Date(c));if(!Oa(c))return c;for(;e;)(m=Je.exec(e))?(f=f.concat(za.call(m,1)),e=f.pop()):(f.push(e),e=null);q(f,function(a){k=Ke[a];g+=k?k(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Ee(){return function(b){return sa(b,!0)}}function Fe(){return function(b,a){if(!L(b)&&!y(b))return b;a=Infinity===Math.abs(Number(a))?Number(a):Z(a);
-if(y(b))return a?0<=a?b.slice(0,a):b.slice(a,b.length):"";var c=[],d,e;a>b.length?a=b.length:a<-b.length&&(a=-b.length);0<a?(d=0,e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Lc(b){return function(a,c,d){function e(a,b){return Sa(b)?function(b,c){return a(c,b)}:a}function g(a,b){var c=typeof a,d=typeof b;return c==d?("string"==c&&(a=a.toLowerCase(),b=b.toLowerCase()),a===b?0:a<b?-1:1):c<d?-1:1}if(!L(a)||!c)return a;c=L(c)?c:[c];c=Vc(c,function(a){var c=!1,d=a||Fa;if(y(a)){if("+"==
-a.charAt(0)||"-"==a.charAt(0))c="-"==a.charAt(0),a=a.substring(1);d=b(a);if(d.constant){var f=d();return e(function(a,b){return g(a[f],b[f])},c)}}return e(function(a,b){return g(d(a),d(b))},c)});for(var f=[],k=0;k<a.length;k++)f.push(a[k]);return f.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(0!==e)return e}return 0},d))}}function wa(b){O(b)&&(b={link:b});b.restrict=b.restrict||"AC";return $(b)}function Oc(b,a,c,d){function e(a,c){c=c?"-"+hb(c,"-"):"";d.removeClass(b,(a?sb:
-tb)+c);d.addClass(b,(a?tb:sb)+c)}var g=this,f=b.parent().controller("form")||ub,k=0,m=g.$error={},h=[];g.$name=a.name||a.ngForm;g.$dirty=!1;g.$pristine=!0;g.$valid=!0;g.$invalid=!1;f.$addControl(g);b.addClass(Na);e(!0);g.$addControl=function(a){Ba(a.$name,"input");h.push(a);a.$name&&(g[a.$name]=a)};g.$removeControl=function(a){a.$name&&g[a.$name]===a&&delete g[a.$name];q(m,function(b,c){g.$setValidity(c,!0,a)});Qa(h,a)};g.$setValidity=function(a,b,c){var d=m[a];if(b)d&&(Qa(d,c),d.length||(k--,k||
-(e(b),g.$valid=!0,g.$invalid=!1),m[a]=!1,e(!0,a),f.$setValidity(a,!0,g)));else{k||e(b);if(d){if(-1!=Pa(d,c))return}else m[a]=d=[],k++,e(!1,a),f.$setValidity(a,!1,g);d.push(c);g.$valid=!1;g.$invalid=!0}};g.$setDirty=function(){d.removeClass(b,Na);d.addClass(b,vb);g.$dirty=!0;g.$pristine=!1;f.$setDirty()};g.$setPristine=function(){d.removeClass(b,vb);d.addClass(b,Na);g.$dirty=!1;g.$pristine=!0;q(h,function(a){a.$setPristine()})}}function ra(b,a,c,d){b.$setValidity(a,c);return c?d:s}function Pc(b,a){var c,
-d;if(a)for(c=0;c<a.length;++c)if(d=a[c],b[d])return!0;return!1}function Le(b,a,c,d,e){U(e)&&(b.$$hasNativeValidators=!0,b.$parsers.push(function(g){if(b.$error[a]||Pc(e,d)||!Pc(e,c))return g;b.$setValidity(a,!1)}))}function wb(b,a,c,d,e,g){var f=a.prop(Me),k=a[0].placeholder,m={};d.$$validityState=f;if(!e.android){var h=!1;a.on("compositionstart",function(a){h=!0});a.on("compositionend",function(){h=!1;l()})}var l=function(e){if(!h){var g=a.val();if(P&&"input"===(e||m).type&&a[0].placeholder!==k)k=
-a[0].placeholder;else if(Sa(c.ngTrim||"T")&&(g=aa(g)),e=f&&d.$$hasNativeValidators,d.$viewValue!==g||""===g&&e)b.$$phase?d.$setViewValue(g):b.$apply(function(){d.$setViewValue(g)})}};if(e.hasEvent("input"))a.on("input",l);else{var p,n=function(){p||(p=g.defer(function(){l();p=null}))};a.on("keydown",function(a){a=a.keyCode;91===a||(15<a&&19>a||37<=a&&40>=a)||n()});if(e.hasEvent("paste"))a.on("paste cut",n)}a.on("change",l);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)};var r=
-c.ngPattern;r&&((e=r.match(/^\/(.*)\/([gim]*)$/))?(r=RegExp(e[1],e[2]),e=function(a){return ra(d,"pattern",d.$isEmpty(a)||r.test(a),a)}):e=function(c){var e=b.$eval(r);if(!e||!e.test)throw v("ngPattern")("noregexp",r,e,ga(a));return ra(d,"pattern",d.$isEmpty(c)||e.test(c),c)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var t=Z(c.ngMinlength);e=function(a){return ra(d,"minlength",d.$isEmpty(a)||a.length>=t,a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var q=Z(c.ngMaxlength);
-e=function(a){return ra(d,"maxlength",d.$isEmpty(a)||a.length<=q,a)};d.$parsers.push(e);d.$formatters.push(e)}}function Ub(b,a){b="ngClass"+b;return["$animate",function(c){function d(a,b){var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],l=0;l<b.length;l++)if(e==b[l])continue a;c.push(e)}return c}function e(a){if(!L(a)){if(y(a))return a.split(" ");if(U(a)){var b=[];q(a,function(a,c){a&&(b=b.concat(c.split(" ")))});return b}}return a}return{restrict:"AC",link:function(g,f,k){function m(a,b){var c=
-f.data("$classCounts")||{},d=[];q(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<b)&&d.push(a)});f.data("$classCounts",c);return d.join(" ")}function h(b){if(!0===a||g.$index%2===a){var h=e(b||[]);if(!l){var r=m(h,1);k.$addClass(r)}else if(!ya(b,l)){var q=e(l),r=d(h,q),h=d(q,h),h=m(h,-1),r=m(r,1);0===r.length?c.removeClass(f,h):0===h.length?c.addClass(f,r):c.setClass(f,r,h)}}l=la(b)}var l;g.$watch(k[b],h,!0);k.$observe("class",function(a){h(g.$eval(k[b]))});"ngClass"!==b&&g.$watch("$index",
-function(c,d){var f=c&1;if(f!==(d&1)){var h=e(g.$eval(k[b]));f===a?(f=m(h,1),k.$addClass(f)):(f=m(h,-1),k.$removeClass(f))}})}}}]}var Me="validity",I=function(b){return y(b)?b.toLowerCase():b},yb=Object.prototype.hasOwnProperty,Ha=function(b){return y(b)?b.toUpperCase():b},P,x,Ca,za=[].slice,Ne=[].push,xa=Object.prototype.toString,Ra=v("ng"),Ta=T.angular||(T.angular={}),Va,La,ka=["0","0","0"];P=Z((/msie (\d+)/.exec(I(navigator.userAgent))||[])[1]);isNaN(P)&&(P=Z((/trident\/.*; rv:(\d+)/.exec(I(navigator.userAgent))||
-[])[1]));A.$inject=[];Fa.$inject=[];var L=function(){return O(Array.isArray)?Array.isArray:function(b){return"[object Array]"===xa.call(b)}}(),aa=function(){return String.prototype.trim?function(b){return y(b)?b.trim():b}:function(b){return y(b)?b.replace(/^\s\s*/,"").replace(/\s\s*$/,""):b}}();La=9>P?function(b){b=b.nodeName?b:b[0];return b.scopeName&&"HTML"!=b.scopeName?Ha(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var Yc=/[A-Z]/g,ad={full:"1.2.19",
-major:1,minor:2,dot:19,codeName:"precognitive-flashbacks"};S.expando="ng339";var Ya=S.cache={},ne=1,ob=T.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},Xa=T.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)};S._data=function(b){return this.cache[b[this.expando]]||{}};var ie=/([\:\-\_]+(.))/g,je=/^moz([A-Z])/,Fb=v("jqLite"),ke=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Gb=/<|&#?\w+;/,
-le=/<([\w:]+)/,me=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ea={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ea.optgroup=ea.option;ea.tbody=ea.tfoot=ea.colgroup=ea.caption=ea.thead;ea.th=ea.td;var Ka=S.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=
-!1;"complete"===V.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),S(T).on("load",a))},toString:function(){var b=[];q(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=b?x(this[b]):x(this[this.length+b])},length:0,push:Ne,sort:[].sort,splice:[].splice},lb={};q("multiple selected checked disabled readOnly required open".split(" "),function(b){lb[I(b)]=b});var qc={};q("input select option textarea button form details".split(" "),function(b){qc[Ha(b)]=!0});q({data:mc,
-inheritedData:kb,scope:function(b){return x(b).data("$scope")||kb(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return x(b).data("$isolateScope")||x(b).data("$isolateScopeNoTemplate")},controller:nc,injector:function(b){return kb(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Jb,css:function(b,a,c){a=Wa(a);if(B(c))b.style[a]=c;else{var d;8>=P&&(d=b.currentStyle&&b.currentStyle[a],""===d&&(d="auto"));d=d||b.style[a];8>=P&&(d=""===d?s:d);return d}},attr:function(b,
-a,c){var d=I(a);if(lb[d])if(B(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||A).specified?d:s;else if(B(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?s:b},prop:function(b,a,c){if(B(c))b[a]=c;else return b[a]},text:function(){function b(b,d){var e=a[b.nodeType];if(D(d))return e?b[e]:"";b[e]=d}var a=[];9>P?(a[1]="innerText",a[3]="nodeValue"):a[1]=a[3]="textContent";b.$dv="";return b}(),val:function(b,
-a){if(D(a)){if("SELECT"===La(b)&&b.multiple){var c=[];q(b.options,function(a){a.selected&&c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value=a},html:function(b,a){if(D(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)Ia(d[c]);b.innerHTML=a},empty:oc},function(b,a){S.prototype[a]=function(a,d){var e,g,f=this.length;if(b!==oc&&(2==b.length&&b!==Jb&&b!==nc?a:d)===s){if(U(a)){for(e=0;e<f;e++)if(b===mc)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}e=
-b.$dv;f=e===s?Math.min(f,1):f;for(g=0;g<f;g++){var k=b(this[g],a,d);e=e?e+k:k}return e}for(e=0;e<f;e++)b(this[e],a,d);return this}});q({removeData:kc,dealoc:Ia,on:function a(c,d,e,g){if(B(g))throw Fb("onargs");var f=ma(c,"events"),k=ma(c,"handle");f||ma(c,"events",f={});k||ma(c,"handle",k=oe(c,f));q(d.split(" "),function(d){var g=f[d];if(!g){if("mouseenter"==d||"mouseleave"==d){var l=V.body.contains||V.body.compareDocumentPosition?function(a,c){var d=9===a.nodeType?a.documentElement:a,e=c&&c.parentNode;
-return a===e||!!(e&&1===e.nodeType&&(d.contains?d.contains(e):a.compareDocumentPosition&&a.compareDocumentPosition(e)&16))}:function(a,c){if(c)for(;c=c.parentNode;)if(c===a)return!0;return!1};f[d]=[];a(c,{mouseleave:"mouseout",mouseenter:"mouseover"}[d],function(a){var c=a.relatedTarget;c&&(c===this||l(this,c))||k(a,d)})}else ob(c,d,k),f[d]=[];g=f[d]}g.push(e)})},off:lc,one:function(a,c,d){a=x(a);a.on(c,function g(){a.off(c,d);a.off(c,g)});a.on(c,d)},replaceWith:function(a,c){var d,e=a.parentNode;
-Ia(a);q(new S(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];q(a.childNodes,function(a){1===a.nodeType&&c.push(a)});return c},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,c){q(new S(c),function(c){1!==a.nodeType&&11!==a.nodeType||a.appendChild(c)})},prepend:function(a,c){if(1===a.nodeType){var d=a.firstChild;q(new S(c),function(c){a.insertBefore(c,d)})}},wrap:function(a,c){c=x(c)[0];var d=a.parentNode;
-d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){Ia(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;q(new S(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:jb,removeClass:ib,toggleClass:function(a,c,d){c&&q(c.split(" "),function(c){var g=d;D(g)&&(g=!Jb(a,c));(g?jb:ib)(a,c)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;for(a=a.nextSibling;null!=
-a&&1!==a.nodeType;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName?a.getElementsByTagName(c):[]},clone:Ib,triggerHandler:function(a,c,d){c=(ma(a,"events")||{})[c];d=d||[];var e=[{preventDefault:A,stopPropagation:A}];q(c,function(c){c.apply(a,e.concat(d))})}},function(a,c){S.prototype[c]=function(c,e,g){for(var f,k=0;k<this.length;k++)D(f)?(f=a(this[k],c,e,g),B(f)&&(f=x(f))):Hb(f,a(this[k],c,e,g));return B(f)?f:this};S.prototype.bind=S.prototype.on;S.prototype.unbind=S.prototype.off});
-Za.prototype={put:function(a,c){this[Ja(a,this.nextUid)]=c},get:function(a){return this[Ja(a,this.nextUid)]},remove:function(a){var c=this[a=Ja(a,this.nextUid)];delete this[a];return c}};var qe=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,re=/,/,se=/^\s*(_?)(\S+?)\1\s*$/,pe=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,$a=v("$injector"),Oe=v("$animate"),Md=["$provide",function(a){this.$$selectors={};this.register=function(c,d){var e=c+"-animation";if(c&&"."!=c.charAt(0))throw Oe("notcsel",c);this.$$selectors[c.substr(1)]=
-e;a.factory(e,d)};this.classNameFilter=function(a){1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null);return this.$$classNameFilter};this.$get=["$timeout","$$asyncCallback",function(a,d){return{enter:function(a,c,f,k){f?f.after(a):(c&&c[0]||(c=f.parent()),c.append(a));k&&d(k)},leave:function(a,c){a.remove();c&&d(c)},move:function(a,c,d,k){this.enter(a,c,d,k)},addClass:function(a,c,f){c=y(c)?c:L(c)?c.join(" "):"";q(a,function(a){jb(a,c)});f&&d(f)},removeClass:function(a,c,f){c=
-y(c)?c:L(c)?c.join(" "):"";q(a,function(a){ib(a,c)});f&&d(f)},setClass:function(a,c,f,k){q(a,function(a){jb(a,c);ib(a,f)});k&&d(k)},enabled:A}}]}],ia=v("$compile");fc.$inject=["$provide","$$sanitizeUriProvider"];var ve=/^(x[\:\-_]|data[\:\-_])/i,yc=v("$interpolate"),Pe=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,ye={http:80,https:443,ftp:21},Ob=v("$location");Qb.prototype=Pb.prototype=Bc.prototype={$$html5:!1,$$replace:!1,absUrl:pb("$$absUrl"),url:function(a,c){if(D(a))return this.$$url;var d=Pe.exec(a);d[1]&&
-this.path(decodeURIComponent(d[1]));(d[2]||d[1])&&this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:pb("$$protocol"),host:pb("$$host"),port:pb("$$port"),path:Cc("$$path",function(a){return"/"==a.charAt(0)?a:"/"+a}),search:function(a,c){switch(arguments.length){case 0:return this.$$search;case 1:if(y(a))this.$$search=bc(a);else if(U(a))this.$$search=a;else throw Ob("isrcharg");break;default:D(c)||null===c?delete this.$$search[a]:this.$$search[a]=c}this.$$compose();return this},hash:Cc("$$hash",
-Fa),replace:function(){this.$$replace=!0;return this}};var ja=v("$parse"),Fc={},ua,Qe=Function.prototype.call,Re=Function.prototype.apply,Qc=Function.prototype.bind,cb={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:A,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return B(d)?B(e)?d+e:d:B(e)?e:s},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(B(d)?d:0)-(B(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,
-c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a,c)^e(a,c)},"=":A,"===":function(a,c,d,e){return d(a,c)===e(a,c)},"!==":function(a,c,d,e){return d(a,c)!==e(a,c)},"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,
-c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Se={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Sb=function(a){this.options=a};Sb.prototype={constructor:Sb,lex:function(a){this.text=a;this.index=0;this.ch=s;this.lastCh=":";for(this.tokens=[];this.index<this.text.length;){this.ch=this.text.charAt(this.index);if(this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||
-this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent();else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch}),this.index++;else if(this.isWhitespace(this.ch)){this.index++;continue}else{a=this.ch+this.peek();var c=a+this.peek(2),d=cb[this.ch],e=cb[a],g=cb[c];g?(this.tokens.push({index:this.index,text:c,fn:g}),this.index+=3):e?(this.tokens.push({index:this.index,text:a,fn:e}),this.index+=2):d?(this.tokens.push({index:this.index,
-text:this.ch,fn:d}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}this.lastCh=this.ch}return this.tokens},is:function(a){return-1!==a.indexOf(this.ch)},was:function(a){return-1!==a.indexOf(this.lastCh)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=
-a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,c,d){d=d||this.index;c=B(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+"]":" "+d;throw ja("lexerr",a,c,this.text);},readNumber:function(){for(var a="",c=this.index;this.index<this.text.length;){var d=I(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var e=this.peek();if("e"==d&&this.isExpOperator(e))a+=d;else if(this.isExpOperator(d)&&
-e&&this.isNumber(e)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||e&&this.isNumber(e)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}a*=1;this.tokens.push({index:c,text:a,literal:!0,constant:!0,fn:function(){return a}})},readIdent:function(){for(var a=this,c="",d=this.index,e,g,f,k;this.index<this.text.length;){k=this.text.charAt(this.index);if("."===k||this.isIdent(k)||this.isNumber(k))"."===k&&(e=this.index),c+=k;else break;this.index++}if(e)for(g=
-this.index;g<this.text.length;){k=this.text.charAt(g);if("("===k){f=c.substr(e-d+1);c=c.substr(0,e-d);this.index=g;break}if(this.isWhitespace(k))g++;else break}d={index:d,text:c};if(cb.hasOwnProperty(c))d.fn=cb[c],d.literal=!0,d.constant=!0;else{var m=Ec(c,this.options,this.text);d.fn=E(function(a,c){return m(a,c)},{assign:function(d,e){return qb(d,c,e,a.text,a.options)}})}this.tokens.push(d);f&&(this.tokens.push({index:e,text:"."}),this.tokens.push({index:e+1,text:f}))},readString:function(a){var c=
-this.index;this.index++;for(var d="",e=a,g=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),e=e+f;if(g)"u"===f?(f=this.text.substring(this.index+1,this.index+5),f.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+f+"]"),this.index+=4,d+=String.fromCharCode(parseInt(f,16))):d=(g=Se[f])?d+g:d+f,g=!1;else if("\\"===f)g=!0;else{if(f===a){this.index++;this.tokens.push({index:c,text:e,string:d,literal:!0,constant:!0,fn:function(){return d}});return}d+=f}this.index++}this.throwError("Unterminated quote",
-c)}};var bb=function(a,c,d){this.lexer=a;this.$filter=c;this.options=d};bb.ZERO=E(function(){return 0},{constant:!0});bb.prototype={constructor:bb,parse:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.statements();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);a.literal=!!a.literal;a.constant=!!a.constant;return a},primary:function(){var a;if(this.expect("("))a=this.filterChain(),this.consume(")");else if(this.expect("["))a=this.arrayDeclaration();else if(this.expect("{"))a=
-this.object();else{var c=this.expect();(a=c.fn)||this.throwError("not a primary expression",c);a.literal=!!c.literal;a.constant=!!c.constant}for(var d;c=this.expect("(","[",".");)"("===c.text?(a=this.functionCall(a,d),d=null):"["===c.text?(d=a,a=this.objectIndex(a)):"."===c.text?(d=a,a=this.fieldAccess(a)):this.throwError("IMPOSSIBLE");return a},throwError:function(a,c){throw ja("syntax",c.text,a,c.index+1,this.text,this.text.substring(c.index));},peekToken:function(){if(0===this.tokens.length)throw ja("ueoe",
-this.text);return this.tokens[0]},peek:function(a,c,d,e){if(0<this.tokens.length){var g=this.tokens[0],f=g.text;if(f===a||f===c||f===d||f===e||!(a||c||d||e))return g}return!1},expect:function(a,c,d,e){return(a=this.peek(a,c,d,e))?(this.tokens.shift(),a):!1},consume:function(a){this.expect(a)||this.throwError("is unexpected, expecting ["+a+"]",this.peek())},unaryFn:function(a,c){return E(function(d,e){return a(d,e,c)},{constant:c.constant})},ternaryFn:function(a,c,d){return E(function(e,g){return a(e,
-g)?c(e,g):d(e,g)},{constant:a.constant&&c.constant&&d.constant})},binaryFn:function(a,c,d){return E(function(e,g){return c(e,g,a,d)},{constant:a.constant&&d.constant})},statements:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.filterChain()),!this.expect(";"))return 1===a.length?a[0]:function(c,d){for(var e,g=0;g<a.length;g++){var f=a[g];f&&(e=f(c,d))}return e}},filterChain:function(){for(var a=this.expression(),c;;)if(c=this.expect("|"))a=this.binaryFn(a,
-c.fn,this.filter());else return a},filter:function(){for(var a=this.expect(),c=this.$filter(a.text),d=[];;)if(a=this.expect(":"))d.push(this.expression());else{var e=function(a,e,k){k=[k];for(var m=0;m<d.length;m++)k.push(d[m](a,e));return c.apply(a,k)};return function(){return e}}},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary(),c,d;return(d=this.expect("="))?(a.assign||this.throwError("implies assignment but ["+this.text.substring(0,d.index)+"] can not be assigned to",
-d),c=this.ternary(),function(d,g){return a.assign(d,c(d,g),g)}):a},ternary:function(){var a=this.logicalOR(),c,d;if(this.expect("?")){c=this.ternary();if(d=this.expect(":"))return this.ternaryFn(a,c,this.ternary());this.throwError("expected :",d)}else return a},logicalOR:function(){for(var a=this.logicalAND(),c;;)if(c=this.expect("||"))a=this.binaryFn(a,c.fn,this.logicalAND());else return a},logicalAND:function(){var a=this.equality(),c;if(c=this.expect("&&"))a=this.binaryFn(a,c.fn,this.logicalAND());
-return a},equality:function(){var a=this.relational(),c;if(c=this.expect("==","!=","===","!=="))a=this.binaryFn(a,c.fn,this.equality());return a},relational:function(){var a=this.additive(),c;if(c=this.expect("<",">","<=",">="))a=this.binaryFn(a,c.fn,this.relational());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.fn,this.multiplicative());return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,
-c.fn,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(bb.ZERO,a.fn,this.unary()):(a=this.expect("!"))?this.unaryFn(a.fn,this.unary()):this.primary()},fieldAccess:function(a){var c=this,d=this.expect().text,e=Ec(d,this.options,this.text);return E(function(c,d,k){return e(k||a(c,d))},{assign:function(e,f,k){return qb(a(e,k),d,f,c.text,c.options)}})},objectIndex:function(a){var c=this,d=this.expression();this.consume("]");return E(function(e,
-g){var f=a(e,g),k=d(e,g),m;da(k,c.text);if(!f)return s;(f=Ma(f[k],c.text))&&(f.then&&c.options.unwrapPromises)&&(m=f,"$$v"in f||(m.$$v=s,m.then(function(a){m.$$v=a})),f=f.$$v);return f},{assign:function(e,g,f){var k=d(e,f);return Ma(a(e,f),c.text)[k]=g}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression());while(this.expect(","))}this.consume(")");var e=this;return function(g,f){for(var k=[],m=c?c(g,f):g,h=0;h<d.length;h++)k.push(d[h](g,f));h=a(g,f,m)||
-A;Ma(m,e.text);var l=e.text;if(h){if(h.constructor===h)throw ja("isecfn",l);if(h===Qe||h===Re||Qc&&h===Qc)throw ja("isecff",l);}k=h.apply?h.apply(m,k):h(k[0],k[1],k[2],k[3],k[4]);return Ma(k,e.text)}},arrayDeclaration:function(){var a=[],c=!0;if("]"!==this.peekToken().text){do{if(this.peek("]"))break;var d=this.expression();a.push(d);d.constant||(c=!1)}while(this.expect(","))}this.consume("]");return E(function(c,d){for(var f=[],k=0;k<a.length;k++)f.push(a[k](c,d));return f},{literal:!0,constant:c})},
-object:function(){var a=[],c=!0;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;var d=this.expect(),d=d.string||d.text;this.consume(":");var e=this.expression();a.push({key:d,value:e});e.constant||(c=!1)}while(this.expect(","))}this.consume("}");return E(function(c,d){for(var e={},m=0;m<a.length;m++){var h=a[m];e[h.key]=h.value(c,d)}return e},{literal:!0,constant:c})}};var Rb={},va=v("$sce"),fa={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},W=V.createElement("a"),
-Hc=ta(T.location.href,!0);jc.$inject=["$provide"];Ic.$inject=["$locale"];Kc.$inject=["$locale"];var Nc=".",Ke={yyyy:Y("FullYear",4),yy:Y("FullYear",2,0,!0),y:Y("FullYear",1),MMMM:rb("Month"),MMM:rb("Month",!0),MM:Y("Month",2,1),M:Y("Month",1,1),dd:Y("Date",2),d:Y("Date",1),HH:Y("Hours",2),H:Y("Hours",1),hh:Y("Hours",2,-12),h:Y("Hours",1,-12),mm:Y("Minutes",2),m:Y("Minutes",1),ss:Y("Seconds",2),s:Y("Seconds",1),sss:Y("Milliseconds",3),EEEE:rb("Day"),EEE:rb("Day",!0),a:function(a,c){return 12>a.getHours()?
-c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Tb(Math[0<a?"floor":"ceil"](a/60),2)+Tb(Math.abs(a%60),2))}},Je=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,Ie=/^\-?\d+$/;Jc.$inject=["$locale"];var Ge=$(I),He=$(Ha

<TRUNCATED>

[15/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java
deleted file mode 100644
index 4396ed1..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java
+++ /dev/null
@@ -1,597 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchbase;
-
-import static org.apache.brooklyn.util.JavaGroovyEquivalents.groovyTruth;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
-
-import javax.annotation.Nonnull;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.config.render.RendererHints;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.EntityInternal;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.group.AbstractMembershipTrackingPolicy;
-import org.apache.brooklyn.entity.group.DynamicClusterImpl;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.feed.http.HttpFeed;
-import org.apache.brooklyn.feed.http.HttpPollConfig;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.feed.http.JsonFunctions;
-import org.apache.brooklyn.util.http.HttpToolResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.util.collections.CollectionFunctionals;
-import org.apache.brooklyn.util.collections.MutableSet;
-import org.apache.brooklyn.util.collections.QuorumCheck;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.TaskBuilder;
-import org.apache.brooklyn.util.core.task.Tasks;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.guava.Functionals;
-import org.apache.brooklyn.util.guava.IfFunctions;
-import org.apache.brooklyn.util.math.MathPredicates;
-import org.apache.brooklyn.util.text.ByteSizeStrings;
-import org.apache.brooklyn.util.text.StringFunctions;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.base.Predicates;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-import com.google.common.net.HostAndPort;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-
-public class CouchbaseClusterImpl extends DynamicClusterImpl implements CouchbaseCluster {
-    
-    /*
-     * Refactoring required:
-     * 
-     * Currently, on start() the cluster waits for an arbitrary SERVICE_UP_TIME_OUT (3 minutes) before assuming that a quorate 
-     * number of servers are available. The servers are then added to the cluster, and a further wait period of  
-     * DELAY_BEFORE_ADVERTISING_CLUSTER (30 seconds) is used before advertising the cluster
-     * 
-     * DELAY_BEFORE_ADVERTISING_CLUSTER: It should be possible to refactor this away by adding a repeater that will poll
-     * the REST API of the primary node (once established) until the API indicates that the cluster is available
-     * 
-     * SERVICE_UP_TIME_OUT: The refactoring of this would be more substantial. One method would be to remove the bulk of the 
-     * logic from the start() method, and rely entirely on the membership tracking policy and the onServerPoolMemberChanged()
-     * method. The addition of a RUNNING sensor on the nodes would allow the cluster to determine that a node is up and
-     * running but has not yet been added to the cluster. The IS_CLUSTER_INITIALIZED key could be used to determine whether
-     * or not the cluster should be initialized, or a node simply added to an existing cluster. A repeater could be used
-     * in the driver's to ensure that the method does not return until the node has been fully added
-     * 
-     * There is an (incomplete) first-pass at this here: https://github.com/Nakomis/incubator-brooklyn/compare/couchbase-running-sensor
-     * however, there have been significant changes to the cluster initialization since that work was done so it will probably
-     * need to be re-done
-     * 
-     * Additionally, during bucket creation, a HttpPoll is used to check that the bucket has been created. This should be 
-     * refactored to use a Repeater in CouchbaseNodeSshDriver.bucketCreate() in a similar way to the one employed in
-     * CouchbaseNodeSshDriver.rebalance(). Were this done, this class could simply queue the bucket creation tasks
-     * 
-     */
-    
-    private static final Logger log = LoggerFactory.getLogger(CouchbaseClusterImpl.class);
-    private final Object mutex = new Object[0];
-    // Used to serialize bucket creation as only one bucket can be created at a time,
-    // so a feed is used to determine when a bucket has finished being created
-    private final AtomicReference<HttpFeed> resetBucketCreation = new AtomicReference<HttpFeed>();
-
-    public void init() {
-        log.info("Initializing the Couchbase cluster...");
-        super.init();
-        
-        enrichers().add(
-            Enrichers.builder()
-                .transforming(COUCHBASE_CLUSTER_UP_NODES)
-                .from(this)
-                .publishing(COUCHBASE_CLUSTER_UP_NODE_ADDRESSES)
-                .computing(new ListOfHostAndPort()).build() );
-        enrichers().add(
-            Enrichers.builder()
-                .transforming(COUCHBASE_CLUSTER_UP_NODE_ADDRESSES)
-                .from(this)
-                .publishing(COUCHBASE_CLUSTER_CONNECTION_URL)
-                .computing(
-                    IfFunctions.<List<String>>ifPredicate(
-                        Predicates.compose(MathPredicates.lessThan(getConfig(CouchbaseCluster.INITIAL_QUORUM_SIZE)), 
-                            CollectionFunctionals.sizeFunction(0)) )
-                    .value((String)null)
-                    .defaultApply(
-                        Functionals.chain(
-                            CollectionFunctionals.<String,List<String>>limit(4), 
-                            StringFunctions.joiner(","),
-                            StringFunctions.formatter("http://%s/"))) )
-                .build() );
-        
-        Map<? extends AttributeSensor<? extends Number>, ? extends AttributeSensor<? extends Number>> enricherSetup = 
-            ImmutableMap.<AttributeSensor<? extends Number>, AttributeSensor<? extends Number>>builder()
-                .put(CouchbaseNode.OPS, CouchbaseCluster.OPS_PER_NODE)
-                .put(CouchbaseNode.COUCH_DOCS_DATA_SIZE, CouchbaseCluster.COUCH_DOCS_DATA_SIZE_PER_NODE)
-                .put(CouchbaseNode.COUCH_DOCS_ACTUAL_DISK_SIZE, CouchbaseCluster.COUCH_DOCS_ACTUAL_DISK_SIZE_PER_NODE)
-                .put(CouchbaseNode.EP_BG_FETCHED, CouchbaseCluster.EP_BG_FETCHED_PER_NODE)
-                .put(CouchbaseNode.MEM_USED, CouchbaseCluster.MEM_USED_PER_NODE)
-                .put(CouchbaseNode.COUCH_VIEWS_ACTUAL_DISK_SIZE, CouchbaseCluster.COUCH_VIEWS_ACTUAL_DISK_SIZE_PER_NODE)
-                .put(CouchbaseNode.CURR_ITEMS, CouchbaseCluster.CURR_ITEMS_PER_NODE)
-                .put(CouchbaseNode.VB_REPLICA_CURR_ITEMS, CouchbaseCluster.VB_REPLICA_CURR_ITEMS_PER_NODE)
-                .put(CouchbaseNode.COUCH_VIEWS_DATA_SIZE, CouchbaseCluster.COUCH_VIEWS_DATA_SIZE_PER_NODE)
-                .put(CouchbaseNode.GET_HITS, CouchbaseCluster.GET_HITS_PER_NODE)
-                .put(CouchbaseNode.CMD_GET, CouchbaseCluster.CMD_GET_PER_NODE)
-                .put(CouchbaseNode.CURR_ITEMS_TOT, CouchbaseCluster.CURR_ITEMS_TOT_PER_NODE)
-            .build();
-        
-        for (AttributeSensor<? extends Number> nodeSensor : enricherSetup.keySet()) {
-            addSummingMemberEnricher(nodeSensor);
-            addAveragingMemberEnricher(nodeSensor, enricherSetup.get(nodeSensor));
-        }
-        
-        enrichers().add(Enrichers.builder().updatingMap(Attributes.SERVICE_NOT_UP_INDICATORS)
-            .from(IS_CLUSTER_INITIALIZED).computing(
-                IfFunctions.ifNotEquals(true).value("The cluster is not yet completely initialized")
-                    .defaultValue(null).build()).build() );
-    }
-    
-    private void addAveragingMemberEnricher(AttributeSensor<? extends Number> fromSensor, AttributeSensor<? extends Number> toSensor) {
-        enrichers().add(Enrichers.builder()
-            .aggregating(fromSensor)
-            .publishing(toSensor)
-            .fromMembers()
-            .computingAverage()
-            .build()
-        );
-    }
-
-    private void addSummingMemberEnricher(AttributeSensor<? extends Number> source) {
-        enrichers().add(Enrichers.builder()
-            .aggregating(source)
-            .publishing(source)
-            .fromMembers()
-            .computingSum()
-            .build()
-        );
-    }
-
-    @Override
-    protected void doStart() {
-        sensors().set(IS_CLUSTER_INITIALIZED, false);
-        
-        super.doStart();
-
-        connectSensors();
-        
-        sensors().set(BUCKET_CREATION_IN_PROGRESS, false);
-
-        //start timeout before adding the servers
-        Tasks.setBlockingDetails("Pausing while Couchbase stabilizes");
-        Time.sleep(getConfig(NODES_STARTED_STABILIZATION_DELAY));
-
-        Optional<Set<Entity>> upNodes = Optional.<Set<Entity>>fromNullable(getAttribute(COUCHBASE_CLUSTER_UP_NODES));
-        if (upNodes.isPresent() && !upNodes.get().isEmpty()) {
-
-            Tasks.setBlockingDetails("Adding servers to Couchbase");
-            
-            //TODO: select a new primary node if this one fails
-            Entity primaryNode = upNodes.get().iterator().next();
-            ((EntityInternal) primaryNode).sensors().set(CouchbaseNode.IS_PRIMARY_NODE, true);
-            sensors().set(COUCHBASE_PRIMARY_NODE, primaryNode);
-
-            Set<Entity> serversToAdd = MutableSet.<Entity>copyOf(getUpNodes());
-
-            if (serversToAdd.size() >= getQuorumSize() && serversToAdd.size() > 1) {
-                log.info("Number of SERVICE_UP nodes:{} in cluster:{} reached Quorum:{}, adding the servers", new Object[]{serversToAdd.size(), getId(), getQuorumSize()});
-                addServers(serversToAdd);
-
-                //wait for servers to be added to the couchbase server
-                try {
-                    Tasks.setBlockingDetails("Delaying before advertising cluster up");
-                    Time.sleep(getConfig(DELAY_BEFORE_ADVERTISING_CLUSTER));
-                } finally {
-                    Tasks.resetBlockingDetails();
-                }
-                
-                ((CouchbaseNode)getPrimaryNode()).rebalance();
-            } else {
-                if (getQuorumSize()>1) {
-                    log.warn(this+" is not quorate; will likely fail later, but proceeding for now");
-                }
-                for (Entity server: serversToAdd) {
-                    ((EntityInternal) server).sensors().set(CouchbaseNode.IS_IN_CLUSTER, true);
-                }
-            }
-                
-            if (getConfig(CREATE_BUCKETS)!=null) {
-                try {
-                    Tasks.setBlockingDetails("Creating buckets in Couchbase");
-
-                    createBuckets();
-                    DependentConfiguration.waitInTaskForAttributeReady(this, CouchbaseCluster.BUCKET_CREATION_IN_PROGRESS, Predicates.equalTo(false));
-
-                } finally {
-                    Tasks.resetBlockingDetails();
-                }
-            }
-
-            if (getConfig(REPLICATION)!=null) {
-                try {
-                    Tasks.setBlockingDetails("Configuring replication rules");
-
-                    List<Map<String, Object>> replRules = getConfig(REPLICATION);
-                    for (Map<String, Object> replRule: replRules) {
-                        DynamicTasks.queue(Effectors.invocation(getPrimaryNode(), CouchbaseNode.ADD_REPLICATION_RULE, replRule));
-                    }
-                    DynamicTasks.waitForLast();
-
-                } finally {
-                    Tasks.resetBlockingDetails();
-                }
-            }
-
-            sensors().set(IS_CLUSTER_INITIALIZED, true);
-            
-        } else {
-            throw new IllegalStateException("No up nodes available after starting");
-        }
-    }
-
-    @Override
-    public void stop() {
-        if (resetBucketCreation.get() != null) {
-            resetBucketCreation.get().stop();
-        }
-        super.stop();
-    }
-
-    protected void connectSensors() {
-        policies().add(PolicySpec.create(MemberTrackingPolicy.class)
-                .displayName("Controller targets tracker")
-                .configure("group", this));
-    }
-    
-    private final static class ListOfHostAndPort implements Function<Set<Entity>, List<String>> {
-        @Override public List<String> apply(Set<Entity> input) {
-            List<String> addresses = Lists.newArrayList();
-            for (Entity entity : input) {
-                addresses.add(String.format("%s",
-                        BrooklynAccessUtils.getBrooklynAccessibleAddress(entity, entity.getAttribute(CouchbaseNode.COUCHBASE_WEB_ADMIN_PORT))));
-            }
-            return addresses;
-        }
-    }
-
-    public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy {
-        @Override protected void onEntityChange(Entity member) {
-            ((CouchbaseClusterImpl)entity).onServerPoolMemberChanged(member);
-        }
-
-        @Override protected void onEntityAdded(Entity member) {
-            ((CouchbaseClusterImpl)entity).onServerPoolMemberChanged(member);
-        }
-
-        @Override protected void onEntityRemoved(Entity member) {
-            ((CouchbaseClusterImpl)entity).onServerPoolMemberChanged(member);
-        }
-    };
-
-    protected synchronized void onServerPoolMemberChanged(Entity member) {
-        if (log.isTraceEnabled()) log.trace("For {}, considering membership of {} which is in locations {}",
-                new Object[]{this, member, member.getLocations()});
-
-        //FIXME: make use of servers to be added after cluster initialization.
-        synchronized (mutex) {
-            if (belongsInServerPool(member)) {
-
-                Optional<Set<Entity>> upNodes = Optional.fromNullable(getUpNodes());
-                if (upNodes.isPresent()) {
-
-                    if (!upNodes.get().contains(member)) {
-                        Set<Entity> newNodes = Sets.newHashSet(getUpNodes());
-                        newNodes.add(member);
-                        sensors().set(COUCHBASE_CLUSTER_UP_NODES, newNodes);
-
-                        //add to set of servers to be added.
-                        if (isClusterInitialized()) {
-                            addServer(member);
-                        }
-                    }
-                } else {
-                    Set<Entity> newNodes = Sets.newHashSet();
-                    newNodes.add(member);
-                    sensors().set(COUCHBASE_CLUSTER_UP_NODES, newNodes);
-
-                    if (isClusterInitialized()) {
-                        addServer(member);
-                    }
-                }
-            } else {
-                Set<Entity> upNodes = getUpNodes();
-                if (upNodes != null && upNodes.contains(member)) {
-                    upNodes.remove(member);
-                    sensors().set(COUCHBASE_CLUSTER_UP_NODES, upNodes);
-                    log.info("Removing couchbase node {}: {}; from cluster", new Object[]{this, member});
-                }
-            }
-            if (log.isTraceEnabled()) log.trace("Done {} checkEntity {}", this, member);
-        }
-    }
-
-    protected boolean belongsInServerPool(Entity member) {
-        if (!groovyTruth(member.getAttribute(Startable.SERVICE_UP))) {
-            if (log.isTraceEnabled()) log.trace("Members of {}, checking {}, eliminating because not up", this, member);
-            return false;
-        }
-        if (!getMembers().contains(member)) {
-            if (log.isTraceEnabled())
-                log.trace("Members of {}, checking {}, eliminating because not member", this, member);
-
-            return false;
-        }
-        if (log.isTraceEnabled()) log.trace("Members of {}, checking {}, approving", this, member);
-
-        return true;
-    }
-
-
-    protected EntitySpec<?> getMemberSpec() {
-        EntitySpec<?> result = super.getMemberSpec();
-        if (result != null) return result;
-        return EntitySpec.create(CouchbaseNode.class);
-    }
-
-    @Override
-    public int getQuorumSize() {
-        Integer quorumSize = getConfig(CouchbaseCluster.INITIAL_QUORUM_SIZE);
-        if (quorumSize != null && quorumSize > 0)
-            return quorumSize;
-        // by default the quorum would be floor(initial_cluster_size/2) + 1
-        return (int) Math.floor(getConfig(INITIAL_SIZE) / 2) + 1;
-    }
-
-    protected int getActualSize() {
-        return Optional.fromNullable(getAttribute(CouchbaseCluster.ACTUAL_CLUSTER_SIZE)).or(-1);
-    }
-
-    private Set<Entity> getUpNodes() {
-        return getAttribute(COUCHBASE_CLUSTER_UP_NODES);
-    }
-
-    private CouchbaseNode getPrimaryNode() {
-        return (CouchbaseNode) getAttribute(COUCHBASE_PRIMARY_NODE);
-    }
-
-    @Override
-    protected void initEnrichers() {
-        enrichers().add(Enrichers.builder().updatingMap(ServiceStateLogic.SERVICE_NOT_UP_INDICATORS)
-            .from(COUCHBASE_CLUSTER_UP_NODES)
-            .computing(new Function<Set<Entity>, Object>() {
-                @Override
-                public Object apply(Set<Entity> input) {
-                    if (input==null) return "Couchbase up nodes not set";
-                    if (input.isEmpty()) return "No Couchbase up nodes";
-                    if (input.size() < getQuorumSize()) return "Couchbase up nodes not quorate";
-                    return null;
-                }
-            }).build());
-        
-        if (config().getLocalRaw(UP_QUORUM_CHECK).isAbsent()) {
-            // TODO Only leaving CouchbaseQuorumCheck here in case it is contained in persisted state.
-            // If so, need a transformer and then to delete it
-            @SuppressWarnings({ "unused", "hiding" })
-            @Deprecated
-            class CouchbaseQuorumCheck implements QuorumCheck {
-                @Override
-                public boolean isQuorate(int sizeHealthy, int totalSize) {
-                    // check members count passed in AND the sensor  
-                    if (sizeHealthy < getQuorumSize()) return false;
-                    return true;
-                }
-            }
-            config().set(UP_QUORUM_CHECK, new CouchbaseClusterImpl.CouchbaseQuorumCheck(this));
-        }
-        super.initEnrichers();
-    }
-    
-    static class CouchbaseQuorumCheck implements QuorumCheck {
-        private final CouchbaseCluster cluster;
-        CouchbaseQuorumCheck(CouchbaseCluster cluster) {
-            this.cluster = cluster;
-        }
-        @Override
-        public boolean isQuorate(int sizeHealthy, int totalSize) {
-            // check members count passed in AND the sensor  
-            if (sizeHealthy < cluster.getQuorumSize()) return false;
-            return true;
-        }
-    }
-    protected void addServers(Set<Entity> serversToAdd) {
-        Preconditions.checkNotNull(serversToAdd);
-        for (Entity s : serversToAdd) {
-            addServerSeveralTimes(s, 12, Duration.TEN_SECONDS);
-        }
-    }
-
-    /** try adding in a loop because we are seeing spurious port failures in AWS */
-    protected void addServerSeveralTimes(Entity s, int numRetries, Duration delayOnFailure) {
-        try {
-            addServer(s);
-        } catch (Exception e) {
-            Exceptions.propagateIfFatal(e);
-            if (numRetries<=0) throw Exceptions.propagate(e);
-            // retry once after sleep because we are getting some odd primary-change events
-            log.warn("Error adding "+s+" to "+this+", "+numRetries+" retries remaining, will retry after delay ("+e+")");
-            Time.sleep(delayOnFailure);
-            addServerSeveralTimes(s, numRetries-1, delayOnFailure);
-        }
-    }
-
-    protected void addServer(Entity serverToAdd) {
-        Preconditions.checkNotNull(serverToAdd);
-        if (serverToAdd.equals(getPrimaryNode())) {
-            // no need to add; but we pass it in anyway because it makes the calling logic easier
-            return;
-        }
-        if (!isMemberInCluster(serverToAdd)) {
-            HostAndPort webAdmin = HostAndPort.fromParts(serverToAdd.getAttribute(SoftwareProcess.SUBNET_HOSTNAME),
-                    serverToAdd.getAttribute(CouchbaseNode.COUCHBASE_WEB_ADMIN_PORT));
-            String username = serverToAdd.getConfig(CouchbaseNode.COUCHBASE_ADMIN_USERNAME);
-            String password = serverToAdd.getConfig(CouchbaseNode.COUCHBASE_ADMIN_PASSWORD);
-
-            if (isClusterInitialized()) {
-                Entities.invokeEffectorWithArgs(this, getPrimaryNode(), CouchbaseNode.SERVER_ADD_AND_REBALANCE, webAdmin.toString(), username, password).getUnchecked();
-            } else {
-                Entities.invokeEffectorWithArgs(this, getPrimaryNode(), CouchbaseNode.SERVER_ADD, webAdmin.toString(), username, password).getUnchecked();
-            }
-            //FIXME check feedback of whether the server was added.
-            ((EntityInternal) serverToAdd).sensors().set(CouchbaseNode.IS_IN_CLUSTER, true);
-        }
-    }
-
-    /** finds the cluster name specified for a node or a cluster, 
-     * using {@link CouchbaseCluster#CLUSTER_NAME} or falling back to the cluster (or node) ID. */
-    public static String getClusterName(Entity node) {
-        String name = node.getConfig(CLUSTER_NAME);
-        if (!Strings.isBlank(name)) return Strings.makeValidFilename(name);
-        return getClusterOrNode(node).getId();
-    }
-    
-    /** returns Couchbase cluster in ancestry, defaulting to the given node if none */
-    @Nonnull public static Entity getClusterOrNode(Entity node) {
-        Iterable<CouchbaseCluster> clusterNodes = Iterables.filter(Entities.ancestors(node), CouchbaseCluster.class);
-        return Iterables.getFirst(clusterNodes, node);
-    }
-    
-    public boolean isClusterInitialized() {
-        return Optional.fromNullable(getAttribute(IS_CLUSTER_INITIALIZED)).or(false);
-    }
-
-    public boolean isMemberInCluster(Entity e) {
-        return Optional.fromNullable(e.getAttribute(CouchbaseNode.IS_IN_CLUSTER)).or(false);
-    }
-    
-    public void createBuckets() {
-        //TODO: check for port conflicts if buckets are being created with a port
-        List<Map<String, Object>> bucketsToCreate = getConfig(CREATE_BUCKETS);
-        if (bucketsToCreate==null) return;
-        
-        Entity primaryNode = getPrimaryNode();
-
-        for (Map<String, Object> bucketMap : bucketsToCreate) {
-            String bucketName = bucketMap.containsKey("bucket") ? (String) bucketMap.get("bucket") : "default";
-            String bucketType = bucketMap.containsKey("bucket-type") ? (String) bucketMap.get("bucket-type") : "couchbase";
-            // default bucket must be on this port; other buckets can (must) specify their own (unique) port
-            Integer bucketPort = bucketMap.containsKey("bucket-port") ? (Integer) bucketMap.get("bucket-port") : 11211;
-            Integer bucketRamSize = bucketMap.containsKey("bucket-ramsize") ? (Integer) bucketMap.get("bucket-ramsize") : 100;
-            Integer bucketReplica = bucketMap.containsKey("bucket-replica") ? (Integer) bucketMap.get("bucket-replica") : 1;
-
-            createBucket(primaryNode, bucketName, bucketType, bucketPort, bucketRamSize, bucketReplica);
-        }
-    }
-
-    public void createBucket(final Entity primaryNode, final String bucketName, final String bucketType, final Integer bucketPort, final Integer bucketRamSize, final Integer bucketReplica) {
-        DynamicTasks.queueIfPossible(TaskBuilder.<Void>builder().displayName("Creating bucket " + bucketName).body(
-                new Callable<Void>() {
-                    @Override
-                    public Void call() throws Exception {
-                        DependentConfiguration.waitInTaskForAttributeReady(CouchbaseClusterImpl.this, CouchbaseCluster.BUCKET_CREATION_IN_PROGRESS, Predicates.equalTo(false));
-                        if (CouchbaseClusterImpl.this.resetBucketCreation.get() != null) {
-                            CouchbaseClusterImpl.this.resetBucketCreation.get().stop();
-                        }
-                        sensors().set(CouchbaseCluster.BUCKET_CREATION_IN_PROGRESS, true);
-                        HostAndPort hostAndPort = BrooklynAccessUtils.getBrooklynAccessibleAddress(primaryNode, primaryNode.getAttribute(CouchbaseNode.COUCHBASE_WEB_ADMIN_PORT));
-
-                        CouchbaseClusterImpl.this.resetBucketCreation.set(HttpFeed.builder()
-                                .entity(CouchbaseClusterImpl.this)
-                                .period(500, TimeUnit.MILLISECONDS)
-                                .baseUri(String.format("http://%s/pools/default/buckets/%s", hostAndPort, bucketName))
-                                .credentials(primaryNode.getConfig(CouchbaseNode.COUCHBASE_ADMIN_USERNAME), primaryNode.getConfig(CouchbaseNode.COUCHBASE_ADMIN_PASSWORD))
-                                .poll(new HttpPollConfig<Boolean>(BUCKET_CREATION_IN_PROGRESS)
-                                        .onSuccess(Functionals.chain(HttpValueFunctions.jsonContents(), JsonFunctions.walkN("nodes"), new Function<JsonElement, Boolean>() {
-                                            @Override
-                                            public Boolean apply(JsonElement input) {
-                                                // Wait until bucket has been created on all nodes and the couchApiBase element has been published (indicating that the bucket is useable)
-                                                JsonArray servers = input.getAsJsonArray();
-                                                if (servers.size() != CouchbaseClusterImpl.this.getMembers().size()) {
-                                                    return true;
-                                                }
-                                                for (JsonElement server : servers) {
-                                                    Object api = server.getAsJsonObject().get("couchApiBase");
-                                                    if (api == null || Strings.isEmpty(String.valueOf(api))) {
-                                                        return true;
-                                                    }
-                                                }
-                                                return false;
-                                            }
-                                        }))
-                                        .onFailureOrException(new Function<Object, Boolean>() {
-                                            @Override
-                                            public Boolean apply(Object input) {
-                                                if (input instanceof HttpToolResponse) {
-                                                    if (((HttpToolResponse) input).getResponseCode() == 404) {
-                                                        return true;
-                                                    }
-                                                }
-                                                if (input instanceof Throwable)
-                                                    Exceptions.propagate((Throwable) input);
-                                                throw new IllegalStateException("Unexpected response when creating bucket:" + input);
-                                            }
-                                        }))
-                                .build());
-
-                        // TODO: Bail out if bucket creation fails, to allow next bucket to proceed
-                        Entities.invokeEffectorWithArgs(CouchbaseClusterImpl.this, primaryNode, CouchbaseNode.BUCKET_CREATE, bucketName, bucketType, bucketPort, bucketRamSize, bucketReplica);
-                        DependentConfiguration.waitInTaskForAttributeReady(CouchbaseClusterImpl.this, CouchbaseCluster.BUCKET_CREATION_IN_PROGRESS, Predicates.equalTo(false));
-                        if (CouchbaseClusterImpl.this.resetBucketCreation.get() != null) {
-                            CouchbaseClusterImpl.this.resetBucketCreation.get().stop();
-                        }
-                        return null;
-                    }
-                }
-        ).build()).orSubmitAndBlock();
-    }
-    
-    static {
-        RendererHints.register(COUCH_DOCS_DATA_SIZE_PER_NODE, RendererHints.displayValue(ByteSizeStrings.metric()));
-        RendererHints.register(COUCH_DOCS_ACTUAL_DISK_SIZE_PER_NODE, RendererHints.displayValue(ByteSizeStrings.metric()));
-        RendererHints.register(MEM_USED_PER_NODE, RendererHints.displayValue(ByteSizeStrings.metric()));
-        RendererHints.register(COUCH_VIEWS_ACTUAL_DISK_SIZE_PER_NODE, RendererHints.displayValue(ByteSizeStrings.metric()));
-        RendererHints.register(COUCH_VIEWS_DATA_SIZE_PER_NODE, RendererHints.displayValue(ByteSizeStrings.metric()));
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNode.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNode.java
deleted file mode 100644
index 8bde2f3..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNode.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchbase;
-
-import java.net.URI;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.annotation.Effector;
-import org.apache.brooklyn.core.annotation.EffectorParam;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.config.render.RendererHints;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.core.effector.MethodEffector;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.text.ByteSizeStrings;
-
-@Catalog(name="CouchBase Node", description="Couchbase Server is an open source, distributed (shared-nothing architecture) "
-        + "NoSQL document-oriented database that is optimized for interactive applications.")
-@ImplementedBy(CouchbaseNodeImpl.class)
-public interface CouchbaseNode extends SoftwareProcess {
-
-    @SetFromFlag("adminUsername")
-    ConfigKey<String> COUCHBASE_ADMIN_USERNAME = ConfigKeys.newStringConfigKey("couchbase.adminUsername", "Username for the admin user on the node", "Administrator");
-
-    @SetFromFlag("adminPassword")
-    ConfigKey<String> COUCHBASE_ADMIN_PASSWORD = ConfigKeys.newStringConfigKey("couchbase.adminPassword", "Password for the admin user on the node", "Password");
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION,
-            "3.0.0");
-
-    @SetFromFlag("enterprise")
-    ConfigKey<Boolean> USE_ENTERPRISE = ConfigKeys.newBooleanConfigKey("couchbase.enterprise.enabled",
-        "Whether to use Couchbase Enterprise; if false uses the community version. Defaults to true.", true);
-
-    @SetFromFlag("downloadUrl")
-    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "http://packages.couchbase.com/releases/${version}/"
-                + "couchbase-server-${driver.communityOrEnterprise}${driver.downloadLinkPreVersionSeparator}${version}${driver.downloadLinkOsTagWithPrefix}");
-
-    @SetFromFlag("clusterInitRamSize")
-    BasicAttributeSensorAndConfigKey<Integer> COUCHBASE_CLUSTER_INIT_RAM_SIZE = new BasicAttributeSensorAndConfigKey<Integer>(
-            Integer.class, "couchbase.clusterInitRamSize", "initial ram size of the cluster", 300);
-
-    PortAttributeSensorAndConfigKey COUCHBASE_WEB_ADMIN_PORT = new PortAttributeSensorAndConfigKey("couchbase.webAdminPort", "Web Administration Port", "8091+");
-    PortAttributeSensorAndConfigKey COUCHBASE_API_PORT = new PortAttributeSensorAndConfigKey("couchbase.apiPort", "Couchbase API Port", "8092+");
-    PortAttributeSensorAndConfigKey COUCHBASE_INTERNAL_BUCKET_PORT = new PortAttributeSensorAndConfigKey("couchbase.internalBucketPort", "Internal Bucket Port", "11209");
-    PortAttributeSensorAndConfigKey COUCHBASE_INTERNAL_EXTERNAL_BUCKET_PORT = new PortAttributeSensorAndConfigKey("couchbase.internalExternalBucketPort", "Internal/External Bucket Port", "11210");
-    PortAttributeSensorAndConfigKey COUCHBASE_CLIENT_INTERFACE_PROXY = new PortAttributeSensorAndConfigKey("couchbase.clientInterfaceProxy", "Client interface (proxy)", "11211");
-    PortAttributeSensorAndConfigKey COUCHBASE_INCOMING_SSL_PROXY = new PortAttributeSensorAndConfigKey("couchbase.incomingSslProxy", "Incoming SSL Proxy", "11214");
-    PortAttributeSensorAndConfigKey COUCHBASE_INTERNAL_OUTGOING_SSL_PROXY = new PortAttributeSensorAndConfigKey("couchbase.internalOutgoingSslProxy", "Internal Outgoing SSL Proxy", "11215");
-    PortAttributeSensorAndConfigKey COUCHBASE_REST_HTTPS_FOR_SSL = new PortAttributeSensorAndConfigKey("couchbase.internalRestHttpsForSsl", "Internal REST HTTPS for SSL", "18091");
-    PortAttributeSensorAndConfigKey COUCHBASE_CAPI_HTTPS_FOR_SSL = new PortAttributeSensorAndConfigKey("couchbase.internalCapiHttpsForSsl", "Internal CAPI HTTPS for SSL", "18092");
-    PortAttributeSensorAndConfigKey ERLANG_PORT_MAPPER = new PortAttributeSensorAndConfigKey("couchbase.erlangPortMapper", "Erlang Port Mapper Daemon Listener Port (epmd)", "4369");
-    PortAttributeSensorAndConfigKey NODE_DATA_EXCHANGE_PORT_RANGE_START = new PortAttributeSensorAndConfigKey("couchbase.nodeDataExchangePortRangeStart", "Node data exchange Port Range Start", "21100+");
-    PortAttributeSensorAndConfigKey NODE_DATA_EXCHANGE_PORT_RANGE_END = new PortAttributeSensorAndConfigKey("couchbase.nodeDataExchangePortRangeEnd", "Node data exchange Port Range End", "21199+");
-
-    AttributeSensor<Boolean> IS_PRIMARY_NODE = Sensors.newBooleanSensor("couchbase.isPrimaryNode", "flag to determine if the current couchbase node is the primary node for the cluster");
-    AttributeSensor<Boolean> IS_IN_CLUSTER = Sensors.newBooleanSensor("couchbase.isInCluster", "flag to determine if the current couchbase node has been added to a cluster, "
-        + "including being the first / primary node");
-    AttributeSensor<URI> COUCHBASE_WEB_ADMIN_URL = Attributes.MAIN_URI;
-    
-    // Interesting stats
-    AttributeSensor<Double> OPS = Sensors.newDoubleSensor("couchbase.stats.ops", 
-            "Retrieved from pools/nodes/<current node>/interestingStats/ops");
-    AttributeSensor<Long> COUCH_DOCS_DATA_SIZE = Sensors.newLongSensor("couchbase.stats.couch.docs.data.size", 
-            "Retrieved from pools/nodes/<current node>/interestingStats/couch_docs_data_size");
-    AttributeSensor<Long> COUCH_DOCS_ACTUAL_DISK_SIZE = Sensors.newLongSensor("couchbase.stats.couch.docs.actual.disk.size", 
-            "Retrieved from pools/nodes/<current node>/interestingStats/couch_docs_actual_disk_size");
-    AttributeSensor<Long> EP_BG_FETCHED = Sensors.newLongSensor("couchbase.stats.ep.bg.fetched", 
-            "Retrieved from pools/nodes/<current node>/interestingStats/ep_bg_fetched");
-    AttributeSensor<Long> MEM_USED = Sensors.newLongSensor("couchbase.stats.mem.used", 
-            "Retrieved from pools/nodes/<current node>/interestingStats/mem_used");
-    AttributeSensor<Long> COUCH_VIEWS_ACTUAL_DISK_SIZE = Sensors.newLongSensor("couchbase.stats.couch.views.actual.disk.size", 
-            "Retrieved from pools/nodes/<current node>/interestingStats/couch_views_actual_disk_size");
-    AttributeSensor<Long> CURR_ITEMS = Sensors.newLongSensor("couchbase.stats.curr.items", 
-            "Retrieved from pools/nodes/<current node>/interestingStats/curr_items");
-    AttributeSensor<Long> VB_REPLICA_CURR_ITEMS = Sensors.newLongSensor("couchbase.stats.vb.replica.curr.items", 
-            "Retrieved from pools/nodes/<current node>/interestingStats/vb_replica_curr_items");
-    AttributeSensor<Long> COUCH_VIEWS_DATA_SIZE = Sensors.newLongSensor("couchbase.stats.couch.views.data.size", 
-            "Retrieved from pools/nodes/<current node>/interestingStats/couch_views_data_size");
-    AttributeSensor<Long> GET_HITS = Sensors.newLongSensor("couchbase.stats.get.hits", 
-            "Retrieved from pools/nodes/<current node>/interestingStats/get_hits");
-    AttributeSensor<Double> CMD_GET = Sensors.newDoubleSensor("couchbase.stats.cmd.get", 
-            "Retrieved from pools/nodes/<current node>/interestingStats/cmd_get");
-    AttributeSensor<Long> CURR_ITEMS_TOT = Sensors.newLongSensor("couchbase.stats.curr.items.tot", 
-            "Retrieved from pools/nodes/<current node>/interestingStats/curr_items_tot");
-    AttributeSensor<String> REBALANCE_STATUS = Sensors.newStringSensor("couchbase.rebalance.status", 
-            "Displays the current rebalance status from pools/nodes/rebalanceStatus");
-    
-    class MainUri {
-        public static final AttributeSensor<URI> MAIN_URI = Attributes.MAIN_URI;
-        
-        static {
-            // ROOT_URL does not need init because it refers to something already initialized
-            RendererHints.register(COUCHBASE_WEB_ADMIN_URL, RendererHints.namedActionWithUrl());
-
-            RendererHints.register(COUCH_DOCS_DATA_SIZE, RendererHints.displayValue(ByteSizeStrings.metric()));
-            RendererHints.register(COUCH_DOCS_ACTUAL_DISK_SIZE, RendererHints.displayValue(ByteSizeStrings.metric()));
-            RendererHints.register(MEM_USED, RendererHints.displayValue(ByteSizeStrings.metric()));
-            RendererHints.register(COUCH_VIEWS_ACTUAL_DISK_SIZE, RendererHints.displayValue(ByteSizeStrings.metric()));
-            RendererHints.register(COUCH_VIEWS_DATA_SIZE, RendererHints.displayValue(ByteSizeStrings.metric()));
-        }
-    }
-    
-    // this long-winded reference is done just to trigger the initialization above
-    AttributeSensor<URI> MAIN_URI = MainUri.MAIN_URI;
-
-    MethodEffector<Void> SERVER_ADD = new MethodEffector<Void>(CouchbaseNode.class, "serverAdd");
-    MethodEffector<Void> SERVER_ADD_AND_REBALANCE = new MethodEffector<Void>(CouchbaseNode.class, "serverAddAndRebalance");
-    MethodEffector<Void> REBALANCE = new MethodEffector<Void>(CouchbaseNode.class, "rebalance");
-    MethodEffector<Void> BUCKET_CREATE = new MethodEffector<Void>(CouchbaseNode.class, "bucketCreate");
-    org.apache.brooklyn.api.effector.Effector<Void> ADD_REPLICATION_RULE = Effectors.effector(Void.class, "addReplicationRule")
-        .description("Adds a replication rule from the indicated bucket on the cluster where this node is located "
-            + "to the indicated cluster and optional destination bucket")
-        .parameter(String.class, "fromBucket", "Bucket to be replicated")
-        .parameter(Object.class, "toCluster", "Entity (or ID) of the cluster to which this should replicate")
-        .parameter(String.class, "toBucket", "Destination bucket for replication in the toCluster, defaulting to the same as the fromBucket")
-        .buildAbstract();
-
-    @Effector(description = "add a server to a cluster")
-    public void serverAdd(@EffectorParam(name = "serverHostname") String serverToAdd, @EffectorParam(name = "username") String username, @EffectorParam(name = "password") String password);
-    
-    @Effector(description = "add a server to a cluster, and immediately rebalances")
-    public void serverAddAndRebalance(@EffectorParam(name = "serverHostname") String serverToAdd, @EffectorParam(name = "username") String username, @EffectorParam(name = "password") String password);
-
-    @Effector(description = "rebalance the couchbase cluster")
-    public void rebalance();
-    
-    @Effector(description = "create a new bucket")
-    public void bucketCreate(@EffectorParam(name = "bucketName") String bucketName, @EffectorParam(name = "bucketType") String bucketType, 
-            @EffectorParam(name = "bucketPort") Integer bucketPort, @EffectorParam(name = "bucketRamSize") Integer bucketRamSize, 
-            @EffectorParam(name = "bucketReplica") Integer bucketReplica);
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNodeDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNodeDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNodeDriver.java
deleted file mode 100644
index b5c797d..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNodeDriver.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchbase;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface CouchbaseNodeDriver extends SoftwareProcessDriver {
-    public String getOsTag();
-    public String getDownloadLinkPreVersionSeparator();
-    public String getDownloadLinkOsTagWithPrefix();
-    
-    public String getCommunityOrEnterprise();
-
-    public void serverAdd(String serverToAdd, String username, String password);
-
-    public void rebalance();
-    
-    public void bucketCreate(String bucketName, String bucketType, Integer bucketPort, Integer bucketRamSize, Integer bucketReplica);
-
-    public void serverAddAndRebalance(String serverToAdd, String username, String password);
-
-    public void addReplicationRule(Entity toCluster, String fromBucket, String toBucket);
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNodeImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNodeImpl.java
deleted file mode 100644
index 68d3a54..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNodeImpl.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchbase;
-
-import static java.lang.String.format;
-
-import java.net.URI;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.location.MachineProvisioningLocation;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.core.effector.EffectorBody;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.http.HttpFeed;
-import org.apache.brooklyn.feed.http.HttpPollConfig;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.feed.http.JsonFunctions;
-import org.apache.http.auth.UsernamePasswordCredentials;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.collections.MutableSet;
-import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.apache.brooklyn.util.http.HttpTool;
-import org.apache.brooklyn.util.http.HttpToolResponse;
-import org.apache.brooklyn.util.core.task.Tasks;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.guava.Functionals;
-import org.apache.brooklyn.util.guava.MaybeFunctions;
-import org.apache.brooklyn.util.guava.TypeTokens;
-import org.apache.brooklyn.util.net.Urls;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.base.Charsets;
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-import com.google.common.base.Preconditions;
-import com.google.common.net.HostAndPort;
-import com.google.common.net.HttpHeaders;
-import com.google.common.net.MediaType;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-
-public class CouchbaseNodeImpl extends SoftwareProcessImpl implements CouchbaseNode {
-
-    private static final Logger log = LoggerFactory.getLogger(CouchbaseNodeImpl.class);
-
-    private volatile HttpFeed httpFeed;
-
-    @Override
-    public Class<CouchbaseNodeDriver> getDriverInterface() {
-        return CouchbaseNodeDriver.class;
-    }
-
-    @Override
-    public CouchbaseNodeDriver getDriver() {
-        return (CouchbaseNodeDriver) super.getDriver();
-    }
-
-    @Override
-    public void init() {
-        super.init();
-
-        subscriptions().subscribe(this, Attributes.SERVICE_UP, new SensorEventListener<Boolean>() {
-            @Override
-            public void onEvent(SensorEvent<Boolean> booleanSensorEvent) {
-                if (Boolean.TRUE.equals(booleanSensorEvent.getValue())) {
-                    Integer webPort = getAttribute(CouchbaseNode.COUCHBASE_WEB_ADMIN_PORT);
-                    Preconditions.checkNotNull(webPort, CouchbaseNode.COUCHBASE_WEB_ADMIN_PORT+" not set for %s; is an acceptable port available?", this);
-                    String hostAndPort = BrooklynAccessUtils.getBrooklynAccessibleAddress(CouchbaseNodeImpl.this, webPort).toString();
-                    sensors().set(CouchbaseNode.COUCHBASE_WEB_ADMIN_URL, URI.create(format("http://%s", hostAndPort)));
-                }
-            }
-        });
-
-        getMutableEntityType().addEffector(ADD_REPLICATION_RULE, new EffectorBody<Void>() {
-            @Override
-            public Void call(ConfigBag parameters) {
-                addReplicationRule(parameters);
-                return null;
-            }
-        });
-    }
-
-    protected Map<String, Object> obtainProvisioningFlags(@SuppressWarnings("rawtypes") MachineProvisioningLocation location) {
-        ConfigBag result = ConfigBag.newInstance(super.obtainProvisioningFlags(location));
-        result.configure(CloudLocationConfig.OS_64_BIT, true);
-        return result.getAllConfig();
-    }
-
-    @Override
-    protected Collection<Integer> getRequiredOpenPorts() {
-        // TODO this creates a huge list of inbound ports; much better to define on a security group using range syntax!
-        int erlangRangeStart = getConfig(NODE_DATA_EXCHANGE_PORT_RANGE_START).iterator().next();
-        int erlangRangeEnd = getConfig(NODE_DATA_EXCHANGE_PORT_RANGE_END).iterator().next();
-
-        Set<Integer> newPorts = MutableSet.<Integer>copyOf(super.getRequiredOpenPorts());
-        newPorts.remove(erlangRangeStart);
-        newPorts.remove(erlangRangeEnd);
-        for (int i = erlangRangeStart; i <= erlangRangeEnd; i++)
-            newPorts.add(i);
-        return newPorts;
-    }
-
-    @Override
-    public void serverAdd(String serverToAdd, String username, String password) {
-        getDriver().serverAdd(serverToAdd, username, password);
-    }
-
-    @Override
-    public void serverAddAndRebalance(String serverToAdd, String username, String password) {
-        getDriver().serverAddAndRebalance(serverToAdd, username, password);
-    }
-
-    @Override
-    public void rebalance() {
-        getDriver().rebalance();
-    }
-
-    protected final static Function<HttpToolResponse, JsonElement> GET_THIS_NODE_STATS = Functionals.chain(
-        HttpValueFunctions.jsonContents(),
-        JsonFunctions.walk("nodes"),
-        new Function<JsonElement, JsonElement>() {
-            @Override public JsonElement apply(JsonElement input) {
-                JsonArray nodes = input.getAsJsonArray();
-                for (JsonElement element : nodes) {
-                    JsonElement thisNode = element.getAsJsonObject().get("thisNode");
-                    if (thisNode!=null && Boolean.TRUE.equals(thisNode.getAsBoolean())) {
-                        return element.getAsJsonObject().get("interestingStats");
-                    }
-                }
-                return null;
-        }}
-    );
-
-    protected final static <T> HttpPollConfig<T> getSensorFromNodeStat(AttributeSensor<T> sensor, String ...jsonPath) {
-        return new HttpPollConfig<T>(sensor)
-            .onSuccess(Functionals.chain(GET_THIS_NODE_STATS,
-                MaybeFunctions.<JsonElement>wrap(),
-                JsonFunctions.walkM(jsonPath),
-                JsonFunctions.castM(TypeTokens.getRawRawType(sensor.getTypeToken()), null)))
-            .onFailureOrException(Functions.<T>constant(null));
-    }
-
-    @Override
-    protected void postStart() {
-        super.postStart();
-        renameServerToPublicHostname();
-    }
-
-    protected void renameServerToPublicHostname() {
-        // http://docs.couchbase.com/couchbase-manual-2.5/cb-install/#couchbase-getting-started-hostnames
-        URI apiUri = null;
-        try {
-            HostAndPort accessible = BrooklynAccessUtils.getBrooklynAccessibleAddress(this, getAttribute(COUCHBASE_WEB_ADMIN_PORT));
-            apiUri = URI.create(String.format("http://%s:%d/node/controller/rename", accessible.getHostText(), accessible.getPort()));
-            UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(getConfig(COUCHBASE_ADMIN_USERNAME), getConfig(COUCHBASE_ADMIN_PASSWORD));
-            HttpToolResponse response = HttpTool.httpPost(
-                    // the uri is required by the HttpClientBuilder in order to set the AuthScope of the credentials
-                    HttpTool.httpClientBuilder().uri(apiUri).credentials(credentials).build(),
-                    apiUri,
-                    MutableMap.of(
-                            HttpHeaders.CONTENT_TYPE, MediaType.FORM_DATA.toString(),
-                            HttpHeaders.ACCEPT, "*/*",
-                            // this appears needed; without it we get org.apache.http.NoHttpResponseException !?
-                            HttpHeaders.AUTHORIZATION, HttpTool.toBasicAuthorizationValue(credentials)),
-                    Charsets.UTF_8.encode("hostname="+Urls.encode(accessible.getHostText())).array());
-            log.debug("Renamed Couchbase server "+this+" via "+apiUri+": "+response);
-            if (!HttpTool.isStatusCodeHealthy(response.getResponseCode())) {
-                log.warn("Invalid response code, renaming {} ({}): {}",
-                        new Object[]{apiUri, response.getResponseCode(), response.getContentAsString()});
-            }
-        } catch (Exception e) {
-            Exceptions.propagateIfFatal(e);
-            log.warn("Error renaming server, using "+apiUri+": "+e, e);
-        }
-    }
-
-    public void connectSensors() {
-        super.connectSensors();
-        connectServiceUpIsRunning();
-
-        HostAndPort hostAndPort = BrooklynAccessUtils.getBrooklynAccessibleAddress(this, this.getAttribute(CouchbaseNode.COUCHBASE_WEB_ADMIN_PORT));
-        httpFeed = HttpFeed.builder()
-            .entity(this)
-            .period(Duration.seconds(3))
-            .baseUri("http://" + hostAndPort + "/pools/nodes/")
-            .credentialsIfNotNull(getConfig(CouchbaseNode.COUCHBASE_ADMIN_USERNAME), getConfig(CouchbaseNode.COUCHBASE_ADMIN_PASSWORD))
-            .poll(getSensorFromNodeStat(CouchbaseNode.OPS, "ops"))
-            .poll(getSensorFromNodeStat(CouchbaseNode.COUCH_DOCS_DATA_SIZE, "couch_docs_data_size"))
-            .poll(getSensorFromNodeStat(CouchbaseNode.COUCH_DOCS_ACTUAL_DISK_SIZE, "couch_docs_actual_disk_size"))
-            .poll(getSensorFromNodeStat(CouchbaseNode.EP_BG_FETCHED, "ep_bg_fetched"))
-            .poll(getSensorFromNodeStat(CouchbaseNode.MEM_USED, "mem_used"))
-            .poll(getSensorFromNodeStat(CouchbaseNode.COUCH_VIEWS_ACTUAL_DISK_SIZE, "couch_views_actual_disk_size"))
-            .poll(getSensorFromNodeStat(CouchbaseNode.CURR_ITEMS, "curr_items"))
-            .poll(getSensorFromNodeStat(CouchbaseNode.VB_REPLICA_CURR_ITEMS, "vb_replica_curr_items"))
-            .poll(getSensorFromNodeStat(CouchbaseNode.COUCH_VIEWS_DATA_SIZE, "couch_views_data_size"))
-            .poll(getSensorFromNodeStat(CouchbaseNode.GET_HITS, "get_hits"))
-            .poll(getSensorFromNodeStat(CouchbaseNode.CMD_GET, "cmd_get"))
-            .poll(getSensorFromNodeStat(CouchbaseNode.CURR_ITEMS_TOT, "curr_items_tot"))
-            .poll(new HttpPollConfig<String>(CouchbaseNode.REBALANCE_STATUS)
-                    .onSuccess(HttpValueFunctions.jsonContents("rebalanceStatus", String.class))
-                    .onFailureOrException(Functions.constant("Could not retrieve")))
-            .build();
-    }
-
-    public void disconnectSensors() {
-        super.disconnectSensors();
-        disconnectServiceUpIsRunning();
-        if (httpFeed != null) {
-            httpFeed.stop();
-        }
-    }
-
-    @Override
-    public void bucketCreate(String bucketName, String bucketType, Integer bucketPort, Integer bucketRamSize, Integer bucketReplica) {
-        if (Strings.isBlank(bucketType)) bucketType = "couchbase";
-        if (bucketRamSize==null || bucketRamSize<=0) bucketRamSize = 200;
-        if (bucketReplica==null || bucketReplica<0) bucketReplica = 1;
-
-        getDriver().bucketCreate(bucketName, bucketType, bucketPort, bucketRamSize, bucketReplica);
-    }
-
-    /** exposed through {@link CouchbaseNode#ADD_REPLICATION_RULE} */
-    protected void addReplicationRule(ConfigBag ruleArgs) {
-        Object toClusterO = Preconditions.checkNotNull(ruleArgs.getStringKey("toCluster"), "toCluster must not be null");
-        if (toClusterO instanceof String) {
-            toClusterO = getManagementContext().lookup((String)toClusterO);
-        }
-        Entity toCluster = Tasks.resolving(toClusterO, Entity.class).context(getExecutionContext()).get();
-
-        String fromBucket = Preconditions.checkNotNull( (String)ruleArgs.getStringKey("fromBucket"), "fromBucket must be specified" );
-
-        String toBucket = (String)ruleArgs.getStringKey("toBucket");
-        if (toBucket==null) toBucket = fromBucket;
-
-        if (!ruleArgs.getUnusedConfig().isEmpty()) {
-            throw new IllegalArgumentException("Unsupported replication rule data: "+ruleArgs.getUnusedConfig());
-        }
-
-        getDriver().addReplicationRule(toCluster, fromBucket, toBucket);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNodeSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNodeSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNodeSshDriver.java
deleted file mode 100644
index 915f06a..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseNodeSshDriver.java
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchbase;
-
-import static java.lang.String.format;
-import static org.apache.brooklyn.util.ssh.BashCommands.*;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.List;
-import java.util.concurrent.Callable;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.Group;
-import org.apache.brooklyn.api.location.OsDetails;
-import org.apache.brooklyn.api.mgmt.Task;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.drivers.downloads.BasicDownloadRequirement;
-import org.apache.brooklyn.core.entity.drivers.downloads.DownloadProducerFromUrlAttribute;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.http.auth.UsernamePasswordCredentials;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.http.HttpTool;
-import org.apache.brooklyn.util.http.HttpToolResponse;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.TaskBuilder;
-import org.apache.brooklyn.util.core.task.TaskTags;
-import org.apache.brooklyn.util.core.task.Tasks;
-import org.apache.brooklyn.util.repeat.Repeater;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.text.NaturalOrderComparator;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.text.StringEscapes.BashStringEscapes;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.base.Function;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.net.HostAndPort;
-
-public class CouchbaseNodeSshDriver extends AbstractSoftwareProcessSshDriver implements CouchbaseNodeDriver {
-
-    public CouchbaseNodeSshDriver(final CouchbaseNodeImpl entity, final SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    public static String couchbaseCli(String cmd) {
-        return "/opt/couchbase/bin/couchbase-cli " + cmd + " ";
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(getInstallDir());
-    }
-
-    @Override
-    public void install() {
-        //for reference https://github.com/urbandecoder/couchbase/blob/master/recipes/server.rb
-        //installation instructions (http://docs.couchbase.com/couchbase-manual-2.5/cb-install/#preparing-to-install)
-
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        OsDetails osDetails = getMachine().getMachineDetails().getOsDetails();
-
-        if (osDetails.isLinux()) {
-            List<String> commands = installLinux(urls, saveAs);
-            //FIXME installation return error but the server is up and running.
-            newScript(INSTALLING)
-                    .body.append(commands).execute();
-        } else {
-            Tasks.markInessential();
-            throw new IllegalStateException("Unsupported OS for installing Couchbase. Will continue but may fail later.");
-        }
-    }
-
-    private List<String> installLinux(List<String> urls, String saveAs) {
-
-        log.info("Installing " + getEntity() + " using couchbase-server-{} {}", getCommunityOrEnterprise(), getVersion());
-
-        String apt = chainGroup(
-                installPackage(MutableMap.of("apt", "python-httplib2 libssl0.9.8"), null),
-                sudo(format("dpkg -i %s", saveAs)));
-
-        String yum = chainGroup(
-                "which yum",
-                // The following prevents failure on RHEL AWS nodes:
-                // https://forums.aws.amazon.com/thread.jspa?threadID=100509
-                ok(sudo("sed -i.bk s/^enabled=1$/enabled=0/ /etc/yum/pluginconf.d/subscription-manager.conf")),
-                ok(sudo("yum check-update")),
-                sudo("yum install -y pkgconfig"),
-                // RHEL requires openssl version 098
-                sudo("[ -f /etc/redhat-release ] && (grep -i \"red hat\" /etc/redhat-release && sudo yum install -y openssl098e) || :"),
-                sudo(format("rpm --install %s", saveAs)));
-
-        String link = new DownloadProducerFromUrlAttribute().apply(new BasicDownloadRequirement(this)).getPrimaryLocations().iterator().next();
-        return ImmutableList.<String>builder()
-                .add(INSTALL_CURL)
-                .addAll(Arrays.asList(INSTALL_CURL,
-                        BashCommands.require(BashCommands.alternatives(BashCommands.simpleDownloadUrlAs(urls, saveAs),
-                                        // Referer link is required for 3.0.0; note mis-spelling is correct, as per http://en.wikipedia.org/wiki/HTTP_referer
-                                        "curl -f -L -k " + BashStringEscapes.wrapBash(link)
-                                                + " -H 'Referer: http://www.couchbase.com/downloads'"
-                                                + " -o " + saveAs),
-                                "Could not retrieve " + saveAs + " (from " + urls.size() + " sites)", 9)))
-                .add(alternatives(apt, yum))
-                .build();
-    }
-
-    @Override
-    public void customize() {
-        //TODO: add linux tweaks for couchbase
-        //http://blog.couchbase.com/often-overlooked-linux-os-tweaks
-        //http://blog.couchbase.com/kirk
-
-        //turn off swappiness
-        //vm.swappiness=0
-        //sudo echo 0 > /proc/sys/vm/swappiness
-
-        //os page cache = 20%
-
-        //disable THP
-        //sudo echo never > /sys/kernel/mm/transparent_hugepage/enabled
-        //sudo echo never > /sys/kernel/mm/transparent_hugepage/defrag
-
-        //turn off transparent huge pages
-        //limit page cache disty bytes
-        //control the rate page cache is flused ... vm.dirty_*
-    }
-
-    @Override
-    public void launch() {
-        String clusterPrefix = "--cluster-" + (isPreV3() ? "init-" : "");
-        // in v30, the cluster arguments were changed, and it became mandatory to supply a url + password (if there is none, these are ignored)
-        newScript(LAUNCHING)
-                .body.append(
-                sudo("/etc/init.d/couchbase-server start"),
-                "for i in {0..120}\n" +
-                        "do\n" +
-                        "    if [ $i -eq 120 ]; then echo REST API unavailable after 120 seconds, failing; exit 1; fi;\n" +
-                        "    curl -s " + String.format("http://localhost:%s", getWebPort()) + " > /dev/null && echo REST API available after $i seconds && break\n" +
-                        "    sleep 1\n" +
-                        "done\n" +
-                        couchbaseCli("cluster-init") +
-                        (isPreV3() ? getCouchbaseHostnameAndPort() : getCouchbaseHostnameAndCredentials()) +
-                        " " + clusterPrefix + "username=" + getUsername() +
-                        " " + clusterPrefix + "password=" + getPassword() +
-                        " " + clusterPrefix + "port=" + getWebPort() +
-                        " " + clusterPrefix + "ramsize=" + getClusterInitRamSize())
-                .execute();
-    }
-
-    @Override
-    public boolean isRunning() {
-        //TODO add a better way to check if couchbase server is running
-        return (newScript(CHECK_RUNNING)
-                .body.append(format("curl -u %s:%s http://localhost:%s/pools/nodes", getUsername(), getPassword(), getWebPort()))
-                .execute() == 0);
-    }
-
-    @Override
-    public void stop() {
-        newScript(STOPPING)
-                .body.append(sudo("/etc/init.d/couchbase-server stop"))
-                .execute();
-    }
-
-    @Override
-    public String getVersion() {
-        return entity.getConfig(CouchbaseNode.SUGGESTED_VERSION);
-    }
-
-    @Override
-    public String getOsTag() {
-        return newDownloadLinkSegmentComputer().getOsTag();
-    }
-
-    protected DownloadLinkSegmentComputer newDownloadLinkSegmentComputer() {
-        return new DownloadLinkSegmentComputer(getLocation().getOsDetails(), !isPreV3(), Strings.toString(getEntity()));
-    }
-
-    public static class DownloadLinkSegmentComputer {
-        // links are:
-        // http://packages.couchbase.com/releases/2.2.0/couchbase-server-community_2.2.0_x86_64.rpm
-        // http://packages.couchbase.com/releases/2.2.0/couchbase-server-community_2.2.0_x86_64.deb
-        // ^^^ preV3 is _ everywhere
-        // http://packages.couchbase.com/releases/3.0.0/couchbase-server-community_3.0.0-ubuntu12.04_amd64.deb
-        // ^^^ most V3 is _${version}-
-        // http://packages.couchbase.com/releases/3.0.0/couchbase-server-community-3.0.0-centos6.x86_64.rpm
-        // ^^^ but RHEL is -${version}-
-
-        @Nullable
-        private final OsDetails os;
-        @Nonnull
-        private final boolean isV3OrLater;
-        @Nonnull
-        private final String context;
-        @Nonnull
-        private final String osName;
-        @Nonnull
-        private final boolean isRpm;
-        @Nonnull
-        private final boolean is64bit;
-
-        public DownloadLinkSegmentComputer(@Nullable OsDetails os, boolean isV3OrLater, @Nonnull String context) {
-            this.os = os;
-            this.isV3OrLater = isV3OrLater;
-            this.context = context;
-            if (os == null) {
-                // guess centos as RPM is sensible default
-                log.warn("No details known for OS of " + context + "; assuming 64-bit RPM distribution of Couchbase");
-                osName = "centos";
-                isRpm = true;
-                is64bit = true;
-                return;
-            }
-            osName = os.getName().toLowerCase();
-            isRpm = !(osName.contains("deb") || osName.contains("ubuntu"));
-            is64bit = os.is64bit();
-        }
-
-        /**
-         * separator after the version number used to be _ but is - in 3.0 and later
-         */
-        public String getPreVersionSeparator() {
-            if (!isV3OrLater) return "_";
-            if (isRpm) return "-";
-            return "_";
-        }
-
-        public String getOsTag() {
-            // couchbase only provide certain versions; if on other platforms let's suck-it-and-see
-            String family;
-            if (osName.contains("debian")) family = "debian7_";
-            else if (osName.contains("ubuntu")) family = "ubuntu12.04_";
-            else if (osName.contains("centos") || osName.contains("rhel") || (osName.contains("red") && osName.contains("hat")))
-                family = "centos6.";
-            else {
-                log.warn("Unrecognised OS " + os + " of " + context + "; assuming RPM distribution of Couchbase");
-                family = "centos6.";
-            }
-
-            if (!is64bit && !isV3OrLater) {
-                // NB: 32-bit binaries aren't (yet?) available for v30
-                log.warn("32-bit binaries for Couchbase might not be available, when deploying " + context);
-            }
-            String arch = !is64bit ? "x86" : !isRpm && isV3OrLater ? "amd64" : "x86_64";
-            String fileExtension = isRpm ? ".rpm" : ".deb";
-
-            if (isV3OrLater)
-                return family + arch + fileExtension;
-            else
-                return arch + fileExtension;
-        }
-
-        public String getOsTagWithPrefix() {
-            return (!isV3OrLater ? "_" : "-") + getOsTag();
-        }
-    }
-
-    @Override
-    public String getDownloadLinkOsTagWithPrefix() {
-        return newDownloadLinkSegmentComputer().getOsTagWithPrefix();
-    }
-
-    @Override
-    public String getDownloadLinkPreVersionSeparator() {
-        return newDownloadLinkSegmentComputer().getPreVersionSeparator();
-    }
-
-    private boolean isPreV3() {
-        return NaturalOrderComparator.INSTANCE.compare(getEntity().getConfig(CouchbaseNode.SUGGESTED_VERSION), "3.0") < 0;
-    }
-
-    @Override
-    public String getCommunityOrEnterprise() {
-        Boolean isEnterprise = getEntity().getConfig(CouchbaseNode.USE_ENTERPRISE);
-        return isEnterprise ? "enterprise" : "community";
-    }
-
-    private String getUsername() {
-        return entity.getConfig(CouchbaseNode.COUCHBASE_ADMIN_USERNAME);
-    }
-
-    private String getPassword() {
-        return entity.getConfig(CouchbaseNode.COUCHBASE_ADMIN_PASSWORD);
-    }
-
-    private String getWebPort() {
-        return "" + entity.getAttribute(CouchbaseNode.COUCHBASE_WEB_ADMIN_PORT);
-    }
-
-    private String getCouchbaseHostnameAndCredentials() {
-        return format("-c %s:%s -u %s -p %s", getSubnetHostname(), getWebPort(), getUsername(), getPassword());
-    }
-
-    private String getCouchbaseHostnameAndPort() {
-        return format("-c %s:%s", getSubnetHostname(), getWebPort());
-    }
-
-    private String getClusterInitRamSize() {
-        return entity.getConfig(CouchbaseNode.COUCHBASE_CLUSTER_INIT_RAM_SIZE).toString();
-    }
-
-    @Override
-    public void rebalance() {
-        entity.sensors().set(CouchbaseNode.REBALANCE_STATUS, "explicitly started");
-        newScript("rebalance")
-                .body.append(
-                couchbaseCli("rebalance") + getCouchbaseHostnameAndCredentials())
-                .failOnNonZeroResultCode()
-                .execute();
-
-        // wait until the re-balance is started
-        // (if it's quick, this might miss it, but it will only block for 30s if so)
-        Repeater.create()
-                .backoff(Repeater.DEFAULT_REAL_QUICK_PERIOD, 2, Duration.millis(500))
-                .limitTimeTo(Duration.THIRTY_SECONDS)
-                .until(new Callable<Boolean>() {
-                           @Override
-                           public Boolean call() throws Exception {
-                               for (HostAndPort nodeHostAndPort : getNodesHostAndPort()) {
-                                   if (isNodeRebalancing(nodeHostAndPort.toString())) {
-                                       return true;
-                                   }
-                               }
-                               return false;
-                           }
-                       }
-                ).run();
-
-        entity.sensors().set(CouchbaseNode.REBALANCE_STATUS, "waiting for completion");
-        // Wait until the Couchbase node finishes the re-balancing
-        Task<Boolean> reBalance = TaskBuilder.<Boolean>builder()
-                .displayName("Waiting until node is rebalancing")
-                .body(new Callable<Boolean>() {
-                    @Override
-                    public Boolean call() throws Exception {
-                        return Repeater.create()
-                                .backoff(Duration.ONE_SECOND, 1.2, Duration.TEN_SECONDS)
-                                .limitTimeTo(Duration.FIVE_MINUTES)
-                                .until(new Callable<Boolean>() {
-                                    @Override
-                                    public Boolean call() throws Exception {
-                                        for (HostAndPort nodeHostAndPort : getNodesHostAndPort()) {
-                                            if (isNodeRebalancing(nodeHostAndPort.toString())) {
-                                                return false;
-                                            }
-                                        }
-                                        return true;
-                                    }
-                                })
-                                .run();
-                        }
-                })
-                .build();
-        Boolean completed = DynamicTasks.queueIfPossible(reBalance)
-                .orSubmitAndBlock()
-                .andWaitForSuccess();
-        if (completed) {
-            entity.sensors().set(CouchbaseNode.REBALANCE_STATUS, "completed");
-            ServiceStateLogic.ServiceNotUpLogic.clearNotUpIndicator(getEntity(), "rebalancing");
-            log.info("Rebalanced cluster via primary node {}", getEntity());
-        } else {
-            entity.sensors().set(CouchbaseNode.REBALANCE_STATUS, "timed out");
-            ServiceStateLogic.ServiceNotUpLogic.updateNotUpIndicator(getEntity(), "rebalancing", "rebalance did not complete within time limit");
-            log.warn("Timeout rebalancing cluster via primary node {}", getEntity());
-        }
-    }
-
-    private Iterable<HostAndPort> getNodesHostAndPort() {
-        Group group = Iterables.getFirst(getEntity().groups(), null);
-        if (group == null) return Lists.newArrayList();
-        return Iterables.transform(group.getAttribute(CouchbaseCluster.COUCHBASE_CLUSTER_UP_NODES),
-                new Function<Entity, HostAndPort>() {
-                    @Override
-                    public HostAndPort apply(Entity input) {
-                        return BrooklynAccessUtils.getBrooklynAccessibleAddress(input, input.getAttribute(CouchbaseNode.COUCHBASE_WEB_ADMIN_PORT));
-                    }
-                });
-    }
-
-    private boolean isNodeRebalancing(String nodeHostAndPort) {
-        HttpToolResponse response = getApiResponse("http://" + nodeHostAndPort + "/pools/default/rebalanceProgress");
-        if (response.getResponseCode() != 200) {
-            throw new IllegalStateException("failed retrieving rebalance status: " + response);
-        }
-        return !"none".equals(HttpValueFunctions.jsonContents("status", String.class).apply(response));
-    }
-
-    private HttpToolResponse getApiResponse(String uri) {
-        return HttpTool.httpGet(HttpTool.httpClientBuilder()
-                        // the uri is required by the HttpClientBuilder in order to set the AuthScope of the credentials
-                        .uri(uri)
-                        .credentials(new UsernamePasswordCredentials(getUsername(), getPassword()))
-                        .build(),
-                URI.create(uri),
-                ImmutableMap.<String, String>of());
-    }
-
-    @Override
-    public void serverAdd(String serverToAdd, String username, String password) {
-        newScript("serverAdd").body.append(couchbaseCli("server-add")
-                + getCouchbaseHostnameAndCredentials() +
-                " --server-add=" + BashStringEscapes.wrapBash(serverToAdd) +
-                " --server-add-username=" + BashStringEscapes.wrapBash(username) +
-                " --server-add-password=" + BashStringEscapes.wrapBash(password))
-                .failOnNonZeroResultCode()
-                .execute();
-    }
-
-    @Override
-    public void serverAddAndRebalance(String serverToAdd, String username, String password) {
-        newScript("serverAddAndRebalance").body.append(couchbaseCli("rebalance")
-                + getCouchbaseHostnameAndCredentials() +
-                " --server-add=" + BashStringEscapes.wrapBash(serverToAdd) +
-                " --server-add-username=" + BashStringEscapes.wrapBash(username) +
-                " --server-add-password=" + BashStringEscapes.wrapBash(password))
-                .failOnNonZeroResultCode()
-                .execute();
-        entity.sensors().set(CouchbaseNode.REBALANCE_STATUS, "triggered as part of server-add");
-    }
-
-    @Override
-    public void bucketCreate(String bucketName, String bucketType, Integer bucketPort, Integer bucketRamSize, Integer bucketReplica) {
-        log.info("Adding bucket: {} to cluster {} primary node: {}", new Object[]{bucketName, CouchbaseClusterImpl.getClusterOrNode(getEntity()), getEntity()});
-
-        newScript("bucketCreate").body.append(couchbaseCli("bucket-create")
-                + getCouchbaseHostnameAndCredentials() +
-                " --bucket=" + BashStringEscapes.wrapBash(bucketName) +
-                " --bucket-type=" + BashStringEscapes.wrapBash(bucketType) +
-                " --bucket-port=" + bucketPort +
-                " --bucket-ramsize=" + bucketRamSize +
-                " --bucket-replica=" + bucketReplica)
-                .failOnNonZeroResultCode()
-                .execute();
-    }
-
-    @Override
-    public void addReplicationRule(Entity toCluster, String fromBucket, String toBucket) {
-        DynamicTasks.queue(DependentConfiguration.attributeWhenReady(toCluster, Attributes.SERVICE_UP)).getUnchecked();
-
-        String destName = CouchbaseClusterImpl.getClusterName(toCluster);
-
-        log.info("Setting up XDCR for " + fromBucket + " from " + CouchbaseClusterImpl.getClusterName(getEntity()) + " (via " + getEntity() + ") "
-                + "to " + destName + " (" + toCluster + ")");
-
-        Entity destPrimaryNode = toCluster.getAttribute(CouchbaseCluster.COUCHBASE_PRIMARY_NODE);
-        String destHostname = destPrimaryNode.getAttribute(Attributes.HOSTNAME);
-        String destUsername = toCluster.getConfig(CouchbaseNode.COUCHBASE_ADMIN_USERNAME);
-        String destPassword = toCluster.getConfig(CouchbaseNode.COUCHBASE_ADMIN_PASSWORD);
-
-        // on the REST API there is mention of a 'type' 'continuous' but i don't see other refs to this
-
-        // PROTOCOL   Select REST protocol or memcached for replication. xmem indicates memcached while capi indicates REST protocol.
-        // looks like xmem is the default; leave off for now
-//        String replMode = "xmem";
-
-        DynamicTasks.queue(TaskTags.markInessential(SshEffectorTasks.ssh(
-                couchbaseCli("xdcr-setup") +
-                        getCouchbaseHostnameAndCredentials() +
-                        " --create" +
-                        " --xdcr-cluster-name=" + BashStringEscapes.wrapBash(destName) +
-                        " --xdcr-hostname=" + BashStringEscapes.wrapBash(destHostname) +
-                        " --xdcr-username=" + BashStringEscapes.wrapBash(destUsername) +
-                        " --xdcr-password=" + BashStringEscapes.wrapBash(destPassword)
-        ).summary("create xdcr destination " + destName).newTask()));
-
-        // would be nice to auto-create bucket, but we'll need to know the parameters; the port in particular is tedious
-//        ((CouchbaseNode)destPrimaryNode).bucketCreate(toBucket, "couchbase", null, 0, 0);
-
-        DynamicTasks.queue(SshEffectorTasks.ssh(
-                couchbaseCli("xdcr-replicate") +
-                        getCouchbaseHostnameAndCredentials() +
-                        " --create" +
-                        " --xdcr-cluster-name=" + BashStringEscapes.wrapBash(destName) +
-                        " --xdcr-from-bucket=" + BashStringEscapes.wrapBash(fromBucket) +
-                        " --xdcr-to-bucket=" + BashStringEscapes.wrapBash(toBucket)
-//            + " --xdcr-replication-mode="+replMode
-        ).summary("configure replication for " + fromBucket + " to " + destName + ":" + toBucket).newTask());
-    }
-}


[51/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)


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

Branch: refs/heads/master
Commit: 02abbab09ab514524bb9a9edbd0a525447d15c99
Parents: 35b456e
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Sat Jan 30 14:02:39 2016 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Sat Jan 30 14:02:39 2016 +0000

----------------------------------------------------------------------
 README.md                                       |     9 +
 brooklyn-library/.gitattributes                 |     6 -
 brooklyn-library/.gitignore                     |    32 -
 brooklyn-library/LICENSE                        |   455 -
 brooklyn-library/NOTICE                         |     5 -
 brooklyn-library/README.md                      |     9 -
 .../examples/global-web-fabric/.gitignore       |     2 -
 .../examples/global-web-fabric/README.txt       |    42 -
 .../examples/global-web-fabric/pom.xml          |   108 -
 .../resources/vmc-delete-all.sh                 |    34 -
 .../brooklyn/demo/GlobalWebFabricExample.java   |   118 -
 .../java/org/apache/brooklyn/demo/ReadMe.java   |    28 -
 brooklyn-library/examples/pom.xml               |    46 -
 .../examples/simple-messaging-pubsub/.gitignore |     1 -
 .../examples/simple-messaging-pubsub/README.txt |    47 -
 .../examples/simple-messaging-pubsub/pom.xml    |   134 -
 .../brooklyn/demo/KafkaClusterExample.java      |    58 -
 .../java/org/apache/brooklyn/demo/Publish.java  |    71 -
 .../demo/StandaloneQpidBrokerExample.java       |    73 -
 .../org/apache/brooklyn/demo/Subscribe.java     |    76 -
 .../src/main/resources/custom-config.xml        |    65 -
 .../src/main/resources/passwd                   |    21 -
 .../examples/simple-nosql-cluster/.gitignore    |     1 -
 .../examples/simple-nosql-cluster/README.md     |    41 -
 .../examples/simple-nosql-cluster/pom.xml       |   106 -
 .../src/main/assembly/assembly.xml              |    64 -
 .../src/main/assembly/files/conf/logback.xml    |    29 -
 .../src/main/assembly/scripts/start.sh          |    40 -
 .../brooklyn/demo/CumulusRDFApplication.java    |   239 -
 .../demo/HighAvailabilityCassandraCluster.java  |    89 -
 .../brooklyn/demo/ResilientMongoDbApp.java      |   105 -
 .../brooklyn/demo/RiakClusterExample.java       |    76 -
 .../brooklyn/demo/SimpleCassandraCluster.java   |    58 -
 .../brooklyn/demo/SimpleCouchDBCluster.java     |    36 -
 .../brooklyn/demo/SimpleMongoDBReplicaSet.java  |    39 -
 .../brooklyn/demo/SimpleRedisCluster.java       |    35 -
 .../apache/brooklyn/demo/StormSampleApp.java    |    69 -
 .../brooklyn/demo/WideAreaCassandraCluster.java |    86 -
 .../src/main/resources/cumulus.yaml             |    26 -
 .../src/main/resources/mongodb.conf             |    32 -
 .../brooklyn/demo/ha-cassandra-cluster.yaml     |    45 -
 .../brooklyn/demo/simple-cassandra-cluster.yaml |    28 -
 .../demo/wide-area-cassandra-cluster.yaml       |    41 -
 .../examples/simple-web-cluster/.gitignore      |     2 -
 .../examples/simple-web-cluster/README.txt      |    59 -
 .../examples/simple-web-cluster/pom.xml         |   164 -
 .../resources/jmeter-test-plan.jmx              |   143 -
 .../src/main/assembly/assembly.xml              |    74 -
 .../src/main/assembly/files/README.txt          |    49 -
 .../src/main/assembly/scripts/start.sh          |    43 -
 .../brooklyn/demo/NodeJsTodoApplication.java    |    60 -
 .../brooklyn/demo/SingleWebServerExample.java   |    66 -
 .../demo/WebClusterDatabaseExample.java         |   122 -
 .../demo/WebClusterDatabaseExampleApp.java      |   174 -
 .../apache/brooklyn/demo/WebClusterExample.java |    95 -
 .../src/main/resources/logback-custom.xml       |    43 -
 .../brooklyn/demo/glossy-3d-blue-web-icon.png   |   Bin 46490 -> 0 bytes
 .../apache/brooklyn/demo/nodejs-riak-todo.yaml  |    46 -
 .../org/apache/brooklyn/demo/nodejs-todo.yaml   |    53 -
 .../main/resources/visitors-creation-script.sql |    41 -
 ...lusterDatabaseExampleAppIntegrationTest.java |   204 -
 .../examples/webapps/hello-world-sql/.gitignore |     1 -
 .../examples/webapps/hello-world-sql/pom.xml    |   109 -
 .../src/main/webapp/WEB-INF/web.xml             |    26 -
 .../src/main/webapp/available.jsp               |    81 -
 .../hello-world-sql/src/main/webapp/db.jsp      |   123 -
 .../src/main/webapp/hadoop-chat.jsp             |   110 -
 .../src/main/webapp/hadoop-wordcount.jsp        |   114 -
 .../main/webapp/images/BrooklynBridge3Large.png |   Bin 703246 -> 0 bytes
 .../src/main/webapp/images/bridge-small.png     |   Bin 42335 -> 0 bytes
 .../hello-world-sql/src/main/webapp/index.html  |    42 -
 .../hello-world-sql/src/main/webapp/mongo.jsp   |   127 -
 .../hello-world-sql/src/main/webapp/riak.jsp    |   148 -
 .../src/main/webapp/styles/main.css             |    71 -
 .../webapps/hello-world-webapp/.gitignore       |     1 -
 .../examples/webapps/hello-world-webapp/pom.xml |    43 -
 .../src/main/webapp/WEB-INF/web.xml             |    26 -
 .../src/main/webapp/available.jsp               |    76 -
 .../hello-world-webapp/src/main/webapp/db.jsp   |   123 -
 .../src/main/webapp/hadoop-chat.jsp             |   110 -
 .../src/main/webapp/hadoop-wordcount.jsp        |   114 -
 .../main/webapp/images/BrooklynBridge3Large.png |   Bin 703246 -> 0 bytes
 .../webapp/images/bridge-large-no-title.png     |   Bin 66113 -> 0 bytes
 .../src/main/webapp/images/bridge-small.png     |   Bin 42335 -> 0 bytes
 .../src/main/webapp/index.html                  |    42 -
 .../src/main/webapp/primes.jsp                  |    77 -
 .../src/main/webapp/styles/main.css             |    71 -
 brooklyn-library/examples/webapps/pom.xml       |    55 -
 brooklyn-library/pom.xml                        |   119 -
 brooklyn-library/qa/log-exclusions.txt          |    19 -
 brooklyn-library/qa/pom.xml                     |   136 -
 .../qa/load/SimulatedJBoss7ServerImpl.java      |   239 -
 .../qa/load/SimulatedMySqlNodeImpl.java         |   183 -
 .../qa/load/SimulatedNginxControllerImpl.java   |   196 -
 .../brooklyn/qa/load/SimulatedTheeTierApp.java  |   140 -
 .../apache/brooklyn/qa/longevity/Monitor.java   |   260 -
 .../brooklyn/qa/longevity/MonitorListener.java  |    35 -
 .../brooklyn/qa/longevity/MonitorPrefs.java     |    54 -
 .../brooklyn/qa/longevity/MonitorUtils.java     |   328 -
 .../brooklyn/qa/longevity/StatusRecorder.java   |   130 -
 .../qa/src/main/resources/hello-world.txt       |    24 -
 .../qa/src/main/resources/hello-world.war       |   Bin 15066 -> 0 bytes
 .../SoftlayerObtainPrivateLiveTest.java         |   225 -
 .../camp/EnrichersSlightlySimplerYamlTest.java  |   134 -
 .../qa/camp/EntitiesYamlIntegrationTest.java    |    71 -
 .../qa/camp/JavaWebAppsIntegrationTest.java     |   273 -
 .../qa/camp/JavaWebAppsMatchingTest.java        |   144 -
 .../downstreamparent/DownstreamParentTest.java  |    64 -
 .../org/apache/brooklyn/qa/load/LoadTest.java   |   241 -
 .../brooklyn/qa/longevity/MonitorUtilsTest.java |   164 -
 .../webcluster/SinusoidalLoadGenerator.java     |    89 -
 .../qa/longevity/webcluster/WebClusterApp.java  |   101 -
 .../test/projects/downstream-parent-test/README |     5 -
 .../projects/downstream-parent-test/pom.xml     |   120 -
 .../src/main/java/com/example/HelloEntity.java  |    26 -
 .../main/java/com/example/HelloEntityImpl.java  |    31 -
 .../src/main/resources/blueprint.yaml           |    19 -
 .../src/main/resources/catalog.bom              |    33 -
 .../java-web-app-and-db-with-function.yaml      |    36 -
 .../java-web-app-and-db-with-policy.yaml        |    46 -
 .../src/test/resources/java-web-app-simple.yaml |    28 -
 ...est-app-with-enrichers-slightly-simpler.yaml |    74 -
 .../src/test/resources/test-tomcat-cluster.yaml |    30 -
 .../test-webapp-with-averaging-enricher.yaml    |    47 -
 brooklyn-library/qa/start-monitor.sh            |    39 -
 brooklyn-library/qa/start-webcluster.sh         |    39 -
 .../sandbox/cassandra-multicloud-snitch/pom.xml |    64 -
 .../customsnitch/MultiCloudSnitch.java          |   222 -
 brooklyn-library/sandbox/database/pom.xml       |    66 -
 .../brooklyn/entity/database/Database.java      |    42 -
 .../apache/brooklyn/entity/database/Schema.java |    37 -
 .../entity/database/derby/DerbyDatabase.java    |   172 -
 .../database/derby/DerbyDatabaseDriver.java     |    25 -
 .../database/derby/DerbyDatabaseSshDriver.java  |   116 -
 .../entity/database/derby/DerbySchema.java      |   148 -
 .../entity/database/PlaceholderTest.java        |    26 -
 brooklyn-library/sandbox/extra/pom.xml          |    79 -
 .../postgresql/PostgreSqlNodeSaltImpl.java      |   183 -
 .../brooklyn/entity/salt/SaltBashCommands.java  |    91 -
 .../apache/brooklyn/entity/salt/SaltConfig.java |   101 -
 .../brooklyn/entity/salt/SaltConfigs.java       |    89 -
 .../entity/salt/SaltLifecycleEffectorTasks.java |   220 -
 .../brooklyn/entity/salt/SaltStackMaster.java   |    72 -
 .../entity/salt/SaltStackMasterDriver.java      |    25 -
 .../entity/salt/SaltStackMasterImpl.java        |    55 -
 .../entity/salt/SaltStackMasterSshDriver.java   |    96 -
 .../apache/brooklyn/entity/salt/SaltTasks.java  |   145 -
 .../org/apache/brooklyn/entity/salt/master      |    65 -
 .../org/apache/brooklyn/entity/salt/masterless  |    53 -
 .../org/apache/brooklyn/entity/salt/minion      |    52 -
 .../postgresql/PostgreSqlSaltLiveTest.java      |   112 -
 .../brooklyn/entity/salt/SaltConfigsTest.java   |    70 -
 .../entity/salt/SaltLiveTestSupport.java        |    68 -
 brooklyn-library/sandbox/mobile-app/pom.xml     |    67 -
 .../mobile-app/src/main/webapp/WEB-INF/web.xml  |    24 -
 .../main/webapp/assets/mobile/css/mobile.css    |    74 -
 .../assets/mobile/images/brooklyn-logo.png      |   Bin 7055 -> 0 bytes
 .../src/main/webapp/assets/mobile/js/app.js     |    84 -
 .../main/webapp/assets/mobile/js/controllers.js |   202 -
 .../src/main/webapp/assets/mobile/js/filters.js |    29 -
 .../webapp/assets/mobile/js/i18n/en-us.json     |    27 -
 .../main/webapp/assets/mobile/js/services.js    |    28 -
 .../mobile/js/templates/applicationsList.html   |    72 -
 .../mobile/js/templates/entitiesList.html       |    53 -
 .../mobile/js/templates/entitySummary.html      |   250 -
 .../libs/angular-1.2.19/angular-cookies.js      |   204 -
 .../libs/angular-1.2.19/angular-cookies.min.js  |     8 -
 .../angular-1.2.19/angular-cookies.min.js.map   |     8 -
 .../mobile/libs/angular-1.2.19/angular-csp.css  |    24 -
 .../mobile/libs/angular-1.2.19/angular-mocks.js |  2171 --
 .../libs/angular-1.2.19/angular-resource.js     |   619 -
 .../libs/angular-1.2.19/angular-resource.min.js |    13 -
 .../angular-1.2.19/angular-resource.min.js.map  |     8 -
 .../mobile/libs/angular-1.2.19/angular-route.js |   927 -
 .../libs/angular-1.2.19/angular-route.min.js    |    14 -
 .../angular-1.2.19/angular-route.min.js.map     |     8 -
 .../mobile/libs/angular-1.2.19/angular-touch.js |   584 -
 .../libs/angular-1.2.19/angular-touch.min.js    |    13 -
 .../angular-1.2.19/angular-touch.min.js.map     |     8 -
 .../mobile/libs/angular-1.2.19/angular.js       | 21778 -----------------
 .../mobile/libs/angular-1.2.19/angular.min.js   |   214 -
 .../libs/angular-1.2.19/angular.min.js.map      |     8 -
 .../mobile/libs/angular-1.2.19/errors.json      |     1 -
 .../angular-1.2.19/i18n/angular-locale_de.js    |    99 -
 .../angular-1.2.19/i18n/angular-locale_en-gb.js |    99 -
 .../angular-1.2.19/i18n/angular-locale_en-us.js |    99 -
 .../angular-1.2.19/i18n/angular-locale_en.js    |    99 -
 .../angular-1.2.19/i18n/angular-locale_es.js    |    99 -
 .../angular-1.2.19/i18n/angular-locale_fr.js    |    99 -
 .../angular-1.2.19/i18n/angular-locale_ru.js    |    99 -
 .../mobile/libs/angular-1.2.19/version.json     |     1 -
 .../mobile/libs/angular-1.2.19/version.txt      |     1 -
 .../.bower.json                                 |    19 -
 .../README.md                                   |     9 -
 .../angular-translate-loader-static-files.js    |    31 -
 ...angular-translate-loader-static-files.min.js |     6 -
 .../bower.json                                  |     8 -
 .../.bower.json                                 |    18 -
 .../angular-translate-storage-cookie/README.md  |     9 -
 .../angular-translate-storage-cookie.js         |    19 -
 .../angular-translate-storage-cookie.min.js     |     6 -
 .../angular-translate-storage-cookie/bower.json |     8 -
 .../angular-translate-storage-local/.bower.json |    20 -
 .../angular-translate-storage-local/README.md   |     9 -
 .../angular-translate-storage-local.js          |    38 -
 .../angular-translate-storage-local.min.js      |     6 -
 .../angular-translate-storage-local/bower.json  |     9 -
 .../mobile/libs/angular-translate/.bower.json   |    16 -
 .../mobile/libs/angular-translate/README.md     |     9 -
 .../libs/angular-translate/angular-translate.js |   883 -
 .../angular-translate/angular-translate.min.js  |     6 -
 .../mobile/libs/angular-translate/bower.json    |     5 -
 .../.gitignore                                  |   102 -
 .../dist/css/mobile-angular-ui-base.css         |  7543 ------
 .../dist/css/mobile-angular-ui-base.min.css     |     1 -
 .../dist/css/mobile-angular-ui-desktop.css      |   531 -
 .../dist/css/mobile-angular-ui-desktop.min.css  |     1 -
 .../dist/css/mobile-angular-ui-hover.css        |   480 -
 .../dist/css/mobile-angular-ui-hover.min.css    |     1 -
 .../dist/fonts/FontAwesome.otf                  |   Bin 75188 -> 0 bytes
 .../dist/fonts/fontawesome-webfont.eot          |   Bin 72449 -> 0 bytes
 .../dist/fonts/fontawesome-webfont.svg          |   504 -
 .../dist/fonts/fontawesome-webfont.ttf          |   Bin 141564 -> 0 bytes
 .../dist/fonts/fontawesome-webfont.woff         |   Bin 83760 -> 0 bytes
 .../dist/js/mobile-angular-ui.js                |  1854 --
 .../dist/js/mobile-angular-ui.min.js            |     1 -
 .../mobile-app/src/main/webapp/index.m.html     |    99 -
 brooklyn-library/sandbox/monitoring/pom.xml     |    67 -
 .../entity/monitoring/zabbix/ZabbixFeed.java    |   463 -
 .../monitoring/zabbix/ZabbixMonitored.java      |    38 -
 .../monitoring/zabbix/ZabbixPollConfig.java     |    75 -
 .../entity/monitoring/zabbix/ZabbixServer.java  |    52 -
 .../monitoring/zabbix/ZabbixServerImpl.java     |   142 -
 brooklyn-library/sandbox/nosql/README.md        |    92 -
 brooklyn-library/sandbox/nosql/pom.xml          |    79 -
 .../nosql/infinispan/Infinispan5Driver.java     |    23 -
 .../nosql/infinispan/Infinispan5Server.java     |    88 -
 .../nosql/infinispan/Infinispan5SshDriver.java  |   124 -
 .../Infinispan5ServerIntegrationTest.java       |   104 -
 brooklyn-library/software/database/pom.xml      |   154 -
 .../brooklyn/entity/database/DatabaseNode.java  |    29 -
 .../entity/database/DatastoreMixins.java        |   104 -
 .../entity/database/crate/CrateNode.java        |    90 -
 .../entity/database/crate/CrateNodeDriver.java  |    24 -
 .../entity/database/crate/CrateNodeImpl.java    |    99 -
 .../database/crate/CrateNodeSshDriver.java      |   118 -
 .../entity/database/mariadb/MariaDbDriver.java  |    30 -
 .../entity/database/mariadb/MariaDbNode.java    |    98 -
 .../database/mariadb/MariaDbNodeImpl.java       |   136 -
 .../database/mariadb/MariaDbSshDriver.java      |   256 -
 .../database/mysql/InitSlaveTaskBody.java       |   426 -
 .../entity/database/mysql/MySqlCluster.java     |    77 -
 .../entity/database/mysql/MySqlClusterImpl.java |   375 -
 .../database/mysql/MySqlClusterUtils.java       |    52 -
 .../entity/database/mysql/MySqlDriver.java      |    33 -
 .../entity/database/mysql/MySqlNode.java        |   127 -
 .../database/mysql/MySqlNodeEffectors.java      |    87 -
 .../entity/database/mysql/MySqlNodeImpl.java    |   167 -
 .../entity/database/mysql/MySqlRowParser.java   |    39 -
 .../entity/database/mysql/MySqlSshDriver.java   |   319 -
 .../database/mysql/ReplicationSnapshot.java     |    58 -
 .../database/postgresql/PostgreSqlDriver.java   |    32 -
 .../database/postgresql/PostgreSqlNode.java     |   115 -
 .../PostgreSqlNodeChefImplFromScratch.java      |   168 -
 .../database/postgresql/PostgreSqlNodeImpl.java |    89 -
 .../database/postgresql/PostgreSqlSpecs.java    |    42 -
 .../postgresql/PostgreSqlSshDriver.java         |   471 -
 .../entity/database/rubyrep/RubyRepDriver.java  |    28 -
 .../entity/database/rubyrep/RubyRepNode.java    |   108 -
 .../database/rubyrep/RubyRepNodeImpl.java       |   111 -
 .../database/rubyrep/RubyRepSshDriver.java      |   125 -
 .../src/main/resources/mariadb-logo-180x119.png |   Bin 9659 -> 0 bytes
 .../src/main/resources/mysql-logo-110x57.png    |   Bin 2437 -> 0 bytes
 .../brooklyn/entity/database/crate/crate.yaml   |    28 -
 .../brooklyn/entity/database/mariadb/my.cnf     |    19 -
 .../entity/database/mssql/ConfigurationFile.ini |   390 -
 .../entity/database/mssql/checkrunningmssql.bat |    23 -
 .../entity/database/mssql/configuremssql.ps1    |    22 -
 .../entity/database/mssql/installmssql.ps1      |    45 -
 .../entity/database/mssql/launchmssql.bat       |    25 -
 .../brooklyn/entity/database/mssql/mssql.yaml   |    40 -
 .../entity/database/mssql/stopmssql.bat         |    24 -
 .../brooklyn/entity/database/mysql/mysql.conf   |    27 -
 .../entity/database/mysql/mysql_master.conf     |    30 -
 .../entity/database/mysql/mysql_slave.conf      |    50 -
 .../entity/database/postgresql/postgresql.conf  |   513 -
 .../entity/database/rubyrep/rubyrep.conf        |    28 -
 .../main/resources/postgresql-logo-200px.png    |   Bin 17434 -> 0 bytes
 .../entity/database/VogellaExampleAccess.java   |   200 -
 .../crate/CrateNodeIntegrationTest.java         |    64 -
 .../mariadb/MariaDbIntegrationTest.java         |   124 -
 .../database/mariadb/MariaDbLiveEc2Test.java    |    79 -
 .../mariadb/MariaDbLiveRackspaceTest.java       |   103 -
 .../mysql/MySqlClusterIntegrationTest.java      |   200 -
 .../database/mysql/MySqlClusterLiveEc2Test.java |    41 -
 .../mysql/MySqlClusterLiveSoftlayerTest.java    |    37 -
 .../database/mysql/MySqlClusterTestHelper.java  |   199 -
 .../database/mysql/MySqlIntegrationTest.java    |   105 -
 .../entity/database/mysql/MySqlLiveEc2Test.java |    76 -
 .../entity/database/mysql/MySqlLiveGceTest.java |    48 -
 .../database/mysql/MySqlLiveRackspaceTest.java  |   106 -
 .../mysql/MySqlRestartIntegrationTest.java      |    50 -
 .../database/mysql/MysqlDockerLiveTest.java     |    48 -
 .../postgresql/PostgreSqDockerLiveTest.java     |    46 -
 .../database/postgresql/PostgreSqlChefTest.java |   102 -
 .../postgresql/PostgreSqlEc2LiveTest.java       |    78 -
 .../postgresql/PostgreSqlGceLiveTest.java       |    45 -
 .../postgresql/PostgreSqlIntegrationTest.java   |    95 -
 .../postgresql/PostgreSqlRackspaceLiveTest.java |   107 -
 .../PostgreSqlRebindIntegrationTest.java        |    57 -
 .../PostgreSqlRestartIntegrationTest.java       |    49 -
 .../database/rubyrep/RubyRepEc2LiveTest.java    |    73 -
 .../rubyrep/RubyRepIntegrationTest.java         |   470 -
 .../rubyrep/RubyRepRackspaceLiveTest.java       |   127 -
 brooklyn-library/software/messaging/pom.xml     |   306 -
 .../entity/messaging/MessageBroker.java         |    33 -
 .../apache/brooklyn/entity/messaging/Queue.java |    50 -
 .../apache/brooklyn/entity/messaging/Topic.java |    46 -
 .../messaging/activemq/ActiveMQBroker.java      |    80 -
 .../messaging/activemq/ActiveMQBrokerImpl.java  |   121 -
 .../messaging/activemq/ActiveMQDestination.java |    24 -
 .../activemq/ActiveMQDestinationImpl.java       |    66 -
 .../messaging/activemq/ActiveMQDriver.java      |    28 -
 .../messaging/activemq/ActiveMQQueue.java       |    26 -
 .../messaging/activemq/ActiveMQQueueImpl.java   |    68 -
 .../messaging/activemq/ActiveMQSpecs.java       |    33 -
 .../messaging/activemq/ActiveMQSshDriver.java   |   145 -
 .../messaging/activemq/ActiveMQTopic.java       |    26 -
 .../messaging/activemq/ActiveMQTopicImpl.java   |    50 -
 .../entity/messaging/amqp/AmqpExchange.java     |    44 -
 .../entity/messaging/amqp/AmqpServer.java       |    52 -
 .../entity/messaging/jms/JMSBroker.java         |    58 -
 .../entity/messaging/jms/JMSBrokerImpl.java     |   167 -
 .../entity/messaging/jms/JMSDestination.java    |    29 -
 .../messaging/jms/JMSDestinationImpl.java       |    51 -
 .../kafka/AbstractfKafkaSshDriver.java          |   132 -
 .../brooklyn/entity/messaging/kafka/Kafka.java  |    44 -
 .../entity/messaging/kafka/KafkaBroker.java     |    82 -
 .../messaging/kafka/KafkaBrokerDriver.java      |    27 -
 .../entity/messaging/kafka/KafkaBrokerImpl.java |   166 -
 .../messaging/kafka/KafkaBrokerSshDriver.java   |    96 -
 .../entity/messaging/kafka/KafkaCluster.java    |    91 -
 .../messaging/kafka/KafkaClusterImpl.java       |   207 -
 .../entity/messaging/kafka/KafkaZooKeeper.java  |    57 -
 .../messaging/kafka/KafkaZooKeeperDriver.java   |    28 -
 .../messaging/kafka/KafkaZooKeeperImpl.java     |    46 -
 .../kafka/KafkaZooKeeperSshDriver.java          |    82 -
 .../entity/messaging/qpid/QpidBroker.java       |    78 -
 .../entity/messaging/qpid/QpidBrokerImpl.java   |   144 -
 .../entity/messaging/qpid/QpidDestination.java  |    32 -
 .../messaging/qpid/QpidDestinationImpl.java     |   100 -
 .../entity/messaging/qpid/QpidDriver.java       |    28 -
 .../entity/messaging/qpid/QpidQueue.java        |    28 -
 .../entity/messaging/qpid/QpidQueueImpl.java    |    66 -
 .../entity/messaging/qpid/QpidSshDriver.java    |   136 -
 .../entity/messaging/qpid/QpidTopic.java        |    26 -
 .../entity/messaging/qpid/QpidTopicImpl.java    |    56 -
 .../entity/messaging/rabbit/RabbitBroker.java   |    95 -
 .../messaging/rabbit/RabbitBrokerImpl.java      |   119 -
 .../messaging/rabbit/RabbitDestination.java     |    91 -
 .../entity/messaging/rabbit/RabbitDriver.java   |    32 -
 .../entity/messaging/rabbit/RabbitQueue.java    |    85 -
 .../messaging/rabbit/RabbitSshDriver.java       |   263 -
 .../brooklyn/entity/messaging/storm/Storm.java  |   104 -
 .../entity/messaging/storm/StormDeployment.java |    41 -
 .../messaging/storm/StormDeploymentImpl.java    |    76 -
 .../entity/messaging/storm/StormDriver.java     |    27 -
 .../entity/messaging/storm/StormImpl.java       |   117 -
 .../entity/messaging/storm/StormSshDriver.java  |   271 -
 .../entity/zookeeper/AbstractZooKeeperImpl.java |   108 -
 .../entity/zookeeper/ZooKeeperDriver.java       |    27 -
 .../entity/zookeeper/ZooKeeperEnsemble.java     |    52 -
 .../entity/zookeeper/ZooKeeperEnsembleImpl.java |   104 -
 .../entity/zookeeper/ZooKeeperNode.java         |    66 -
 .../entity/zookeeper/ZooKeeperNodeImpl.java     |    33 -
 .../entity/zookeeper/ZooKeeperSshDriver.java    |   162 -
 .../src/main/resources/RabbitMQLogo.png         |   Bin 14252 -> 0 bytes
 .../src/main/resources/activemq-logo.png        |   Bin 6819 -> 0 bytes
 .../entity/messaging/activemq/activemq.xml      |   154 -
 .../messaging/kafka/kafka-google-doorway.jpg    |   Bin 15692 -> 0 bytes
 .../entity/messaging/kafka/server.properties    |   112 -
 .../entity/messaging/kafka/zookeeper.properties |    13 -
 .../entity/messaging/rabbit/rabbitmq.config     |     6 -
 .../brooklyn/entity/messaging/storm/storm.yaml  |    39 -
 .../brooklyn/entity/messaging/zookeeper/zoo.cfg |    42 -
 .../messaging/src/main/resources/qpid-logo.jpeg |   Bin 5189 -> 0 bytes
 .../src/main/resources/redis-logo.jpeg          |   Bin 6065 -> 0 bytes
 .../messaging/activemq/ActiveMQEc2LiveTest.java |   116 -
 .../activemq/ActiveMQGoogleComputeLiveTest.java |   116 -
 .../activemq/ActiveMQIntegrationTest.java       |   257 -
 .../messaging/kafka/KafkaIntegrationTest.java   |   139 -
 .../entity/messaging/kafka/KafkaLiveTest.java   |    67 -
 .../entity/messaging/kafka/KafkaSupport.java    |   109 -
 .../entity/messaging/qpid/QpidEc2LiveTest.java  |    45 -
 .../messaging/qpid/QpidIntegrationTest.java     |   253 -
 .../messaging/rabbit/RabbitEc2LiveTest.java     |   125 -
 .../messaging/rabbit/RabbitIntegrationTest.java |   187 -
 .../messaging/storm/LocalhostLiveTest.java      |    32 -
 .../messaging/storm/SoftLayerLiveTest.java      |    33 -
 .../storm/StormAbstractCloudLiveTest.java       |   201 -
 .../messaging/storm/StormEc2LiveTest.java       |    57 -
 .../messaging/storm/StormGceLiveTest.java       |    50 -
 .../storm/topologies/ExclamationBolt.java       |    51 -
 .../zookeeper/ZooKeeperEc2LiveTest.java         |    47 -
 .../zookeeper/ZooKeeperEnsembleLiveTest.java    |   127 -
 .../src/test/resources/qpid-test-config.xml     |    70 -
 brooklyn-library/software/monitoring/pom.xml    |   112 -
 .../entity/monitoring/monit/MonitDriver.java    |    28 -
 .../entity/monitoring/monit/MonitNode.java      |    60 -
 .../entity/monitoring/monit/MonitNodeImpl.java  |   115 -
 .../entity/monitoring/monit/MonitSshDriver.java |   136 -
 .../monitoring/monit/MonitIntegrationTest.java  |   204 -
 .../entity/monitoring/monit/monit.monitrc       |    30 -
 .../entity/monitoring/monit/monitmysql.monitrc  |    29 -
 .../monit/monitmysqlwithrestart.monitrc         |    31 -
 brooklyn-library/software/network/pom.xml       |    97 -
 .../entity/network/bind/BindDnsServer.java      |   156 -
 .../network/bind/BindDnsServerDriver.java       |    38 -
 .../entity/network/bind/BindDnsServerImpl.java  |   339 -
 .../network/bind/BindDnsServerSshDriver.java    |   184 -
 .../entity/network/bind/BindOsSupport.java      |   113 -
 .../network/src/main/resources/isc-logo.png     |   Bin 9330 -> 0 bytes
 .../brooklyn/entity/network/bind/domain.zone    |    46 -
 .../apache/brooklyn/entity/network/bind/ifcfg   |    24 -
 .../brooklyn/entity/network/bind/named.conf     |    63 -
 .../brooklyn/entity/network/bind/named.empty    |    30 -
 .../entity/network/bind/named.localhost         |    32 -
 .../brooklyn/entity/network/bind/named.loopback |    31 -
 .../brooklyn/entity/network/bind/resolv.conf    |    25 -
 .../brooklyn/entity/network/bind/reverse.zone   |    37 -
 .../brooklyn/entity/network/bind/rfc1912.zone   |    52 -
 .../network/bind/BindDnsServerByonLiveTest.java |    44 -
 .../network/bind/BindDnsServerEc2LiveTest.java  |    62 -
 .../bind/BindDnsServerIntegrationTest.java      |   260 -
 .../network/bind/BindDnsServerLiveTest.java     |   111 -
 .../bind/BindDnsServerSoftlayerLiveTest.java    |    32 -
 .../bind/DoNothingSoftwareProcessDriver.java    |    55 -
 .../network/bind/PrefixAndIdEnricher.java       |    57 -
 .../network/bind/TestBindDnsServerImpl.java     |    89 -
 brooklyn-library/software/nosql/pom.xml         |   300 -
 .../nosql/cassandra/CassandraCluster.java       |    30 -
 .../nosql/cassandra/CassandraClusterImpl.java   |    27 -
 .../nosql/cassandra/CassandraDatacenter.java    |   214 -
 .../cassandra/CassandraDatacenterImpl.java      |   629 -
 .../entity/nosql/cassandra/CassandraFabric.java |    80 -
 .../nosql/cassandra/CassandraFabricImpl.java    |   394 -
 .../entity/nosql/cassandra/CassandraNode.java   |   218 -
 .../nosql/cassandra/CassandraNodeDriver.java    |    47 -
 .../nosql/cassandra/CassandraNodeImpl.java      |   606 -
 .../nosql/cassandra/CassandraNodeSshDriver.java |   420 -
 .../entity/nosql/cassandra/TokenGenerator.java  |    49 -
 .../entity/nosql/cassandra/TokenGenerators.java |   192 -
 .../nosql/couchbase/CouchbaseCluster.java       |   134 -
 .../nosql/couchbase/CouchbaseClusterImpl.java   |   597 -
 .../entity/nosql/couchbase/CouchbaseNode.java   |   159 -
 .../nosql/couchbase/CouchbaseNodeDriver.java    |    41 -
 .../nosql/couchbase/CouchbaseNodeImpl.java      |   269 -
 .../nosql/couchbase/CouchbaseNodeSshDriver.java |   511 -
 .../nosql/couchbase/CouchbaseSyncGateway.java   |    75 -
 .../couchbase/CouchbaseSyncGatewayDriver.java   |    27 -
 .../couchbase/CouchbaseSyncGatewayImpl.java     |    82 -
 .../CouchbaseSyncGatewaySshDriver.java          |   167 -
 .../entity/nosql/couchdb/CouchDBCluster.java    |    48 -
 .../nosql/couchdb/CouchDBClusterImpl.java       |    50 -
 .../entity/nosql/couchdb/CouchDBNode.java       |    66 -
 .../entity/nosql/couchdb/CouchDBNodeDriver.java |    37 -
 .../entity/nosql/couchdb/CouchDBNodeImpl.java   |   109 -
 .../nosql/couchdb/CouchDBNodeSshDriver.java     |   152 -
 .../elasticsearch/ElasticSearchCluster.java     |    40 -
 .../elasticsearch/ElasticSearchClusterImpl.java |    45 -
 .../nosql/elasticsearch/ElasticSearchNode.java  |    93 -
 .../elasticsearch/ElasticSearchNodeDriver.java  |    25 -
 .../elasticsearch/ElasticSearchNodeImpl.java    |   111 -
 .../ElasticSearchNodeSshDriver.java             |   139 -
 .../nosql/hazelcast/HazelcastCluster.java       |    59 -
 .../nosql/hazelcast/HazelcastClusterImpl.java   |   125 -
 .../entity/nosql/hazelcast/HazelcastNode.java   |   101 -
 .../nosql/hazelcast/HazelcastNodeDriver.java    |    25 -
 .../nosql/hazelcast/HazelcastNodeImpl.java      |   146 -
 .../nosql/hazelcast/HazelcastNodeSshDriver.java |   164 -
 .../nosql/mongodb/AbstractMongoDBServer.java    |    66 -
 .../nosql/mongodb/AbstractMongoDBSshDriver.java |   231 -
 .../mongodb/MongoDBAuthenticationMixins.java    |    51 -
 .../mongodb/MongoDBAuthenticationUtils.java     |    79 -
 .../entity/nosql/mongodb/MongoDBClient.java     |    65 -
 .../nosql/mongodb/MongoDBClientDriver.java      |    25 -
 .../entity/nosql/mongodb/MongoDBClientImpl.java |    43 -
 .../nosql/mongodb/MongoDBClientSshDriver.java   |   146 -
 .../nosql/mongodb/MongoDBClientSupport.java     |   322 -
 .../entity/nosql/mongodb/MongoDBDriver.java     |    24 -
 .../entity/nosql/mongodb/MongoDBReplicaSet.java |    86 -
 .../nosql/mongodb/MongoDBReplicaSetImpl.java    |   465 -
 .../entity/nosql/mongodb/MongoDBServer.java     |   154 -
 .../entity/nosql/mongodb/MongoDBServerImpl.java |   227 -
 .../entity/nosql/mongodb/MongoDBSshDriver.java  |    58 -
 .../entity/nosql/mongodb/ReplicaSetConfig.java  |   277 -
 .../nosql/mongodb/ReplicaSetMemberStatus.java   |    66 -
 .../sharding/CoLocatedMongoDBRouter.java        |    59 -
 .../sharding/CoLocatedMongoDBRouterImpl.java    |    72 -
 .../mongodb/sharding/MongoDBConfigServer.java   |    27 -
 .../sharding/MongoDBConfigServerCluster.java    |    35 -
 .../MongoDBConfigServerClusterImpl.java         |    58 -
 .../sharding/MongoDBConfigServerDriver.java     |    25 -
 .../sharding/MongoDBConfigServerImpl.java       |    36 -
 .../sharding/MongoDBConfigServerSshDriver.java  |    43 -
 .../nosql/mongodb/sharding/MongoDBRouter.java   |    51 -
 .../mongodb/sharding/MongoDBRouterCluster.java  |    54 -
 .../sharding/MongoDBRouterClusterImpl.java      |   101 -
 .../mongodb/sharding/MongoDBRouterDriver.java   |    25 -
 .../mongodb/sharding/MongoDBRouterImpl.java     |    85 -
 .../sharding/MongoDBRouterSshDriver.java        |    51 -
 .../mongodb/sharding/MongoDBShardCluster.java   |    27 -
 .../sharding/MongoDBShardClusterImpl.java       |   182 -
 .../sharding/MongoDBShardedDeployment.java      |   102 -
 .../sharding/MongoDBShardedDeploymentImpl.java  |   162 -
 .../entity/nosql/redis/RedisCluster.java        |    41 -
 .../entity/nosql/redis/RedisClusterImpl.java    |   158 -
 .../brooklyn/entity/nosql/redis/RedisShard.java |    26 -
 .../entity/nosql/redis/RedisShardImpl.java      |    26 -
 .../brooklyn/entity/nosql/redis/RedisSlave.java |    42 -
 .../entity/nosql/redis/RedisSlaveImpl.java      |    34 -
 .../brooklyn/entity/nosql/redis/RedisStore.java |    73 -
 .../entity/nosql/redis/RedisStoreDriver.java    |    27 -
 .../entity/nosql/redis/RedisStoreImpl.java      |   161 -
 .../entity/nosql/redis/RedisStoreSshDriver.java |   136 -
 .../brooklyn/entity/nosql/riak/RiakCluster.java |    65 -
 .../entity/nosql/riak/RiakClusterImpl.java      |   263 -
 .../brooklyn/entity/nosql/riak/RiakNode.java    |   241 -
 .../entity/nosql/riak/RiakNodeDriver.java       |    48 -
 .../entity/nosql/riak/RiakNodeImpl.java         |   311 -
 .../entity/nosql/riak/RiakNodeSshDriver.java    |   613 -
 .../brooklyn/entity/nosql/solr/SolrServer.java  |    81 -
 .../entity/nosql/solr/SolrServerDriver.java     |    30 -
 .../entity/nosql/solr/SolrServerImpl.java       |    76 -
 .../entity/nosql/solr/SolrServerSshDriver.java  |   156 -
 .../nosql/src/main/resources/cassandra-logo.png |   Bin 35150 -> 0 bytes
 .../nosql/src/main/resources/couchbase-logo.png |   Bin 88089 -> 0 bytes
 .../nosql/src/main/resources/couchdb-logo.png   |   Bin 7941 -> 0 bytes
 .../nosql/src/main/resources/mongodb-logo.png   |   Bin 39197 -> 0 bytes
 .../entity/nosql/cassandra/cassandra-1.2.yaml   |   644 -
 .../entity/nosql/cassandra/cassandra-2.0.yaml   |   688 -
 .../cassandra/cassandra-multicloud-snitch.txt   |    33 -
 .../nosql/cassandra/cassandra-rackdc.properties |     6 -
 .../entity/nosql/couchbase/pillowfight.yaml     |    77 -
 .../brooklyn/entity/nosql/couchdb/couch.ini     |    17 -
 .../brooklyn/entity/nosql/couchdb/couch.uri     |     2 -
 .../nosql/hazelcast/hazelcast-brooklyn.xml      |    64 -
 .../entity/nosql/mongodb/default-mongod.conf    |     7 -
 .../brooklyn/entity/nosql/mongodb/default.conf  |     2 -
 .../entity/nosql/mongodb/mongodb_win.yaml       |    46 -
 .../nosql/mongodb/win/checkrunning_mongodb.ps1  |    30 -
 .../nosql/mongodb/win/configure_mongodb.ps1     |    31 -
 .../nosql/mongodb/win/install_mongodb.ps1       |    32 -
 .../entity/nosql/mongodb/win/launch_mongodb.ps1 |    26 -
 .../entity/nosql/mongodb/win/stop_mongodb.ps1   |    27 -
 .../brooklyn/entity/nosql/redis/redis.conf      |    13 -
 .../brooklyn/entity/nosql/redis/slave.conf      |    16 -
 .../brooklyn/entity/nosql/riak/app.config       |   353 -
 .../nosql/riak/riak-cluster-with-solr.yaml      |    35 -
 .../brooklyn/entity/nosql/riak/riak-mac.conf    |   494 -
 .../nosql/riak/riak-with-webapp-cluster.yaml    |    42 -
 .../entity/nosql/riak/riak-with-webapp.yaml     |    36 -
 .../apache/brooklyn/entity/nosql/riak/riak.conf |   494 -
 .../apache/brooklyn/entity/nosql/riak/riak.md   |    67 -
 .../apache/brooklyn/entity/nosql/riak/riak.png  |   Bin 110651 -> 0 bytes
 .../apache/brooklyn/entity/nosql/riak/vm.args   |    64 -
 .../apache/brooklyn/entity/nosql/solr/solr.xml  |    19 -
 .../nosql/src/main/resources/redis-logo.png     |   Bin 34333 -> 0 bytes
 .../nosql/src/main/resources/solr-logo.png      |   Bin 42902 -> 0 bytes
 .../cassandra/AbstractCassandraNodeTest.java    |    40 -
 .../entity/nosql/cassandra/AstyanaxSupport.java |   330 -
 .../CassandraDatacenterIntegrationTest.java     |   150 -
 .../cassandra/CassandraDatacenterLiveTest.java  |   310 -
 ...assandraDatacenterRebindIntegrationTest.java |    97 -
 .../cassandra/CassandraDatacenterTest.java      |   224 -
 .../nosql/cassandra/CassandraFabricTest.java    |   183 -
 .../cassandra/CassandraNodeEc2LiveTest.java     |    81 -
 .../cassandra/CassandraNodeIntegrationTest.java |   189 -
 .../nosql/cassandra/CassandraNodeLiveTest.java  |    74 -
 .../cassandra/NonNegTokenGeneratorTest.java     |   116 -
 .../cassandra/PosNegTokenGeneratorTest.java     |    57 -
 .../nosql/couchbase/CouchbaseOfflineTest.java   |    61 -
 .../CouchbaseSyncGatewayEc2LiveTest.java        |   136 -
 .../nosql/couchdb/AbstractCouchDBNodeTest.java  |    53 -
 .../nosql/couchdb/CouchDBClusterLiveTest.java   |    89 -
 .../nosql/couchdb/CouchDBNodeEc2LiveTest.java   |    48 -
 .../couchdb/CouchDBNodeIntegrationTest.java     |    66 -
 .../nosql/couchdb/CouchDBNodeLiveTest.java      |    74 -
 .../entity/nosql/couchdb/JcouchdbSupport.java   |    77 -
 .../ElasticSearchClusterIntegrationTest.java    |   127 -
 .../ElasticSearchNodeIntegrationTest.java       |   111 -
 .../hazelcast/HazelcastClusterEc2LiveTest.java  |    47 -
 .../HazelcastClusterNodeIntegrationTest.java    |    49 -
 .../HazelcastClusterSoftlayerLiveTest.java      |    47 -
 .../hazelcast/HazelcastNodeIntegrationTest.java |   107 -
 .../nosql/hazelcast/HazelcastTestHelper.java    |    76 -
 .../nosql/mongodb/MongoDBEc2LiveTest.java       |    84 -
 .../nosql/mongodb/MongoDBIntegrationTest.java   |    90 -
 .../mongodb/MongoDBRebindIntegrationTest.java   |    59 -
 .../mongodb/MongoDBReplicaSetEc2LiveTest.java   |    95 -
 .../MongoDBReplicaSetIntegrationTest.java       |   205 -
 .../mongodb/MongoDBRestartIntegrationTest.java  |    42 -
 .../nosql/mongodb/MongoDBSoftLayerLiveTest.java |    55 -
 .../entity/nosql/mongodb/MongoDBTestHelper.java |   123 -
 .../nosql/mongodb/MongoDBWinEc2LiveTest.java    |   138 -
 .../nosql/mongodb/ReplicaSetConfigTest.java     |   240 -
 .../MongoDBConfigServerIntegrationTest.java     |    65 -
 .../MongoDBShardedDeploymentEc2LiveTest.java    |    82 -
 ...MongoDBShardedDeploymentIntegrationTest.java |   128 -
 .../entity/nosql/redis/JedisSupport.java        |    77 -
 .../redis/RedisClusterIntegrationTest.java      |   108 -
 .../entity/nosql/redis/RedisEc2LiveTest.java    |    91 -
 .../nosql/redis/RedisIntegrationTest.java       |   118 -
 .../nosql/riak/RiakClusterEc2LiveTest.java      |    73 -
 .../entity/nosql/riak/RiakNodeEc2LiveTest.java  |    74 -
 .../riak/RiakNodeGoogleComputeLiveTest.java     |    61 -
 .../nosql/riak/RiakNodeIntegrationTest.java     |   230 -
 .../nosql/riak/RiakNodeSoftlayerLiveTest.java   |    44 -
 .../nosql/solr/AbstractSolrServerTest.java      |    40 -
 .../entity/nosql/solr/SolrJSupport.java         |    66 -
 .../nosql/solr/SolrServerEc2LiveTest.java       |    65 -
 .../nosql/solr/SolrServerIntegrationTest.java   |    84 -
 .../entity/nosql/solr/SolrServerLiveTest.java   |    89 -
 .../nosql/src/test/resources/mongodb-keyfile    |    16 -
 .../nosql/src/test/resources/solr/example.tgz   |   Bin 20655 -> 0 bytes
 .../nosql/src/test/resources/solr/example.txt   |    18 -
 .../test/resources/solr/example/conf/schema.xml |    50 -
 .../resources/solr/example/conf/solrconfig.xml  |  1791 --
 .../test/resources/solr/example/core.properties |    19 -
 .../resources/test-mongodb-configserver.conf    |     6 -
 .../src/test/resources/test-mongodb-router.conf |     6 -
 .../nosql/src/test/resources/test-mongodb.conf  |    21 -
 brooklyn-library/software/osgi/pom.xml          |   127 -
 .../entity/osgi/karaf/KarafContainer.java       |   137 -
 .../entity/osgi/karaf/KarafContainerImpl.java   |   297 -
 .../brooklyn/entity/osgi/karaf/KarafDriver.java |    30 -
 .../entity/osgi/karaf/KarafSshDriver.java       |   149 -
 .../osgi/src/main/java/org/osgi/jmx/Item.java   |   200 -
 .../main/java/org/osgi/jmx/JmxConstants.java    |   318 -
 .../osgi/src/main/resources/karaf-logo.png      |   Bin 26072 -> 0 bytes
 .../osgi/karaf/KarafContainerEc2LiveTest.java   |    52 -
 .../entity/osgi/karaf/KarafContainerTest.java   |   146 -
 .../osgi/src/test/resources/hello-world.jar     |   Bin 2088 -> 0 bytes
 .../osgi/src/test/resources/hello-world.txt     |    26 -
 brooklyn-library/software/webapp/pom.xml        |   193 -
 .../entity/dns/AbstractGeoDnsService.java       |    74 -
 .../entity/dns/AbstractGeoDnsServiceImpl.java   |   392 -
 .../dns/geoscaling/GeoscalingDnsService.java    |    86 -
 .../geoscaling/GeoscalingDnsServiceImpl.java    |   201 -
 .../geoscaling/GeoscalingScriptGenerator.java   |    79 -
 .../dns/geoscaling/GeoscalingWebClient.java     |   458 -
 .../entity/proxy/AbstractController.java        |    74 -
 .../entity/proxy/AbstractControllerImpl.java    |   515 -
 .../proxy/AbstractNonProvisionedController.java |    28 -
 .../AbstractNonProvisionedControllerImpl.java   |   276 -
 .../brooklyn/entity/proxy/LoadBalancer.java     |   124 -
 .../entity/proxy/LoadBalancerCluster.java       |    37 -
 .../entity/proxy/LoadBalancerClusterImpl.java   |    76 -
 .../brooklyn/entity/proxy/ProxySslConfig.java   |   218 -
 .../proxy/nginx/NginxConfigFileGenerator.java   |    33 -
 .../entity/proxy/nginx/NginxController.java     |   145 -
 .../entity/proxy/nginx/NginxControllerImpl.java |   369 -
 .../nginx/NginxDefaultConfigGenerator.java      |   257 -
 .../entity/proxy/nginx/NginxDriver.java         |    31 -
 .../entity/proxy/nginx/NginxSshDriver.java      |   476 -
 .../nginx/NginxTemplateConfigGenerator.java     |    82 -
 .../brooklyn/entity/proxy/nginx/UrlMapping.java |   102 -
 .../entity/proxy/nginx/UrlMappingImpl.java      |   222 -
 .../entity/proxy/nginx/UrlRewriteRule.java      |    74 -
 .../webapp/ControlledDynamicWebAppCluster.java  |   113 -
 .../ControlledDynamicWebAppClusterImpl.java     |   330 -
 .../entity/webapp/DynamicWebAppCluster.java     |    69 -
 .../entity/webapp/DynamicWebAppClusterImpl.java |   262 -
 .../entity/webapp/DynamicWebAppFabric.java      |    48 -
 .../entity/webapp/DynamicWebAppFabricImpl.java  |    83 -
 .../entity/webapp/ElasticJavaWebAppService.java |    60 -
 .../webapp/FilenameToWebContextMapper.java      |    92 -
 .../brooklyn/entity/webapp/HttpsSslConfig.java  |    74 -
 .../entity/webapp/JavaWebAppDriver.java         |    54 -
 .../entity/webapp/JavaWebAppService.java        |   109 -
 .../webapp/JavaWebAppSoftwareProcess.java       |    34 -
 .../webapp/JavaWebAppSoftwareProcessImpl.java   |   205 -
 .../entity/webapp/JavaWebAppSshDriver.java      |   205 -
 .../brooklyn/entity/webapp/WebAppService.java   |    24 -
 .../entity/webapp/WebAppServiceConstants.java   |    61 -
 .../entity/webapp/WebAppServiceMethods.java     |    89 -
 .../entity/webapp/WebAppServiceMetrics.java     |    77 -
 .../entity/webapp/jboss/JBoss6Driver.java       |    24 -
 .../entity/webapp/jboss/JBoss6Server.java       |    62 -
 .../entity/webapp/jboss/JBoss6ServerImpl.java   |   114 -
 .../entity/webapp/jboss/JBoss6SshDriver.java    |   242 -
 .../entity/webapp/jboss/JBoss7Driver.java       |    30 -
 .../entity/webapp/jboss/JBoss7Server.java       |   111 -
 .../entity/webapp/jboss/JBoss7ServerImpl.java   |   214 -
 .../entity/webapp/jboss/JBoss7SshDriver.java    |   274 -
 .../entity/webapp/jetty/Jetty6Driver.java       |    24 -
 .../entity/webapp/jetty/Jetty6Server.java       |    60 -
 .../entity/webapp/jetty/Jetty6ServerImpl.java   |   142 -
 .../entity/webapp/jetty/Jetty6SshDriver.java    |   173 -
 .../webapp/nodejs/NodeJsWebAppDriver.java       |    29 -
 .../webapp/nodejs/NodeJsWebAppService.java      |    74 -
 .../webapp/nodejs/NodeJsWebAppServiceImpl.java  |    91 -
 .../webapp/nodejs/NodeJsWebAppSshDriver.java    |   184 -
 .../entity/webapp/tomcat/Tomcat7Driver.java     |    23 -
 .../entity/webapp/tomcat/Tomcat7SshDriver.java  |    29 -
 .../entity/webapp/tomcat/Tomcat8Server.java     |    55 -
 .../entity/webapp/tomcat/Tomcat8ServerImpl.java |    26 -
 .../entity/webapp/tomcat/TomcatDriver.java      |    24 -
 .../entity/webapp/tomcat/TomcatServer.java      |    87 -
 .../entity/webapp/tomcat/TomcatServerImpl.java  |   125 -
 .../entity/webapp/tomcat/TomcatSshDriver.java   |   173 -
 .../webapp/src/main/resources/jboss_logo.png    |   Bin 23207 -> 0 bytes
 .../webapp/src/main/resources/jetty-logo.png    |   Bin 8870 -> 0 bytes
 .../webapp/src/main/resources/nginx-logo.jpeg   |   Bin 4546 -> 0 bytes
 .../webapp/src/main/resources/nodejs-logo.png   |   Bin 9620 -> 0 bytes
 .../brooklyn/entity/dns/geoscaling/template.php |    68 -
 .../brooklyn/entity/proxy/nginx/server.conf     |    84 -
 .../entity/webapp/jboss/jboss7-standalone.xml   |   311 -
 .../entity/webapp/jetty/jetty-brooklyn.xml      |    41 -
 .../entity/webapp/sample-java-keystore.jks      |   Bin 1355 -> 0 bytes
 .../entity/webapp/sample-java-keystore.txt      |    22 -
 .../brooklyn/entity/webapp/tomcat/server.xml    |   206 -
 .../entity/webapp/tomcat/tomcat8-server.xml     |   149 -
 .../entity/webapp/tomcat/tomcat8-web.xml        |  4615 ----
 .../brooklyn/entity/webapp/tomcat/web.xml       |  4615 ----
 .../webapp/src/main/resources/tomcat-logo.png   |   Bin 18612 -> 0 bytes
 .../entity/dns/AbstractGeoDnsServiceTest.java   |   345 -
 .../dns/geoscaling/GeoDnsServiceYamlTest.java   |    45 -
 .../geoscaling/GeoscalingIntegrationTest.java   |   222 -
 .../GeoscalingScriptGeneratorTest.java          |    57 -
 .../dns/geoscaling/GeoscalingWebClientTest.java |   199 -
 .../entity/proxy/AbstractControllerTest.java    |   360 -
 .../entity/proxy/ProxySslConfigTest.java        |    60 -
 .../brooklyn/entity/proxy/StubAppServer.java    |    86 -
 .../proxy/TrackingAbstractController.java       |    30 -
 .../proxy/TrackingAbstractControllerImpl.java   |    67 -
 .../brooklyn/entity/proxy/UrlMappingTest.java   |   215 -
 .../nginx/NginxClusterIntegrationTest.java      |   238 -
 .../entity/proxy/nginx/NginxEc2LiveTest.java    |    71 -
 .../nginx/NginxHttpsSslIntegrationTest.java     |   237 -
 .../proxy/nginx/NginxIntegrationTest.java       |   452 -
 .../proxy/nginx/NginxLightIntegrationTest.java  |    72 -
 .../proxy/nginx/NginxRebindIntegrationTest.java |   368 -
 .../nginx/NginxRebindWithHaIntegrationTest.java |   180 -
 .../nginx/NginxUrlMappingIntegrationTest.java   |   503 -
 .../proxy/nginx/NginxWebClusterEc2LiveTest.java |   115 -
 .../AbstractWebAppFixtureIntegrationTest.java   |   539 -
 ...lledDynamicWebAppClusterIntegrationTest.java |   181 -
 .../ControlledDynamicWebAppClusterTest.java     |   210 -
 .../entity/webapp/DynamicWebAppClusterTest.java |   130 -
 .../entity/webapp/DynamicWebAppFabricTest.java  |   123 -
 .../webapp/ElasticCustomLocationTest.java       |    89 -
 ...ElasticJavaWebAppServiceIntegrationTest.java |    68 -
 .../webapp/FilenameToWebContextMapperTest.java  |    86 -
 .../entity/webapp/HttpsSslConfigTest.java       |    38 -
 .../webapp/TomcatAutoScalerPolicyTest.java      |   123 -
 .../webapp/WebAppConcurrentDeployTest.java      |   102 -
 .../webapp/WebAppLiveIntegrationTest.java       |    91 -
 ...namicWebAppClusterRebindIntegrationTest.java |   197 -
 ...namicWebAppClusterRebindIntegrationTest.java |   188 -
 .../jboss/JBoss6ServerAwsEc2LiveTest.java       |    98 -
 ...Boss6ServerNonInheritingIntegrationTest.java |   100 -
 .../webapp/jboss/JBoss7PasswordHashingTest.java |    62 -
 .../jboss/JBoss7ServerAwsEc2LiveTest.java       |   104 -
 .../jboss/JBoss7ServerDockerLiveTest.java       |    74 -
 ...Boss7ServerNonInheritingIntegrationTest.java |   187 -
 .../JBoss7ServerRebindingIntegrationTest.java   |   124 -
 ...ultiVersionWebAppFixtureIntegrationTest.java |   105 -
 .../Jboss7ServerGoogleComputeLiveTest.java      |    75 -
 .../JettyWebAppFixtureIntegrationTest.java      |    59 -
 .../webapp/nodejs/NodeJsWebAppEc2LiveTest.java  |    59 -
 .../NodeJsWebAppFixtureIntegrationTest.java     |   174 -
 .../NodeJsWebAppSimpleIntegrationTest.java      |    81 -
 .../nodejs/NodeJsWebAppSoftlayerLiveTest.java   |    58 -
 .../webapp/tomcat/Tomcat8ServerEc2LiveTest.java |    65 -
 .../Tomcat8ServerRestartIntegrationTest.java    |    44 -
 .../tomcat/Tomcat8ServerSoftlayerLiveTest.java  |    74 -
 ...mcat8ServerWebAppFixtureIntegrationTest.java |   174 -
 ...ableRetrieveUsageMetricsIntegrationTest.java |    64 -
 .../webapp/tomcat/TomcatServerEc2LiveTest.java  |   101 -
 .../TomcatServerRestartIntegrationTest.java     |    44 -
 .../tomcat/TomcatServerSoftlayerLiveTest.java   |    75 -
 ...omcatServerWebAppFixtureIntegrationTest.java |   154 -
 .../test/entity/TestJavaWebAppEntity.java       |    77 -
 .../test/entity/TestJavaWebAppEntityImpl.java   |    61 -
 .../entity/dns/geoscaling/expectedScript.php    |    79 -
 .../brooklyn/entity/dns/geoscaling/geodns.yaml  |    42 -
 .../webapp/nodejs/nodejs-hello-world.yaml       |    31 -
 .../test/resources/ssl/certs/localhost/info.txt |     2 -
 .../resources/ssl/certs/localhost/server.crt    |    17 -
 .../resources/ssl/certs/localhost/server.csr    |    12 -
 .../resources/ssl/certs/localhost/server.key    |    15 -
 .../ssl/certs/localhost/server.key.org          |    18 -
 examples/global-web-fabric/.gitignore           |     2 +
 examples/global-web-fabric/README.txt           |    42 +
 examples/global-web-fabric/pom.xml              |   108 +
 .../resources/vmc-delete-all.sh                 |    34 +
 .../brooklyn/demo/GlobalWebFabricExample.java   |   118 +
 .../java/org/apache/brooklyn/demo/ReadMe.java   |    28 +
 examples/pom.xml                                |    46 +
 examples/simple-messaging-pubsub/.gitignore     |     1 +
 examples/simple-messaging-pubsub/README.txt     |    47 +
 examples/simple-messaging-pubsub/pom.xml        |   134 +
 .../brooklyn/demo/KafkaClusterExample.java      |    58 +
 .../java/org/apache/brooklyn/demo/Publish.java  |    71 +
 .../demo/StandaloneQpidBrokerExample.java       |    73 +
 .../org/apache/brooklyn/demo/Subscribe.java     |    76 +
 .../src/main/resources/custom-config.xml        |    65 +
 .../src/main/resources/passwd                   |    21 +
 examples/simple-nosql-cluster/.gitignore        |     1 +
 examples/simple-nosql-cluster/README.md         |    41 +
 examples/simple-nosql-cluster/pom.xml           |   106 +
 .../src/main/assembly/assembly.xml              |    64 +
 .../src/main/assembly/files/conf/logback.xml    |    29 +
 .../src/main/assembly/scripts/start.sh          |    40 +
 .../brooklyn/demo/CumulusRDFApplication.java    |   239 +
 .../demo/HighAvailabilityCassandraCluster.java  |    89 +
 .../brooklyn/demo/ResilientMongoDbApp.java      |   105 +
 .../brooklyn/demo/RiakClusterExample.java       |    76 +
 .../brooklyn/demo/SimpleCassandraCluster.java   |    58 +
 .../brooklyn/demo/SimpleCouchDBCluster.java     |    36 +
 .../brooklyn/demo/SimpleMongoDBReplicaSet.java  |    39 +
 .../brooklyn/demo/SimpleRedisCluster.java       |    35 +
 .../apache/brooklyn/demo/StormSampleApp.java    |    69 +
 .../brooklyn/demo/WideAreaCassandraCluster.java |    86 +
 .../src/main/resources/cumulus.yaml             |    26 +
 .../src/main/resources/mongodb.conf             |    32 +
 .../brooklyn/demo/ha-cassandra-cluster.yaml     |    45 +
 .../brooklyn/demo/simple-cassandra-cluster.yaml |    28 +
 .../demo/wide-area-cassandra-cluster.yaml       |    41 +
 examples/simple-web-cluster/.gitignore          |     2 +
 examples/simple-web-cluster/README.txt          |    59 +
 examples/simple-web-cluster/pom.xml             |   164 +
 .../resources/jmeter-test-plan.jmx              |   143 +
 .../src/main/assembly/assembly.xml              |    74 +
 .../src/main/assembly/files/README.txt          |    49 +
 .../src/main/assembly/scripts/start.sh          |    43 +
 .../brooklyn/demo/NodeJsTodoApplication.java    |    60 +
 .../brooklyn/demo/SingleWebServerExample.java   |    66 +
 .../demo/WebClusterDatabaseExample.java         |   122 +
 .../demo/WebClusterDatabaseExampleApp.java      |   174 +
 .../apache/brooklyn/demo/WebClusterExample.java |    95 +
 .../src/main/resources/logback-custom.xml       |    43 +
 .../brooklyn/demo/glossy-3d-blue-web-icon.png   |   Bin 0 -> 46490 bytes
 .../apache/brooklyn/demo/nodejs-riak-todo.yaml  |    46 +
 .../org/apache/brooklyn/demo/nodejs-todo.yaml   |    53 +
 .../main/resources/visitors-creation-script.sql |    41 +
 ...lusterDatabaseExampleAppIntegrationTest.java |   204 +
 examples/webapps/hello-world-sql/.gitignore     |     1 +
 examples/webapps/hello-world-sql/pom.xml        |   109 +
 .../src/main/webapp/WEB-INF/web.xml             |    26 +
 .../src/main/webapp/available.jsp               |    81 +
 .../hello-world-sql/src/main/webapp/db.jsp      |   123 +
 .../src/main/webapp/hadoop-chat.jsp             |   110 +
 .../src/main/webapp/hadoop-wordcount.jsp        |   114 +
 .../main/webapp/images/BrooklynBridge3Large.png |   Bin 0 -> 703246 bytes
 .../src/main/webapp/images/bridge-small.png     |   Bin 0 -> 42335 bytes
 .../hello-world-sql/src/main/webapp/index.html  |    42 +
 .../hello-world-sql/src/main/webapp/mongo.jsp   |   127 +
 .../hello-world-sql/src/main/webapp/riak.jsp    |   148 +
 .../src/main/webapp/styles/main.css             |    71 +
 examples/webapps/hello-world-webapp/.gitignore  |     1 +
 examples/webapps/hello-world-webapp/pom.xml     |    43 +
 .../src/main/webapp/WEB-INF/web.xml             |    26 +
 .../src/main/webapp/available.jsp               |    76 +
 .../hello-world-webapp/src/main/webapp/db.jsp   |   123 +
 .../src/main/webapp/hadoop-chat.jsp             |   110 +
 .../src/main/webapp/hadoop-wordcount.jsp        |   114 +
 .../main/webapp/images/BrooklynBridge3Large.png |   Bin 0 -> 703246 bytes
 .../webapp/images/bridge-large-no-title.png     |   Bin 0 -> 66113 bytes
 .../src/main/webapp/images/bridge-small.png     |   Bin 0 -> 42335 bytes
 .../src/main/webapp/index.html                  |    42 +
 .../src/main/webapp/primes.jsp                  |    77 +
 .../src/main/webapp/styles/main.css             |    71 +
 examples/webapps/pom.xml                        |    55 +
 pom.xml                                         |   119 +
 qa/log-exclusions.txt                           |    19 +
 qa/pom.xml                                      |   136 +
 .../qa/load/SimulatedJBoss7ServerImpl.java      |   239 +
 .../qa/load/SimulatedMySqlNodeImpl.java         |   183 +
 .../qa/load/SimulatedNginxControllerImpl.java   |   196 +
 .../brooklyn/qa/load/SimulatedTheeTierApp.java  |   140 +
 .../apache/brooklyn/qa/longevity/Monitor.java   |   260 +
 .../brooklyn/qa/longevity/MonitorListener.java  |    35 +
 .../brooklyn/qa/longevity/MonitorPrefs.java     |    54 +
 .../brooklyn/qa/longevity/MonitorUtils.java     |   328 +
 .../brooklyn/qa/longevity/StatusRecorder.java   |   130 +
 qa/src/main/resources/hello-world.txt           |    24 +
 qa/src/main/resources/hello-world.war           |   Bin 0 -> 15066 bytes
 .../SoftlayerObtainPrivateLiveTest.java         |   225 +
 .../camp/EnrichersSlightlySimplerYamlTest.java  |   134 +
 .../qa/camp/EntitiesYamlIntegrationTest.java    |    71 +
 .../qa/camp/JavaWebAppsIntegrationTest.java     |   273 +
 .../qa/camp/JavaWebAppsMatchingTest.java        |   144 +
 .../downstreamparent/DownstreamParentTest.java  |    64 +
 .../org/apache/brooklyn/qa/load/LoadTest.java   |   241 +
 .../brooklyn/qa/longevity/MonitorUtilsTest.java |   164 +
 .../webcluster/SinusoidalLoadGenerator.java     |    89 +
 .../qa/longevity/webcluster/WebClusterApp.java  |   101 +
 .../test/projects/downstream-parent-test/README |     5 +
 .../projects/downstream-parent-test/pom.xml     |   120 +
 .../src/main/java/com/example/HelloEntity.java  |    26 +
 .../main/java/com/example/HelloEntityImpl.java  |    31 +
 .../src/main/resources/blueprint.yaml           |    19 +
 .../src/main/resources/catalog.bom              |    33 +
 .../java-web-app-and-db-with-function.yaml      |    36 +
 .../java-web-app-and-db-with-policy.yaml        |    46 +
 qa/src/test/resources/java-web-app-simple.yaml  |    28 +
 ...est-app-with-enrichers-slightly-simpler.yaml |    74 +
 qa/src/test/resources/test-tomcat-cluster.yaml  |    30 +
 .../test-webapp-with-averaging-enricher.yaml    |    47 +
 qa/start-monitor.sh                             |    39 +
 qa/start-webcluster.sh                          |    39 +
 sandbox/cassandra-multicloud-snitch/pom.xml     |    64 +
 .../customsnitch/MultiCloudSnitch.java          |   222 +
 sandbox/database/pom.xml                        |    66 +
 .../brooklyn/entity/database/Database.java      |    42 +
 .../apache/brooklyn/entity/database/Schema.java |    37 +
 .../entity/database/derby/DerbyDatabase.java    |   172 +
 .../database/derby/DerbyDatabaseDriver.java     |    25 +
 .../database/derby/DerbyDatabaseSshDriver.java  |   116 +
 .../entity/database/derby/DerbySchema.java      |   148 +
 .../entity/database/PlaceholderTest.java        |    26 +
 sandbox/extra/pom.xml                           |    79 +
 .../postgresql/PostgreSqlNodeSaltImpl.java      |   183 +
 .../brooklyn/entity/salt/SaltBashCommands.java  |    91 +
 .../apache/brooklyn/entity/salt/SaltConfig.java |   101 +
 .../brooklyn/entity/salt/SaltConfigs.java       |    89 +
 .../entity/salt/SaltLifecycleEffectorTasks.java |   220 +
 .../brooklyn/entity/salt/SaltStackMaster.java   |    72 +
 .../entity/salt/SaltStackMasterDriver.java      |    25 +
 .../entity/salt/SaltStackMasterImpl.java        |    55 +
 .../entity/salt/SaltStackMasterSshDriver.java   |    96 +
 .../apache/brooklyn/entity/salt/SaltTasks.java  |   145 +
 .../org/apache/brooklyn/entity/salt/master      |    65 +
 .../org/apache/brooklyn/entity/salt/masterless  |    53 +
 .../org/apache/brooklyn/entity/salt/minion      |    52 +
 .../postgresql/PostgreSqlSaltLiveTest.java      |   112 +
 .../brooklyn/entity/salt/SaltConfigsTest.java   |    70 +
 .../entity/salt/SaltLiveTestSupport.java        |    68 +
 sandbox/mobile-app/pom.xml                      |    67 +
 .../mobile-app/src/main/webapp/WEB-INF/web.xml  |    24 +
 .../main/webapp/assets/mobile/css/mobile.css    |    74 +
 .../assets/mobile/images/brooklyn-logo.png      |   Bin 0 -> 7055 bytes
 .../src/main/webapp/assets/mobile/js/app.js     |    84 +
 .../main/webapp/assets/mobile/js/controllers.js |   202 +
 .../src/main/webapp/assets/mobile/js/filters.js |    29 +
 .../webapp/assets/mobile/js/i18n/en-us.json     |    27 +
 .../main/webapp/assets/mobile/js/services.js    |    28 +
 .../mobile/js/templates/applicationsList.html   |    72 +
 .../mobile/js/templates/entitiesList.html       |    53 +
 .../mobile/js/templates/entitySummary.html      |   250 +
 .../libs/angular-1.2.19/angular-cookies.js      |   204 +
 .../libs/angular-1.2.19/angular-cookies.min.js  |     8 +
 .../angular-1.2.19/angular-cookies.min.js.map   |     8 +
 .../mobile/libs/angular-1.2.19/angular-csp.css  |    24 +
 .../mobile/libs/angular-1.2.19/angular-mocks.js |  2171 ++
 .../libs/angular-1.2.19/angular-resource.js     |   619 +
 .../libs/angular-1.2.19/angular-resource.min.js |    13 +
 .../angular-1.2.19/angular-resource.min.js.map  |     8 +
 .../mobile/libs/angular-1.2.19/angular-route.js |   927 +
 .../libs/angular-1.2.19/angular-route.min.js    |    14 +
 .../angular-1.2.19/angular-route.min.js.map     |     8 +
 .../mobile/libs/angular-1.2.19/angular-touch.js |   584 +
 .../libs/angular-1.2.19/angular-touch.min.js    |    13 +
 .../angular-1.2.19/angular-touch.min.js.map     |     8 +
 .../mobile/libs/angular-1.2.19/angular.js       | 21778 +++++++++++++++++
 .../mobile/libs/angular-1.2.19/angular.min.js   |   214 +
 .../libs/angular-1.2.19/angular.min.js.map      |     8 +
 .../mobile/libs/angular-1.2.19/errors.json      |     1 +
 .../angular-1.2.19/i18n/angular-locale_de.js    |    99 +
 .../angular-1.2.19/i18n/angular-locale_en-gb.js |    99 +
 .../angular-1.2.19/i18n/angular-locale_en-us.js |    99 +
 .../angular-1.2.19/i18n/angular-locale_en.js    |    99 +
 .../angular-1.2.19/i18n/angular-locale_es.js    |    99 +
 .../angular-1.2.19/i18n/angular-locale_fr.js    |    99 +
 .../angular-1.2.19/i18n/angular-locale_ru.js    |    99 +
 .../mobile/libs/angular-1.2.19/version.json     |     1 +
 .../mobile/libs/angular-1.2.19/version.txt      |     1 +
 .../.bower.json                                 |    19 +
 .../README.md                                   |     9 +
 .../angular-translate-loader-static-files.js    |    31 +
 ...angular-translate-loader-static-files.min.js |     6 +
 .../bower.json                                  |     8 +
 .../.bower.json                                 |    18 +
 .../angular-translate-storage-cookie/README.md  |     9 +
 .../angular-translate-storage-cookie.js         |    19 +
 .../angular-translate-storage-cookie.min.js     |     6 +
 .../angular-translate-storage-cookie/bower.json |     8 +
 .../angular-translate-storage-local/.bower.json |    20 +
 .../angular-translate-storage-local/README.md   |     9 +
 .../angular-translate-storage-local.js          |    38 +
 .../angular-translate-storage-local.min.js      |     6 +
 .../angular-translate-storage-local/bower.json  |     9 +
 .../mobile/libs/angular-translate/.bower.json   |    16 +
 .../mobile/libs/angular-translate/README.md     |     9 +
 .../libs/angular-translate/angular-translate.js |   883 +
 .../angular-translate/angular-translate.min.js  |     6 +
 .../mobile/libs/angular-translate/bower.json    |     5 +
 .../.gitignore                                  |   102 +
 .../dist/css/mobile-angular-ui-base.css         |  7543 ++++++
 .../dist/css/mobile-angular-ui-base.min.css     |     1 +
 .../dist/css/mobile-angular-ui-desktop.css      |   531 +
 .../dist/css/mobile-angular-ui-desktop.min.css  |     1 +
 .../dist/css/mobile-angular-ui-hover.css        |   480 +
 .../dist/css/mobile-angular-ui-hover.min.css    |     1 +
 .../dist/fonts/FontAwesome.otf                  |   Bin 0 -> 75188 bytes
 .../dist/fonts/fontawesome-webfont.eot          |   Bin 0 -> 72449 bytes
 .../dist/fonts/fontawesome-webfont.svg          |   504 +
 .../dist/fonts/fontawesome-webfont.ttf          |   Bin 0 -> 141564 bytes
 .../dist/fonts/fontawesome-webfont.woff         |   Bin 0 -> 83760 bytes
 .../dist/js/mobile-angular-ui.js                |  1854 ++
 .../dist/js/mobile-angular-ui.min.js            |     1 +
 sandbox/mobile-app/src/main/webapp/index.m.html |    99 +
 sandbox/monitoring/pom.xml                      |    67 +
 .../entity/monitoring/zabbix/ZabbixFeed.java    |   463 +
 .../monitoring/zabbix/ZabbixMonitored.java      |    38 +
 .../monitoring/zabbix/ZabbixPollConfig.java     |    75 +
 .../entity/monitoring/zabbix/ZabbixServer.java  |    52 +
 .../monitoring/zabbix/ZabbixServerImpl.java     |   142 +
 sandbox/nosql/README.md                         |    92 +
 sandbox/nosql/pom.xml                           |    79 +
 .../nosql/infinispan/Infinispan5Driver.java     |    23 +
 .../nosql/infinispan/Infinispan5Server.java     |    88 +
 .../nosql/infinispan/Infinispan5SshDriver.java  |   124 +
 .../Infinispan5ServerIntegrationTest.java       |   104 +
 software/database/pom.xml                       |   154 +
 .../brooklyn/entity/database/DatabaseNode.java  |    29 +
 .../entity/database/DatastoreMixins.java        |   104 +
 .../entity/database/crate/CrateNode.java        |    90 +
 .../entity/database/crate/CrateNodeDriver.java  |    24 +
 .../entity/database/crate/CrateNodeImpl.java    |    99 +
 .../database/crate/CrateNodeSshDriver.java      |   118 +
 .../entity/database/mariadb/MariaDbDriver.java  |    30 +
 .../entity/database/mariadb/MariaDbNode.java    |    98 +
 .../database/mariadb/MariaDbNodeImpl.java       |   136 +
 .../database/mariadb/MariaDbSshDriver.java      |   256 +
 .../database/mysql/InitSlaveTaskBody.java       |   426 +
 .../entity/database/mysql/MySqlCluster.java     |    77 +
 .../entity/database/mysql/MySqlClusterImpl.java |   375 +
 .../database/mysql/MySqlClusterUtils.java       |    52 +
 .../entity/database/mysql/MySqlDriver.java      |    33 +
 .../entity/database/mysql/MySqlNode.java        |   127 +
 .../database/mysql/MySqlNodeEffectors.java      |    87 +
 .../entity/database/mysql/MySqlNodeImpl.java    |   167 +
 .../entity/database/mysql/MySqlRowParser.java   |    39 +
 .../entity/database/mysql/MySqlSshDriver.java   |   319 +
 .../database/mysql/ReplicationSnapshot.java     |    58 +
 .../database/postgresql/PostgreSqlDriver.java   |    32 +
 .../database/postgresql/PostgreSqlNode.java     |   115 +
 .../PostgreSqlNodeChefImplFromScratch.java      |   168 +
 .../database/postgresql/PostgreSqlNodeImpl.java |    89 +
 .../database/postgresql/PostgreSqlSpecs.java    |    42 +
 .../postgresql/PostgreSqlSshDriver.java         |   471 +
 .../entity/database/rubyrep/RubyRepDriver.java  |    28 +
 .../entity/database/rubyrep/RubyRepNode.java    |   108 +
 .../database/rubyrep/RubyRepNodeImpl.java       |   111 +
 .../database/rubyrep/RubyRepSshDriver.java      |   125 +
 .../src/main/resources/mariadb-logo-180x119.png |   Bin 0 -> 9659 bytes
 .../src/main/resources/mysql-logo-110x57.png    |   Bin 0 -> 2437 bytes
 .../brooklyn/entity/database/crate/crate.yaml   |    28 +
 .../brooklyn/entity/database/mariadb/my.cnf     |    19 +
 .../entity/database/mssql/ConfigurationFile.ini |   390 +
 .../entity/database/mssql/checkrunningmssql.bat |    23 +
 .../entity/database/mssql/configuremssql.ps1    |    22 +
 .../entity/database/mssql/installmssql.ps1      |    45 +
 .../entity/database/mssql/launchmssql.bat       |    25 +
 .../brooklyn/entity/database/mssql/mssql.yaml   |    40 +
 .../entity/database/mssql/stopmssql.bat         |    24 +
 .../brooklyn/entity/database/mysql/mysql.conf   |    27 +
 .../entity/database/mysql/mysql_master.conf     |    30 +
 .../entity/database/mysql/mysql_slave.conf      |    50 +
 .../entity/database/postgresql/postgresql.conf  |   513 +
 .../entity/database/rubyrep/rubyrep.conf        |    28 +
 .../main/resources/postgresql-logo-200px.png    |   Bin 0 -> 17434 bytes
 .../entity/database/VogellaExampleAccess.java   |   200 +
 .../crate/CrateNodeIntegrationTest.java         |    64 +
 .../mariadb/MariaDbIntegrationTest.java         |   124 +
 .../database/mariadb/MariaDbLiveEc2Test.java    |    79 +
 .../mariadb/MariaDbLiveRackspaceTest.java       |   103 +
 .../mysql/MySqlClusterIntegrationTest.java      |   200 +
 .../database/mysql/MySqlClusterLiveEc2Test.java |    41 +
 .../mysql/MySqlClusterLiveSoftlayerTest.java    |    37 +
 .../database/mysql/MySqlClusterTestHelper.java  |   199 +
 .../database/mysql/MySqlIntegrationTest.java    |   105 +
 .../entity/database/mysql/MySqlLiveEc2Test.java |    76 +
 .../entity/database/mysql/MySqlLiveGceTest.java |    48 +
 .../database/mysql/MySqlLiveRackspaceTest.java  |   106 +
 .../mysql/MySqlRestartIntegrationTest.java      |    50 +
 .../database/mysql/MysqlDockerLiveTest.java     |    48 +
 .../postgresql/PostgreSqDockerLiveTest.java     |    46 +
 .../database/postgresql/PostgreSqlChefTest.java |   102 +
 .../postgresql/PostgreSqlEc2LiveTest.java       |    78 +
 .../postgresql/PostgreSqlGceLiveTest.java       |    45 +
 .../postgresql/PostgreSqlIntegrationTest.java   |    95 +
 .../postgresql/PostgreSqlRackspaceLiveTest.java |   107 +
 .../PostgreSqlRebindIntegrationTest.java        |    57 +
 .../PostgreSqlRestartIntegrationTest.java       |    49 +
 .../database/rubyrep/RubyRepEc2LiveTest.java    |    73 +
 .../rubyrep/RubyRepIntegrationTest.java         |   470 +
 .../rubyrep/RubyRepRackspaceLiveTest.java       |   127 +
 software/messaging/pom.xml                      |   306 +
 .../entity/messaging/MessageBroker.java         |    33 +
 .../apache/brooklyn/entity/messaging/Queue.java |    50 +
 .../apache/brooklyn/entity/messaging/Topic.java |    46 +
 .../messaging/activemq/ActiveMQBroker.java      |    80 +
 .../messaging/activemq/ActiveMQBrokerImpl.java  |   121 +
 .../messaging/activemq/ActiveMQDestination.java |    24 +
 .../activemq/ActiveMQDestinationImpl.java       |    66 +
 .../messaging/activemq/ActiveMQDriver.java      |    28 +
 .../messaging/activemq/ActiveMQQueue.java       |    26 +
 .../messaging/activemq/ActiveMQQueueImpl.java   |    68 +
 .../messaging/activemq/ActiveMQSpecs.java       |    33 +
 .../messaging/activemq/ActiveMQSshDriver.java   |   145 +
 .../messaging/activemq/ActiveMQTopic.java       |    26 +
 .../messaging/activemq/ActiveMQTopicImpl.java   |    50 +
 .../entity/messaging/amqp/AmqpExchange.java     |    44 +
 .../entity/messaging/amqp/AmqpServer.java       |    52 +
 .../entity/messaging/jms/JMSBroker.java         |    58 +
 .../entity/messaging/jms/JMSBrokerImpl.java     |   167 +
 .../entity/messaging/jms/JMSDestination.java    |    29 +
 .../messaging/jms/JMSDestinationImpl.java       |    51 +
 .../kafka/AbstractfKafkaSshDriver.java          |   132 +
 .../brooklyn/entity/messaging/kafka/Kafka.java  |    44 +
 .../entity/messaging/kafka/KafkaBroker.java     |    82 +
 .../messaging/kafka/KafkaBrokerDriver.java      |    27 +
 .../entity/messaging/kafka/KafkaBrokerImpl.java |   166 +
 .../messaging/kafka/KafkaBrokerSshDriver.java   |    96 +
 .../entity/messaging/kafka/KafkaCluster.java    |    91 +
 .../messaging/kafka/KafkaClusterImpl.java       |   207 +
 .../entity/messaging/kafka/KafkaZooKeeper.java  |    57 +
 .../messaging/kafka/KafkaZooKeeperDriver.java   |    28 +
 .../messaging/kafka/KafkaZooKeeperImpl.java     |    46 +
 .../kafka/KafkaZooKeeperSshDriver.java          |    82 +
 .../entity/messaging/qpid/QpidBroker.java       |    78 +
 .../entity/messaging/qpid/QpidBrokerImpl.java   |   144 +
 .../entity/messaging/qpid/QpidDestination.java  |    32 +
 .../messaging/qpid/QpidDestinationImpl.java     |   100 +
 .../entity/messaging/qpid/QpidDriver.java       |    28 +
 .../entity/messaging/qpid/QpidQueue.java        |    28 +
 .../entity/messaging/qpid/QpidQueueImpl.java    |    66 +
 .../entity/messaging/qpid/QpidSshDriver.java    |   136 +
 .../entity/messaging/qpid/QpidTopic.java        |    26 +
 .../entity/messaging/qpid/QpidTopicImpl.java    |    56 +
 .../entity/messaging/rabbit/RabbitBroker.java   |    95 +
 .../messaging/rabbit/RabbitBrokerImpl.java      |   119 +
 .../messaging/rabbit/RabbitDestination.java     |    91 +
 .../entity/messaging/rabbit/RabbitDriver.java   |    32 +
 .../entity/messaging/rabbit/RabbitQueue.java    |    85 +
 .../messaging/rabbit/RabbitSshDriver.java       |   263 +
 .../brooklyn/entity/messaging/storm/Storm.java  |   104 +
 .../entity/messaging/storm/StormDeployment.java |    41 +
 .../messaging/storm/StormDeploymentImpl.java    |    76 +
 .../entity/messaging/storm/StormDriver.java     |    27 +
 .../entity/messaging/storm/StormImpl.java       |   117 +
 .../entity/messaging/storm/StormSshDriver.java  |   271 +
 .../entity/zookeeper/AbstractZooKeeperImpl.java |   108 +
 .../entity/zookeeper/ZooKeeperDriver.java       |    27 +
 .../entity/zookeeper/ZooKeeperEnsemble.java     |    52 +
 .../entity/zookeeper/ZooKeeperEnsembleImpl.java |   104 +
 .../entity/zookeeper/ZooKeeperNode.java         |    66 +
 .../entity/zookeeper/ZooKeeperNodeImpl.java     |    33 +
 .../entity/zookeeper/ZooKeeperSshDriver.java    |   162 +
 .../src/main/resources/RabbitMQLogo.png         |   Bin 0 -> 14252 bytes
 .../src/main/resources/activemq-logo.png        |   Bin 0 -> 6819 bytes
 .../entity/messaging/activemq/activemq.xml      |   154 +
 .../messaging/kafka/kafka-google-doorway.jpg    |   Bin 0 -> 15692 bytes
 .../entity/messaging/kafka/server.properties    |   112 +
 .../entity/messaging/kafka/zookeeper.properties |    13 +
 .../entity/messaging/rabbit/rabbitmq.config     |     6 +
 .../brooklyn/entity/messaging/storm/storm.yaml  |    39 +
 .../brooklyn/entity/messaging/zookeeper/zoo.cfg |    42 +
 .../messaging/src/main/resources/qpid-logo.jpeg |   Bin 0 -> 5189 bytes
 .../src/main/resources/redis-logo.jpeg          |   Bin 0 -> 6065 bytes
 .../messaging/activemq/ActiveMQEc2LiveTest.java |   116 +
 .../activemq/ActiveMQGoogleComputeLiveTest.java |   116 +
 .../activemq/ActiveMQIntegrationTest.java       |   257 +
 .../messaging/kafka/KafkaIntegrationTest.java   |   139 +
 .../entity/messaging/kafka/KafkaLiveTest.java   |    67 +
 .../entity/messaging/kafka/KafkaSupport.java    |   109 +
 .../entity/messaging/qpid/QpidEc2LiveTest.java  |    45 +
 .../messaging/qpid/QpidIntegrationTest.java     |   253 +
 .../messaging/rabbit/RabbitEc2LiveTest.java     |   125 +
 .../messaging/rabbit/RabbitIntegrationTest.java |   187 +
 .../messaging/storm/LocalhostLiveTest.java      |    32 +
 .../messaging/storm/SoftLayerLiveTest.java      |    33 +
 .../storm/StormAbstractCloudLiveTest.java       |   201 +
 .../messaging/storm/StormEc2LiveTest.java       |    57 +
 .../messaging/storm/StormGceLiveTest.java       |    50 +
 .../storm/topologies/ExclamationBolt.java       |    51 +
 .../zookeeper/ZooKeeperEc2LiveTest.java         |    47 +
 .../zookeeper/ZooKeeperEnsembleLiveTest.java    |   127 +
 .../src/test/resources/qpid-test-config.xml     |    70 +
 software/monitoring/pom.xml                     |   112 +
 .../entity/monitoring/monit/MonitDriver.java    |    28 +
 .../entity/monitoring/monit/MonitNode.java      |    60 +
 .../entity/monitoring/monit/MonitNodeImpl.java  |   115 +
 .../entity/monitoring/monit/MonitSshDriver.java |   136 +
 .../monitoring/monit/MonitIntegrationTest.java  |   204 +
 .../entity/monitoring/monit/monit.monitrc       |    30 +
 .../entity/monitoring/monit/monitmysql.monitrc  |    29 +
 .../monit/monitmysqlwithrestart.monitrc         |    31 +
 software/network/pom.xml                        |    97 +
 .../entity/network/bind/BindDnsServer.java      |   156 +
 .../network/bind/BindDnsServerDriver.java       |    38 +
 .../entity/network/bind/BindDnsServerImpl.java  |   339 +
 .../network/bind/BindDnsServerSshDriver.java    |   184 +
 .../entity/network/bind/BindOsSupport.java      |   113 +
 .../network/src/main/resources/isc-logo.png     |   Bin 0 -> 9330 bytes
 .../brooklyn/entity/network/bind/domain.zone    |    46 +
 .../apache/brooklyn/entity/network/bind/ifcfg   |    24 +
 .../brooklyn/entity/network/bind/named.conf     |    63 +
 .../brooklyn/entity/network/bind/named.empty    |    30 +
 .../entity/network/bind/named.localhost         |    32 +
 .../brooklyn/entity/network/bind/named.loopback |    31 +
 .../brooklyn/entity/network/bind/resolv.conf    |    25 +
 .../brooklyn/entity/network/bind/reverse.zone   |    37 +
 .../brooklyn/entity/network/bind/rfc1912.zone   |    52 +
 .../network/bind/BindDnsServerByonLiveTest.java |    44 +
 .../network/bind/BindDnsServerEc2LiveTest.java  |    62 +
 .../bind/BindDnsServerIntegrationTest.java      |   260 +
 .../network/bind/BindDnsServerLiveTest.java     |   111 +
 .../bind/BindDnsServerSoftlayerLiveTest.java    |    32 +
 .../bind/DoNothingSoftwareProcessDriver.java    |    55 +
 .../network/bind/PrefixAndIdEnricher.java       |    57 +
 .../network/bind/TestBindDnsServerImpl.java     |    89 +
 software/nosql/pom.xml                          |   300 +
 .../nosql/cassandra/CassandraCluster.java       |    30 +
 .../nosql/cassandra/CassandraClusterImpl.java   |    27 +
 .../nosql/cassandra/CassandraDatacenter.java    |   214 +
 .../cassandra/CassandraDatacenterImpl.java      |   629 +
 .../entity/nosql/cassandra/CassandraFabric.java |    80 +
 .../nosql/cassandra/CassandraFabricImpl.java    |   394 +
 .../entity/nosql/cassandra/CassandraNode.java   |   218 +
 .../nosql/cassandra/CassandraNodeDriver.java    |    47 +
 .../nosql/cassandra/CassandraNodeImpl.java      |   606 +
 .../nosql/cassandra/CassandraNodeSshDriver.java |   420 +
 .../entity/nosql/cassandra/TokenGenerator.java  |    49 +
 .../entity/nosql/cassandra/TokenGenerators.java |   192 +
 .../nosql/couchbase/CouchbaseCluster.java       |   134 +
 .../nosql/couchbase/CouchbaseClusterImpl.java   |   597 +
 .../entity/nosql/couchbase/CouchbaseNode.java   |   159 +
 .../nosql/couchbase/CouchbaseNodeDriver.java    |    41 +
 .../nosql/couchbase/CouchbaseNodeImpl.java      |   269 +
 .../nosql/couchbase/CouchbaseNodeSshDriver.java |   511 +
 .../nosql/couchbase/CouchbaseSyncGateway.java   |    75 +
 .../couchbase/CouchbaseSyncGatewayDriver.java   |    27 +
 .../couchbase/CouchbaseSyncGatewayImpl.java     |    82 +
 .../CouchbaseSyncGatewaySshDriver.java          |   167 +
 .../entity/nosql/couchdb/CouchDBCluster.java    |    48 +
 .../nosql/couchdb/CouchDBClusterImpl.java       |    50 +
 .../entity/nosql/couchdb/CouchDBNode.java       |    66 +
 .../entity/nosql/couchdb/CouchDBNodeDriver.java |    37 +
 .../entity/nosql/couchdb/CouchDBNodeImpl.java   |   109 +
 .../nosql/couchdb/CouchDBNodeSshDriver.java     |   152 +
 .../elasticsearch/ElasticSearchCluster.java     |    40 +
 .../elasticsearch/ElasticSearchClusterImpl.java |    45 +
 .../nosql/elasticsearch/ElasticSearchNode.java  |    93 +
 .../elasticsearch/ElasticSearchNodeDriver.java  |    25 +
 .../elasticsearch/ElasticSearchNodeImpl.java    |   111 +
 .../ElasticSearchNodeSshDriver.java             |   139 +
 .../nosql/hazelcast/HazelcastCluster.java       |    59 +
 .../nosql/hazelcast/HazelcastClusterImpl.java   |   125 +
 .../entity/nosql/hazelcast/HazelcastNode.java   |   101 +
 .../nosql/hazelcast/HazelcastNodeDriver.java    |    25 +
 .../nosql/hazelcast/HazelcastNodeImpl.java      |   146 +
 .../nosql/hazelcast/HazelcastNodeSshDriver.java |   164 +
 .../nosql/mongodb/AbstractMongoDBServer.java    |    66 +
 .../nosql/mongodb/AbstractMongoDBSshDriver.java |   231 +
 .../mongodb/MongoDBAuthenticationMixins.java    |    51 +
 .../mongodb/MongoDBAuthenticationUtils.java     |    79 +
 .../entity/nosql/mongodb/MongoDBClient.java     |    65 +
 .../nosql/mongodb/MongoDBClientDriver.java      |    25 +
 .../entity/nosql/mongodb/MongoDBClientImpl.java |    43 +
 .../nosql/mongodb/MongoDBClientSshDriver.java   |   146 +
 .../nosql/mongodb/MongoDBClientSupport.java     |   322 +
 .../entity/nosql/mongodb/MongoDBDriver.java     |    24 +
 .../entity/nosql/mongodb/MongoDBReplicaSet.java |    86 +
 .../nosql/mongodb/MongoDBReplicaSetImpl.java    |   465 +
 .../entity/nosql/mongodb/MongoDBServer.java     |   154 +
 .../entity/nosql/mongodb/MongoDBServerImpl.java |   227 +
 .../entity/nosql/mongodb/MongoDBSshDriver.java  |    58 +
 .../entity/nosql/mongodb/ReplicaSetConfig.java  |   277 +
 .../nosql/mongodb/ReplicaSetMemberStatus.java   |    66 +
 .../sharding/CoLocatedMongoDBRouter.java        |    59 +
 .../sharding/CoLocatedMongoDBRouterImpl.java    |    72 +
 .../mongodb/sharding/MongoDBConfigServer.java   |    27 +
 .../sharding/MongoDBConfigServerCluster.java    |    35 +
 .../MongoDBConfigServerClusterImpl.java         |    58 +
 .../sharding/MongoDBConfigServerDriver.java     |    25 +
 .../sharding/MongoDBConfigServerImpl.java       |    36 +
 .../sharding/MongoDBConfigServerSshDriver.java  |    43 +
 .../nosql/mongodb/sharding/MongoDBRouter.java   |    51 +
 .../mongodb/sharding/MongoDBRouterCluster.java  |    54 +
 .../sharding/MongoDBRouterClusterImpl.java      |   101 +
 .../mongodb/sharding/MongoDBRouterDriver.java   |    25 +
 .../mongodb/sharding/MongoDBRouterImpl.java     |    85 +
 .../sharding/MongoDBRouterSshDriver.java        |    51 +
 .../mongodb/sharding/MongoDBShardCluster.java   |    27 +
 .../sharding/MongoDBShardClusterImpl.java       |   182 +
 .../sharding/MongoDBShardedDeployment.java      |   102 +
 .../sharding/MongoDBShardedDeploymentImpl.java  |   162 +
 .../entity/nosql/redis/RedisCluster.java        |    41 +
 .../entity/nosql/redis/RedisClusterImpl.java    |   158 +
 .../brooklyn/entity/nosql/redis/RedisShard.java |    26 +
 .../entity/nosql/redis/RedisShardImpl.java      |    26 +
 .../brooklyn/entity/nosql/redis/RedisSlave.java |    42 +
 .../entity/nosql/redis/RedisSlaveImpl.java      |    34 +
 .../brooklyn/entity/nosql/redis/RedisStore.java |    73 +
 .../entity/nosql/redis/RedisStoreDriver.java    |    27 +
 .../entity/nosql/redis/RedisStoreImpl.java      |   161 +
 .../entity/nosql/redis/RedisStoreSshDriver.java |   136 +
 .../brooklyn/entity/nosql/riak/RiakCluster.java |    65 +
 .../entity/nosql/riak/RiakClusterImpl.java      |   263 +
 .../brooklyn/entity/nosql/riak/RiakNode.java    |   241 +
 .../entity/nosql/riak/RiakNodeDriver.java       |    48 +
 .../entity/nosql/riak/RiakNodeImpl.java         |   311 +
 .../entity/nosql/riak/RiakNodeSshDriver.java    |   613 +
 .../brooklyn/entity/nosql/solr/SolrServer.java  |    81 +
 .../entity/nosql/solr/SolrServerDriver.java     |    30 +
 .../entity/nosql/solr/SolrServerImpl.java       |    76 +
 .../entity/nosql/solr/SolrServerSshDriver.java  |   156 +
 .../nosql/src/main/resources/cassandra-logo.png |   Bin 0 -> 35150 bytes
 .../nosql/src/main/resources/couchbase-logo.png |   Bin 0 -> 88089 bytes
 .../nosql/src/main/resources/couchdb-logo.png   |   Bin 0 -> 7941 bytes
 .../nosql/src/main/resources/mongodb-logo.png   |   Bin 0 -> 39197 bytes
 .../entity/nosql/cassandra/cassandra-1.2.yaml   |   644 +
 .../entity/nosql/cassandra/cassandra-2.0.yaml   |   688 +
 .../cassandra/cassandra-multicloud-snitch.txt   |    33 +
 .../nosql/cassandra/cassandra-rackdc.properties |     6 +
 .../entity/nosql/couchbase/pillowfight.yaml     |    77 +
 .../brooklyn/entity/nosql/couchdb/couch.ini     |    17 +
 .../brooklyn/entity/nosql/couchdb/couch.uri     |     2 +
 .../nosql/hazelcast/hazelcast-brooklyn.xml      |    64 +
 .../entity/nosql/mongodb/default-mongod.conf    |     7 +
 .../brooklyn/entity/nosql/mongodb/default.conf  |     2 +
 .../entity/nosql/mongodb/mongodb_win.yaml       |    46 +
 .../nosql/mongodb/win/checkrunning_mongodb.ps1  |    30 +
 .../nosql/mongodb/win/configure_mongodb.ps1     |    31 +
 .../nosql/mongodb/win/install_mongodb.ps1       |    32 +
 .../entity/nosql/mongodb/win/launch_mongodb.ps1 |    26 +
 .../entity/nosql/mongodb/win/stop_mongodb.ps1   |    27 +
 .../brooklyn/entity/nosql/redis/redis.conf      |    13 +
 .../brooklyn/entity/nosql/redis/slave.conf      |    16 +
 .../brooklyn/entity/nosql/riak/app.config       |   353 +
 .../nosql/riak/riak-cluster-with-solr.yaml      |    35 +
 .../brooklyn/entity/nosql/riak/riak-mac.conf    |   494 +
 .../nosql/riak/riak-with-webapp-cluster.yaml    |    42 +
 .../entity/nosql/riak/riak-with-webapp.yaml     |    36 +
 .../apache/brooklyn/entity/nosql/riak/riak.conf |   494 +
 .../apache/brooklyn/entity/nosql/riak/riak.md   |    67 +
 .../apache/brooklyn/entity/nosql/riak/riak.png  |   Bin 0 -> 110651 bytes
 .../apache/brooklyn/entity/nosql/riak/vm.args   |    64 +
 .../apache/brooklyn/entity/nosql/solr/solr.xml  |    19 +
 .../nosql/src/main/resources/redis-logo.png     |   Bin 0 -> 34333 bytes
 software/nosql/src/main/resources/solr-logo.png |   Bin 0 -> 42902 bytes
 .../cassandra/AbstractCassandraNodeTest.java    |    40 +
 .../entity/nosql/cassandra/AstyanaxSupport.java |   330 +
 .../CassandraDatacenterIntegrationTest.java     |   150 +
 .../cassandra/CassandraDatacenterLiveTest.java  |   310 +
 ...assandraDatacenterRebindIntegrationTest.java |    97 +
 .../cassandra/CassandraDatacenterTest.java      |   224 +
 .../nosql/cassandra/CassandraFabricTest.java    |   183 +
 .../cassandra/CassandraNodeEc2LiveTest.java     |    81 +
 .../cassandra/CassandraNodeIntegrationTest.java |   189 +
 .../nosql/cassandra/CassandraNodeLiveTest.java  |    74 +
 .../cassandra/NonNegTokenGeneratorTest.java     |   116 +
 .../cassandra/PosNegTokenGeneratorTest.java     |    57 +
 .../nosql/couchbase/CouchbaseOfflineTest.java   |    61 +
 .../CouchbaseSyncGatewayEc2LiveTest.java        |   136 +
 .../nosql/couchdb/AbstractCouchDBNodeTest.java  |    53 +
 .../nosql/couchdb/CouchDBClusterLiveTest.java   |    89 +
 .../nosql/couchdb/CouchDBNodeEc2LiveTest.java   |    48 +
 .../couchdb/CouchDBNodeIntegrationTest.java     |    66 +
 .../nosql/couchdb/CouchDBNodeLiveTest.java      |    74 +
 .../entity/nosql/couchdb/JcouchdbSupport.java   |    77 +
 .../ElasticSearchClusterIntegrationTest.java    |   127 +
 .../ElasticSearchNodeIntegrationTest.java       |   111 +
 .../hazelcast/HazelcastClusterEc2LiveTest.java  |    47 +
 .../HazelcastClusterNodeIntegrationTest.java    |    49 +
 .../HazelcastClusterSoftlayerLiveTest.java      |    47 +
 .../hazelcast/HazelcastNodeIntegrationTest.java |   107 +
 .../nosql/hazelcast/HazelcastTestHelper.java    |    76 +
 .../nosql/mongodb/MongoDBEc2LiveTest.java       |    84 +
 .../nosql/mongodb/MongoDBIntegrationTest.java   |    90 +
 .../mongodb/MongoDBRebindIntegrationTest.java   |    59 +
 .../mongodb/MongoDBReplicaSetEc2LiveTest.java   |    95 +
 .../MongoDBReplicaSetIntegrationTest.java       |   205 +
 .../mongodb/MongoDBRestartIntegrationTest.java  |    42 +
 .../nosql/mongodb/MongoDBSoftLayerLiveTest.java |    55 +
 .../entity/nosql/mongodb/MongoDBTestHelper.java |   123 +
 .../nosql/mongodb/MongoDBWinEc2LiveTest.java    |   138 +
 .../nosql/mongodb/ReplicaSetConfigTest.java     |   240 +
 .../MongoDBConfigServerIntegrationTest.java     |    65 +
 .../MongoDBShardedDeploymentEc2LiveTest.java    |    82 +
 ...MongoDBShardedDeploymentIntegrationTest.java |   128 +
 .../entity/nosql/redis/JedisSupport.java        |    77 +
 .../redis/RedisClusterIntegrationTest.java      |   108 +
 .../entity/nosql/redis/RedisEc2LiveTest.java    |    91 +
 .../nosql/redis/RedisIntegrationTest.java       |   118 +
 .../nosql/riak/RiakClusterEc2LiveTest.java      |    73 +
 .../entity/nosql/riak/RiakNodeEc2LiveTest.java  |    74 +
 .../riak/RiakNodeGoogleComputeLiveTest.java     |    61 +
 .../nosql/riak/RiakNodeIntegrationTest.java     |   230 +
 .../nosql/riak/RiakNodeSoftlayerLiveTest.java   |    44 +
 .../nosql/solr/AbstractSolrServerTest.java      |    40 +
 .../entity/nosql/solr/SolrJSupport.java         |    66 +
 .../nosql/solr/SolrServerEc2LiveTest.java       |    65 +
 .../nosql/solr/SolrServerIntegrationTest.java   |    84 +
 .../entity/nosql/solr/SolrServerLiveTest.java   |    89 +
 .../nosql/src/test/resources/mongodb-keyfile    |    16 +
 .../nosql/src/test/resources/solr/example.tgz   |   Bin 0 -> 20655 bytes
 .../nosql/src/test/resources/solr/example.txt   |    18 +
 .../test/resources/solr/example/conf/schema.xml |    50 +
 .../resources/solr/example/conf/solrconfig.xml  |  1791 ++
 .../test/resources/solr/example/core.properties |    19 +
 .../resources/test-mongodb-configserver.conf    |     6 +
 .../src/test/resources/test-mongodb-router.conf |     6 +
 .../nosql/src/test/resources/test-mongodb.conf  |    21 +
 software/osgi/pom.xml                           |   127 +
 .../entity/osgi/karaf/KarafContainer.java       |   137 +
 .../entity/osgi/karaf/KarafContainerImpl.java   |   297 +
 .../brooklyn/entity/osgi/karaf/KarafDriver.java |    30 +
 .../entity/osgi/karaf/KarafSshDriver.java       |   149 +
 .../osgi/src/main/java/org/osgi/jmx/Item.java   |   200 +
 .../main/java/org/osgi/jmx/JmxConstants.java    |   318 +
 software/osgi/src/main/resources/karaf-logo.png |   Bin 0 -> 26072 bytes
 .../osgi/karaf/KarafContainerEc2LiveTest.java   |    52 +
 .../entity/osgi/karaf/KarafContainerTest.java   |   146 +
 .../osgi/src/test/resources/hello-world.jar     |   Bin 0 -> 2088 bytes
 .../osgi/src/test/resources/hello-world.txt     |    26 +
 software/webapp/pom.xml                         |   193 +
 .../entity/dns/AbstractGeoDnsService.java       |    74 +
 .../entity/dns/AbstractGeoDnsServiceImpl.java   |   392 +
 .../dns/geoscaling/GeoscalingDnsService.java    |    86 +
 .../geoscaling/GeoscalingDnsServiceImpl.java    |   201 +
 .../geoscaling/GeoscalingScriptGenerator.java   |    79 +
 .../dns/geoscaling/GeoscalingWebClient.java     |   458 +
 .../entity/proxy/AbstractController.java        |    74 +
 .../entity/proxy/AbstractControllerImpl.java    |   515 +
 .../proxy/AbstractNonProvisionedController.java |    28 +
 .../AbstractNonProvisionedControllerImpl.java   |   276 +
 .../brooklyn/entity/proxy/LoadBalancer.java     |   124 +
 .../entity/proxy/LoadBalancerCluster.java       |    37 +
 .../entity/proxy/LoadBalancerClusterImpl.java   |    76 +
 .../brooklyn/entity/proxy/ProxySslConfig.java   |   218 +
 .../proxy/nginx/NginxConfigFileGenerator.java   |    33 +
 .../entity/proxy/nginx/NginxController.java     |   145 +
 .../entity/proxy/nginx/NginxControllerImpl.java |   369 +
 .../nginx/NginxDefaultConfigGenerator.java      |   257 +
 .../entity/proxy/nginx/NginxDriver.java         |    31 +
 .../entity/proxy/nginx/NginxSshDriver.java      |   476 +
 .../nginx/NginxTemplateConfigGenerator.java     |    82 +
 .../brooklyn/entity/proxy/nginx/UrlMapping.java |   102 +
 .../entity/proxy/nginx/UrlMappingImpl.java      |   222 +
 .../entity/proxy/nginx/UrlRewriteRule.java      |    74 +
 .../webapp/ControlledDynamicWebAppCluster.java  |   113 +
 .../ControlledDynamicWebAppClusterImpl.java     |   330 +
 .../entity/webapp/DynamicWebAppCluster.java     |    69 +
 .../entity/webapp/DynamicWebAppClusterImpl.java |   262 +
 .../entity/webapp/DynamicWebAppFabric.java      |    48 +
 .../entity/webapp/DynamicWebAppFabricImpl.java  |    83 +
 .../entity/webapp/ElasticJavaWebAppService.java |    60 +
 .../webapp/FilenameToWebContextMapper.java      |    92 +
 .../brooklyn/entity/webapp/HttpsSslConfig.java  |    74 +
 .../entity/webapp/JavaWebAppDriver.java         |    54 +
 .../entity/webapp/JavaWebAppService.java        |   109 +
 .../webapp/JavaWebAppSoftwareProcess.java       |    34 +
 .../webapp/JavaWebAppSoftwareProcessImpl.java   |   205 +
 .../entity/webapp/JavaWebAppSshDriver.java      |   205 +
 .../brooklyn/entity/webapp/WebAppService.java   |    24 +
 .../entity/webapp/WebAppServiceConstants.java   |    61 +
 .../entity/webapp/WebAppServiceMethods.java     |    89 +
 .../entity/webapp/WebAppServiceMetrics.java     |    77 +
 .../entity/webapp/jboss/JBoss6Driver.java       |    24 +
 .../entity/webapp/jboss/JBoss6Server.java       |    62 +
 .../entity/webapp/jboss/JBoss6ServerImpl.java   |   114 +
 .../entity/webapp/jboss/JBoss6SshDriver.java    |   242 +
 .../entity/webapp/jboss/JBoss7Driver.java       |    30 +
 .../entity/webapp/jboss/JBoss7Server.java       |   111 +
 .../entity/webapp/jboss/JBoss7ServerImpl.java   |   214 +
 .../entity/webapp/jboss/JBoss7SshDriver.java    |   274 +
 .../entity/webapp/jetty/Jetty6Driver.java       |    24 +
 .../entity/webapp/jetty/Jetty6Server.java       |    60 +
 .../entity/webapp/jetty/Jetty6ServerImpl.java   |   142 +
 .../entity/webapp/jetty/Jetty6SshDriver.java    |   173 +
 .../webapp/nodejs/NodeJsWebAppDriver.java       |    29 +
 .../webapp/nodejs/NodeJsWebAppService.java      |    74 +
 .../webapp/nodejs/NodeJsWebAppServiceImpl.java  |    91 +
 .../webapp/nodejs/NodeJsWebAppSshDriver.java    |   184 +
 .../entity/webapp/tomcat/Tomcat7Driver.java     |    23 +
 .../entity/webapp/tomcat/Tomcat7SshDriver.java  |    29 +
 .../entity/webapp/tomcat/Tomcat8Server.java     |    55 +
 .../entity/webapp/tomcat/Tomcat8ServerImpl.java |    26 +
 .../entity/webapp/tomcat/TomcatDriver.java      |    24 +
 .../entity/webapp/tomcat/TomcatServer.java      |    87 +
 .../entity/webapp/tomcat/TomcatServerImpl.java  |   125 +
 .../entity/webapp/tomcat/TomcatSshDriver.java   |   173 +
 .../webapp/src/main/resources/jboss_logo.png    |   Bin 0 -> 23207 bytes
 .../webapp/src/main/resources/jetty-logo.png    |   Bin 0 -> 8870 bytes
 .../webapp/src/main/resources/nginx-logo.jpeg   |   Bin 0 -> 4546 bytes
 .../webapp/src/main/resources/nodejs-logo.png   |   Bin 0 -> 9620 bytes
 .../brooklyn/entity/dns/geoscaling/template.php |    68 +
 .../brooklyn/entity/proxy/nginx/server.conf     |    84 +
 .../entity/webapp/jboss/jboss7-standalone.xml   |   311 +
 .../entity/webapp/jetty/jetty-brooklyn.xml      |    41 +
 .../entity/webapp/sample-java-keystore.jks      |   Bin 0 -> 1355 bytes
 .../entity/webapp/sample-java-keystore.txt      |    22 +
 .../brooklyn/entity/webapp/tomcat/server.xml    |   206 +
 .../entity/webapp/tomcat/tomcat8-server.xml     |   149 +
 .../entity/webapp/tomcat/tomcat8-web.xml        |  4615 ++++
 .../brooklyn/entity/webapp/tomcat/web.xml       |  4615 ++++
 .../webapp/src/main/resources/tomcat-logo.png   |   Bin 0 -> 18612 bytes
 .../entity/dns/AbstractGeoDnsServiceTest.java   |   345 +
 .../dns/geoscaling/GeoDnsServiceYamlTest.java   |    45 +
 .../geoscaling/GeoscalingIntegrationTest.java   |   222 +
 .../GeoscalingScriptGeneratorTest.java          |    57 +
 .../dns/geoscaling/GeoscalingWebClientTest.java |   199 +
 .../entity/proxy/AbstractControllerTest.java    |   360 +
 .../entity/proxy/ProxySslConfigTest.java        |    60 +
 .../brooklyn/entity/proxy/StubAppServer.java    |    86 +
 .../proxy/TrackingAbstractController.java       |    30 +
 .../proxy/TrackingAbstractControllerImpl.java   |    67 +
 .../brooklyn/entity/proxy/UrlMappingTest.java   |   215 +
 .../nginx/NginxClusterIntegrationTest.java      |   238 +
 .../entity/proxy/nginx/NginxEc2LiveTest.java    |    71 +
 .../nginx/NginxHttpsSslIntegrationTest.java     |   237 +
 .../proxy/nginx/NginxIntegrationTest.java       |   452 +
 .../proxy/nginx/NginxLightIntegrationTest.java  |    72 +
 .../proxy/nginx/NginxRebindIntegrationTest.java |   368 +
 .../nginx/NginxRebindWithHaIntegrationTest.java |   180 +
 .../nginx/NginxUrlMappingIntegrationTest.java   |   503 +
 .../proxy/nginx/NginxWebClusterEc2LiveTest.java |   115 +
 .../AbstractWebAppFixtureIntegrationTest.java   |   539 +
 ...lledDynamicWebAppClusterIntegrationTest.java |   181 +
 .../ControlledDynamicWebAppClusterTest.java     |   210 +
 .../entity/webapp/DynamicWebAppClusterTest.java |   130 +
 .../entity/webapp/DynamicWebAppFabricTest.java  |   123 +
 .../webapp/ElasticCustomLocationTest.java       |    89 +
 ...ElasticJavaWebAppServiceIntegrationTest.java |    68 +
 .../webapp/FilenameToWebContextMapperTest.java  |    86 +
 .../entity/webapp/HttpsSslConfigTest.java       |    38 +
 .../webapp/TomcatAutoScalerPolicyTest.java      |   123 +
 .../webapp/WebAppConcurrentDeployTest.java      |   102 +
 .../webapp/WebAppLiveIntegrationTest.java       |    91 +
 ...namicWebAppClusterRebindIntegrationTest.java |   197 +
 ...namicWebAppClusterRebindIntegrationTest.java |   188 +
 .../jboss/JBoss6ServerAwsEc2LiveTest.java       |    98 +
 ...Boss6ServerNonInheritingIntegrationTest.java |   100 +
 .../webapp/jboss/JBoss7PasswordHashingTest.java |    62 +
 .../jboss/JBoss7ServerAwsEc2LiveTest.java       |   104 +
 .../jboss/JBoss7ServerDockerLiveTest.java       |    74 +
 ...Boss7ServerNonInheritingIntegrationTest.java |   187 +
 .../JBoss7ServerRebindingIntegrationTest.java   |   124 +
 ...ultiVersionWebAppFixtureIntegrationTest.java |   105 +
 .../Jboss7ServerGoogleComputeLiveTest.java      |    75 +
 .../JettyWebAppFixtureIntegrationTest.java      |    59 +
 .../webapp/nodejs/NodeJsWebAppEc2LiveTest.java  |    59 +
 .../NodeJsWebAppFixtureIntegrationTest.java     |   174 +
 .../NodeJsWebAppSimpleIntegrationTest.java      |    81 +
 .../nodejs/NodeJsWebAppSoftlayerLiveTest.java   |    58 +
 .../webapp/tomcat/Tomcat8ServerEc2LiveTest.java |    65 +
 .../Tomcat8ServerRestartIntegrationTest.java    |    44 +
 .../tomcat/Tomcat8ServerSoftlayerLiveTest.java  |    74 +
 ...mcat8ServerWebAppFixtureIntegrationTest.java |   174 +
 ...ableRetrieveUsageMetricsIntegrationTest.java |    64 +
 .../webapp/tomcat/TomcatServerEc2LiveTest.java  |   101 +
 .../TomcatServerRestartIntegrationTest.java     |    44 +
 .../tomcat/TomcatServerSoftlayerLiveTest.java   |    75 +
 ...omcatServerWebAppFixtureIntegrationTest.java |   154 +
 .../test/entity/TestJavaWebAppEntity.java       |    77 +
 .../test/entity/TestJavaWebAppEntityImpl.java   |    61 +
 .../entity/dns/geoscaling/expectedScript.php    |    79 +
 .../brooklyn/entity/dns/geoscaling/geodns.yaml  |    42 +
 .../webapp/nodejs/nodejs-hello-world.yaml       |    31 +
 .../test/resources/ssl/certs/localhost/info.txt |     2 +
 .../resources/ssl/certs/localhost/server.crt    |    17 +
 .../resources/ssl/certs/localhost/server.csr    |    12 +
 .../resources/ssl/certs/localhost/server.key    |    15 +
 .../ssl/certs/localhost/server.key.org          |    18 +
 1580 files changed, 125191 insertions(+), 125689 deletions(-)
----------------------------------------------------------------------



[24/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlRestartIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlRestartIntegrationTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlRestartIntegrationTest.java
deleted file mode 100644
index 185fec3..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlRestartIntegrationTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessRestartIntegrationTest;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-/**
- * Tests restart of the software *process* (as opposed to the VM).
- */
-@Test(groups="Integration")
-public class PostgreSqlRestartIntegrationTest extends AbstractSoftwareProcessRestartIntegrationTest {
-    
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(PostgreSqlRestartIntegrationTest.class);
-
-    @Override
-    protected EntitySpec<? extends SoftwareProcess> newEntitySpec() {
-        return EntitySpec.create(PostgreSqlNode.class);
-    }
-    
-    // TODO The second start() will fail because customize operations forbidden while there is existing data:
-    //      "If you want to create a new database system, either remove or empty".
-    // I haven't checked whether it damaged the data in the database though!
-    @Test(enabled=false, groups={"Integration", "WIP"})
-    public void testStopProcessAndStart() throws Exception {
-        super.testStopProcessAndStart();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepEc2LiveTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepEc2LiveTest.java
deleted file mode 100644
index 8ded942..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepEc2LiveTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.rubyrep;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.postgresql.PostgreSqlIntegrationTest;
-import org.apache.brooklyn.entity.database.postgresql.PostgreSqlNode;
-
-public class RubyRepEc2LiveTest extends AbstractEc2LiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        PostgreSqlNode db1 = app.createAndManageChild(EntitySpec.create(PostgreSqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, PostgreSqlIntegrationTest.CREATION_SCRIPT)
-                .configure(PostgreSqlNode.POSTGRESQL_PORT, PortRanges.fromInteger(9111)));
-
-        PostgreSqlNode db2 = app.createAndManageChild(EntitySpec.create(PostgreSqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, PostgreSqlIntegrationTest.CREATION_SCRIPT)
-                .configure(PostgreSqlNode.POSTGRESQL_PORT, PortRanges.fromInteger(9111)));
-
-        RubyRepIntegrationTest.startInLocation(app, db1, db2, loc);
-        RubyRepIntegrationTest.testReplication(db1, db2);
-    }
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_Debian_6() throws Exception { } // Disabled because PostgreSql 9.1 not available
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_Ubuntu_10_0() throws Exception { } // Disabled because PostgreSql 9.1 not available
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_Debian_7_2() throws Exception { } // Diabling all except Ubuntu 12.0 temporarily
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_CentOS_6_3() throws Exception { } // Diabling all except Ubuntu 12.0 temporarily
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_CentOS_5() throws Exception { } // Diabling all except Ubuntu 12.0 temporarily
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_Red_Hat_Enterprise_Linux_6() throws Exception { } // Diabling all except Ubuntu 12.0 temporarily
-
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this really does have test methods  
-}
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepIntegrationTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepIntegrationTest.java
deleted file mode 100644
index 7127334..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepIntegrationTest.java
+++ /dev/null
@@ -1,470 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.rubyrep;
-
-import static org.testng.Assert.assertEquals;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.mgmt.ManagementContext;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.internal.BrooklynProperties;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.entity.database.mysql.MySqlIntegrationTest;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode;
-import org.apache.brooklyn.entity.database.postgresql.PostgreSqlIntegrationTest;
-import org.apache.brooklyn.entity.database.postgresql.PostgreSqlNode;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-public class RubyRepIntegrationTest {
-
-    public static final Logger log = LoggerFactory.getLogger(RubyRepIntegrationTest.class);
-    protected BrooklynProperties brooklynProperties;
-    protected ManagementContext managementContext;
-    protected TestApplication tapp;
-    
-    @BeforeMethod(alwaysRun = true)
-    public void setUp() {
-        brooklynProperties = BrooklynProperties.Factory.newDefault();
-        managementContext = new LocalManagementContext(brooklynProperties);
-        tapp = ApplicationBuilder.newManagedApp(TestApplication.class, managementContext);
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void tearDown() {
-        Entities.destroyAllCatching(managementContext);
-    }
-
-    /*
-        Exception org.apache.brooklyn.util.exceptions.PropagatedRuntimeException
-        
-        Message: (none)
-        Stacktrace:
-        
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:103)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:353)
-        at org.apache.brooklyn.util.core.task.DynamicTasks$TaskQueueingResult.andWaitForSuccess(DynamicTasks.java:159)
-        at org.apache.brooklyn.core.objs.proxy.EntityProxyImpl.invoke(EntityProxyImpl.java:211)
-        at com.sun.proxy.$Proxy49.start(Unknown Source)
-        at org.apache.brooklyn.entity.database.rubyrep.RubyRepIntegrationTest.startInLocation(RubyRepIntegrationTest.java:139)
-        at org.apache.brooklyn.entity.database.rubyrep.RubyRepIntegrationTest.startInLocation(RubyRepIntegrationTest.java:119)
-        at org.apache.brooklyn.entity.database.rubyrep.RubyRepIntegrationTest.test_localhost_mysql(RubyRepIntegrationTest.java:80)
-        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-        at java.lang.reflect.Method.invoke(Method.java:606)
-        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
-        at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
-        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
-        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
-        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
-        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
-        at org.testng.TestRunner.privateRun(TestRunner.java:767)
-        at org.testng.TestRunner.run(TestRunner.java:617)
-        at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
-        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
-        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
-        at org.testng.SuiteRunner.run(SuiteRunner.java:254)
-        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
-        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
-        at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
-        at org.testng.TestNG.run(TestNG.java:1057)
-        at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:115)
-        at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:205)
-        at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)
-        at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
-        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
-        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
-        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at Application[r1CKCG7x]: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 1 of 3 parallel child tasks failed: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=pePPOzBw}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=pePPOzBw} did not pass is-running check within the required 2m limit (2m 2s elapsed)
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:351)
-        ... 34 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at Application[r1CKCG7x]: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 1 of 3 parallel child tasks failed: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=pePPOzBw}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=pePPOzBw} did not pass is-running check within the required 2m limit (2m 2s elapsed)
-        at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.handleEffectorException(EffectorUtils.java:270)
-        at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:255)
-        at org.apache.brooklyn.core.effector.MethodEffector.call(MethodEffector.java:149)
-        at org.apache.brooklyn.core.entity.trait.Startable$StartEffectorBody.call(Startable.java:56)
-        at org.apache.brooklyn.core.entity.trait.Startable$StartEffectorBody.call(Startable.java:50)
-        at org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:468)
-        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
-        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
-        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
-        at java.lang.Thread.run(Thread.java:745)
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 1 of 3 parallel child tasks failed: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=pePPOzBw}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=pePPOzBw} did not pass is-running check within the required 2m limit (2m 2s elapsed)
-        at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:332)
-        at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:250)
-        ... 10 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 1 of 3 parallel child tasks failed: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=pePPOzBw}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=pePPOzBw} did not pass is-running check within the required 2m limit (2m 2s elapsed)
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:103)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:353)
-        at org.apache.brooklyn.core.entity.trait.StartableMethods.start(StartableMethods.java:53)
-        at org.apache.brooklyn.core.entity.AbstractApplication.doStart(AbstractApplication.java:178)
-        at org.apache.brooklyn.core.entity.AbstractApplication.start(AbstractApplication.java:155)
-        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-        at java.lang.reflect.Method.invoke(Method.java:606)
-        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
-        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
-        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1085)
-        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
-        at groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
-        at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
-        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
-        at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
-        at org.apache.brooklyn.util.groovy.GroovyJavaMethods.invokeMethodOnMetaClass(GroovyJavaMethods.java:191)
-        at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:304)
-        at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:328)
-        ... 11 more
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 1 of 3 parallel child tasks failed: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=pePPOzBw}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=pePPOzBw} did not pass is-running check within the required 2m limit (2m 2s elapsed)
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:351)
-        ... 29 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 1 of 3 parallel child tasks failed: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=pePPOzBw}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=pePPOzBw} did not pass is-running check within the required 2m limit (2m 2s elapsed)
-        at org.apache.brooklyn.util.exceptions.Exceptions.create(Exceptions.java:299)
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:287)
-        at org.apache.brooklyn.util.core.task.ParallelTask.runJobs(ParallelTask.java:81)
-        at org.apache.brooklyn.util.core.task.CompoundTask$1.call(CompoundTask.java:81)
-        at org.apache.brooklyn.util.core.task.CompoundTask$1.call(CompoundTask.java:79)
-        ... 5 more
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=pePPOzBw}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=pePPOzBw} did not pass is-running check within the required 2m limit (2m 2s elapsed)
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.ParallelTask.runJobs(ParallelTask.java:63)
-        ... 7 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=pePPOzBw}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=pePPOzBw} did not pass is-running check within the required 2m limit (2m 2s elapsed)
-        at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.handleEffectorException(EffectorUtils.java:270)
-        at org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$2.handleException(EffectorTasks.java:90)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask.handleException(DynamicSequentialTask.java:452)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:400)
-        ... 5 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=pePPOzBw} did not pass is-running check within the required 2m limit (2m 2s elapsed)
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:103)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:353)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask.drain(DynamicSequentialTask.java:475)
-        at org.apache.brooklyn.util.core.task.DynamicTasks.drain(DynamicTasks.java:313)
-        at org.apache.brooklyn.util.core.task.DynamicTasks.waitForLast(DynamicTasks.java:302)
-        at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks.start(MachineLifecycleEffectorTasks.java:314)
-        at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$StartEffectorBody.call(MachineLifecycleEffectorTasks.java:214)
-        at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$StartEffectorBody.call(MachineLifecycleEffectorTasks.java:201)
-        at org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:342)
-        ... 5 more
-        Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=pePPOzBw} did not pass is-running check within the required 2m limit (2m 2s elapsed)
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:351)
-        ... 13 more
-        Caused by: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=pePPOzBw} did not pass is-running check within the required 2m limit (2m 2s elapsed)
-        at org.apache.brooklyn.entity.software.base.SoftwareProcessImpl.waitForEntityStart(SoftwareProcessImpl.java:592)
-        at org.apache.brooklyn.entity.software.base.SoftwareProcessImpl.postDriverStart(SoftwareProcessImpl.java:266)
-        at org.apache.brooklyn.entity.software.base.SoftwareProcessDriverLifecycleEffectorTasks.postStartCustom(SoftwareProcessDriverLifecycleEffectorTasks.java:169)
-        at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$PostStartTask.run(MachineLifecycleEffectorTasks.java:572)
-        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
-        ... 6 more
-     */
-    @Test(groups = {"Integration","Broken"})
-    public void test_localhost_mysql() throws Exception {
-        MySqlNode db1 = tapp.createAndManageChild(EntitySpec.create(MySqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, MySqlIntegrationTest.CREATION_SCRIPT)
-                .configure("test.table.name", "COMMENTS")
-                .configure(MySqlNode.MYSQL_PORT, PortRanges.fromInteger(9111)));
-
-        MySqlNode db2 = tapp.createAndManageChild(EntitySpec.create(MySqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, MySqlIntegrationTest.CREATION_SCRIPT)
-                .configure("test.table.name", "COMMENTS")
-                .configure(MySqlNode.MYSQL_PORT, PortRanges.fromInteger(9112)));
-
-
-        startInLocation(tapp, db1, db2, new LocalhostMachineProvisioningLocation());
-        testReplication(db1, db2);
-    }
-
-    /*
-        Exception org.apache.brooklyn.util.exceptions.PropagatedRuntimeException
-        
-        Message: (none)
-        Stacktrace:
-        
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:103)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:353)
-        at org.apache.brooklyn.util.core.task.DynamicTasks$TaskQueueingResult.andWaitForSuccess(DynamicTasks.java:159)
-        at org.apache.brooklyn.core.objs.proxy.EntityProxyImpl.invoke(EntityProxyImpl.java:211)
-        at com.sun.proxy.$Proxy53.start(Unknown Source)
-        at org.apache.brooklyn.entity.database.rubyrep.RubyRepIntegrationTest.startInLocation(RubyRepIntegrationTest.java:139)
-        at org.apache.brooklyn.entity.database.rubyrep.RubyRepIntegrationTest.test_localhost_postgres(RubyRepIntegrationTest.java:98)
-        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-        at java.lang.reflect.Method.invoke(Method.java:606)
-        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
-        at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
-        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
-        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
-        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
-        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
-        at org.testng.TestRunner.privateRun(TestRunner.java:767)
-        at org.testng.TestRunner.run(TestRunner.java:617)
-        at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
-        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
-        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
-        at org.testng.SuiteRunner.run(SuiteRunner.java:254)
-        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
-        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
-        at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
-        at org.testng.TestNG.run(TestNG.java:1057)
-        at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:115)
-        at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:205)
-        at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)
-        at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
-        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
-        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
-        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at Application[OTSda29h]: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 1 of 2 parallel child tasks failed: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=VhsCCM9k}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=VhsCCM9k} did not pass is-running check within the required 2m limit (2m 1s elapsed)
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:351)
-        ... 33 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at Application[OTSda29h]: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 1 of 2 parallel child tasks failed: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=VhsCCM9k}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=VhsCCM9k} did not pass is-running check within the required 2m limit (2m 1s elapsed)
-        at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.handleEffectorException(EffectorUtils.java:270)
-        at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:255)
-        at org.apache.brooklyn.core.effector.MethodEffector.call(MethodEffector.java:149)
-        at org.apache.brooklyn.core.entity.trait.Startable$StartEffectorBody.call(Startable.java:56)
-        at org.apache.brooklyn.core.entity.trait.Startable$StartEffectorBody.call(Startable.java:50)
-        at org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:468)
-        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
-        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
-        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
-        at java.lang.Thread.run(Thread.java:745)
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 1 of 2 parallel child tasks failed: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=VhsCCM9k}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=VhsCCM9k} did not pass is-running check within the required 2m limit (2m 1s elapsed)
-        at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:332)
-        at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:250)
-        ... 10 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 1 of 2 parallel child tasks failed: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=VhsCCM9k}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=VhsCCM9k} did not pass is-running check within the required 2m limit (2m 1s elapsed)
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:103)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:353)
-        at org.apache.brooklyn.core.entity.trait.StartableMethods.start(StartableMethods.java:53)
-        at org.apache.brooklyn.core.entity.AbstractApplication.doStart(AbstractApplication.java:178)
-        at org.apache.brooklyn.core.entity.AbstractApplication.start(AbstractApplication.java:155)
-        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-        at java.lang.reflect.Method.invoke(Method.java:606)
-        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
-        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
-        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1085)
-        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
-        at groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
-        at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
-        at org.apache.brooklyn.util.groovy.GroovyJavaMethods.invokeMethodOnMetaClass(GroovyJavaMethods.java:191)
-        at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:304)
-        at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:328)
-        ... 11 more
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 1 of 2 parallel child tasks failed: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=VhsCCM9k}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=VhsCCM9k} did not pass is-running check within the required 2m limit (2m 1s elapsed)
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:351)
-        ... 27 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 1 of 2 parallel child tasks failed: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=VhsCCM9k}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=VhsCCM9k} did not pass is-running check within the required 2m limit (2m 1s elapsed)
-        at org.apache.brooklyn.util.exceptions.Exceptions.create(Exceptions.java:299)
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:287)
-        at org.apache.brooklyn.util.core.task.ParallelTask.runJobs(ParallelTask.java:81)
-        at org.apache.brooklyn.util.core.task.CompoundTask$1.call(CompoundTask.java:81)
-        at org.apache.brooklyn.util.core.task.CompoundTask$1.call(CompoundTask.java:79)
-        ... 5 more
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=VhsCCM9k}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=VhsCCM9k} did not pass is-running check within the required 2m limit (2m 1s elapsed)
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.ParallelTask.runJobs(ParallelTask.java:63)
-        ... 7 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RubyRepNodeImpl{id=VhsCCM9k}: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=VhsCCM9k} did not pass is-running check within the required 2m limit (2m 1s elapsed)
-        at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.handleEffectorException(EffectorUtils.java:270)
-        at org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$2.handleException(EffectorTasks.java:90)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask.handleException(DynamicSequentialTask.java:452)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:400)
-        ... 5 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=VhsCCM9k} did not pass is-running check within the required 2m limit (2m 1s elapsed)
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:103)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:353)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask.drain(DynamicSequentialTask.java:475)
-        at org.apache.brooklyn.util.core.task.DynamicTasks.drain(DynamicTasks.java:313)
-        at org.apache.brooklyn.util.core.task.DynamicTasks.waitForLast(DynamicTasks.java:302)
-        at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks.start(MachineLifecycleEffectorTasks.java:314)
-        at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$StartEffectorBody.call(MachineLifecycleEffectorTasks.java:214)
-        at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$StartEffectorBody.call(MachineLifecycleEffectorTasks.java:201)
-        at org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:342)
-        ... 5 more
-        Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=VhsCCM9k} did not pass is-running check within the required 2m limit (2m 1s elapsed)
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:351)
-        ... 13 more
-        Caused by: java.lang.IllegalStateException: Software process entity RubyRepNodeImpl{id=VhsCCM9k} did not pass is-running check within the required 2m limit (2m 1s elapsed)
-        at org.apache.brooklyn.entity.software.base.SoftwareProcessImpl.waitForEntityStart(SoftwareProcessImpl.java:592)
-        at org.apache.brooklyn.entity.software.base.SoftwareProcessImpl.postDriverStart(SoftwareProcessImpl.java:266)
-        at org.apache.brooklyn.entity.software.base.SoftwareProcessDriverLifecycleEffectorTasks.postStartCustom(SoftwareProcessDriverLifecycleEffectorTasks.java:169)
-        at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$PostStartTask.run(MachineLifecycleEffectorTasks.java:572)
-        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
-        ... 6 more
-     */
-    /**
-     * Altered to use a single postgresql server to avoid issues with shared memory limits
-     */
-    @Test(groups = {"Integration","Broken"})
-    public void test_localhost_postgres() throws Exception {
-        String createTwoDbsScript = PostgreSqlIntegrationTest.CREATION_SCRIPT +
-                PostgreSqlIntegrationTest.CREATION_SCRIPT.replaceAll("CREATE USER.*", "").replaceAll(" feedback", " feedback1");
-
-        PostgreSqlNode db1 = tapp.createAndManageChild(EntitySpec.create(PostgreSqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, createTwoDbsScript)
-                .configure(PostgreSqlNode.POSTGRESQL_PORT, PortRanges.fromInteger(9113))
-                .configure(PostgreSqlNode.MAX_CONNECTIONS, 10)
-                .configure(PostgreSqlNode.SHARED_MEMORY, "512kB")); // Very low so kernel configuration not needed
-
-        startInLocation(tapp, db1, "feedback", db1, "feedback1", new LocalhostMachineProvisioningLocation());
-        testReplication(db1, "feedback", db1, "feedback1");
-    }
-
-    @Test(enabled = false, groups = "Integration") // TODO this doesn't appear to be supported by RubyRep
-    public void test_localhost_postgres_mysql() throws Exception {
-        PostgreSqlNode db1 = tapp.createAndManageChild(EntitySpec.create(PostgreSqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, PostgreSqlIntegrationTest.CREATION_SCRIPT)
-                .configure(PostgreSqlNode.POSTGRESQL_PORT, PortRanges.fromInteger(9115))
-                .configure(PostgreSqlNode.MAX_CONNECTIONS, 10)
-                .configure(PostgreSqlNode.SHARED_MEMORY, "512kB")); // Very low so kernel configuration not needed
-
-        MySqlNode db2 = tapp.createAndManageChild(EntitySpec.create(MySqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, MySqlIntegrationTest.CREATION_SCRIPT)
-                .configure(MySqlNode.MYSQL_PORT, PortRanges.fromInteger(9116)));
-
-        startInLocation(tapp, db1, db2, new LocalhostMachineProvisioningLocation());
-        testReplication(db1, db2);
-    }
-
-    public static void startInLocation(TestApplication tapp, DatastoreCommon db1, DatastoreCommon db2, Location... locations) throws Exception {
-        startInLocation(tapp, db1, "feedback", db2, "feedback", locations);
-    }
-
-    /**
-     * Configures rubyrep to connect to the two databases and starts the app
-     */
-    public static void startInLocation(TestApplication tapp, DatastoreCommon db1, String dbName1, DatastoreCommon db2, String dbName2, Location... locations) throws Exception {
-        tapp.createAndManageChild(EntitySpec.create(RubyRepNode.class)
-                .configure("startupTimeout", 300)
-                .configure("leftDatabase", db1)
-                .configure("rightDatabase", db2)
-                .configure("leftUsername", "sqluser")
-                .configure("rightUsername", "sqluser")
-                .configure("rightPassword", "sqluserpw")
-                .configure("leftPassword", "sqluserpw")
-                .configure("leftDatabaseName", dbName1)
-                .configure("rightDatabaseName", dbName2)
-                .configure("replicationInterval", 1)
-        );
-
-        tapp.start(Arrays.asList(locations));
-    }
-
-    public static void testReplication(DatastoreCommon db1, DatastoreCommon db2) throws Exception {
-        testReplication(db1, "feedback", db2, "feedback");
-    }
-
-    /**
-     * Tests replication between the two databases by altering the first and checking the change is applied to the second
-     */
-    public static void testReplication(DatastoreCommon db1, String dbName1, DatastoreCommon db2, String dbName2) throws Exception {
-        String db1Url = db1.getAttribute(DatastoreCommon.DATASTORE_URL);
-        String db2Url = db2.getAttribute(DatastoreCommon.DATASTORE_URL);
-
-        log.info("Testing replication between " + db1Url + " and " + db2Url);
-
-        VogellaExampleAccess vea1 = new VogellaExampleAccess(db1 instanceof MySqlNode ? "com.mysql.jdbc.Driver" : "org.postgresql.Driver", db1Url, dbName1);
-        VogellaExampleAccess vea2 = new VogellaExampleAccess(db2 instanceof MySqlNode ? "com.mysql.jdbc.Driver" : "org.postgresql.Driver", db2Url, dbName2);
-
-        try {
-            vea1.connect();
-            List<List<String>> rs = vea1.readDataBase();
-            assertEquals(rs.size(), 1);
-
-            vea2.connect();
-            rs = vea2.readDataBase();
-            assertEquals(rs.size(), 1);
-
-            log.info("Modifying left database");
-            vea1.modifyDataBase();
-
-            log.info("Reading left database");
-            rs = vea1.readDataBase();
-            assertEquals(rs.size(), 2);
-
-            log.info("Reading right database");
-            rs = vea2.readDataBase();
-
-            for (int i = 0; i < 60 && rs.size() != 2; i++) {
-                log.info("Sleeping for a second");
-                Thread.sleep(1000);
-                rs = vea2.readDataBase();
-            }
-
-            assertEquals(rs.size(), 2);
-        } finally {
-            vea1.close();
-            vea2.close();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepRackspaceLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepRackspaceLiveTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepRackspaceLiveTest.java
deleted file mode 100644
index f6a77b0..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepRackspaceLiveTest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.rubyrep;
-
-import java.util.Arrays;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.postgresql.PostgreSqlIntegrationTest;
-import org.apache.brooklyn.entity.database.postgresql.PostgreSqlNode;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.net.Protocol;
-import org.apache.brooklyn.util.ssh.IptablesCommands;
-import org.apache.brooklyn.util.ssh.IptablesCommands.Chain;
-import org.apache.brooklyn.util.ssh.IptablesCommands.Policy;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-/**
- * The RubyRepRackspaceLiveTest installs RubyRep on various operating systems like Ubuntu, CentOS, Red Hat etc. To make sure that
- * RubyRep and PostgreSql works like expected on these Operating Systems.
- */
-public class RubyRepRackspaceLiveTest extends RubyRepIntegrationTest {
-    
-    @Test(groups = "Live")
-    public void test_Debian_6() throws Exception {
-        test("Debian 6");
-    }
-
-    @Test(groups = "Live")
-    public void test_Ubuntu_10_0() throws Exception {
-        test("Ubuntu 10.0");
-    }
-
-    @Test(groups = "Live")
-    public void test_Ubuntu_12_0() throws Exception {
-        test("Ubuntu 12.0");
-    }
-
-    @Test(groups = "Live")
-    public void test_Ubuntu_13() throws Exception {
-        test("Ubuntu 13");
-    }
-
-    @Test(groups = "Live")
-    public void test_CentOS_6() throws Exception {
-        test("CentOS 6");
-    }
-
-    @Test(groups = "Live")
-    public void test_CentOS_5() throws Exception {
-        test("CentOS 5");
-    }
-
-    @Test(groups = "Live")
-    public void test_Fedora() throws Exception {
-        test("Fedora ");
-    }
-
-    @Test(groups = "Live")
-    public void test_Red_Hat_Enterprise_Linux_6() throws Exception {
-        test("Red Hat Enterprise Linux 6");
-    }
-
-    public void test(String osRegex) throws Exception {
-        PostgreSqlNode db1 = tapp.createAndManageChild(EntitySpec.create(PostgreSqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, PostgreSqlIntegrationTest.CREATION_SCRIPT)
-                .configure(PostgreSqlNode.POSTGRESQL_PORT, PortRanges.fromInteger(9111)));
-        PostgreSqlNode db2 = tapp.createAndManageChild(EntitySpec.create(PostgreSqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, PostgreSqlIntegrationTest.CREATION_SCRIPT)
-                .configure(PostgreSqlNode.POSTGRESQL_PORT, PortRanges.fromInteger(9111)));
-
-        brooklynProperties.put("brooklyn.location.jclouds.rackspace-cloudservers-uk.imageNameRegex", osRegex);
-        brooklynProperties.remove("brooklyn.location.jclouds.rackspace-cloudservers-uk.image-id");
-        brooklynProperties.remove("brooklyn.location.jclouds.rackspace-cloudservers-uk.imageId");
-        brooklynProperties.put("brooklyn.location.jclouds.rackspace-cloudservers-uk.inboundPorts", Arrays.asList(22, 9111));
-        Location loc = managementContext.getLocationRegistry().resolve("jclouds:rackspace-cloudservers-uk");
-        
-        startInLocation(tapp, db1, db2, loc);
-
-        //hack to get the port for mysql open; is the inbounds property not respected on rackspace??
-        for (DatastoreCommon node : ImmutableSet.of(db1, db2)) {
-            SshMachineLocation l = (SshMachineLocation) node.getLocations().iterator().next();
-            l.execCommands("add iptables rule", ImmutableList.of(IptablesCommands.insertIptablesRule(Chain.INPUT, Protocol.TCP, 9111, Policy.ACCEPT)));
-        }
-
-        testReplication(db1, db2);
-    }
-    
-    // disable inherited non-live tests
-    @Test(enabled = false, groups = "Integration")
-    public void test_localhost_mysql() throws Exception {
-        super.test_localhost_mysql();
-    }
-
-    // disable inherited non-live tests
-    @Test(enabled = false, groups = "Integration")
-    public void test_localhost_postgres() throws Exception {
-        super.test_localhost_postgres();
-    }
-
-    // disable inherited non-live tests
-    @Test(enabled = false, groups = "Integration")
-    public void test_localhost_postgres_mysql() throws Exception {
-        super.test_localhost_postgres_mysql();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/pom.xml b/brooklyn-library/software/messaging/pom.xml
deleted file mode 100644
index 57b2ff0..0000000
--- a/brooklyn-library/software/messaging/pom.xml
+++ /dev/null
@@ -1,306 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>brooklyn-software-messaging</artifactId>
-	<packaging>jar</packaging>
-	<name>Brooklyn Messaging Software Entities</name>
-	<description>
-		Brooklyn entities for messaging software processes
-	</description>
-
-	<parent>
-		<groupId>org.apache.brooklyn</groupId>
-		<artifactId>brooklyn-library</artifactId>
-		<version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-		<relativePath>../../pom.xml</relativePath>
-	</parent>
-
-	<repositories>
-		<repository>
-			<id>clojars.org</id>
-			<url>http://clojars.org/repo</url>
-		</repository>
-	</repositories>
-
-    <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.rat</groupId>
-                    <artifactId>apache-rat-plugin</artifactId>
-                    <configuration>
-                        <excludes combine.children="append">
-                            <!--
-                                Configuration artifacts (for installations) are based on templated defaults for 
-                                the given components. These are files "without any degree of creativity" from the
-                                perspective of the Brooklyn/Apache contribution.
-                            -->
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/messaging/activemq/activemq.xml</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/messaging/kafka/server.properties</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/messaging/kafka/zookeeper.properties</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/messaging/storm/storm.yaml</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/messaging/rabbit/rabbitmq.config</exclude>
-                        </excludes>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <!-- test dependencies -->
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-locations-jclouds</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- for qpid -->
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jms_1.1_spec</artifactId>
-            <version>${geronimo-jms_1.1_spec.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.qpid</groupId>
-            <artifactId>qpid-client</artifactId>
-            <version>${qpid.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- for activemq -->
-        <dependency>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-broker</artifactId>
-            <version>${activemq.version}</version>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-api</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <!-- for rabbit -->
-        <dependency>
-            <groupId>com.rabbitmq</groupId>
-            <artifactId>amqp-client</artifactId>
-            <version>${rabbitmq-version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- for kafka -->
-        <dependency>
-            <groupId>org.apache.kafka</groupId>
-            <artifactId>kafka-clients</artifactId>
-            <version>${kafka.version}</version>
-            <scope>test</scope>
-            <exclusions>
-                <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-                <exclusion>
-                    <groupId>org.apache.zookeeper</groupId>
-                    <artifactId>zookeeper</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        
-        <!-- for storm -->
-		<dependency>
-			<groupId>storm</groupId>
-			<artifactId>storm-core</artifactId>
-			<version>${storm.version}</version>
-			<!-- keep storm out of the jar-with-dependencies -->
-            <scope>test</scope>
-            <exclusions>
-                <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.clojure</groupId>
-                    <artifactId>clojure</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.zookeeper</groupId>
-                    <artifactId>zookeeper</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>ring</groupId>
-                    <artifactId>ring-core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>clj-time</groupId>
-                    <artifactId>clj-time</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>commons-codec</groupId>
-                    <artifactId>commons-codec</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>storm</groupId>
-                    <artifactId>carbonite</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <!-- Transitive dependencies, declared explicitly due to version mismatch -->
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>${log4j.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>${slf4j.version}</version>
-            <scope>test</scope>
-            <exclusions>
-                <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.clojure</groupId>
-            <artifactId>clojure</artifactId>
-            <version>${clojure.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.zookeeper</groupId>
-            <artifactId>zookeeper</artifactId>
-            <version>${zookeeper.version}</version>
-            <scope>test</scope>
-            <exclusions>
-                <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>ring</groupId>
-            <artifactId>ring-core</artifactId>
-            <version>${ring-core.version}</version>
-            <scope>test</scope>
-            <exclusions>
-                <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-                <exclusion>
-                    <groupId>org.clojure</groupId>
-                    <artifactId>clojure</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>clj-time</groupId>
-                    <artifactId>clj-time</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>commons-codec</groupId>
-                    <artifactId>commons-codec</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>clj-time</groupId>
-            <artifactId>clj-time</artifactId>
-            <version>${clj-time.version}</version>
-            <scope>test</scope>
-            <exclusions>
-                <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-                <exclusion>
-                    <groupId>org.clojure</groupId>
-                    <artifactId>clojure</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-            <version>${commons-codec.version}</version>
-        </dependency>
-        <!-- End of transitive dependencies -->
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/MessageBroker.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/MessageBroker.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/MessageBroker.java
deleted file mode 100644
index 23260d2..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/MessageBroker.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.sensor.Sensors;
-
-/**
- * Marker interface identifying message brokers.
- */
-public interface MessageBroker extends Entity {
-    AttributeSensor<String> BROKER_URL = Sensors.newStringSensor("broker.url", "Broker Connection URL");
-
-    /** Setup the URL for external connections to the broker. */
-    void setBrokerUrl();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/Queue.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/Queue.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/Queue.java
deleted file mode 100644
index 190d5bf..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/Queue.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging;
-
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-
-/**
- * An interface that describes a messaging queue.
- */
-public interface Queue {
-    BasicAttributeSensorAndConfigKey<String> QUEUE_NAME = new BasicAttributeSensorAndConfigKey<String>(String.class, "queue.name", "Queue name");
-
-    AttributeSensor<Integer> QUEUE_DEPTH_BYTES = Sensors.newIntegerSensor("queue.depth.bytes", "Queue depth in bytes");
-    AttributeSensor<Integer> QUEUE_DEPTH_MESSAGES = Sensors.newIntegerSensor("queue.depth.messages", "Queue depth in messages");
-    
-    /**
-     * Create the queue.
-     *
-     * TODO make this an effector
-     */
-    abstract void create();
-
-    /**
-     * Delete the queue.
-     *
-     * TODO make this an effector
-     */
-    abstract void delete();
-
-    String getQueueName();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/Topic.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/Topic.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/Topic.java
deleted file mode 100644
index c4ed3b7..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/Topic.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging;
-
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-
-/**
- * An interface that describes a messaging topic.
- */
-public interface Topic {
-    BasicAttributeSensorAndConfigKey<String> TOPIC_NAME = new BasicAttributeSensorAndConfigKey<String>(
-            String.class, "topic.name", "Topic name");
-
-    /**
-     * Create the topic.
-     * 
-     * TODO make this an effector
-     */
-    public abstract void create();
-
-    /**
-     * Delete the topic.
-     * 
-     * TODO make this an effector
-     */
-    public abstract void delete();
-
-    String getTopicName();
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQBroker.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQBroker.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQBroker.java
deleted file mode 100644
index aa79613..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQBroker.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.sensor.AttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.messaging.MessageBroker;
-import org.apache.brooklyn.entity.messaging.jms.JMSBroker;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.time.Duration;
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single ActiveMQ broker instance.
- */
-@Catalog(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")
-@ImplementedBy(ActiveMQBrokerImpl.class)
-public interface ActiveMQBroker extends SoftwareProcess, MessageBroker, UsesJmx, JMSBroker<ActiveMQQueue, ActiveMQTopic> {
-
-    @SetFromFlag("startTimeout")
-    ConfigKey<Duration> START_TIMEOUT = SoftwareProcess.START_TIMEOUT;
-    
-    @SetFromFlag("version")
-    public static final ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "5.10.2");
-
-    @SetFromFlag("downloadUrl")
-    public static final AttributeSensorAndConfigKey<String,String> DOWNLOAD_URL = new StringAttributeSensorAndConfigKey(
-            Attributes.DOWNLOAD_URL, "${driver.mirrorUrl}/${version}/apache-activemq-${version}-bin.tar.gz");
-
-    /** download mirror, if desired */
-    @SetFromFlag("mirrorUrl")
-    public static final BasicConfigKey<String> MIRROR_URL = new BasicConfigKey<String>(String.class, "activemq.install.mirror.url", "URL of mirror",
-        "http://www.mirrorservice.org/sites/ftp.apache.org/activemq");
-
-    @SetFromFlag("brokerName")
-    public static final AttributeSensorAndConfigKey<String,String> BROKER_NAME = 
-        ConfigKeys.newStringSensorAndConfigKey("activemq.brokerName", "ActiveMQ Broker Name", "localhost");
-
-    @SetFromFlag("openWirePort")
-    public static final PortAttributeSensorAndConfigKey OPEN_WIRE_PORT = new PortAttributeSensorAndConfigKey("openwire.port", "OpenWire port", "61616+");
-
-    @SetFromFlag("jettyPort")
-    public static final PortAttributeSensorAndConfigKey AMQ_JETTY_PORT = new PortAttributeSensorAndConfigKey("activemq.jetty.port", "jetty port", "8161+");
-
-    @SetFromFlag("jmxUser")
-    public static final BasicAttributeSensorAndConfigKey<String> JMX_USER = new BasicAttributeSensorAndConfigKey<String>(UsesJmx.JMX_USER, "admin");
-    
-    @SetFromFlag("jmxPassword")
-    public static final BasicAttributeSensorAndConfigKey<String> JMX_PASSWORD = new BasicAttributeSensorAndConfigKey<String>(UsesJmx.JMX_PASSWORD, "admin");
-    
-    @SetFromFlag("templateConfigurationUrl")
-    public static final BasicAttributeSensorAndConfigKey<String> TEMPLATE_CONFIGURATION_URL = new BasicAttributeSensorAndConfigKey<String>(
-            String.class, "activemq.templateConfigurationUrl", "Template file (in freemarker format) for the conf/activemq.xml file", 
-            "classpath://org/apache/brooklyn/entity/messaging/activemq/activemq.xml");
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQBrokerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQBrokerImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQBrokerImpl.java
deleted file mode 100644
index 6954e81..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQBrokerImpl.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.messaging.jms.JMSBrokerImpl;
-import org.apache.brooklyn.feed.jmx.JmxAttributePollConfig;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-
-import com.google.common.base.Functions;
-import com.google.common.base.Objects.ToStringHelper;
-import com.google.common.base.Predicates;
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single ActiveMQ broker instance.
- */
-public class ActiveMQBrokerImpl extends JMSBrokerImpl<ActiveMQQueue, ActiveMQTopic> implements ActiveMQBroker {
-    private static final Logger log = LoggerFactory.getLogger(ActiveMQBrokerImpl.class);
-
-    private volatile JmxFeed jmxFeed;
-
-    public ActiveMQBrokerImpl() {
-        super();
-    }
-
-    @Override
-    public void init() {
-        super.init();
-        Entities.getRequiredUrlConfig(this, TEMPLATE_CONFIGURATION_URL);
-    }
-    
-    public void setBrokerUrl() {
-        sensors().set(BROKER_URL, String.format("tcp://%s:%d", getAttribute(HOSTNAME), getAttribute(OPEN_WIRE_PORT)));
-    }
-    
-    public Integer getJmxPort() {
-        return !isJmxEnabled() ? Integer.valueOf(-1) : getAttribute(UsesJmx.JMX_PORT);
-    }
-    
-    public String getBrokerName() {
-        return getAttribute(BROKER_NAME);
-    }
-    
-    public Integer getOpenWirePort() {
-        return getAttribute(OPEN_WIRE_PORT);
-    }
-    
-    public boolean isJmxEnabled() {
-        return Boolean.TRUE.equals(getConfig(USE_JMX));
-    }
-
-    @Override
-    public ActiveMQQueue createQueue(Map properties) {
-        ActiveMQQueue result = addChild(EntitySpec.create(ActiveMQQueue.class).configure(properties));
-        result.create();
-        return result;
-    }
-
-    @Override
-    public ActiveMQTopic createTopic(Map properties) {
-        ActiveMQTopic result = addChild(EntitySpec.create(ActiveMQTopic.class).configure(properties));
-        result.create();
-        return result;
-    }
-
-    @Override     
-    protected void connectSensors() {
-        sensors().set(BROKER_URL, String.format("tcp://%s:%d", getAttribute(HOSTNAME), getAttribute(OPEN_WIRE_PORT)));
-        
-        String brokerMbeanName = "org.apache.activemq:type=Broker,brokerName=" + getBrokerName();
-        
-        jmxFeed = JmxFeed.builder()
-                .entity(this)
-                .period(500, TimeUnit.MILLISECONDS)
-                .pollAttribute(new JmxAttributePollConfig<Boolean>(SERVICE_UP)
-                        .objectName(brokerMbeanName)
-                        .attributeName("BrokerName")
-                        .onSuccess(Functions.forPredicate(Predicates.notNull()))
-                        .onFailureOrException(Functions.constant(false))
-                        .suppressDuplicates(true))
-                .build();
-    }
-
-    @Override
-    public void disconnectSensors() {
-        super.disconnectSensors();
-        if (jmxFeed != null) jmxFeed.stop();
-    }
-
-    @Override
-    protected ToStringHelper toStringHelper() {
-        return super.toStringHelper().add("openWirePort", getAttribute(OPEN_WIRE_PORT));
-    }
-
-    @Override
-    public Class getDriverInterface() {
-        return ActiveMQDriver.class;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQDestination.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQDestination.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQDestination.java
deleted file mode 100644
index c941ac1..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQDestination.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import org.apache.brooklyn.entity.messaging.jms.JMSDestination;
-
-public interface ActiveMQDestination extends JMSDestination {
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQDestinationImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQDestinationImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQDestinationImpl.java
deleted file mode 100644
index 6a27030..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQDestinationImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntityLocal;
-
-import com.google.common.base.Preconditions;
-
-import org.apache.brooklyn.entity.messaging.jms.JMSDestinationImpl;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-import org.apache.brooklyn.feed.jmx.JmxHelper;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-
-public abstract class ActiveMQDestinationImpl extends JMSDestinationImpl implements ActiveMQDestination {
-    protected ObjectName brokerMBeanName;
-    protected transient JmxHelper jmxHelper;
-    protected volatile JmxFeed jmxFeed;
-
-    public ActiveMQDestinationImpl() {
-    }
-    
-    @Override
-    public void onManagementStarting() {
-        super.onManagementStarting();
-
-        String brokerName = getBrokerName();
-        Preconditions.checkArgument(brokerName != null && !brokerName.isEmpty(), "ActiveMQ brokerName attribute must be specified");
-
-        try {
-            brokerMBeanName = new ObjectName("org.apache.activemq:type=Broker,brokerName=" + brokerName);
-            jmxHelper = new JmxHelper((EntityLocal) getParent());
-        } catch (MalformedObjectNameException e) {
-            throw Exceptions.propagate(e);
-        }
-    }
-    
-    @Override
-    protected void disconnectSensors() {
-        if (jmxFeed != null) jmxFeed.stop();
-    }
-    
-    protected String getBrokerName() {
-        Preconditions.checkNotNull(getParent(), "JMS Destination must have a broker parent");
-        return getParent().getAttribute(ActiveMQBroker.BROKER_NAME);
-    }
-}


[28/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNodeImpl.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNodeImpl.java
deleted file mode 100644
index f72e2ef..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNodeImpl.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.crate;
-
-import org.apache.brooklyn.core.config.render.RendererHints;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.java.JavaAppUtils;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.http.HttpFeed;
-import org.apache.brooklyn.feed.http.HttpPollConfig;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-import org.apache.brooklyn.util.guava.Functionals;
-
-public class CrateNodeImpl extends SoftwareProcessImpl implements CrateNode{
-
-    private JmxFeed jmxFeed;
-    private HttpFeed httpFeed;
-
-    static {
-        JavaAppUtils.init();
-        RendererHints.register(MANAGEMENT_URL, RendererHints.namedActionWithUrl());
-    }
-
-    @Override
-    public Class getDriverInterface() {
-        return CrateNodeDriver.class;
-    }
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        connectServiceUpIsRunning();
-        jmxFeed = JavaAppUtils.connectMXBeanSensors(this);
-        sensors().set(DATASTORE_URL, "crate://" + getAttribute(HOSTNAME) + ":" + getPort());
-        String url = "http://" + getAttribute(HOSTNAME) + ":" + getHttpPort();
-        sensors().set(MANAGEMENT_URL, url);
-
-        httpFeed = HttpFeed.builder()
-                .entity(this)
-                .baseUri(url)
-                .poll(new HttpPollConfig<String>(SERVER_NAME)
-                        .onSuccess(HttpValueFunctions.jsonContents("name", String.class)))
-                .poll(new HttpPollConfig<Integer>(SERVER_STATUS)
-                        .onSuccess(HttpValueFunctions.jsonContents("status", Integer.class)))
-                .poll(new HttpPollConfig<Boolean>(SERVER_OK)
-                        .onSuccess(HttpValueFunctions.jsonContents("ok", Boolean.class)))
-                .poll(new HttpPollConfig<String>(SERVER_BUILD_TIMESTAMP)
-                        .onSuccess(HttpValueFunctions.jsonContents(new String[]{"version", "build_timestamp"}, String.class)))
-                .poll(new HttpPollConfig<String>(SERVER_BUILD_HASH)
-                        .onSuccess(HttpValueFunctions.jsonContents(new String[]{"version", "build_hash"}, String.class)))
-                .poll(new HttpPollConfig<Boolean>(SERVER_IS_BUILD_SNAPSHOT)
-                        .onSuccess(HttpValueFunctions.jsonContents(new String[] {"version", "build_snapshot"}, Boolean.class)))
-                .poll(new HttpPollConfig<String>(SERVER_LUCENE_VERSION)
-                        .onSuccess(HttpValueFunctions.jsonContents(new String[] {"version", "lucene_version"}, String.class)))
-                .poll(new HttpPollConfig<String>(SERVER_ES_VERSION)
-                        .onSuccess(HttpValueFunctions.jsonContents(new String[] {"version", "es_version"}, String.class)))
-                .build();
-
-        enrichers().add(Enrichers.builder().updatingMap(Attributes.SERVICE_NOT_UP_INDICATORS)
-                .from(SERVER_OK)
-                .computing(Functionals.ifNotEquals(true).value("Crate server reports it is not ok."))
-                .build());
-    }
-
-    @Override
-    protected void disconnectSensors() {
-        disconnectServiceUpIsRunning();
-        if (jmxFeed != null) jmxFeed.stop();
-        if (httpFeed != null) httpFeed.stop();
-        super.disconnectSensors();
-    }
-
-    public Integer getPort() {
-        return getAttribute(CRATE_PORT);
-    }
-
-    public Integer getHttpPort() {
-        return getAttribute(CRATE_HTTP_PORT);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNodeSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNodeSshDriver.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNodeSshDriver.java
deleted file mode 100644
index f972570..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNodeSshDriver.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.crate;
-
-import static java.lang.String.format;
-
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-
-import com.google.common.collect.ImmutableList;
-
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Urls;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-public class CrateNodeSshDriver extends JavaSoftwareProcessSshDriver {
-
-    public CrateNodeSshDriver(EntityLocal entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(),
-                resolver.getUnpackedDirectoryName(format("crate-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = ImmutableList.<String>builder()
-                .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-                .add("tar xvfz "+saveAs)
-                .build();
-
-        newScript(INSTALLING)
-                .failOnNonZeroResultCode()
-                .body.append(commands).execute();
-    }
-
-    @Override
-    public void customize() {
-        newScript(CUSTOMIZING)
-                .body.append("mkdir -p " + getDataLocation())
-                .execute();
-        copyTemplate(entity.getConfig(CrateNode.SERVER_CONFIG_URL), getConfigFileLocation());
-    }
-
-    @Override
-    public void launch() {
-        StringBuilder command = new StringBuilder(getExpandedInstallDir())
-                .append("/bin/crate ")
-                .append(" -d")
-                .append(" -p ").append(getPidFileLocation())
-                .append(" -Des.config=").append(getConfigFileLocation());
-        newScript(LAUNCHING)
-                .failOnNonZeroResultCode()
-                .body.append(command).execute();
-
-    }
-
-    @Override
-    public boolean isRunning() {
-        return newScript (MutableMap.of("usePidFile", getPidFileLocation()), CHECK_RUNNING)
-                .execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        // See https://crate.io/docs/stable/cli.html#signal-handling.
-        newScript(STOPPING)
-                .body.append("kill -USR2 `cat " + getPidFileLocation() + "`")
-                .execute();
-    }
-
-    protected String getConfigFileLocation() {
-        return Urls.mergePaths(getRunDir(), "config.yaml");
-    }
-
-    @Override
-    public String getLogFileLocation() {
-        return Urls.mergePaths(getRunDir(), "crate.log");
-    }
-
-    protected String getPidFileLocation () {
-        return Urls.mergePaths(getRunDir(), "pid.txt");
-    }
-
-    // public for use in template too.
-    public String getDataLocation() {
-        return Urls.mergePaths(getRunDir(), "data");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbDriver.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbDriver.java
deleted file mode 100644
index 05c097a..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbDriver.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mariadb;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper;
-
-/**
- * The {@link SoftwareProcessDriver} for MariaDB.
- */
-public interface MariaDbDriver extends SoftwareProcessDriver {
-    public String getStatusCmd();
-    public ProcessTaskWrapper<Integer> executeScriptAsync(String commands);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbNode.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbNode.java
deleted file mode 100644
index 3c78d99..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbNode.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mariadb;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.objs.HasShortName;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.config.MapConfigKey;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.database.DatabaseNode;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-@Catalog(name="MariaDB Node", description="MariaDB is an open source relational database management system (RDBMS)", iconUrl="classpath:///mariadb-logo-180x119.png")
-@ImplementedBy(MariaDbNodeImpl.class)
-public interface MariaDbNode extends SoftwareProcess, DatastoreCommon, HasShortName, DatabaseNode {
-
-    @SetFromFlag("version")
-    public static final ConfigKey<String> SUGGESTED_VERSION =
-        ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "5.5.40");
-
-    // https://downloads.mariadb.org/interstitial/mariadb-5.5.33a/kvm-bintar-hardy-amd64/mariadb-5.5.33a-linux-x86_64.tar.gz/from/http://mirrors.coreix.net/mariadb
-    // above redirects to download the artifactd from the URLs below.
-    // Use `curl -sL -w "%{http_code} %{url_effective}\n" "http://..." -o target.tar.gz` to find out redirect URL.
-    //     64-bit: http://mirrors.coreix.net/mariadb/mariadb-5.5.40/bintar-linux-x86_64/mariadb-5.5.40-linux-x86_64.tar.gz
-    //     32-bit: http://mirrors.coreix.net/mariadb/mariadb-5.5.40/bintar-linux-x86/mariadb-5.5.40-linux-i686.tar.gz
-
-    @SetFromFlag("downloadUrl")
-    public static final BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new StringAttributeSensorAndConfigKey(
-          Attributes.DOWNLOAD_URL, "${driver.mirrorUrl}/mariadb-${version}/${driver.downloadParentDir}/mariadb-${version}-${driver.osTag}.tar.gz");
-
-    /** download mirror, if desired */
-    @SetFromFlag("mirrorUrl")
-    public static final ConfigKey<String> MIRROR_URL = ConfigKeys.newStringConfigKey("mariadb.install.mirror.url", "URL of mirror",
-        "http://mirrors.coreix.net/mariadb/"
-     );
-
-    @SetFromFlag("port")
-    public static final PortAttributeSensorAndConfigKey MARIADB_PORT =
-        new PortAttributeSensorAndConfigKey("mariadb.port", "MariaDB port", PortRanges.fromString("3306, 13306+"));
-
-    @SetFromFlag("dataDir")
-    public static final ConfigKey<String> DATA_DIR = ConfigKeys.newStringConfigKey(
-        "mariadb.datadir", "Directory for writing data files", null);
-
-    @SetFromFlag("serverConf")
-    public static final MapConfigKey<Object> MARIADB_SERVER_CONF = new MapConfigKey<Object>(
-        Object.class, "mariadb.server.conf", "Configuration options for MariaDB server");
-
-    public static final ConfigKey<Object> MARIADB_SERVER_CONF_LOWER_CASE_TABLE_NAMES =
-        MARIADB_SERVER_CONF.subKey("lower_case_table_names", "See MariaDB (or MySQL!) guide. Set 1 to ignore case in table names (useful for OS portability)");
-
-    @SetFromFlag("password")
-    public static final StringAttributeSensorAndConfigKey PASSWORD = new StringAttributeSensorAndConfigKey(
-        "mariadb.password", "Database admin password (or randomly generated if not set)", null);
-
-    @SetFromFlag("socketUid")
-    public static final StringAttributeSensorAndConfigKey SOCKET_UID = new StringAttributeSensorAndConfigKey(
-        "mariadb.socketUid", "Socket uid, for use in file /tmp/mysql.sock.<uid>.3306 (or randomly generated if not set)", null);
-
-    /** @deprecated since 0.7.0 use DATASTORE_URL */ @Deprecated
-    public static final AttributeSensor<String> MARIADB_URL = DATASTORE_URL;
-
-    @SetFromFlag("configurationTemplateUrl")
-    static final BasicAttributeSensorAndConfigKey<String> TEMPLATE_CONFIGURATION_URL = new StringAttributeSensorAndConfigKey(
-        "mariadb.template.configuration.url", "Template file (in freemarker format) for the my.cnf file",
-        "classpath://org/apache/brooklyn/entity/database/mariadb/my.cnf");
-
-    public static final AttributeSensor<Double> QUERIES_PER_SECOND_FROM_MARIADB =
-        Sensors.newDoubleSensor("mariadb.queries.perSec.fromMariadb");
-
-    public String executeScript(String commands);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbNodeImpl.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbNodeImpl.java
deleted file mode 100644
index 86a8bfb..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbNodeImpl.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mariadb;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.core.effector.EffectorBody;
-import org.apache.brooklyn.core.location.Locations;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.ssh.SshFeed;
-import org.apache.brooklyn.feed.ssh.SshPollConfig;
-import org.apache.brooklyn.feed.ssh.SshPollValue;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.apache.brooklyn.util.guava.Maybe;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.base.Function;
-
-public class MariaDbNodeImpl extends SoftwareProcessImpl implements MariaDbNode {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MariaDbNodeImpl.class);
-
-    private SshFeed feed;
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return MariaDbDriver.class;
-    }
-
-    @Override
-    public MariaDbDriver getDriver() {
-        return (MariaDbDriver) super.getDriver();
-    }
-
-    @Override
-    public void init() {
-        super.init();
-        getMutableEntityType().addEffector(EXECUTE_SCRIPT, new EffectorBody<String>() {
-            @Override
-            public String call(ConfigBag parameters) {
-                return executeScript((String)parameters.getStringKey("commands"));
-            }
-        });
-    }
-    
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        sensors().set(DATASTORE_URL, String.format("mysql://%s:%s/", getAttribute(HOSTNAME), getAttribute(MARIADB_PORT)));
-
-        /*        
-         * TODO status gives us things like:
-         *   Uptime: 2427  Threads: 1  Questions: 581  Slow queries: 0  Opens: 53  Flush tables: 1  Open tables: 35  Queries per second avg: 0.239
-         * So can extract lots of sensors from that.
-         */
-        Maybe<SshMachineLocation> machine = Locations.findUniqueSshMachineLocation(getLocations());
-
-        if (machine.isPresent()) {
-            String cmd = getDriver().getStatusCmd();
-            feed = SshFeed.builder()
-                    .entity(this)
-                    .period(Duration.FIVE_SECONDS)
-                    .machine(machine.get())
-                    .poll(new SshPollConfig<Boolean>(SERVICE_UP)
-                            .command(cmd)
-                            .setOnSuccess(true)
-                            .setOnFailureOrException(false))
-                    .poll(new SshPollConfig<Double>(QUERIES_PER_SECOND_FROM_MARIADB)
-                            .command(cmd)
-                            .onSuccess(new Function<SshPollValue, Double>() {
-                                public Double apply(SshPollValue input) {
-                                    String q = Strings.getFirstWordAfter(input.getStdout(), "Queries per second avg:");
-                                    return (q == null) ? null : Double.parseDouble(q);
-                                }})
-                            .setOnFailureOrException(null) )
-                    .build();
-        } else {
-            LOG.warn("Location(s) {} not an ssh-machine location, so not polling for status; setting serviceUp immediately", getLocations());
-            sensors().set(SERVICE_UP, true);
-        }
-    }
-
-    @Override
-    protected void disconnectSensors() {
-        if (feed != null) feed.stop();
-        super.disconnectSensors();
-    }
-
-    public int getPort() {
-        return getAttribute(MARIADB_PORT);
-    }
-
-    public String getSocketUid() {
-        String result = getAttribute(MariaDbNode.SOCKET_UID);
-        if (Strings.isBlank(result))
-            sensors().set(MariaDbNode.SOCKET_UID, (result = Identifiers.makeRandomId(6)));
-        return result;
-    }
-
-    public String getPassword() {
-        String result = getAttribute(MariaDbNode.PASSWORD);
-        if (Strings.isBlank(result))
-            sensors().set(MariaDbNode.PASSWORD, (result = Identifiers.makeRandomId(6)));
-        return result;
-    }
-
-    @Override
-    public String getShortName() {
-        return "MariaDB";
-    }
-
-    @Override
-    public String executeScript(String commands) {
-        return getDriver().executeScriptAsync(commands).block().getStdout();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbSshDriver.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbSshDriver.java
deleted file mode 100644
index dedba55..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbSshDriver.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mariadb;
-
-import static java.lang.String.format;
-import static org.apache.brooklyn.util.JavaGroovyEquivalents.groovyTruth;
-import static org.apache.brooklyn.util.ssh.BashCommands.commandsToDownloadUrlsAs;
-import static org.apache.brooklyn.util.ssh.BashCommands.installPackage;
-import static org.apache.brooklyn.util.ssh.BashCommands.ok;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.entity.database.DatastoreMixins;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.api.location.OsDetails;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper;
-import org.apache.brooklyn.util.net.Urls;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.CountdownTimer;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * The SSH implementation of the {@link MariaDbDriver}.
- */
-public class MariaDbSshDriver extends AbstractSoftwareProcessSshDriver implements MariaDbDriver {
-
-    public static final Logger log = LoggerFactory.getLogger(MariaDbSshDriver.class);
-
-    public MariaDbSshDriver(MariaDbNodeImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-
-        entity.sensors().set(Attributes.LOG_FILE_LOCATION, getLogFile());
-    }
-
-    public String getOsTag() {
-        OsDetails os = getLocation().getOsDetails();
-        // NOTE: cannot rely on OsDetails.isLinux() to return true for all linux flavours, so
-        // explicitly test for unsupported OSes, otherwise assume generic linux.
-        if (os == null) return "linux-i686";
-        if (os.isWindows() || os.isMac())
-            throw new UnsupportedOperationException("only support linux versions just now; OS details: " + os);
-        return (os.is64bit() ? "linux-x86_64" : "linux-i686");
-    }
-
-    public String getDownloadParentDir() {
-        // NOTE: cannot rely on OsDetails.isLinux() to return true for all linux flavours, so
-        // explicitly test for unsupported OSes, otherwise assume generic linux.
-        OsDetails os = getLocation().getOsDetails();
-        if (os == null) return "bintar-linux-x86";
-        if (os.isWindows() || os.isMac())
-            throw new UnsupportedOperationException("only support linux versions just now; OS details: " + os);
-        return (os.is64bit() ? "bintar-linux-x86_64" : "bintar-linux-x86");
-    }
-
-    public String getMirrorUrl() {
-        return entity.getConfig(MariaDbNode.MIRROR_URL);
-    }
-
-    public String getBaseDir() { return getExpandedInstallDir(); }
-
-    public String getDataDir() {
-        String result = entity.getConfig(MariaDbNode.DATA_DIR);
-        return (result == null) ? "." : result;
-    }
-
-    public String getLogFile() {
-        return Urls.mergePaths(getRunDir(), "console.log");
-    }
-
-    public String getConfigFile() {
-        return "my.cnf";
-    }
-
-    public String getInstallFilename() {
-        return String.format("mariadb-%s-%s.tar.gz", getVersion(), getOsTag());
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this, ImmutableMap.of("filename", getInstallFilename()));
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("mariadb-%s-%s", getVersion(), getOsTag()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = new LinkedList<String>();
-        commands.add(BashCommands.INSTALL_TAR);
-        commands.add(BashCommands.INSTALL_CURL);
-
-        commands.add("echo installing extra packages");
-        commands.add(installPackage(ImmutableMap.of("yum", "libgcc_s.so.1"), null));
-        commands.add(installPackage(ImmutableMap.of("yum", "libaio.so.1 libncurses.so.5", "apt", "libaio1 libaio-dev"), null));
-
-        // these deps are needed on some OS versions but others don't need them so ignore failures (ok(...))
-        commands.add(ok(installPackage(ImmutableMap.of("yum", "libaio", "apt", "ia32-libs"), null)));
-        commands.add("echo finished installing extra packages");
-
-        commands.addAll(commandsToDownloadUrlsAs(urls, saveAs));
-        commands.add(format("tar xfvz %s", saveAs));
-
-        newScript(INSTALLING).body.append(commands).execute();
-    }
-
-    public MariaDbNodeImpl getEntity() { return (MariaDbNodeImpl) super.getEntity(); }
-    public int getPort() { return getEntity().getPort(); }
-    public String getSocketUid() { return getEntity().getSocketUid(); }
-    public String getPassword() { return getEntity().getPassword(); }
-
-    @Override
-    public void customize() {
-        copyDatabaseConfigScript();
-
-        newScript(CUSTOMIZING)
-            .updateTaskAndFailOnNonZeroResultCode()
-            .body.append(
-                "chmod 600 "+getConfigFile(),
-                getBaseDir()+"/scripts/mysql_install_db "+
-                    "--basedir="+getBaseDir()+" --datadir="+getDataDir()+" "+
-                    "--defaults-file="+getConfigFile())
-            .execute();
-
-        // launch, then we will configure it
-        launch();
-
-        CountdownTimer timer = Duration.seconds(20).countdownTimer();
-        boolean hasCreationScript = copyDatabaseCreationScript();
-        timer.waitForExpiryUnchecked();
-
-        DynamicTasks.queue(
-            SshEffectorTasks.ssh(
-                "cd "+getRunDir(),
-                getBaseDir()+"/bin/mysqladmin --defaults-file="+getConfigFile()+" --password= password "+getPassword()
-            ).summary("setting password"));
-
-        if (hasCreationScript)
-            executeScriptFromInstalledFileAsync("creation-script.sql");
-
-        // not sure necessary to stop then subsequently launch, but seems safest
-        // (if skipping, use a flag in launch to indicate we've just launched it)
-        stop();
-    }
-
-    private void copyDatabaseConfigScript() {
-        newScript(CUSTOMIZING).execute();  //create the directory
-
-        String configScriptContents = processTemplate(entity.getAttribute(MariaDbNode.TEMPLATE_CONFIGURATION_URL));
-        Reader configContents = new StringReader(configScriptContents);
-
-        getMachine().copyTo(configContents, Urls.mergePaths(getRunDir(), getConfigFile()));
-    }
-
-    private boolean copyDatabaseCreationScript() {
-        InputStream creationScript = DatastoreMixins.getDatabaseCreationScript(entity);
-        if (creationScript==null) return false;
-        getMachine().copyTo(creationScript, getRunDir() + "/creation-script.sql");
-        return true;
-    }
-
-    public String getMariaDbServerOptionsString() {
-        Map<String, Object> options = entity.getConfig(MariaDbNode.MARIADB_SERVER_CONF);
-        StringBuilder result = new StringBuilder();
-        if (groovyTruth(options)) {
-            for (Map.Entry<String, Object> entry : options.entrySet()) {
-                result.append(entry.getKey());
-                String value = entry.getValue().toString();
-                if (!Strings.isEmpty(value)) {
-                    result.append(" = ").append(value);
-                }
-                result.append('\n');
-            }
-        }
-        return result.toString();
-    }
-
-    @Override
-    public void launch() {
-        newScript(MutableMap.of("usePidFile", true), LAUNCHING)
-            .updateTaskAndFailOnNonZeroResultCode()
-            .body.append(format("nohup %s/bin/mysqld --defaults-file=%s --user=`whoami` > %s 2>&1 < /dev/null &", getBaseDir(), getConfigFile(), getLogFile()))
-            .execute();
-    }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of("usePidFile", false), CHECK_RUNNING)
-            .body.append(getStatusCmd())
-            .execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(MutableMap.of("usePidFile", true), STOPPING).execute();
-    }
-
-    @Override
-    public void kill() {
-        newScript(MutableMap.of("usePidFile", true), KILLING).execute();
-    }
-
-    @Override
-    public String getStatusCmd() {
-        return format("%s/bin/mysqladmin --defaults-file=%s status", getExpandedInstallDir(), Urls.mergePaths(getRunDir(), getConfigFile()));
-    }
-
-    public ProcessTaskWrapper<Integer> executeScriptAsync(String commands) {
-        String filename = "mariadb-commands-"+Identifiers.makeRandomId(8);
-        DynamicTasks.queue(SshEffectorTasks.put(Urls.mergePaths(getRunDir(), filename)).contents(commands).summary("copying datastore script to execute "+filename));
-        return executeScriptFromInstalledFileAsync(filename);
-    }
-
-    public ProcessTaskWrapper<Integer> executeScriptFromInstalledFileAsync(String filenameAlreadyInstalledAtServer) {
-        return DynamicTasks.queue(
-                SshEffectorTasks.ssh(
-                                "cd "+getRunDir(),
-                                getBaseDir()+"/bin/mysql --defaults-file="+getConfigFile()+" < "+filenameAlreadyInstalledAtServer)
-                        .summary("executing datastore script "+filenameAlreadyInstalledAtServer));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/InitSlaveTaskBody.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/InitSlaveTaskBody.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/InitSlaveTaskBody.java
deleted file mode 100644
index 70e29d7..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/InitSlaveTaskBody.java
+++ /dev/null
@@ -1,426 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import java.text.SimpleDateFormat;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.Semaphore;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.mgmt.Task;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.effector.EffectorTasks;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.EntityPredicates;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode.ExportDumpEffector;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.TaskTags;
-import org.apache.brooklyn.util.core.task.ssh.SshTasks;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskFactory;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.apache.brooklyn.util.text.StringEscapes.BashStringEscapes;
-import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.lang3.concurrent.ConcurrentUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Joiner;
-import com.google.common.base.Optional;
-import com.google.common.base.Predicates;
-import com.google.common.base.Strings;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-public class InitSlaveTaskBody implements Runnable {
-    private static final String SNAPSHOT_DUMP_OPTIONS = "--skip-lock-tables --single-transaction --flush-logs --hex-blob";
-
-    private static final Logger log = LoggerFactory.getLogger(InitSlaveTaskBody.class);
-
-    private final MySqlCluster cluster;
-    private final MySqlNode slave;
-    private Semaphore lock;
-
-    public InitSlaveTaskBody(MySqlCluster cluster, MySqlNode slave, Semaphore lock) {
-        this.cluster = cluster;
-        this.slave = slave;
-        this.lock = lock;
-    }
-
-    @Override
-    public void run() {
-        // Replication init state consists of:
-        //   * initial dump (optional)
-        //   * location of initial dump (could be on any of the members, optional)
-        //   * bin log file name
-        //   * bin log position
-        // 1. Check replication state:
-        //   * Does the dump exist (and the machine where it is located)
-        //   * Does the bin log exist on the master
-        // 2. If the replication state is not valid create a new one
-        //   * Select a slave to dump, master if no slaves
-        //   * If it's a slave do 'STOP SLAVE SQL_THREAD;'
-        //   * Call mysqldump to create the snapshot
-        //   * When done if a slave do 'START SLAVE SQL_THREAD;'
-        //   * Get master state from the dump - grep "MASTER_LOG_POS" dump.sql.
-        //     If slave get state from 'SHOW SLAVE STATUS'
-        //   * Save new init info in cluster - bin log name, position, dump
-        // 3. Init Slave
-        //   * transfer dump to new slave (if dump exists)
-        //   * import - mysql < ~/dump.sql
-        //   * change master to and start slave
-        //!!! Caveat if dumping from master and MyISAM tables are used dump may be inconsistent.
-        //   * Only way around it is to lock the database while dumping (or taking a snapshot through LVM which is quicker)
-        bootstrapSlaveAsync(getValidReplicationInfo(), slave);
-        cluster.getAttribute(MySqlClusterImpl.SLAVE_ID_ADDRESS_MAPPING).put(slave.getId(), slave.getAttribute(MySqlNode.SUBNET_ADDRESS));
-    }
-
-    private MySqlNode getMaster() {
-        return (MySqlNode) Iterables.find(cluster.getMembers(), MySqlClusterUtils.IS_MASTER);
-    }
-
-    private void bootstrapSlaveAsync(final Future<ReplicationSnapshot> replicationInfoFuture, final MySqlNode slave) {
-        DynamicTasks.queue("bootstrap slave replication", new Runnable() {
-            @Override
-            public void run() {
-                ReplicationSnapshot replicationSnapshot;
-                try {
-                    replicationSnapshot = replicationInfoFuture.get();
-                } catch (InterruptedException | ExecutionException e) {
-                    throw Exceptions.propagate(e);
-                }
-
-                MySqlNode master = getMaster();
-                String masterAddress = MySqlClusterUtils.validateSqlParam(master.getAttribute(MySqlNode.SUBNET_ADDRESS));
-                Integer masterPort = master.getAttribute(MySqlNode.MYSQL_PORT);
-                String slaveAddress = MySqlClusterUtils.validateSqlParam(slave.getAttribute(MySqlNode.SUBNET_ADDRESS));
-                String username = MySqlClusterUtils.validateSqlParam(cluster.getConfig(MySqlCluster.SLAVE_USERNAME));
-                String password = MySqlClusterUtils.validateSqlParam(cluster.getAttribute(MySqlCluster.SLAVE_PASSWORD));
-
-                if (replicationSnapshot.getEntityId() != null) {
-                    Entity sourceEntity = Iterables.find(cluster.getMembers(), EntityPredicates.idEqualTo(replicationSnapshot.getEntityId()));
-                    String dumpId = FilenameUtils.removeExtension(replicationSnapshot.getSnapshotPath());
-                    copyDumpAsync(sourceEntity, slave, replicationSnapshot.getSnapshotPath(), dumpId);
-                    DynamicTasks.queue(Effectors.invocation(slave, MySqlNode.IMPORT_DUMP, ImmutableMap.of("path", replicationSnapshot.getSnapshotPath())));
-                    //The dump resets the password to whatever is on the source instance, reset it back.
-                    //We are able to still login because privileges are not flushed, so we just set the password to the same value.
-                    DynamicTasks.queue(Effectors.invocation(slave, MySqlNode.CHANGE_PASSWORD, ImmutableMap.of("password", slave.getAttribute(MySqlNode.PASSWORD))));                        //
-                    //Flush privileges to load new users coming from the dump
-                    MySqlClusterUtils.executeSqlOnNodeAsync(slave, "FLUSH PRIVILEGES;");
-                }
-
-                MySqlClusterUtils.executeSqlOnNodeAsync(master, String.format(
-                        "CREATE USER '%s'@'%s' IDENTIFIED BY '%s';\n" +
-                        "GRANT REPLICATION SLAVE ON *.* TO '%s'@'%s';\n",
-                        username, slaveAddress, password, username, slaveAddress));
-
-                // Executing this will unblock SERVICE_UP wait in the start effector
-                String slaveCmd = String.format(
-                        "CHANGE MASTER TO " +
-                            "MASTER_HOST='%s', " +
-                            "MASTER_PORT=%d, " +
-                            "MASTER_USER='%s', " +
-                            "MASTER_PASSWORD='%s', " +
-                            "MASTER_LOG_FILE='%s', " +
-                            "MASTER_LOG_POS=%d;\n" +
-                        "START SLAVE;\n",
-                        masterAddress, masterPort,
-                        username, password,
-                        replicationSnapshot.getBinLogName(),
-                        replicationSnapshot.getBinLogPosition());
-                MySqlClusterUtils.executeSqlOnNodeAsync(slave, slaveCmd);
-            }
-        });
-    }
-
-    private void copyDumpAsync(Entity source, Entity dest, String sourceDumpPath, String dumpId) {
-        final SshMachineLocation sourceMachine = EffectorTasks.getSshMachine(source);
-        final SshMachineLocation destMachine = EffectorTasks.getSshMachine(dest);
-
-        String sourceRunDir = source.getAttribute(MySqlNode.RUN_DIR);
-        String privateKeyFile = dumpId + ".id_rsa";
-        final Task<String> tempKeyTask = DynamicTasks.queue(SshEffectorTasks.ssh(
-                "cd $RUN_DIR",
-                "PRIVATE_KEY=" + privateKeyFile,
-                "ssh-keygen -t rsa -N '' -f $PRIVATE_KEY -C " + dumpId + " > /dev/null",
-                "cat $PRIVATE_KEY.pub")
-                .environmentVariable("RUN_DIR", sourceRunDir)
-                .machine(sourceMachine)
-                .summary("generate private key for slave access")
-                .requiringZeroAndReturningStdout())
-                .asTask();
-
-        DynamicTasks.queue("add key to authorized_keys", new Runnable() {
-            @Override
-            public void run() {
-                String publicKey = tempKeyTask.getUnchecked();
-                DynamicTasks.queue(SshEffectorTasks.ssh(String.format(
-                        "cat >> ~/.ssh/authorized_keys <<EOF\n%s\nEOF", 
-                        publicKey))
-                    .machine(destMachine)
-                    .summary("Add key to authorized_keys")
-                    .requiringExitCodeZero());
-            }
-        });
-
-        final ProcessTaskWrapper<Integer> copyTask = SshEffectorTasks.ssh(
-                "cd $RUN_DIR",
-                String.format(
-                    "scp -o 'BatchMode yes' -o 'StrictHostKeyChecking no' -i '%s' '%s' '%s@%s:%s/%s.sql'",
-                    privateKeyFile,
-                    sourceDumpPath,
-                    destMachine.getUser(),
-                    dest.getAttribute(MySqlNode.SUBNET_ADDRESS),
-                    dest.getAttribute(MySqlNode.RUN_DIR),
-                    dumpId))
-                .environmentVariable("RUN_DIR", sourceRunDir)
-                .machine(sourceMachine)
-                .summary("copy database dump to slave")
-                .newTask();
-        // Let next couple of tasks complete even if this one fails so that we can clean up.
-        TaskTags.markInessential(copyTask);
-        DynamicTasks.queue(copyTask);
-
-        // Delete private key
-        DynamicTasks.queue(SshEffectorTasks.ssh(
-                "cd $RUN_DIR",
-                "rm " + privateKeyFile)
-            .environmentVariable("RUN_DIR", sourceRunDir)
-            .machine(sourceMachine)
-            .summary("remove private key"));
-
-        DynamicTasks.queue(SshEffectorTasks.ssh(String.format(
-                "sed -i'' -e '/%s/d' ~/.ssh/authorized_keys",
-                dumpId))
-            .machine(destMachine)
-            .summary("remove private key from authorized_keys")).asTask();
-
-        // The task will fail if copyTask fails, but only after the private key is deleted.
-        DynamicTasks.queue("check for successful copy", new Runnable() {
-            @Override
-            public void run() {
-                copyTask.asTask().getUnchecked();
-            }
-        });
-    }
-
-    private Future<ReplicationSnapshot> getValidReplicationInfo() {
-        try {
-            try {
-                lock.acquire();
-            } catch (InterruptedException e) {
-                throw Exceptions.propagate(e);
-            }
-            ReplicationSnapshot replicationSnapshot = getReplicationInfoMasterConfig();
-            if (replicationSnapshot == null) {
-                replicationSnapshot = getAttributeBlocking(cluster, MySqlCluster.REPLICATION_LAST_SLAVE_SNAPSHOT);
-            }
-            if (!isReplicationInfoValid(replicationSnapshot)) {
-                final MySqlNode snapshotNode = getSnapshotNode();
-                final String dumpName = getDumpUniqueId() + ".sql";
-                if (MySqlClusterUtils.IS_MASTER.apply(snapshotNode)) {
-                    return createMasterReplicationSnapshot(snapshotNode, dumpName);
-                } else {
-                    return createSlaveReplicationSnapshot(snapshotNode, dumpName);
-                }
-            }
-            return ConcurrentUtils.constantFuture(replicationSnapshot);
-        } finally {
-            lock.release();
-        }
-    }
-
-    /**
-     * Rebind backwards compatibility
-     * @deprecated since 0.9.0
-     */
-    @Deprecated
-    private ReplicationSnapshot getReplicationInfoMasterConfig() {
-        Entity master = getMaster();
-        AttributeSensor<String> MASTER_LOG_FILE = Sensors.newStringSensor(
-                "mysql.master.log_file", "The binary log file master is writing to");
-        AttributeSensor<Integer> MASTER_LOG_POSITION = Sensors.newIntegerSensor(
-                "mysql.master.log_position", "The position in the log file to start replication");
-
-        String logFile = master.sensors().get(MASTER_LOG_FILE);
-        Integer logPos = master.sensors().get(MASTER_LOG_POSITION);
-        if(logFile != null && logPos != null) {
-            ReplicationSnapshot replicationSnapshot = new ReplicationSnapshot(null, null, logFile, logPos);
-            cluster.sensors().set(MySqlCluster.REPLICATION_LAST_SLAVE_SNAPSHOT, replicationSnapshot);
-            master.sensors().set(MASTER_LOG_FILE, null);
-            master.sensors().set(MASTER_LOG_POSITION, null);
-            return replicationSnapshot;
-        }
-        return null;
-    }
-
-    private Future<ReplicationSnapshot> createMasterReplicationSnapshot(final MySqlNode master, final String dumpName) {
-        log.info("MySql cluster " + cluster + ": generating new replication snapshot on master node " + master + " with name " + dumpName);
-        String dumpOptions = SNAPSHOT_DUMP_OPTIONS + " --master-data=2" + getDumpDatabases(master);
-        ImmutableMap<String, String> params = ImmutableMap.of(
-                ExportDumpEffector.PATH.getName(), dumpName,
-                ExportDumpEffector.ADDITIONAL_OPTIONS.getName(), dumpOptions);
-        DynamicTasks.queue(Effectors.invocation(master, MySqlNode.EXPORT_DUMP, params));
-        return DynamicTasks.queue("get master log info from dump", new Callable<ReplicationSnapshot>() {
-            @Override
-            public ReplicationSnapshot call() throws Exception {
-                Pattern masterInfoPattern = Pattern.compile("CHANGE MASTER TO.*MASTER_LOG_FILE\\s*=\\s*'([^']+)'.*MASTER_LOG_POS\\s*=\\s*(\\d+)");
-                String masterInfo = DynamicTasks.queue(execSshTask(master, "grep -m1 'CHANGE MASTER TO' " + dumpName, "Extract master replication status from dump")
-                        .requiringZeroAndReturningStdout()).asTask().getUnchecked();
-                Matcher masterInfoMatcher = masterInfoPattern.matcher(masterInfo);
-                if (!masterInfoMatcher.find() || masterInfoMatcher.groupCount() != 2) {
-                    throw new IllegalStateException("Master dump doesn't contain replication info: " + masterInfo);
-                }
-                String masterLogFile = masterInfoMatcher.group(1);
-                int masterLogPosition = Integer.parseInt(masterInfoMatcher.group(2));
-                ReplicationSnapshot replicationSnapshot = new ReplicationSnapshot(master.getId(), dumpName, masterLogFile, masterLogPosition);
-                cluster.sensors().set(MySqlCluster.REPLICATION_LAST_SLAVE_SNAPSHOT, replicationSnapshot);
-                return replicationSnapshot;
-            }
-        });
-    }
-
-    private String getDumpDatabases(MySqlNode node) {
-        // The config will be inherited from the cluster
-        Collection<String> dumpDbs = node.config().get(MySqlCluster.SLAVE_REPLICATE_DUMP_DB);
-        if (dumpDbs != null && !dumpDbs.isEmpty()) {
-            return " --databases " + Joiner.on(' ').join(Iterables.transform(dumpDbs, BashStringEscapes.wrapBash()));
-        } else {
-            return " --all-databases";
-        }
-    }
-
-    private Future<ReplicationSnapshot> createSlaveReplicationSnapshot(final MySqlNode slave, final String dumpName) {
-        MySqlClusterUtils.executeSqlOnNodeAsync(slave, "STOP SLAVE SQL_THREAD;");
-        try {
-            log.info("MySql cluster " + cluster + ": generating new replication snapshot on slave node " + slave + " with name " + dumpName);
-            String dumpOptions = SNAPSHOT_DUMP_OPTIONS + getDumpDatabases(slave);
-            ImmutableMap<String, String> params = ImmutableMap.of(
-                    ExportDumpEffector.PATH.getName(), dumpName,
-                    ExportDumpEffector.ADDITIONAL_OPTIONS.getName(), dumpOptions);
-            DynamicTasks.queue(Effectors.invocation(slave, MySqlNode.EXPORT_DUMP, params));
-            return DynamicTasks.queue("get master log info from slave", new Callable<ReplicationSnapshot>() {
-                @Override
-                public ReplicationSnapshot call() throws Exception {
-                    String slaveStatusRow = slave.executeScript("SHOW SLAVE STATUS \\G");
-                    Map<String, String> slaveStatus = MySqlRowParser.parseSingle(slaveStatusRow);
-                    String masterLogFile = slaveStatus.get("Relay_Master_Log_File");
-                    int masterLogPosition = Integer.parseInt(slaveStatus.get("Exec_Master_Log_Pos"));
-                    ReplicationSnapshot replicationSnapshot = new ReplicationSnapshot(slave.getId(), dumpName, masterLogFile, masterLogPosition);
-                    cluster.sensors().set(MySqlCluster.REPLICATION_LAST_SLAVE_SNAPSHOT, replicationSnapshot);
-                    return replicationSnapshot;
-                }
-            });
-        } finally {
-            MySqlClusterUtils.executeSqlOnNodeAsync(slave, "START SLAVE SQL_THREAD;");
-        }
-    }
-
-    private MySqlNode getSnapshotNode() {
-        String snapshotNodeId = cluster.getConfig(MySqlCluster.REPLICATION_PREFERRED_SOURCE);
-        if (snapshotNodeId != null) {
-            Optional<Entity> preferredNode = Iterables.tryFind(cluster.getMembers(), EntityPredicates.idEqualTo(snapshotNodeId));
-            if (preferredNode.isPresent()) {
-                return (MySqlNode) preferredNode.get();
-            } else {
-                log.warn("MySql cluster " + this + " configured with preferred snapshot node " + snapshotNodeId + " but it's not a member. Defaulting to a random slave.");
-            }
-        }
-        return getRandomSlave();
-    }
-
-    private MySqlNode getRandomSlave() {
-        List<MySqlNode> slaves = getHealhtySlaves();
-        if (slaves.size() > 0) {
-            return slaves.get(new Random().nextInt(slaves.size()));
-        } else {
-            return getMaster();
-        }
-    }
-
-    private ImmutableList<MySqlNode> getHealhtySlaves() {
-        return FluentIterable.from(cluster.getMembers())
-                   .filter(Predicates.not(MySqlClusterUtils.IS_MASTER))
-                   .filter(EntityPredicates.attributeEqualTo(MySqlNode.SERVICE_UP, Boolean.TRUE))
-                   .filter(MySqlNode.class)
-                   .toList();
-    }
-
-    private boolean isReplicationInfoValid(ReplicationSnapshot replicationSnapshot) {
-        MySqlNode master = getMaster();
-        String dataDir = Strings.nullToEmpty(master.getConfig(MySqlNode.DATA_DIR));
-        if (!checkFileExistsOnEntity(master, Os.mergePathsUnix(dataDir, replicationSnapshot.getBinLogName()))) {
-            return false;
-        }
-        if (replicationSnapshot.getEntityId() != null) {
-            Optional<Entity> snapshotSlave = Iterables.tryFind(cluster.getChildren(), EntityPredicates.idEqualTo(replicationSnapshot.getEntityId()));
-            if (!snapshotSlave.isPresent()) {
-                log.info("MySql cluster " + cluster + " missing node " + replicationSnapshot.getEntityId() + " with last snapshot " + replicationSnapshot.getSnapshotPath() + ". Will generate new snapshot.");
-                return false;
-            }
-            if (!checkFileExistsOnEntity(snapshotSlave.get(), replicationSnapshot.getSnapshotPath())) {
-                log.info("MySql cluster " + cluster + ", node " + snapshotSlave.get() + " missing replication snapshot " + replicationSnapshot.getSnapshotPath() + ". Will generate new snapshot.");
-                return false;
-            }
-        }
-        return true;
-    }
-
-    private boolean checkFileExistsOnEntity(Entity entity, String path) {
-        String cmd = BashCommands.chain(
-                BashCommands.requireTest(String.format("-f \"%s\"", path), "File " + path + " doesn't exist."));
-        String summary = "Check if file " + path + " exists";
-        return DynamicTasks.queue(execSshTask(entity, cmd, summary).allowingNonZeroExitCode()).asTask().getUnchecked() == 0;
-    }
-
-    private ProcessTaskFactory<Integer> execSshTask(Entity entity, String cmd, String summary) {
-        SshMachineLocation machine = EffectorTasks.getSshMachine(entity);
-        return SshTasks.newSshExecTaskFactory(machine, "cd $RUN_DIR\n" + cmd)
-            .allowingNonZeroExitCode()
-            .environmentVariable("RUN_DIR", entity.getAttribute(SoftwareProcess.RUN_DIR))
-            .summary(summary);
-    }
-
-    private <T> T getAttributeBlocking(Entity masterNode, AttributeSensor<T> att) {
-        return DynamicTasks.queue(DependentConfiguration.attributeWhenReady(masterNode, att)).getUnchecked();
-    }
-
-    private String getDumpUniqueId() {
-        return "replication-dump-" + Identifiers.makeRandomId(8) + "-" + new SimpleDateFormat("yyyy-MM-dd--HH-mm-ss").format(new Date());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlCluster.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlCluster.java
deleted file mode 100644
index 67c1e80..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlCluster.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.database.DatastoreMixins.HasDatastoreUrl;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.util.GenericTypes;
-
-import com.google.common.reflect.TypeToken;
-
-@ImplementedBy(MySqlClusterImpl.class)
-@Catalog(name="MySql Master-Slave cluster", description="Sets up a cluster of MySQL nodes using master-slave relation and binary logging", iconUrl="classpath:///mysql-logo-110x57.png")
-public interface MySqlCluster extends DynamicCluster, HasDatastoreUrl {
-    interface MySqlMaster {
-        ConfigKey<String> MASTER_CREATION_SCRIPT_CONTENTS = ConfigKeys.newStringConfigKey(
-                "datastore.master.creation.script.contents", "Contents of creation script to initialize the master node after initializing replication");
-
-        ConfigKey<String> MASTER_CREATION_SCRIPT_URL = ConfigKeys.newStringConfigKey(
-                "datastore.master.creation.script.url", "URL of creation script to use to initialize the master node after initializing replication (ignored if creationScriptContents is specified)");
-    }
-    interface MySqlSlave {
-        AttributeSensor<Boolean> SLAVE_HEALTHY = Sensors.newBooleanSensor("mysql.slave.healthy", "Indicates that the replication state of the slave is healthy");
-        AttributeSensor<Integer> SLAVE_SECONDS_BEHIND_MASTER = Sensors.newIntegerSensor("mysql.slave.seconds_behind_master", "How many seconds behind master is the replication state on the slave");
-    }
-
-    AttributeSensor<ReplicationSnapshot> REPLICATION_LAST_SLAVE_SNAPSHOT = Sensors.newSensor(ReplicationSnapshot.class, "mysql.replication.last_slave_snapshot", "Last valid state to init slaves with");
-    ConfigKey<String> REPLICATION_PREFERRED_SOURCE = ConfigKeys.newStringConfigKey("mysql.replication.preferred_source", "ID of node to get the replication snapshot from. If not set a random slave is used, falling back to master if no slaves.");
-
-    ConfigKey<String> SLAVE_USERNAME = ConfigKeys.newStringConfigKey(
-            "mysql.slave.username", "The user name slaves will use to connect to the master", "slave");
-    ConfigKey<Collection<String>> SLAVE_REPLICATE_DO_DB = ConfigKeys.newConfigKey(GenericTypes.COLLECTION_STRING,
-            "mysql.slave.replicate_do_db", "Replicate only listed DBs. Use together with 'mysql.slave.replicate_dump_db'.");
-    ConfigKey<Collection<String>> SLAVE_REPLICATE_IGNORE_DB = ConfigKeys.newConfigKey(GenericTypes.COLLECTION_STRING,
-            "mysql.slave.replicate_ignore_db", "Don't replicate listed DBs. Use together with 'mysql.slave.replicate_dump_db'.");
-    ConfigKey<Collection<String>> SLAVE_REPLICATE_DO_TABLE = ConfigKeys.newConfigKey(GenericTypes.COLLECTION_STRING,
-            "mysql.slave.replicate_do_table", "Replicate only listed tables. Use together with 'mysql.slave.replicate_dump_db'.");
-    ConfigKey<Collection<String>> SLAVE_REPLICATE_IGNORE_TABLE = ConfigKeys.newConfigKey(GenericTypes.COLLECTION_STRING,
-            "mysql.slave.replicate_ignore_table", "Don't replicate listed tables. Use together with 'mysql.slave.replicate_dump_db'.");
-    ConfigKey<Collection<String>> SLAVE_REPLICATE_WILD_DO_TABLE = ConfigKeys.newConfigKey(GenericTypes.COLLECTION_STRING,
-            "mysql.slave.replicate_wild_do_table", "Replicate only listed tables, wildcards acepted. Use together with 'mysql.slave.replicate_dump_db'.");
-    ConfigKey<Collection<String>> SLAVE_REPLICATE_WILD_IGNORE_TABLE = ConfigKeys.newConfigKey(GenericTypes.COLLECTION_STRING,
-            "mysql.slave.replicate_wild_ignore_table", "Don't replicate listed tables, wildcards acepted. Use together with 'mysql.slave.replicate_dump_db'.");
-    ConfigKey<Collection<String>> SLAVE_REPLICATE_DUMP_DB = ConfigKeys.newConfigKey(GenericTypes.COLLECTION_STRING,
-            "mysql.slave.replicate_dump_db", "Databases to pass to the mysqldump command, used for slave initialization");
-    StringAttributeSensorAndConfigKey SLAVE_PASSWORD = new StringAttributeSensorAndConfigKey(
-            "mysql.slave.password", "The password slaves will use to connect to the master. Will be auto-generated by default.");
-    @SuppressWarnings("serial")
-    AttributeSensor<List<String>> SLAVE_DATASTORE_URL_LIST = Sensors.newSensor(new TypeToken<List<String>>() {},
-            "mysql.slave.datastore.url", "List of all slave's DATASTORE_URL sensors");
-    AttributeSensor<Double> QUERIES_PER_SECOND_FROM_MYSQL_PER_NODE = Sensors.newDoubleSensor("mysql.queries.perSec.fromMysql.perNode");
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
deleted file mode 100644
index d356fc5..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.annotation.Nullable;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic.ServiceNotUpLogic;
-import org.apache.brooklyn.core.mgmt.BrooklynTaskTags;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.group.DynamicClusterImpl;
-import org.apache.brooklyn.feed.function.FunctionFeed;
-import org.apache.brooklyn.feed.function.FunctionPollConfig;
-import org.apache.brooklyn.util.collections.CollectionFunctionals;
-import org.apache.brooklyn.util.core.ResourceUtils;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.TaskBuilder;
-import org.apache.brooklyn.util.guava.Functionals;
-import org.apache.brooklyn.util.guava.IfFunctions;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.apache.brooklyn.util.text.StringPredicates;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-import com.google.common.base.Predicates;
-import com.google.common.base.Supplier;
-import com.google.common.base.Suppliers;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-import com.google.common.reflect.TypeToken;
-
-// https://dev.mysql.com/doc/refman/5.7/en/replication-howto.html
-
-// TODO SSL connection between master and slave
-// TODO Promote slave to master
-public class MySqlClusterImpl extends DynamicClusterImpl implements MySqlCluster {
-    private static final AttributeSensor<Boolean> NODE_REPLICATION_INITIALIZED = Sensors.newBooleanSensor("mysql.replication_initialized");
-
-    private static final String MASTER_CONFIG_URL = "classpath:///org/apache/brooklyn/entity/database/mysql/mysql_master.conf";
-    private static final String SLAVE_CONFIG_URL = "classpath:///org/apache/brooklyn/entity/database/mysql/mysql_slave.conf";
-    protected static final int MASTER_SERVER_ID = 1;
-
-    @SuppressWarnings("serial")
-    private static final AttributeSensor<Supplier<Integer>> SLAVE_NEXT_SERVER_ID = Sensors.newSensor(new TypeToken<Supplier<Integer>>() {},
-            "mysql.slave.next_server_id", "Returns the ID of the next slave server");
-    @SuppressWarnings("serial")
-    protected static final AttributeSensor<Map<String, String>> SLAVE_ID_ADDRESS_MAPPING = Sensors.newSensor(new TypeToken<Map<String, String>>() {},
-            "mysql.slave.id_address_mapping", "Maps slave entity IDs to SUBNET_ADDRESS, so the address is known at member remove time.");
-
-    @Override
-    public void init() {
-        super.init();
-        // Set id supplier in attribute so it is serialized
-        sensors().set(SLAVE_NEXT_SERVER_ID, new NextServerIdSupplier());
-        sensors().set(SLAVE_ID_ADDRESS_MAPPING, new ConcurrentHashMap<String, String>());
-        if (getConfig(SLAVE_PASSWORD) == null) {
-            sensors().set(SLAVE_PASSWORD, Identifiers.makeRandomId(8));
-        } else {
-            sensors().set(SLAVE_PASSWORD, getConfig(SLAVE_PASSWORD));
-        }
-        initSubscriptions();
-    }
-
-    @Override
-    public void rebind() {
-        super.rebind();
-        initSubscriptions();
-    }
-
-    private void initSubscriptions() {
-        subscriptions().subscribeToMembers(this, MySqlNode.SERVICE_PROCESS_IS_RUNNING, new NodeRunningListener(this));
-        subscriptions().subscribe(this, MEMBER_REMOVED, new MemberRemovedListener());
-    }
-
-    @SuppressWarnings({ "unchecked", "rawtypes" })
-    @Override
-    protected void initEnrichers() {
-        super.initEnrichers();
-        propagateMasterAttribute(MySqlNode.HOSTNAME);
-        propagateMasterAttribute(MySqlNode.ADDRESS);
-        propagateMasterAttribute(MySqlNode.SUBNET_HOSTNAME);
-        propagateMasterAttribute(MySqlNode.SUBNET_ADDRESS);
-        propagateMasterAttribute(MySqlNode.MYSQL_PORT);
-        propagateMasterAttribute(MySqlNode.DATASTORE_URL);
-
-        enrichers().add(Enrichers.builder()
-                .aggregating(MySqlNode.DATASTORE_URL)
-                .publishing(SLAVE_DATASTORE_URL_LIST)
-                .computing((Function<Collection<String>, List<String>>)(Function)Functions.identity())
-                .entityFilter(Predicates.not(MySqlClusterUtils.IS_MASTER))
-                .fromMembers()
-                .build());
-
-        enrichers().add(Enrichers.builder()
-                .aggregating(MySqlNode.QUERIES_PER_SECOND_FROM_MYSQL)
-                .publishing(QUERIES_PER_SECOND_FROM_MYSQL_PER_NODE)
-                .fromMembers()
-                .computingAverage()
-                .defaultValueForUnreportedSensors(0d)
-                .build());
-    }
-
-    private void propagateMasterAttribute(AttributeSensor<?> att) {
-        enrichers().add(Enrichers.builder()
-                .aggregating(att)
-                .publishing(att)
-                .computing(IfFunctions.ifPredicate(CollectionFunctionals.notEmpty())
-                        .apply(CollectionFunctionals.firstElement())
-                        .defaultValue(null))
-                .entityFilter(MySqlClusterUtils.IS_MASTER)
-                .build());
-    }
-
-    @Override
-    protected EntitySpec<?> getFirstMemberSpec() {
-        final EntitySpec<?> firstMemberSpec = super.getFirstMemberSpec();
-        if (firstMemberSpec != null) {
-            return applyDefaults(firstMemberSpec, Suppliers.ofInstance(MASTER_SERVER_ID), MASTER_CONFIG_URL);
-        }
-
-        final EntitySpec<?> memberSpec = super.getMemberSpec();
-        if (memberSpec != null) {
-            return applyDefaults(memberSpec, Suppliers.ofInstance(MASTER_SERVER_ID), MASTER_CONFIG_URL);
-        }
-
-        return EntitySpec.create(MySqlNode.class)
-                .displayName("MySql Master")
-                .configure(MySqlNode.MYSQL_SERVER_ID, MASTER_SERVER_ID)
-                .configure(MySqlNode.TEMPLATE_CONFIGURATION_URL, MASTER_CONFIG_URL);
-    }
-
-    @Override
-    protected EntitySpec<?> getMemberSpec() {
-        Supplier<Integer> serverIdSupplier = getAttribute(SLAVE_NEXT_SERVER_ID);
-
-        EntitySpec<?> spec = super.getMemberSpec();
-        if (spec != null) {
-            return applyDefaults(spec, serverIdSupplier, SLAVE_CONFIG_URL);
-        }
-
-        return EntitySpec.create(MySqlNode.class)
-                .displayName("MySql Slave")
-                // Slave server IDs will not be linear because getMemberSpec not always results in createNode (result discarded)
-                .configure(MySqlNode.MYSQL_SERVER_ID, serverIdSupplier.get())
-                .configure(MySqlNode.TEMPLATE_CONFIGURATION_URL, SLAVE_CONFIG_URL);
-    }
-
-    private EntitySpec<?> applyDefaults(EntitySpec<?> spec, Supplier<Integer> serverId, String configUrl) {
-        boolean needsServerId = !isKeyConfigured(spec, MySqlNode.MYSQL_SERVER_ID);
-        boolean needsConfigUrl = !isKeyConfigured(spec, MySqlNode.TEMPLATE_CONFIGURATION_URL.getConfigKey());
-        if (needsServerId || needsConfigUrl) {
-            EntitySpec<?> clonedSpec = EntitySpec.create(spec);
-            if (needsServerId) {
-                clonedSpec.configure(MySqlNode.MYSQL_SERVER_ID, serverId.get());
-            }
-            if (needsConfigUrl) {
-                clonedSpec.configure(MySqlNode.TEMPLATE_CONFIGURATION_URL, configUrl);
-            }
-            return clonedSpec;
-        } else {
-            return spec;
-        }
-    }
-
-    private boolean isKeyConfigured(EntitySpec<?> spec, ConfigKey<?> key) {
-        return spec.getConfig().containsKey(key) || spec.getFlags().containsKey(key.getName());
-    }
-
-    @Override
-    protected Entity createNode(Location loc, Map<?, ?> flags) {
-        MySqlNode node = (MySqlNode) super.createNode(loc, flags);
-        if (!MySqlClusterUtils.IS_MASTER.apply(node)) {
-            EntityLocal localNode = (EntityLocal) node;
-            ServiceNotUpLogic.updateNotUpIndicator(localNode, MySqlSlave.SLAVE_HEALTHY, "Replication not started");
-
-            addFeed(FunctionFeed.builder()
-                .entity(localNode)
-                .period(Duration.FIVE_SECONDS)
-                .poll(FunctionPollConfig.forSensor(MySqlSlave.SLAVE_HEALTHY)
-                        .callable(new SlaveStateCallable(node))
-                        .checkSuccess(StringPredicates.isNonBlank())
-                        .onSuccess(new SlaveStateParser(node))
-                        .setOnFailure(false)
-                        .description("Polls SHOW SLAVE STATUS"))
-                .build());
-
-            node.enrichers().add(Enrichers.builder().updatingMap(Attributes.SERVICE_NOT_UP_INDICATORS)
-                    .from(MySqlSlave.SLAVE_HEALTHY)
-                    .computing(Functionals.ifNotEquals(true).value("Slave replication status is not healthy") )
-                    .build());
-        }
-        return node;
-    }
-
-    public static class SlaveStateCallable implements Callable<String> {
-        private MySqlNode slave;
-        public SlaveStateCallable(MySqlNode slave) {
-            this.slave = slave;
-        }
-
-        @Override
-        public String call() throws Exception {
-            if (Boolean.TRUE.equals(slave.getAttribute(MySqlNode.SERVICE_PROCESS_IS_RUNNING))) {
-                return MySqlClusterUtils.executeSqlOnNode(slave, "SHOW SLAVE STATUS \\G");
-            } else {
-                return null;
-            }
-        }
-
-    }
-
-    public static class SlaveStateParser implements Function<String, Boolean> {
-        private Entity slave;
-
-        public SlaveStateParser(Entity slave) {
-            this.slave = slave;
-        }
-
-        @Override
-        public Boolean apply(String result) {
-            Map<String, String> status = MySqlRowParser.parseSingle(result);
-            String secondsBehindMaster = status.get("Seconds_Behind_Master");
-            if (secondsBehindMaster != null && !"NULL".equals(secondsBehindMaster)) {
-                slave.sensors().set(MySqlSlave.SLAVE_SECONDS_BEHIND_MASTER, new Integer(secondsBehindMaster));
-            }
-            return "Yes".equals(status.get("Slave_IO_Running")) && "Yes".equals(status.get("Slave_SQL_Running"));
-        }
-
-    }
-
-    private static class NextServerIdSupplier implements Supplier<Integer> {
-        private AtomicInteger nextId = new AtomicInteger(MASTER_SERVER_ID+1);
-
-        @Override
-        public Integer get() {
-            return nextId.getAndIncrement();
-        }
-    }
-
-    // ============= Member Init =============
-
-    // The task is executed separately from the start effector, so failing here
-    // will not fail the start effector as well, but it will eventually time out
-    // because replication is not started.
-    // Would be nice to be able to plug in to the entity lifecycle!
-
-    private static final class NodeRunningListener implements SensorEventListener<Boolean> {
-        private MySqlCluster cluster;
-        private Semaphore lock = new Semaphore(1);
-
-        public NodeRunningListener(MySqlCluster cluster) {
-            this.cluster = cluster;
-        }
-
-        @Override
-        public void onEvent(SensorEvent<Boolean> event) {
-            final MySqlNode node = (MySqlNode) event.getSource();
-            if (Boolean.TRUE.equals(event.getValue()) &&
-                    // We are interested in SERVICE_PROCESS_IS_RUNNING only while haven't come online yet.
-                    // Probably will get several updates while replication is initialized so an additional
-                    // check is needed whether we have already seen this.
-                    Boolean.FALSE.equals(node.getAttribute(MySqlNode.SERVICE_UP)) &&
-                    !Boolean.TRUE.equals(node.getAttribute(NODE_REPLICATION_INITIALIZED))) {
-
-                // Events executed sequentially so no need to synchronize here.
-                node.sensors().set(NODE_REPLICATION_INITIALIZED, Boolean.TRUE);
-
-                final Runnable nodeInitTaskBody;
-                if (MySqlClusterUtils.IS_MASTER.apply(node)) {
-                    nodeInitTaskBody = new InitMasterTaskBody(cluster, node);
-                } else {
-                    nodeInitTaskBody = new InitSlaveTaskBody(cluster, node, lock);
-                }
-
-                DynamicTasks.submitTopLevelTask(TaskBuilder.builder()
-                        .displayName("setup master-slave replication")
-                        .body(nodeInitTaskBody)
-                        .tag(BrooklynTaskTags.tagForContextEntity(node))
-                        .tag(BrooklynTaskTags.NON_TRANSIENT_TASK_TAG)
-                        .build(),
-                        node);
-            }
-        }
-
-    }
-    
-    private static class InitMasterTaskBody implements Runnable {
-        private MySqlNode master;
-        private MySqlCluster cluster;
-        public InitMasterTaskBody(MySqlCluster cluster, MySqlNode master) {
-            this.cluster = cluster;
-            this.master = master;
-        }
-
-        @Override
-        public void run() {
-            String binLogInfo = MySqlClusterUtils.executeSqlOnNode(master, "FLUSH TABLES WITH READ LOCK;SHOW MASTER STATUS \\G UNLOCK TABLES;");
-            Map<String, String> status = MySqlRowParser.parseSingle(binLogInfo);
-            String file = status.get("File");
-            String position = status.get("Position");
-            if (file != null && position != null) {
-                cluster.sensors().set(MySqlCluster.REPLICATION_LAST_SLAVE_SNAPSHOT, new ReplicationSnapshot(null, null, file, Integer.parseInt(position)));
-            }
-
-            //NOTE: Will be executed on each start, analogously to the standard CREATION_SCRIPT config
-            String creationScript = getDatabaseCreationScriptAsString(master);
-            if (creationScript != null) {
-                master.invoke(MySqlNode.EXECUTE_SCRIPT, ImmutableMap.of("commands", creationScript));
-            }
-        }
-
-        @Nullable private static String getDatabaseCreationScriptAsString(Entity entity) {
-            String url = entity.getConfig(MySqlMaster.MASTER_CREATION_SCRIPT_URL);
-            if (!Strings.isBlank(url))
-                return new ResourceUtils(entity).getResourceAsString(url);
-            String contents = entity.getConfig(MySqlMaster.MASTER_CREATION_SCRIPT_CONTENTS);
-            if (!Strings.isBlank(contents))
-                return contents;
-            return null;
-        }
-    }
-
-    // ============= Member Remove =============
-
-    public class MemberRemovedListener implements SensorEventListener<Entity> {
-        @Override
-        public void onEvent(SensorEvent<Entity> event) {
-            MySqlCluster cluster = (MySqlCluster) event.getSource();
-            Entity node = event.getValue();
-            String slaveAddress = cluster.getAttribute(SLAVE_ID_ADDRESS_MAPPING).remove(node.getId());
-            if (slaveAddress != null) {
-                // Could already be gone if stopping the entire app - let it throw an exception
-                MySqlNode master = (MySqlNode) Iterables.find(cluster.getMembers(), MySqlClusterUtils.IS_MASTER);
-                String username = MySqlClusterUtils.validateSqlParam(cluster.getConfig(SLAVE_USERNAME));
-                MySqlClusterUtils.executeSqlOnNodeAsync(master, String.format("DROP USER '%s'@'%s';", username, slaveAddress));
-            }
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterUtils.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterUtils.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterUtils.java
deleted file mode 100644
index 9f8dc6d..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterUtils.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.mgmt.Task;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.core.entity.EntityPredicates;
-import org.apache.brooklyn.entity.database.DatastoreMixins.CanExecuteScript;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableMap;
-
-public class MySqlClusterUtils {
-    protected static final Predicate<Entity> IS_MASTER = EntityPredicates.configEqualTo(MySqlNode.MYSQL_SERVER_ID, MySqlClusterImpl.MASTER_SERVER_ID);
-
-    protected static String executeSqlOnNode(MySqlNode node, String commands) {
-        return executeSqlOnNodeAsync(node, commands).getUnchecked();
-    }
-
-    // Can't call node.executeScript directly, need to change execution context, so use an effector task
-    protected static Task<String> executeSqlOnNodeAsync(MySqlNode node, String commands) {
-        return DynamicTasks.queue(Effectors.invocation(node, MySqlNode.EXECUTE_SCRIPT, ImmutableMap.of(CanExecuteScript.COMMANDS.getName(), commands))).asTask();
-    }
-
-    protected static String validateSqlParam(String config) {
-        // Don't go into escape madness, just deny any suspicious strings.
-        // Would be nice to use prepared statements, but not worth pulling in the extra dependencies.
-        if (config.contains("'") && config.contains("\\")) {
-            throw new IllegalStateException("User provided string contains illegal SQL characters: " + config);
-        }
-        return config;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlDriver.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlDriver.java
deleted file mode 100644
index b4da5f9..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlDriver.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper;
-
-/**
- * The {@link SoftwareProcessDriver} for MySQL.
- */
-public interface MySqlDriver extends SoftwareProcessDriver {
-    String getStatusCmd();
-    ProcessTaskWrapper<Integer> executeScriptAsync(String commands);
-    ProcessTaskWrapper<Integer> executeScriptFromInstalledFileAsync(String filenameAlreadyInstalledAtServer);
-    ProcessTaskWrapper<Integer> dumpDatabase(String additionalOptions, String dumpDestination);
-    void changePassword(String oldPass, String newPass);
-}


[25/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbLiveEc2Test.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbLiveEc2Test.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbLiveEc2Test.java
deleted file mode 100644
index 362e966..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbLiveEc2Test.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mariadb;
-
-import static org.testng.Assert.assertNotNull;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityAsserts;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.location.jclouds.JcloudsLocation;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-@Test(groups = { "Live" })
-public class MariaDbLiveEc2Test extends AbstractEc2LiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        // TODO For some CentOS VMs (e.g. in AWS 6.3, us-east-1/ami-a96b01c0), currently need to turn off iptables unfortunately.
-        // Should really just open the ports in iptables.
-        MariaDbNode mariadb = app.createAndManageChild(EntitySpec.create(MariaDbNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, MariaDbIntegrationTest.CREATION_SCRIPT)
-                .configure(MariaDbNode.PROVISIONING_PROPERTIES.subKey(JcloudsLocation.STOP_IPTABLES.getName()), true));
-
-        app.start(ImmutableList.of(loc));
-
-        new VogellaExampleAccess("com.mysql.jdbc.Driver", mariadb.getAttribute(DatastoreCommon.DATASTORE_URL)).readModifyAndRevertDataBase();
-    }
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_Debian_7_2() throws Exception { } // Disabled because MariaDB not available
-
-    @Test(groups = {"Live"})
-    public void testWithOnlyPort22() throws Exception {
-        // CentOS-6.3-x86_64-GA-EBS-02-85586466-5b6c-4495-b580-14f72b4bcf51-ami-bb9af1d2.1
-        jcloudsLocation = mgmt.getLocationRegistry().resolve(LOCATION_SPEC, ImmutableMap.of(
-                "tags", ImmutableList.of(getClass().getName()),
-                "imageId", "us-east-1/ami-a96b01c0", 
-                "hardwareId", SMALL_HARDWARE_ID));
-
-        MariaDbNode server = app.createAndManageChild(EntitySpec.create(MariaDbNode.class)
-                .configure(MariaDbNode.PROVISIONING_PROPERTIES.subKey(CloudLocationConfig.INBOUND_PORTS.getName()), ImmutableList.of(22)));
-        
-        app.start(ImmutableList.of(jcloudsLocation));
-        
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_UP, true);
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-        
-        Integer port = server.getAttribute(MariaDbNode.MARIADB_PORT);
-        assertNotNull(port);
-        
-        assertViaSshLocalPortListeningEventually(server, port);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbLiveRackspaceTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbLiveRackspaceTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbLiveRackspaceTest.java
deleted file mode 100644
index b5474f8..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbLiveRackspaceTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mariadb;
-
-import java.util.Arrays;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.location.jclouds.JcloudsLocation;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.net.Protocol;
-import org.apache.brooklyn.util.ssh.IptablesCommands;
-import org.apache.brooklyn.util.ssh.IptablesCommands.Chain;
-import org.apache.brooklyn.util.ssh.IptablesCommands.Policy;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * The MariaDbLiveTest installs MariaDb on various operating systems like Ubuntu, CentOS, Red Hat etc. To make sure that
- * MariaDb works like expected on these Operating Systems.
- */
-public class MariaDbLiveRackspaceTest extends MariaDbIntegrationTest {
-    @Test(groups = {"Live"})
-    public void test_Debian_6() throws Exception {
-        test("Debian 6");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_Ubuntu_10_0() throws Exception {
-        test("Ubuntu 10.0");
-    }
-
-    @Test(groups = {"Live", "Live-sanity"})
-    public void test_Ubuntu_12_0() throws Exception {
-        test("Ubuntu 12.0");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_Ubuntu_13() throws Exception {
-        test("Ubuntu 13");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_CentOS_6() throws Exception {
-        test("CentOS 6");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_CentOS_5() throws Exception {
-        test("CentOS 5");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_Fedora() throws Exception {
-        test("Fedora ");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_Red_Hat_Enterprise_Linux_6() throws Exception {
-        test("Red Hat Enterprise Linux 6");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_localhost() throws Exception {
-        super.test_localhost();
-    }
-
-    public void test(String osRegex) throws Exception {
-        MariaDbNode mariadb = tapp.createAndManageChild(EntitySpec.create(MariaDbNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, CREATION_SCRIPT));
-
-        brooklynProperties.put("brooklyn.location.jclouds.rackspace-cloudservers-uk.imageNameRegex", osRegex);
-        brooklynProperties.remove("brooklyn.location.jclouds.rackspace-cloudservers-uk.image-id");
-        brooklynProperties.remove("brooklyn.location.jclouds.rackspace-cloudservers-uk.imageId");
-        brooklynProperties.put("brooklyn.location.jclouds.rackspace-cloudservers-uk.inboundPorts", Arrays.asList(22, 3306));
-        JcloudsLocation jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve("jclouds:rackspace-cloudservers-uk");
-
-        tapp.start(ImmutableList.of(jcloudsLocation));
-
-        SshMachineLocation l = (SshMachineLocation) mariadb.getLocations().iterator().next();
-        l.execCommands("add iptables rule", ImmutableList.of(IptablesCommands.insertIptablesRule(Chain.INPUT, Protocol.TCP, 3306, Policy.ACCEPT)));
-
-        new VogellaExampleAccess("com.mysql.jdbc.Driver", mariadb.getAttribute(DatastoreCommon.DATASTORE_URL)).readModifyAndRevertDataBase();
-    } 
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterIntegrationTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterIntegrationTest.java
deleted file mode 100644
index baaefe4..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterIntegrationTest.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotEquals;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.effector.EffectorTasks;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.apache.brooklyn.entity.database.mysql.MySqlCluster.MySqlMaster;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.util.core.task.ssh.SshTasks;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Strings;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-public class MySqlClusterIntegrationTest extends BrooklynAppLiveTestSupport {
-
-    private static final String TEST_LOCATION = "localhost";
-
-    @Test(groups="Integration")
-    public void testAllNodesInit() throws Exception {
-        try {
-            MySqlClusterTestHelper.test(app, getLocation());
-        } finally {
-            cleanData();
-        }
-    }
-
-    @Test(groups = {"Integration"})
-    public void testMasterInit() throws Exception {
-        try {
-            MySqlClusterTestHelper.testMasterInit(app, getLocation());
-        } finally {
-            cleanData();
-        }
-    }
-
-    @Test(groups="Integration")
-    public void testDumpReplication() throws Exception {
-        try {
-            Location loc = getLocation();
-            EntitySpec<MySqlCluster> clusterSpec = EntitySpec.create(MySqlCluster.class)
-                    .configure(MySqlMaster.MASTER_CREATION_SCRIPT_CONTENTS, MySqlClusterTestHelper.CREATION_SCRIPT)
-                    .configure(MySqlNode.MYSQL_SERVER_CONF, MySqlClusterTestHelper.minimalMemoryConfig());
-            MySqlCluster cluster = MySqlClusterTestHelper.initCluster(app, loc, clusterSpec);
-            MySqlNode master = (MySqlNode) cluster.getAttribute(MySqlCluster.FIRST);
-            purgeLogs(cluster, master);
-
-            // test dump replication from master
-            MySqlNode slave = (MySqlNode) Iterables.getOnlyElement(cluster.invoke(MySqlCluster.RESIZE_BY_DELTA, ImmutableMap.of("delta", 1)).getUnchecked());
-            assertEquals(cluster.getAttribute(MySqlCluster.REPLICATION_LAST_SLAVE_SNAPSHOT).getEntityId(), master.getId());
-            MySqlClusterTestHelper.assertReplication(master, slave);
-
-            // test dump replication from slave, missing dump on node
-            deleteSnapshot(cluster);
-            cluster.config().set(MySqlCluster.REPLICATION_PREFERRED_SOURCE, slave.getId());
-            MySqlNode secondSlave = (MySqlNode) Iterables.getOnlyElement(cluster.invoke(MySqlCluster.RESIZE_BY_DELTA, ImmutableMap.of("delta", 1)).getUnchecked());
-            assertEquals(cluster.getAttribute(MySqlCluster.REPLICATION_LAST_SLAVE_SNAPSHOT).getEntityId(), slave.getId());
-            MySqlClusterTestHelper.assertReplication(master, secondSlave);
-
-            // test dump replication from slave, missing snapshot entity
-            Entities.destroy(slave);
-            cluster.config().set(MySqlCluster.REPLICATION_PREFERRED_SOURCE, secondSlave.getId());
-            MySqlNode thirdSlave = (MySqlNode) Iterables.getOnlyElement(cluster.invoke(MySqlCluster.RESIZE_BY_DELTA, ImmutableMap.of("delta", 1)).getUnchecked());
-            assertEquals(cluster.getAttribute(MySqlCluster.REPLICATION_LAST_SLAVE_SNAPSHOT).getEntityId(), secondSlave.getId());
-            MySqlClusterTestHelper.assertReplication(master, thirdSlave);
-        } finally {
-            cleanData();
-        }
-    }
-
-    @Test(groups="Integration")
-    public void testReplicationDatabaseFiltering() throws Exception {
-        try {
-            Location loc = getLocation();
-            EntitySpec<MySqlCluster> clusterSpec = EntitySpec.create(MySqlCluster.class)
-                    .configure(MySqlMaster.MASTER_CREATION_SCRIPT_CONTENTS, MySqlClusterTestHelper.CREATION_SCRIPT)
-                    .configure(MySqlNode.MYSQL_SERVER_CONF, MySqlClusterTestHelper.minimalMemoryConfig())
-                    .configure(MySqlCluster.SLAVE_REPLICATE_DO_DB, ImmutableList.of("feedback", "items", "mysql"))
-                    .configure(MySqlCluster.SLAVE_REPLICATE_DUMP_DB, ImmutableList.of("feedback", "items", "mysql"));
-
-            MySqlCluster cluster = MySqlClusterTestHelper.initCluster(app, loc, clusterSpec);
-            MySqlNode master = (MySqlNode) cluster.getAttribute(MySqlCluster.FIRST);
-            purgeLogs(cluster, master);
-
-            // test dump replication from master
-            MySqlNode slave = (MySqlNode) Iterables.getOnlyElement(cluster.invoke(MySqlCluster.RESIZE_BY_DELTA, ImmutableMap.of("delta", 1)).getUnchecked());
-            assertEquals(cluster.getAttribute(MySqlCluster.REPLICATION_LAST_SLAVE_SNAPSHOT).getEntityId(), master.getId());
-            MySqlClusterTestHelper.assertReplication(master, slave, "db_filter_test");
-        } finally {
-            cleanData();
-        }
-    }
-
-    private void deleteSnapshot(MySqlCluster cluster) {
-        ReplicationSnapshot replicationSnapshot = cluster.getAttribute(MySqlCluster.REPLICATION_LAST_SLAVE_SNAPSHOT);
-        Entity snapshotEntity = mgmt.getEntityManager().getEntity(replicationSnapshot.getEntityId());
-        SshMachineLocation machine = EffectorTasks.getSshMachine(snapshotEntity);
-        Entities.submit(snapshotEntity, SshEffectorTasks.ssh(
-                "cd $RUN_DIR",
-                "rm " + replicationSnapshot.getSnapshotPath())
-            .summary("clear snapshot")
-            .machine(machine)
-            .environmentVariable("RUN_DIR", snapshotEntity.getAttribute(MySqlNode.RUN_DIR))
-            .requiringExitCodeZero())
-        .asTask()
-        .getUnchecked();
-    }
-
-    private void purgeLogs(MySqlCluster cluster, MySqlNode master) {
-        String preFlushBinaryLogFile = getBinaryLogFile(master);
-        ReplicationSnapshot replicationSnapshot = master.getParent().getAttribute(MySqlCluster.REPLICATION_LAST_SLAVE_SNAPSHOT);
-        assertEquals(preFlushBinaryLogFile, replicationSnapshot.getBinLogName());
-        MySqlClusterTestHelper.execSql(master, "FLUSH LOGS");
-        String postFlushBinaryLogFile = getBinaryLogFile(master);
-        waitSlavesCatchUp(cluster, postFlushBinaryLogFile);
-        assertNotEquals(postFlushBinaryLogFile, preFlushBinaryLogFile);
-        MySqlClusterTestHelper.execSql(master, "PURGE BINARY LOGS TO '" + postFlushBinaryLogFile + "';");
-        assertFalse(fileExists(master, preFlushBinaryLogFile));
-    }
-
-    private void waitSlavesCatchUp(final MySqlCluster cluster, final String binLog) {
-        Asserts.succeedsEventually(new Runnable() {
-            @Override
-            public void run() {
-                MySqlNode master = (MySqlNode) cluster.getAttribute(MySqlCluster.FIRST);
-                for (Entity node : cluster.getMembers()) {
-                    if (node == master) continue;
-                    String status = MySqlClusterTestHelper.execSql((MySqlNode) node, "SHOW SLAVE STATUS \\G");
-                    Map<String, String> map = MySqlRowParser.parseSingle(status);
-                    assertEquals(map.get("Relay_Master_Log_File"), binLog);
-                }
-            }
-        });
-    }
-    private String getBinaryLogFile(MySqlNode master) {
-        String status = MySqlClusterTestHelper.execSql(master, "SHOW MASTER STATUS \\G");
-        Map<String, String> map = MySqlRowParser.parseSingle(status);
-        return map.get("File");
-    }
-    private boolean fileExists(MySqlNode node, String binLogName) {
-        String dataDir = Strings.nullToEmpty(node.getConfig(MySqlNode.DATA_DIR));
-        String path = Os.mergePathsUnix(dataDir, binLogName);
-        String cmd = BashCommands.chain(
-                "cd $RUN_DIR",
-                BashCommands.requireTest(String.format("-f \"%s\"", path), "File " + path + " doesn't exist."));
-        String summary = "Check if file " + path + " exists";
-        SshMachineLocation machine = EffectorTasks.getSshMachine(node);
-        return Entities.submit(node, SshTasks.newSshExecTaskFactory(machine, cmd)
-                .allowingNonZeroExitCode()
-                .environmentVariable("RUN_DIR", node.getAttribute(SoftwareProcess.RUN_DIR))
-                .summary(summary)
-                .allowingNonZeroExitCode()).asTask().getUnchecked() == 0;
-    }
-    private void cleanData() {
-        if (app.getChildren().isEmpty()) return;
-        for (Entity member : Iterables.getOnlyElement(app.getChildren()).getChildren()) {
-            String runDir = member.getAttribute(MySqlNode.RUN_DIR);
-            if (runDir != null) {
-                Os.deleteRecursively(runDir);
-            }
-        }
-    }
-
-    private Location getLocation() {
-        return mgmt.getLocationRegistry().resolve(TEST_LOCATION);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterLiveEc2Test.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterLiveEc2Test.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterLiveEc2Test.java
deleted file mode 100644
index 93fe0c9..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterLiveEc2Test.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import org.testng.annotations.Test;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-
-@Test(groups = { "Live" })
-public class MySqlClusterLiveEc2Test extends AbstractEc2LiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        MySqlClusterTestHelper.test(app, loc);
-    }
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_Debian_7_2() throws Exception { } // Disabled because MySQl not available
-
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this really does have test methods  
-
-}
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterLiveSoftlayerTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterLiveSoftlayerTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterLiveSoftlayerTest.java
deleted file mode 100644
index c711265..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterLiveSoftlayerTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import org.testng.annotations.Test;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.entity.AbstractSoftlayerLiveTest;
-
-@Test(groups = { "Live" })
-public class MySqlClusterLiveSoftlayerTest extends AbstractSoftlayerLiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        MySqlClusterTestHelper.test(app, loc);
-    }
-
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this really does have test methods  
-
-}
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterTestHelper.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterTestHelper.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterTestHelper.java
deleted file mode 100644
index 71c0165..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterTestHelper.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-
-import java.util.List;
-import java.util.Set;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.entity.database.mysql.MySqlCluster.MySqlMaster;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Joiner;
-import com.google.common.base.Predicates;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-/**
- * Runs a slightly modified version of the popular Vogella MySQL tutorial,
- * from
- * http://www.vogella.de/articles/MySQLJava/article.html
- */
-public class MySqlClusterTestHelper {
-    public static final Logger log = LoggerFactory.getLogger(MySqlClusterTestHelper.class);
-
-    // From http://www.vogella.de/articles/MySQLJava/article.html
-    public static final String CREATION_SCRIPT = Joiner.on("\n").join(ImmutableList.of(
-            "CREATE DATABASE feedback;",
-            "CREATE USER 'sqluser'@'localhost' IDENTIFIED BY 'sqluserpw';",
-            "GRANT USAGE ON *.* TO 'sqluser'@'localhost';",
-            "GRANT ALL PRIVILEGES ON feedback.* TO 'sqluser'@'localhost';",
-            "CREATE USER 'sqluser'@'%' IDENTIFIED BY 'sqluserpw';",
-            "GRANT USAGE ON *.* TO 'sqluser'@'%';",
-            "GRANT ALL PRIVILEGES ON feedback.* TO 'sqluser'@'%';",
-            "FLUSH PRIVILEGES;",
-            "USE feedback;",
-            "CREATE TABLE COMMENTS (",
-            "        id INT NOT NULL AUTO_INCREMENT,", 
-            "        MYUSER VARCHAR(30) NOT NULL,",
-            "        EMAIL VARCHAR(30), ",
-            "        WEBPAGE VARCHAR(100) NOT NULL,", 
-            "        DATUM DATE NOT NULL, ",
-            "        SUMMARY VARCHAR(40) NOT NULL,",
-            "        COMMENTS VARCHAR(400) NOT NULL,",
-            "        PRIMARY KEY (ID)",
-            "    );",
-            "",
-            "INSERT INTO COMMENTS values (default, 'lars', 'myemail@gmail.com','http://www.vogella.de', '2009-09-14 10:33:11', 'Summary','My first comment' );",
-            "",
-            "CREATE DATABASE items;",
-            "GRANT ALL PRIVILEGES ON items.* TO 'sqluser'@'localhost';",
-            "GRANT ALL PRIVILEGES ON items.* TO 'sqluser'@'%';",
-            "FLUSH PRIVILEGES;",
-            "",
-            "USE items;",
-            "CREATE TABLE INVENTORY (MYUSER VARCHAR(30) NOT NULL);",
-            "INSERT INTO INVENTORY values ('lars');",
-            "",
-            "CREATE DATABASE db_filter_test;",
-            "USE db_filter_test;",
-            "CREATE TABLE FILTERED (id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (ID));"
-            ));
-
-    public static void test(TestApplication app, Location location) throws Exception {
-        test(app, location, EntitySpec.create(MySqlCluster.class)
-                .configure(MySqlCluster.INITIAL_SIZE, 2)
-                .configure(MySqlNode.CREATION_SCRIPT_CONTENTS, CREATION_SCRIPT)
-                .configure(MySqlNode.MYSQL_SERVER_CONF, minimalMemoryConfig()));
-    }
-
-    public static MutableMap<String, Object> minimalMemoryConfig() {
-        // http://www.tocker.ca/2014/03/10/configuring-mysql-to-use-minimal-memory.html
-        return MutableMap.<String, Object>of()
-                .add("skip-name-resolve","")
-                .add("performance_schema","0")
-                .add("innodb_buffer_pool_size","5M")
-                .add("innodb_log_buffer_size","256K")
-                .add("query_cache_size","0")
-                .add("max_connections","10")
-                .add("key_buffer_size","8")
-                .add("thread_cache_size","0")
-                .add("host_cache_size","0")
-                .add("innodb_ft_cache_size","1600000")
-                .add("innodb_ft_total_cache_size","32000000")
-
-                // per thread or per operation settings
-                .add("thread_stack","131072")
-                .add("sort_buffer_size","32K")
-                .add("read_buffer_size","8200")
-                .add("read_rnd_buffer_size","8200")
-                .add("max_heap_table_size","16K")
-                .add("tmp_table_size","1K")
-                .add("bulk_insert_buffer_size","0")
-                .add("join_buffer_size","128")
-                .add("net_buffer_length","1K")
-                .add("innodb_sort_buffer_size","64K")
-
-                // settings that relate to the binary log (if enabled)
-                .add("binlog_cache_size","4K")
-                .add("binlog_stmt_cache_size","4K");
-    }
-
-    public static void testMasterInit(TestApplication app, Location location) throws Exception {
-        test(app, location, EntitySpec.create(MySqlCluster.class)
-                .configure(MySqlCluster.INITIAL_SIZE, 2)
-                .configure(MySqlMaster.MASTER_CREATION_SCRIPT_CONTENTS, CREATION_SCRIPT)
-                .configure(MySqlNode.MYSQL_SERVER_CONF, minimalMemoryConfig()));
-    }
-
-    public static void test(TestApplication app, Location location, EntitySpec<MySqlCluster> clusterSpec) throws Exception {
-        MySqlCluster cluster = initCluster(app, location, clusterSpec);
-        MySqlNode master = (MySqlNode) cluster.getAttribute(MySqlCluster.FIRST);
-        MySqlNode slave = (MySqlNode) Iterables.find(cluster.getMembers(), Predicates.not(Predicates.<Entity>equalTo(master)));
-        assertEquals(cluster.getMembers().size(), 2);
-        assertEquals(cluster.getAttribute(MySqlCluster.SLAVE_DATASTORE_URL_LIST).size(), 1);
-        assertEquals(cluster.getAttribute(MySqlNode.DATASTORE_URL), master.getAttribute(MySqlNode.DATASTORE_URL));
-        assertReplication(master, slave);
-    }
-
-    public static void assertReplication(MySqlNode master, MySqlNode slave, String... notReplicatedSchemas) throws ClassNotFoundException, Exception {
-        VogellaExampleAccess masterDb = new VogellaExampleAccess("com.mysql.jdbc.Driver", master.getAttribute(MySqlNode.DATASTORE_URL));
-        VogellaExampleAccess slaveDb = new VogellaExampleAccess("com.mysql.jdbc.Driver", slave.getAttribute(MySqlNode.DATASTORE_URL));
-        masterDb.connect();
-        slaveDb.connect();
-
-        assertSlave(masterDb, slaveDb, 1);
-        masterDb.modifyDataBase();
-        masterDb.execute("items", "INSERT INTO INVENTORY values (?);", "Test");
-        assertSlave(masterDb, slaveDb, 2);
-        masterDb.revertDatabase();
-        masterDb.execute("items", "delete from INVENTORY where myuser= ?;", "Test");
-        assertSlave(masterDb, slaveDb, 1);
-
-        Set<String> dbSchemas = slaveDb.getSchemas();
-        for (String schema : notReplicatedSchemas) {
-            assertFalse(dbSchemas.contains(schema), "Database " + schema + " exists on slave");
-        }
-
-        masterDb.close();
-        slaveDb.close();
-
-        log.info("Ran vogella MySQL example -- SUCCESS");
-    }
-
-    public static MySqlCluster initCluster(TestApplication app, Location location, EntitySpec<MySqlCluster> spec) {
-        MySqlCluster mysql = app.createAndManageChild(spec);
-        app.start(ImmutableList.of(location));
-        log.info("MySQL started");
-        return mysql;
-    }
-
-    private static void assertSlave(final VogellaExampleAccess masterDb, final VogellaExampleAccess slaveDb, final int recordCnt) throws Exception {
-        Asserts.succeedsEventually(new Runnable() {
-            private static final String QUERY = "SELECT C.myuser, webpage, datum, summary, COMMENTS from COMMENTS as C INNER JOIN items.INVENTORY as I ON C.MYUSER=I.MYUSER";
-            @Override
-            public void run() {
-                try {
-                    List<List<String>> masterResult = masterDb.read(QUERY);
-                    assertEquals(masterResult.size(), recordCnt);
-                    assertEquals(masterResult, slaveDb.read(QUERY));
-                } catch (Exception e) {
-                    throw Exceptions.propagate(e);
-                }
-            }
-        });
-    }
-
-    public static String execSql(MySqlNode node, String cmd) {
-        return node.invoke(MySqlNode.EXECUTE_SCRIPT, ImmutableMap.of("commands", cmd)).asTask().getUnchecked();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlIntegrationTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlIntegrationTest.java
deleted file mode 100644
index 139a1e7..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlIntegrationTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import java.io.File;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.os.Os;
-
-import com.google.common.base.Joiner;
-import com.google.common.collect.ImmutableList;
-import com.google.common.io.Files;
-
-/**
- * Runs a slightly modified version of the popular Vogella MySQL tutorial,
- * from
- * http://www.vogella.de/articles/MySQLJava/article.html
- */
-public class MySqlIntegrationTest extends BrooklynAppLiveTestSupport {
-
-    public static final Logger log = LoggerFactory.getLogger(MySqlIntegrationTest.class);
-    
-    // can start in AWS by running this -- or use brooklyn CLI/REST for most clouds, or programmatic/config for set of fixed IP machines
-    static String hostname = Networking.getLocalHost().getHostName();
-
-    // From http://www.vogella.de/articles/MySQLJava/article.html
-    // Expects COMMENTS to be injected as the test.table.name config value, for VogellaExampleAccess to work.
-    public static final String CREATION_SCRIPT = Joiner.on("\n").join(ImmutableList.of(
-            "CREATE DATABASE feedback;",
-            "CREATE USER 'sqluser'@'localhost' IDENTIFIED BY 'sqluserpw';",
-            "GRANT USAGE ON *.* TO 'sqluser'@'localhost';",
-            "GRANT ALL PRIVILEGES ON feedback.* TO 'sqluser'@'localhost';",
-            "CREATE USER 'sqluser'@'%' IDENTIFIED BY 'sqluserpw';",
-            "GRANT USAGE ON *.* TO 'sqluser'@'%';",
-            "GRANT ALL PRIVILEGES ON feedback.* TO 'sqluser'@'%';",
-            "CREATE USER 'sqluser'@'$hostname' IDENTIFIED BY 'sqluserpw';",
-            "GRANT USAGE ON *.* TO 'sqluser'@'$hostname';",
-            "GRANT ALL PRIVILEGES ON feedback.* TO 'sqluser'@'$hostname';",
-            "FLUSH PRIVILEGES;",
-            "USE feedback;",
-            "CREATE TABLE ${config['test.table.name']} (",
-            "        id INT NOT NULL AUTO_INCREMENT,", 
-            "        MYUSER VARCHAR(30) NOT NULL,",
-            "        EMAIL VARCHAR(30), ",
-            "        WEBPAGE VARCHAR(100) NOT NULL,", 
-            "        DATUM DATE NOT NULL, ",
-            "        SUMMARY VARCHAR(40) NOT NULL,",
-            "        COMMENTS VARCHAR(400) NOT NULL,",
-            "        PRIMARY KEY (ID)",
-            "    );",
-            "",
-            "INSERT INTO ${config['test.table.name']} values (default, 'lars', 'myemail@gmail.com','http://www.vogella.de', '2009-09-14 10:33:11', 'Summary','My first comment' );"
-            ));
-
-    @Test(groups = {"Integration"})
-    public void test_localhost() throws Exception {
-        File dataDir = Files.createTempDir();
-        try {
-            MySqlNode mysql = app.createAndManageChild(EntitySpec.create(MySqlNode.class)
-                    .configure("mysql.server.conf", MutableMap.of("skip-name-resolve",""))
-                    .configure("creationScriptContents", CREATION_SCRIPT)
-                    .configure("dataDir", dataDir.getAbsolutePath())
-                    .configure("test.table.name", "COMMENTS")); // to ensure creation script is templated
-            LocalhostMachineProvisioningLocation location = new LocalhostMachineProvisioningLocation();
-            
-            app.start(ImmutableList.of(location));;
-            log.info("MySQL started");
-    
-            new VogellaExampleAccess("com.mysql.jdbc.Driver", mysql.getAttribute(MySqlNode.DATASTORE_URL)).readModifyAndRevertDataBase();
-    
-            log.info("Ran vogella MySQL example -- SUCCESS");
-    
-            // Ensure the data directory was successfully overridden.
-            File mysqlSubdirFile = new File(dataDir, "mysql");
-            Assert.assertTrue(mysqlSubdirFile.exists());
-        } finally {
-            Os.deleteRecursively(dataDir);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlLiveEc2Test.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlLiveEc2Test.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlLiveEc2Test.java
deleted file mode 100644
index c727d2f..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlLiveEc2Test.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import static org.testng.Assert.assertNotNull;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityAsserts;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-@Test(groups = { "Live" })
-public class MySqlLiveEc2Test extends AbstractEc2LiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        MySqlNode mysql = app.createAndManageChild(EntitySpec.create(MySqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, MySqlIntegrationTest.CREATION_SCRIPT)
-                .configure("test.table.name", "COMMENTS"));
-
-        app.start(ImmutableList.of(loc));
-
-        new VogellaExampleAccess("com.mysql.jdbc.Driver", mysql.getAttribute(DatastoreCommon.DATASTORE_URL)).readModifyAndRevertDataBase();
-    }
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_Debian_7_2() throws Exception { } // Disabled because MySQl not available
-
-    @Test(groups = {"Live"})
-    public void testWithOnlyPort22() throws Exception {
-        // CentOS-6.3-x86_64-GA-EBS-02-85586466-5b6c-4495-b580-14f72b4bcf51-ami-bb9af1d2.1
-        jcloudsLocation = mgmt.getLocationRegistry().resolve(LOCATION_SPEC, ImmutableMap.of(
-                "tags", ImmutableList.of(getClass().getName()),
-                "imageId", "us-east-1/ami-a96b01c0", 
-                "hardwareId", SMALL_HARDWARE_ID));
-
-        MySqlNode server = app.createAndManageChild(EntitySpec.create(MySqlNode.class)
-                .configure(MySqlNode.PROVISIONING_PROPERTIES.subKey(CloudLocationConfig.INBOUND_PORTS.getName()), ImmutableList.of(22)));
-        
-        app.start(ImmutableList.of(jcloudsLocation));
-        
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_UP, true);
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-        
-        Integer port = server.getAttribute(MySqlNode.MYSQL_PORT);
-        assertNotNull(port);
-        
-        assertViaSshLocalPortListeningEventually(server, port);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlLiveGceTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlLiveGceTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlLiveGceTest.java
deleted file mode 100644
index 45202a0..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlLiveGceTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.AbstractGoogleComputeLiveTest;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = { "Live" })
-public class MySqlLiveGceTest extends AbstractGoogleComputeLiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        MySqlNode mysql = app.createAndManageChild(EntitySpec.create(MySqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, MySqlIntegrationTest.CREATION_SCRIPT)
-                .configure("test.table.name", "COMMENTS"));
-
-        app.start(ImmutableList.of(loc));
-
-        new VogellaExampleAccess("com.mysql.jdbc.Driver", mysql.getAttribute(DatastoreCommon.DATASTORE_URL)).readModifyAndRevertDataBase();
-    }
-
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this really does have test methods  
-
-}
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlLiveRackspaceTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlLiveRackspaceTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlLiveRackspaceTest.java
deleted file mode 100644
index 46396fd..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlLiveRackspaceTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import java.util.Arrays;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.internal.BrooklynProperties;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.location.jclouds.JcloudsLocation;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.net.Protocol;
-import org.apache.brooklyn.util.ssh.IptablesCommands;
-import org.apache.brooklyn.util.ssh.IptablesCommands.Chain;
-import org.apache.brooklyn.util.ssh.IptablesCommands.Policy;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * The MySqlLiveTest installs MySQL on various operating systems like Ubuntu, CentOS, Red Hat etc. To make sure that
- * MySQL works like expected on these Operating Systems.
- */
-public class MySqlLiveRackspaceTest extends MySqlIntegrationTest {
-    @Test(groups = {"Live"})
-    public void test_Debian_6() throws Exception {
-        test("Debian 6");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_Ubuntu_10_0() throws Exception {
-        test("Ubuntu 10.0");
-    }
-
-    @Test(groups = {"Live", "Live-sanity"})
-    public void test_Ubuntu_12_0() throws Exception {
-        test("Ubuntu 12.0");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_Ubuntu_13() throws Exception {
-        test("Ubuntu 13");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_CentOS_6() throws Exception {
-        test("CentOS 6");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_CentOS_5() throws Exception {
-        test("CentOS 5");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_Fedora() throws Exception {
-        test("Fedora ");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_Red_Hat_Enterprise_Linux_6() throws Exception {
-        test("Red Hat Enterprise Linux 6");
-    }
-
-    @Test(enabled=false, groups = {"Live"}) // only run this in MySqlIntegrationTest
-    public void test_localhost() throws Exception {
-        super.test_localhost();
-    }
-
-    public void test(String osRegex) throws Exception {
-        MySqlNode mysql = app.createAndManageChild(EntitySpec.create(MySqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, CREATION_SCRIPT)
-                .configure("test.table.name", "COMMENTS"));
-
-        BrooklynProperties brooklynProperties = mgmt.getBrooklynProperties();
-        brooklynProperties.put("brooklyn.location.jclouds.rackspace-cloudservers-uk.imageNameRegex", osRegex);
-        brooklynProperties.remove("brooklyn.location.jclouds.rackspace-cloudservers-uk.image-id");
-        brooklynProperties.remove("brooklyn.location.jclouds.rackspace-cloudservers-uk.imageId");
-        brooklynProperties.put("brooklyn.location.jclouds.rackspace-cloudservers-uk.inboundPorts", Arrays.asList(22, 3306));
-        JcloudsLocation jcloudsLocation = (JcloudsLocation) mgmt.getLocationRegistry().resolve("jclouds:rackspace-cloudservers-uk");
-
-        app.start(ImmutableList.of(jcloudsLocation));
-
-        SshMachineLocation l = (SshMachineLocation) mysql.getLocations().iterator().next();
-        l.execCommands("add iptables rule", ImmutableList.of(IptablesCommands.insertIptablesRule(Chain.INPUT, Protocol.TCP, 3306, Policy.ACCEPT)));
-
-        new VogellaExampleAccess("com.mysql.jdbc.Driver", mysql.getAttribute(DatastoreCommon.DATASTORE_URL)).readModifyAndRevertDataBase();
-    } 
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlRestartIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlRestartIntegrationTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlRestartIntegrationTest.java
deleted file mode 100644
index 1e2aa91..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MySqlRestartIntegrationTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessRestartIntegrationTest;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-/**
- * Tests restart of the software *process* (as opposed to the VM).
- */
-@Test(groups="Integration")
-public class MySqlRestartIntegrationTest extends AbstractSoftwareProcessRestartIntegrationTest {
-    
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(MySqlRestartIntegrationTest.class);
-
-    @Override
-    protected EntitySpec<? extends SoftwareProcess> newEntitySpec() {
-        return EntitySpec.create(MySqlNode.class);
-    }
-
-    //Fails setting the password on second start (because already changed from first launch)
-    @Override
-    @Test(groups={"Integration","Broken"})
-    public void testStopProcessAndStart() throws Exception {
-        super.testStopProcessAndStart();
-    }
-    
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MysqlDockerLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MysqlDockerLiveTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MysqlDockerLiveTest.java
deleted file mode 100644
index f8a285c..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mysql/MysqlDockerLiveTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.mysql;
-
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.entity.software.base.AbstractDockerLiveTest;
-
-import com.google.common.collect.ImmutableList;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.testng.annotations.Test;
-
-public class MysqlDockerLiveTest extends AbstractDockerLiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-       MySqlNode mysql = app.createAndManageChild(EntitySpec.create(MySqlNode.class)
-               .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, MySqlIntegrationTest.CREATION_SCRIPT)
-               .configure("test.table.name", "COMMENTS"));
-
-       app.start(ImmutableList.of(loc));
-
-       new VogellaExampleAccess("com.mysql.jdbc.Driver", mysql.getAttribute(DatastoreCommon.DATASTORE_URL))
-               .readModifyAndRevertDataBase();
-    }
-
-    @Test(enabled=false)
-    public void testDummy() { } // Convince testng IDE integration that this really does have test methods
-}
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqDockerLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqDockerLiveTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqDockerLiveTest.java
deleted file mode 100644
index 7ba4ec8..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqDockerLiveTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.entity.software.base.AbstractDockerLiveTest;
-
-import com.google.common.collect.ImmutableList;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.testng.annotations.Test;
-
-public class PostgreSqDockerLiveTest extends AbstractDockerLiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        PostgreSqlNode psql = app.createAndManageChild(EntitySpec.create(PostgreSqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, PostgreSqlIntegrationTest.CREATION_SCRIPT));
-
-        app.start(ImmutableList.of(loc));
-
-        new VogellaExampleAccess("org.postgresql.Driver", psql.getAttribute(DatastoreCommon.DATASTORE_URL)).readModifyAndRevertDataBase();
-    }
-
-    @Test(enabled=false)
-    public void testDummy() { } // Convince testng IDE integration that this really does have test methods
-}
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlChefTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlChefTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlChefTest.java
deleted file mode 100644
index 6f1d014..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlChefTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import java.util.Random;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.chef.ChefLiveTestSupport;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.api.location.PortRange;
-import org.apache.brooklyn.core.effector.EffectorTasks;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.collect.ImmutableList;
-
-/** 
- * Tests Chef installation of PostgreSql. Requires chef-server (knife).
- * <p> 
- * To be able to run repeatedly on the same box, you will need the patched version of the postgresql library,
- * at https://github.com/opscode-cookbooks/postgresql/pull/73 .
- *  
- * @author alex
- *
- */
-public class PostgreSqlChefTest extends ChefLiveTestSupport {
-
-    private static final Logger log = LoggerFactory.getLogger(PostgreSqlChefTest.class);
-    
-    PostgreSqlNode psql;
-    
-    @Test(groups="Live")
-    public void testPostgresStartsAndStops() throws Exception {
-        ChefLiveTestSupport.installBrooklynChefHostedConfig(app);
-        psql = app.createAndManageChild(PostgreSqlSpecs.specChef());
-
-        app.start(ImmutableList.of(targetLocation));
-        
-        Entities.submit(psql, SshEffectorTasks.ssh("ps aux | grep [p]ostgres").requiringExitCodeZero());
-        SshMachineLocation targetMachine = EffectorTasks.getSshMachine(psql);
-        
-        psql.stop();
-        
-        try {
-            // if host is still contactable ensure postgres is not running
-            ProcessTaskWrapper<Integer> t = Entities.submit(app, SshEffectorTasks.ssh("ps aux | grep [p]ostgres").machine(targetMachine).allowingNonZeroExitCode());
-            t.getTask().blockUntilEnded(Duration.TEN_SECONDS);
-            if (!t.isDone())
-                Assert.fail("Task not finished yet: "+t.getTask());
-            Assert.assertNotEquals(t.get(), (Integer)0, "Task ended with code "+t.get()+"; output: "+t.getStdout() );
-        } catch (Exception e) {
-            // host has been killed, that is fine
-            log.info("Machine "+targetMachine+" destroyed on stop (expected - "+e+")");
-        }
-    }
-    
-    @Test(groups="Live")
-    public void testPostgresScriptAndAccess() throws Exception {
-        ChefLiveTestSupport.installBrooklynChefHostedConfig(app);
-        PortRange randomPort = PortRanges.fromString(String.format("%d+", 5420 + new Random().nextInt(10)));
-        psql = app.createAndManageChild(PostgreSqlSpecs.specChef()
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, PostgreSqlIntegrationTest.CREATION_SCRIPT)
-                .configure(PostgreSqlNode.POSTGRESQL_PORT, randomPort)
-                .configure(PostgreSqlNode.SHARED_MEMORY, "8MB")
-            );
-
-        app.start(ImmutableList.of(targetLocation));
-
-        String url = psql.getAttribute(DatastoreCommon.DATASTORE_URL);
-        log.info("Trying to connect to "+psql+" at "+url);
-        Assert.assertNotNull(url);
-        Assert.assertTrue(url.contains("542"));
-        
-        new VogellaExampleAccess("org.postgresql.Driver", url).readModifyAndRevertDataBase();
-    }
-
-}
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlEc2LiveTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlEc2LiveTest.java
deleted file mode 100644
index 2d18561..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlEc2LiveTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import static org.testng.Assert.assertNotNull;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityAsserts;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public class PostgreSqlEc2LiveTest extends AbstractEc2LiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        PostgreSqlNode psql = app.createAndManageChild(EntitySpec.create(PostgreSqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, PostgreSqlIntegrationTest.CREATION_SCRIPT));
-
-        app.start(ImmutableList.of(loc));
-
-        new VogellaExampleAccess("org.postgresql.Driver", psql.getAttribute(DatastoreCommon.DATASTORE_URL)).readModifyAndRevertDataBase();
-    }
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_Debian_6() throws Exception { } // Disabled because PostgreSql 9.1 not available
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_Ubuntu_10_0() throws Exception { } // Disabled because PostgreSql 9.1 not available
-
-    @Test(groups = {"Live"})
-    public void testWithOnlyPort22() throws Exception {
-        // CentOS-6.3-x86_64-GA-EBS-02-85586466-5b6c-4495-b580-14f72b4bcf51-ami-bb9af1d2.1
-        jcloudsLocation = mgmt.getLocationRegistry().resolve(LOCATION_SPEC, ImmutableMap.of(
-                "tags", ImmutableList.of(getClass().getName()),
-                "imageId", "us-east-1/ami-a96b01c0", 
-                "hardwareId", SMALL_HARDWARE_ID));
-
-        PostgreSqlNode server = app.createAndManageChild(EntitySpec.create(PostgreSqlNode.class)
-                .configure(PostgreSqlNode.PROVISIONING_PROPERTIES.subKey(CloudLocationConfig.INBOUND_PORTS.getName()), ImmutableList.of(22)));
-        
-        app.start(ImmutableList.of(jcloudsLocation));
-        
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_UP, true);
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-        
-        Integer port = server.getAttribute(PostgreSqlNode.POSTGRESQL_PORT);
-        assertNotNull(port);
-        
-        assertViaSshLocalPortListeningEventually(server, port);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlGceLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlGceLiveTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlGceLiveTest.java
deleted file mode 100644
index d6dbb45..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlGceLiveTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.AbstractGoogleComputeLiveTest;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-
-import com.google.common.collect.ImmutableList;
-
-public class PostgreSqlGceLiveTest extends AbstractGoogleComputeLiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        PostgreSqlNode psql = app.createAndManageChild(EntitySpec.create(PostgreSqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, PostgreSqlIntegrationTest.CREATION_SCRIPT));
-
-        app.start(ImmutableList.of(loc));
-
-        new VogellaExampleAccess("org.postgresql.Driver", psql.getAttribute(DatastoreCommon.DATASTORE_URL)).readModifyAndRevertDataBase();
-    }
-
-    @Test(enabled=false)
-    public void testDummy() { } // Convince testng IDE integration that this really does have test methods
-}
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlIntegrationTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlIntegrationTest.java
deleted file mode 100644
index 2cfe531..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlIntegrationTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.mgmt.ManagementContext;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.internal.BrooklynProperties;
-import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * Runs the popular Vogella MySQL tutorial against PostgreSQL
- * from
- * http://www.vogella.de/articles/MySQLJava/article.html
- */
-public class PostgreSqlIntegrationTest {
-
-    public static final Logger log = LoggerFactory.getLogger(PostgreSqlIntegrationTest.class);
-    
-    protected BrooklynProperties brooklynProperties;
-    protected ManagementContext managementContext;
-    protected TestApplication tapp;
-    
-    @BeforeMethod(alwaysRun = true)
-    public void setUp() {
-        brooklynProperties = BrooklynProperties.Factory.newDefault();
-        managementContext = new LocalManagementContext(brooklynProperties);
-        tapp = ApplicationBuilder.newManagedApp(TestApplication.class, managementContext);
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void ensureShutDown() {
-        Entities.destroyAllCatching(managementContext);
-    }
-
-    //from http://www.vogella.de/articles/MySQLJava/article.html
-    public static final String CREATION_SCRIPT =
-            "CREATE USER sqluser WITH PASSWORD 'sqluserpw';\n" +
-            "CREATE DATABASE feedback OWNER sqluser;\n" +
-            "\\c feedback;\n" +
-            "CREATE TABLE COMMENTS ( " +
-                    "id INT8 NOT NULL,  " +
-                    "MYUSER VARCHAR(30) NOT NULL, " +
-                    "EMAIL VARCHAR(30),  " +
-                    "WEBPAGE VARCHAR(100) NOT NULL,  " +
-                    "DATUM DATE NOT NULL,  " +
-                    "SUMMARY VARCHAR(40) NOT NULL, " +
-                    "COMMENTS VARCHAR(400) NOT NULL, " +
-                    "PRIMARY KEY (ID) " +
-                ");\n" +
-            "GRANT ALL ON comments TO sqluser;\n" +
-            "INSERT INTO COMMENTS values (1, 'lars', 'myemail@gmail.com','http://www.vogella.de', '2009-09-14 10:33:11', 'Summary','My first comment' );";
-
-    @Test(groups = "Integration")
-    public void test_localhost() throws Exception {
-        PostgreSqlNode pgsql = tapp.createAndManageChild(EntitySpec.create(PostgreSqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, CREATION_SCRIPT)
-                .configure(PostgreSqlNode.MAX_CONNECTIONS, 10)
-                .configure(PostgreSqlNode.SHARED_MEMORY, "512kB")); // Very low so kernel configuration not needed
-
-        tapp.start(ImmutableList.of(new LocalhostMachineProvisioningLocation()));
-        String url = pgsql.getAttribute(DatastoreCommon.DATASTORE_URL);
-        log.info("PostgreSql started on "+url);
-        new VogellaExampleAccess("org.postgresql.Driver", url).readModifyAndRevertDataBase();
-        log.info("Ran vogella PostgreSql example -- SUCCESS");
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlRackspaceLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlRackspaceLiveTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlRackspaceLiveTest.java
deleted file mode 100644
index 0e3489e..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlRackspaceLiveTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import java.util.Arrays;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.location.jclouds.JcloudsLocation;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.net.Protocol;
-import org.apache.brooklyn.util.ssh.IptablesCommands;
-import org.apache.brooklyn.util.ssh.IptablesCommands.Chain;
-import org.apache.brooklyn.util.ssh.IptablesCommands.Policy;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * The PostgreSqlRackspaceLiveTest installs Postgresql on various operating systems like Ubuntu, CentOS, Red Hat etc. To
- * make sure that PostgreSql works like expected on these Operating Systems.
- */
-public class PostgreSqlRackspaceLiveTest extends PostgreSqlIntegrationTest {
-    @Test(groups = "Live")
-    public void test_Debian_6() throws Exception {
-        test("Debian 6");
-    }
-
-    @Test(groups = "Live")
-    public void test_Ubuntu_10_0() throws Exception {
-        test("Ubuntu 10.0");
-    }
-
-    @Test(groups = "Live")
-    public void test_Ubuntu_11_0() throws Exception {
-        test("Ubuntu 11.0");
-    }
-
-    @Test(groups = "Live")
-    public void test_Ubuntu_12_0() throws Exception {
-        test("Ubuntu 12.0");
-    }
-
-    @Test(groups = "Live")
-    public void test_CentOS_6_0() throws Exception {
-        test("CentOS 6.0");
-    }
-
-    @Test(groups = "Live")
-    public void test_CentOS_5_6() throws Exception {
-        test("CentOS 5.6");
-    }
-
-    @Test(groups = "Live")
-    public void test_Fedora_17() throws Exception {
-        test("Fedora 17");
-    }
-
-    @Test(groups = "Live")
-    public void test_Red_Hat_Enterprise_Linux_6() throws Exception {
-        test("Red Hat Enterprise Linux 6");
-    }
-
-    @Test(groups = "Live")
-    public void test_localhost() throws Exception {
-        super.test_localhost();
-    }
-    
-    public void test(String osRegex) throws Exception {
-        PostgreSqlNode psql = tapp.createAndManageChild(EntitySpec.create(PostgreSqlNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, CREATION_SCRIPT)
-                .configure(PostgreSqlNode.POSTGRESQL_PORT, PortRanges.fromInteger(5432))
-                .configure(PostgreSqlNode.SHARED_MEMORY, "32MB"));
-
-        brooklynProperties.put("brooklyn.location.jclouds.rackspace-cloudservers-uk.imageNameRegex", osRegex);
-        brooklynProperties.remove("brooklyn.location.jclouds.rackspace-cloudservers-uk.image-id");
-        brooklynProperties.remove("brooklyn.location.jclouds.rackspace-cloudservers-uk.imageId");
-        brooklynProperties.put("brooklyn.location.jclouds.rackspace-cloudservers-uk.inboundPorts", Arrays.asList(22, 5432));
-        JcloudsLocation jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve("jclouds:rackspace-cloudservers-uk");
-
-        tapp.start(ImmutableList.of(jcloudsLocation));
-
-        SshMachineLocation l = (SshMachineLocation) psql.getLocations().iterator().next();
-        l.execCommands("add iptables rule", ImmutableList.of(IptablesCommands.insertIptablesRule(Chain.INPUT, Protocol.TCP, 5432, Policy.ACCEPT)));
-
-        String url = psql.getAttribute(DatastoreCommon.DATASTORE_URL);
-        new VogellaExampleAccess("org.postgresql.Driver", url).readModifyAndRevertDataBase();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlRebindIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlRebindIntegrationTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlRebindIntegrationTest.java
deleted file mode 100644
index 320c14b..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlRebindIntegrationTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.mgmt.rebind.RebindTestFixtureWithApp;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.base.Predicates;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-
-public class PostgreSqlRebindIntegrationTest extends RebindTestFixtureWithApp {
-
-    private LocalhostMachineProvisioningLocation loc;
-    
-    @BeforeMethod(alwaysRun=true)
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        loc = origApp.newLocalhostProvisioningLocation();
-    }
-
-    @Test(groups = {"Integration"})
-    public void testRebind() throws Exception {
-        origApp.createAndManageChild(EntitySpec.create(PostgreSqlNode.class));
-        origApp.start(ImmutableList.of(loc));
-
-        // rebind
-        rebind();
-        final PostgreSqlNode newEntity = (PostgreSqlNode) Iterables.find(newApp.getChildren(), Predicates.instanceOf(PostgreSqlNode.class));
-
-        // confirm effectors still work on entity
-        EntityTestUtils.assertAttributeEqualsEventually(newEntity, PostgreSqlNode.SERVICE_UP, true);
-        newEntity.stop();
-        EntityTestUtils.assertAttributeEqualsEventually(newEntity, PostgreSqlNode.SERVICE_UP, false);
-    }
-}


[08/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/redis/redis.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/redis/redis.conf b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/redis/redis.conf
deleted file mode 100644
index 0554eb2..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/redis/redis.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-# Redis configuration file
-
-# Start as daemon
-daemonize yes
-pidfile ${driver.runDir}/pid.txt
-
-# Set port and optional bind address
-port ${entity.redisPort?c}
-# bind ${entity.address}
-
-# Configure logging
-loglevel verbose
-logfile ${driver.runDir}/redis.log

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/redis/slave.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/redis/slave.conf b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/redis/slave.conf
deleted file mode 100644
index 3a9e64a..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/redis/slave.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-# Redis configuration file
-
-# Start as daemon
-daemonize yes
-pidfile ${driver.runDir}/pid.txt
-
-# Set port and optional bind address
-port ${entity.redisPort?c}
-# bind ${entity.address}
-
-# Slave configuration
-slaveof ${entity.master.address} ${entity.master.redisPort?c}
-
-# Configure logging
-loglevel verbose
-logfile ${driver.runDir}/redis.log

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/app.config
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/app.config b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/app.config
deleted file mode 100644
index 7ee8a37..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/app.config
+++ /dev/null
@@ -1,353 +0,0 @@
-%% Brooklyn note: file from 1.4.8 Mac install, with erlang section added, and ports templated
-
-%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ft=erlang ts=4 sw=4 et
-[
- %% Riak Client APIs config
- {riak_api, [
-            %% pb_backlog is the maximum length to which the queue of pending
-            %% connections may grow. If set, it must be an integer >= 0.
-            %% By default the value is 5. If you anticipate a huge number of
-            %% connections being initialised *simultaneously*, set this number
-            %% higher.
-            %% {pb_backlog, 64},
-             
-            %% pb is a list of IP addresses and TCP ports that the Riak 
-            %% Protocol Buffers interface will bind.
-            {pb, [ {"0.0.0.0", ${entity.riakPbPort?c} } ]}
-            ]},
-
- %% Riak Core config
- {riak_core, [
-              %% Default location of ringstate
-              {ring_state_dir, "./data/ring"},
-
-              %% Default ring creation size.  Make sure it is a power of 2,
-              %% e.g. 16, 32, 64, 128, 256, 512 etc
-              %{ring_creation_size, 64},
-
-              %% http is a list of IP addresses and TCP ports that the Riak
-              %% HTTP interface will bind.
-              {http, [ {"0.0.0.0", ${entity.riakWebPort?c} } ]},
-
-              %% https is a list of IP addresses and TCP ports that the Riak
-              %% HTTPS interface will bind.
-              %{https, [{ "0.0.0.0", ${entity.riakWebPort?c} }]},
-
-              %% Default cert and key locations for https can be overridden
-              %% with the ssl config variable, for example:
-              %{ssl, [
-              %       {certfile, "./etc/cert.pem"},
-              %       {keyfile, "./etc/key.pem"}
-              %      ]},
-
-              %% riak_handoff_port is the TCP port that Riak uses for
-              %% intra-cluster data handoff.
-              {handoff_port, ${entity.handoffListenerPort?c} },
-
-              %% To encrypt riak_core intra-cluster data handoff traffic,
-              %% uncomment the following line and edit its path to an
-              %% appropriate certfile and keyfile.  (This example uses a
-              %% single file with both items concatenated together.)
-              %{handoff_ssl_options, [{certfile, "/tmp/erlserver.pem"}]},
-
-              %% DTrace support
-              %% Do not enable 'dtrace_support' unless your Erlang/OTP
-              %% runtime is compiled to support DTrace.  DTrace is
-              %% available in R15B01 (supported by the Erlang/OTP
-              %% official source package) and in R14B04 via a custom
-              %% source repository & branch.
-              {dtrace_support, false},
-
-              %% Health Checks
-              %% If disabled, health checks registered by an application will
-              %% be ignored. NOTE: this option cannot be changed at runtime.
-              %% To re-enable, the setting must be changed and the node restarted.
-              %% NOTE: As of Riak 1.3.2, health checks are deprecated as they
-              %% may interfere with the new overload protection mechanisms.
-              %% If there is a good reason to re-enable them, you must uncomment
-              %% this line and also add an entry in the riak_kv section:
-              %%          {riak_kv, [ ..., {enable_health_checks, true}, ...]}
-              %% {enable_health_checks, true},
-
-              %% Platform-specific installation paths (substituted by rebar)
-              {platform_bin_dir, "./bin"},
-              {platform_data_dir, "./data"},
-              {platform_etc_dir, "./etc"},
-              {platform_lib_dir, "./lib"},
-              {platform_log_dir, "./log"}
-             ]},
-
- %% Riak KV config
- {riak_kv, [
-            %% Storage_backend specifies the Erlang module defining the storage
-            %% mechanism that will be used on this node.
-            {storage_backend, riak_kv_bitcask_backend},
-
-            %% raw_name is the first part of all URLS used by the Riak raw HTTP
-            %% interface.  See riak_web.erl and raw_http_resource.erl for
-            %% details.
-            %{raw_name, "riak"},
-
-            %% Enable active anti-entropy subsystem + optional debug messages:
-            %%   {anti_entropy, {on|off, []}},
-            %%   {anti_entropy, {on|off, [debug]}},
-            {anti_entropy, {on, []}},
-
-            %% Restrict how fast AAE can build hash trees. Building the tree
-            %% for a given partition requires a full scan over that partition's
-            %% data. Once built, trees stay built until they are expired.
-            %% Config is of the form:
-            %%   {num-builds, per-timespan-in-milliseconds}
-            %% Default is 1 build per hour.
-            {anti_entropy_build_limit, {1, 3600000}},
-
-            %% Determine how often hash trees are expired after being built.
-            %% Periodically expiring a hash tree ensures the on-disk hash tree
-            %% data stays consistent with the actual k/v backend data. It also
-            %% helps Riak identify silent disk failures and bit rot. However,
-            %% expiration is not needed for normal AAE operation and should be
-            %% infrequent for performance reasons. The time is specified in
-            %% milliseconds. The default is 1 week.
-            {anti_entropy_expire, 604800000},
-
-            %% Limit how many AAE exchanges/builds can happen concurrently.
-            {anti_entropy_concurrency, 2},
-
-            %% The tick determines how often the AAE manager looks for work
-            %% to do (building/expiring trees, triggering exchanges, etc).
-            %% The default is every 15 seconds. Lowering this value will
-            %% speedup the rate that all replicas are synced across the cluster.
-            %% Increasing the value is not recommended.
-            {anti_entropy_tick, 15000},
-
-            %% The directory where AAE hash trees are stored.
-            {anti_entropy_data_dir, "./data/anti_entropy"},
-
-            %% The LevelDB options used by AAE to generate the LevelDB-backed
-            %% on-disk hashtrees.
-            {anti_entropy_leveldb_opts, [{write_buffer_size, 4194304},
-                                         {max_open_files, 20}]},
-
-            %% mapred_name is URL used to submit map/reduce requests to Riak.
-            {mapred_name, "mapred"},
-
-            %% mapred_2i_pipe indicates whether secondary-index
-            %% MapReduce inputs are queued in parallel via their own
-            %% pipe ('true'), or serially via a helper process
-            %% ('false' or undefined).  Set to 'false' or leave
-            %% undefined during a rolling upgrade from 1.0.
-            {mapred_2i_pipe, true},
-
-            %% Each of the following entries control how many Javascript
-            %% virtual machines are available for executing map, reduce,
-            %% pre- and post-commit hook functions.
-            {map_js_vm_count, 8 },
-            {reduce_js_vm_count, 6 },
-            {hook_js_vm_count, 2 },
-
-            %% js_max_vm_mem is the maximum amount of memory, in megabytes,
-            %% allocated to the Javascript VMs. If unset, the default is
-            %% 8MB.
-            {js_max_vm_mem, 8},
-
-            %% js_thread_stack is the maximum amount of thread stack, in megabyes,
-            %% allocate to the Javascript VMs. If unset, the default is 16MB.
-            %% NOTE: This is not the same as the C thread stack.
-            {js_thread_stack, 16},
-
-            %% js_source_dir should point to a directory containing Javascript
-            %% source files which will be loaded by Riak when it initializes
-            %% Javascript VMs.
-            %{js_source_dir, "/tmp/js_source"},
-
-            %% http_url_encoding determines how Riak treats URL encoded
-            %% buckets, keys, and links over the REST API. When set to 'on'
-            %% Riak always decodes encoded values sent as URLs and Headers.
-            %% Otherwise, Riak defaults to compatibility mode where links
-            %% are decoded, but buckets and keys are not. The compatibility
-            %% mode will be removed in a future release.
-            {http_url_encoding, on},
-
-            %% Switch to vnode-based vclocks rather than client ids.  This
-            %% significantly reduces the number of vclock entries.
-            %% Only set true if *all* nodes in the cluster are upgraded to 1.0
-            {vnode_vclocks, true},
-
-            %% This option toggles compatibility of keylisting with 1.0
-            %% and earlier versions.  Once a rolling upgrade to a version
-            %% > 1.0 is completed for a cluster, this should be set to
-            %% true for better control of memory usage during key listing
-            %% operations
-            {listkeys_backpressure, true},
-
-            %% This option specifies how many of each type of fsm may exist
-            %% concurrently.  This is for overload protection and is a new
-            %% mechanism that obsoletes 1.3's health checks. Note that this number
-            %% represents two potential processes, so +P in vm.args should be at 
-            %% least 3X the fsm_limit.
-            {fsm_limit, 50000},
-
-            %% Uncomment to make non-paginated results be sorted the
-            %% same way paginated results are: by term, then key.
-            %% In Riak 1.4.* before 1.4.4, all results were sorted this way
-            %% by default, which can adversely affect performance in some cases.
-            %% Setting this to true emulates that behavior.
-            %% {secondary_index_sort_default, true},
-
-            %% object_format controls which binary representation of a riak_object 
-            %% is stored on disk.
-            %% Current options are: v0, v1.
-            %% v0: Original erlang:term_to_binary format. Higher space overhead.
-            %% v1: New format for more compact storage of small values.
-            {object_format, v1}
-           ]},
-
- %% Riak Search Config
- {riak_search, [
-                %% To enable Search functionality set this 'true'.
-                {enabled, false}
-               ]},
-
- %% Merge Index Config
- {merge_index, [
-                %% The root dir to store search merge_index data
-                {data_root, "./data/merge_index"},
-
-                %% Size, in bytes, of the in-memory buffer.  When this
-                %% threshold has been reached the data is transformed
-                %% into a segment file which resides on disk.
-                {buffer_rollover_size, 1048576},
-
-                %% Overtime the segment files need to be compacted.
-                %% This is the maximum number of segments that will be
-                %% compacted at once.  A lower value will lead to
-                %% quicker but more frequent compactions.
-                {max_compact_segments, 20}
-               ]},
-
- %% Bitcask Config
- {bitcask, [
-             %% Configure how Bitcask writes data to disk.
-             %%   erlang: Erlang's built-in file API
-             %%      nif: Direct calls to the POSIX C API
-             %%
-             %% The NIF mode provides higher throughput for certain
-             %% workloads, but has the potential to negatively impact
-             %% the Erlang VM, leading to higher worst-case latencies
-             %% and possible throughput collapse.
-             {io_mode, erlang},
-
-             {data_root, "./data/bitcask"}
-           ]},
-
- %% eLevelDB Config
- {eleveldb, [
-             {data_root, "./data/leveldb"}
-            ]},
-
- %% Lager Config
- {lager, [
-            %% What handlers to install with what arguments
-            %% The defaults for the logfiles are to rotate the files when
-            %% they reach 10Mb or at midnight, whichever comes first, and keep
-            %% the last 5 rotations. See the lager README for a description of
-            %% the time rotation format:
-            %% https://github.com/basho/lager/blob/master/README.org
-            %%
-            %% If you wish to disable rotation, you can either set the size to 0
-            %% and the rotation time to "", or instead specify a 2-tuple that only
-            %% consists of {Logfile, Level}.
-            %%
-            %% If you wish to have riak log messages to syslog, you can use a handler
-            %% like this:
-            %%   {lager_syslog_backend, ["riak", daemon, info]},
-            %%
-            {handlers, [ 
-                           {lager_file_backend, [ 
-                               {"./log/error.log", error, 10485760, "$D0", 5}, 
-                               {"./log/console.log", info, 10485760, "$D0", 5} 
-                           ]} 
-                       ] },
-
-            %% Whether to write a crash log, and where.
-            %% Commented/omitted/undefined means no crash logger.
-            {crash_log, "./log/crash.log"},
-
-            %% Maximum size in bytes of events in the crash log - defaults to 65536
-            {crash_log_msg_size, 65536},
-
-            %% Maximum size of the crash log in bytes, before its rotated, set
-            %% to 0 to disable rotation - default is 0
-            {crash_log_size, 10485760},
-
-            %% What time to rotate the crash log - default is no time
-            %% rotation. See the lager README for a description of this format:
-            %% https://github.com/basho/lager/blob/master/README.org
-            {crash_log_date, "$D0"},
-
-            %% Number of rotated crash logs to keep, 0 means keep only the
-            %% current one - default is 0
-            {crash_log_count, 5},
-
-            %% Whether to redirect error_logger messages into lager - defaults to true
-            {error_logger_redirect, true},
-
-            %% maximum number of error_logger messages to handle in a second
-            %% lager 2.0.0 shipped with a limit of 50, which is a little low for riak's startup
-            {error_logger_hwm, 100}
-        ]},
-
- %% riak_sysmon config
- {riak_sysmon, [
-         %% To disable forwarding events of a particular type, use a
-         %% limit of 0.
-         {process_limit, 30},
-         {port_limit, 2},
-
-         %% Finding reasonable limits for a given workload is a matter
-         %% of experimentation.
-         %% NOTE: Enabling the 'gc_ms_limit' monitor (by setting non-zero)
-         %%       can cause performance problems on multi-CPU systems.
-         {gc_ms_limit, 0},
-         {heap_word_limit, 40111000},
-
-         %% Configure the following items to 'false' to disable logging
-         %% of that event type.
-         {busy_port, true},
-         {busy_dist_port, true}
-        ]},
-
- %% SASL config
- {sasl, [
-         {sasl_error_logger, false}
-        ]},
-
- %% riak_control config
- {riak_control, [
-                %% Set to false to disable the admin panel.
-                {enabled, true},
-
-                %% Authentication style used for access to the admin
-                %% panel. Valid styles are 'userlist' <TODO>.
-                {auth, userlist},
-
-                %% If auth is set to 'userlist' then this is the
-                %% list of usernames and passwords for access to the
-                %% admin panel.
-                {userlist, [{"user", "pass"}
-                           ]},
-
-                %% The admin panel is broken up into multiple
-                %% components, each of which is enabled or disabled
-                %% by one of these settings.
-                {admin, true}
-                ]},
- 
- %% erlang, constrain port range so we can open the internal firewall ports               
- { kernel, [
-            {inet_dist_listen_min, ${entity.erlangPortRangeStart?c}},
-            {inet_dist_listen_max, ${entity.erlangPortRangeEnd?c}}
-          ]}
-
-].

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-cluster-with-solr.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-cluster-with-solr.yaml b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-cluster-with-solr.yaml
deleted file mode 100644
index 0d1e7c7..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-cluster-with-solr.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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.
-#
-
-name: Cluster Riak & Solr
-location:
-  jclouds:aws-ec2:us-east-1:
-    osFamily: centos
-    osVersionRegex: 6\..*
-services:
-- type: org.apache.brooklyn.entity.nosql.riak.RiakCluster
-  initialSize: 2
-  memberSpec:
-    $brooklyn:entitySpec:
-      type: org.apache.brooklyn.entity.nosql.riak.RiakNode
-      searchEnabled: true
-  brooklyn.config:
-    provisioning.properties:
-      minCores: 2
-      minRam: 6gb
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-mac.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-mac.conf b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-mac.conf
deleted file mode 100644
index d123000..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-mac.conf
+++ /dev/null
@@ -1,494 +0,0 @@
-## Brooklyn note: file from 2.0.1 Mac install, with erlang section added, and ports templated
-
-## Where to emit the default log messages (typically at 'info'
-## severity):
-## off: disabled
-## file: the file specified by log.console.file
-## console: to standard output (seen when using `riak attach-direct`)
-## both: log.console.file and standard out.
-##
-## Default: file
-##
-## Acceptable values:
-##   - one of: off, file, console, both
-log.console = file
-
-## The severity level of the console log, default is 'info'.
-##
-## Default: info
-##
-## Acceptable values:
-##   - one of: debug, info, notice, warning, error, critical, alert, emergency, none
-log.console.level = info
-
-## When 'log.console' is set to 'file' or 'both', the file where
-## console messages will be logged.
-##
-## Default: $(platform_log_dir)/console.log
-##
-## Acceptable values:
-##   - the path to a file
-log.console.file = $(platform_log_dir)/console.log
-
-## The file where error messages will be logged.
-##
-## Default: $(platform_log_dir)/error.log
-##
-## Acceptable values:
-##   - the path to a file
-log.error.file = $(platform_log_dir)/error.log
-
-## When set to 'on', enables log output to syslog.
-##
-## Default: off
-##
-## Acceptable values:
-##   - on or off
-log.syslog = off
-
-## Whether to enable the crash log.
-##
-## Default: on
-##
-## Acceptable values:
-##   - on or off
-log.crash = on
-
-## If the crash log is enabled, the file where its messages will
-## be written.
-##
-## Default: $(platform_log_dir)/crash.log
-##
-## Acceptable values:
-##   - the path to a file
-log.crash.file = $(platform_log_dir)/crash.log
-
-## Maximum size in bytes of individual messages in the crash log
-##
-## Default: 64KB
-##
-## Acceptable values:
-##   - a byte size with units, e.g. 10GB
-log.crash.maximum_message_size = 64KB
-
-## Maximum size of the crash log in bytes, before it is rotated
-##
-## Default: 10MB
-##
-## Acceptable values:
-##   - a byte size with units, e.g. 10GB
-log.crash.size = 10MB
-
-## The schedule on which to rotate the crash log.  For more
-## information see:
-## https://github.com/basho/lager/blob/master/README.md#internal-log-rotation
-##
-## Default: $D0
-##
-## Acceptable values:
-##   - text
-log.crash.rotation = $D0
-
-## The number of rotated crash logs to keep. When set to
-## 'current', only the current open log file is kept.
-##
-## Default: 5
-##
-## Acceptable values:
-##   - an integer
-##   - the text "current"
-log.crash.rotation.keep = 5
-
-## Name of the Erlang node
-##
-## Default: riak@127.0.0.1
-##
-## Acceptable values:
-##   - text
-nodename = riak@${driver.hostname}
-
-## Cookie for distributed node communication.  All nodes in the
-## same cluster should use the same cookie or they will not be able to
-## communicate.
-##
-## Default: riak
-##
-## Acceptable values:
-##   - text
-distributed_cookie = riak
-
-## Sets the number of threads in async thread pool, valid range
-## is 0-1024. If thread support is available, the default is 64.
-## More information at: http://erlang.org/doc/man/erl.html
-##
-## Default: 64
-##
-## Acceptable values:
-##   - an integer
-erlang.async_threads = 64
-
-## The number of concurrent ports/sockets
-## Valid range is 1024-134217727
-##
-## Default: 65536
-##
-## Acceptable values:
-##   - an integer
-erlang.max_ports = 65536
-
-## Set scheduler forced wakeup interval. All run queues will be
-## scanned each Interval milliseconds. While there are sleeping
-## schedulers in the system, one scheduler will be woken for each
-## non-empty run queue found. An Interval of zero disables this
-## feature, which also is the default.
-## This feature is a workaround for lengthy executing native code, and
-## native code that do not bump reductions properly.
-## More information: http://www.erlang.org/doc/man/erl.html#+sfwi
-##
-## Acceptable values:
-##   - an integer
-## erlang.schedulers.force_wakeup_interval = 500
-
-## Enable or disable scheduler compaction of load. By default
-## scheduler compaction of load is enabled. When enabled, load
-## balancing will strive for a load distribution which causes as many
-## scheduler threads as possible to be fully loaded (i.e., not run out
-## of work). This is accomplished by migrating load (e.g. runnable
-## processes) into a smaller set of schedulers when schedulers
-## frequently run out of work. When disabled, the frequency with which
-## schedulers run out of work will not be taken into account by the
-## load balancing logic.
-## More information: http://www.erlang.org/doc/man/erl.html#+scl
-##
-## Acceptable values:
-##   - one of: true, false
-## erlang.schedulers.compaction_of_load = false
-
-## Enable or disable scheduler utilization balancing of load. By
-## default scheduler utilization balancing is disabled and instead
-## scheduler compaction of load is enabled which will strive for a
-## load distribution which causes as many scheduler threads as
-## possible to be fully loaded (i.e., not run out of work). When
-## scheduler utilization balancing is enabled the system will instead
-## try to balance scheduler utilization between schedulers. That is,
-## strive for equal scheduler utilization on all schedulers.
-## More information: http://www.erlang.org/doc/man/erl.html#+sub
-##
-## Acceptable values:
-##   - one of: true, false
-## erlang.schedulers.utilization_balancing = true
-
-## Number of partitions in the cluster (only valid when first
-## creating the cluster). Must be a power of 2, minimum 8 and maximum
-## 1024.
-##
-## Default: 64
-##
-## Acceptable values:
-##   - an integer
-## ring_size = 64
-
-## Number of concurrent node-to-node transfers allowed.
-##
-## Default: 2
-##
-## Acceptable values:
-##   - an integer
-## transfer_limit = 2
-
-## Default cert location for https can be overridden
-## with the ssl config variable, for example:
-##
-## Acceptable values:
-##   - the path to a file
-## ssl.certfile = $(platform_etc_dir)/cert.pem
-
-## Default key location for https can be overridden with the ssl
-## config variable, for example:
-##
-## Acceptable values:
-##   - the path to a file
-## ssl.keyfile = $(platform_etc_dir)/key.pem
-
-## Default signing authority location for https can be overridden
-## with the ssl config variable, for example:
-##
-## Acceptable values:
-##   - the path to a file
-## ssl.cacertfile = $(platform_etc_dir)/cacertfile.pem
-
-## DTrace support Do not enable 'dtrace' unless your Erlang/OTP
-## runtime is compiled to support DTrace.  DTrace is available in
-## R15B01 (supported by the Erlang/OTP official source package) and in
-## R14B04 via a custom source repository & branch.
-##
-## Default: off
-##
-## Acceptable values:
-##   - on or off
-dtrace = off
-
-## Platform-specific installation paths (substituted by rebar)
-##
-## Default: ./bin
-##
-## Acceptable values:
-##   - the path to a directory
-platform_bin_dir = ./bin
-
-##
-## Default: ./data
-##
-## Acceptable values:
-##   - the path to a directory
-platform_data_dir = ./data
-
-##
-## Default: ./etc
-##
-## Acceptable values:
-##   - the path to a directory
-platform_etc_dir = ./etc
-
-##
-## Default: ./lib
-##
-## Acceptable values:
-##   - the path to a directory
-platform_lib_dir = ./lib
-
-##
-## Default: ./log
-##
-## Acceptable values:
-##   - the path to a directory
-platform_log_dir = ./log
-
-## Enable consensus subsystem. Set to 'on' to enable the
-## consensus subsystem used for strongly consistent Riak operations.
-##
-## Default: off
-##
-## Acceptable values:
-##   - on or off
-## strong_consistency = on
-
-## listener.http.<name> is an IP address and TCP port that the Riak
-## HTTP interface will bind.
-##
-## Default: 127.0.0.1:8098
-##
-## Acceptable values:
-##   - an IP/port pair, e.g. 127.0.0.1:10011
-listener.http.internal = 0.0.0.0:${entity.riakWebPort?c}
-
-## listener.protobuf.<name> is an IP address and TCP port that the Riak
-## Protocol Buffers interface will bind.
-##
-## Default: 127.0.0.1:8087
-##
-## Acceptable values:
-##   - an IP/port pair, e.g. 127.0.0.1:10011
-listener.protobuf.internal = 0.0.0.0:${entity.riakPbPort?c}
-
-## The maximum length to which the queue of pending connections
-## may grow. If set, it must be an integer > 0. If you anticipate a
-## huge number of connections being initialized *simultaneously*, set
-## this number higher.
-##
-## Default: 128
-##
-## Acceptable values:
-##   - an integer
-## protobuf.backlog = 128
-
-## listener.https.<name> is an IP address and TCP port that the Riak
-## HTTPS interface will bind.
-##
-## Acceptable values:
-##   - an IP/port pair, e.g. 127.0.0.1:10011
-## listener.https.internal = 127.0.0.1:8098
-
-## How Riak will repair out-of-sync keys. Some features require
-## this to be set to 'active', including search.
-## * active: out-of-sync keys will be repaired in the background
-## * passive: out-of-sync keys are only repaired on read
-## * active-debug: like active, but outputs verbose debugging
-## information
-##
-## Default: active
-##
-## Acceptable values:
-##   - one of: active, passive, active-debug
-anti_entropy = active
-
-## Specifies the storage engine used for Riak's key-value data
-## and secondary indexes (if supported).
-##
-## Default: bitcask
-##
-## Acceptable values:
-##   - one of: bitcask, leveldb, memory, multi
-storage_backend = bitcask
-
-## Controls which binary representation of a riak value is stored
-## on disk.
-## * 0: Original erlang:term_to_binary format. Higher space overhead.
-## * 1: New format for more compact storage of small values.
-##
-## Default: 1
-##
-## Acceptable values:
-##   - the integer 1
-##   - the integer 0
-object.format = 1
-
-## Reading or writing objects bigger than this size will write a
-## warning in the logs.
-##
-## Default: 5MB
-##
-## Acceptable values:
-##   - a byte size with units, e.g. 10GB
-object.size.warning_threshold = 5MB
-
-## Writing an object bigger than this will send a failure to the
-## client.
-##
-## Default: 50MB
-##
-## Acceptable values:
-##   - a byte size with units, e.g. 10GB
-object.size.maximum = 50MB
-
-## Writing an object with more than this number of siblings will
-## generate a warning in the logs.
-##
-## Default: 25
-##
-## Acceptable values:
-##   - an integer
-object.siblings.warning_threshold = 25
-
-## Writing an object with more than this number of siblings will
-## send a failure to the client.
-##
-## Default: 100
-##
-## Acceptable values:
-##   - an integer
-object.siblings.maximum = 100
-
-## A path under which bitcask data files will be stored.
-##
-## Default: $(platform_data_dir)/bitcask
-##
-## Acceptable values:
-##   - the path to a directory
-bitcask.data_root = $(platform_data_dir)/bitcask
-
-## Configure how Bitcask writes data to disk.
-## erlang: Erlang's built-in file API
-## nif: Direct calls to the POSIX C API
-## The NIF mode provides higher throughput for certain
-## workloads, but has the potential to negatively impact
-## the Erlang VM, leading to higher worst-case latencies
-## and possible throughput collapse.
-##
-## Default: erlang
-##
-## Acceptable values:
-##   - one of: erlang, nif
-bitcask.io_mode = erlang
-
-## Set to 'off' to disable the admin panel.
-##
-## Default: off
-##
-## Acceptable values:
-##   - on or off
-riak_control = on
-
-## Authentication mode used for access to the admin panel.
-##
-## Default: off
-##
-## Acceptable values:
-##   - one of: off, userlist
-riak_control.auth.mode = off
-
-## If riak control's authentication mode (riak_control.auth.mode)
-## is set to 'userlist' then this is the list of usernames and
-## passwords for access to the admin panel.
-## To create users with given names, add entries of the format:
-## riak_control.auth.user.USERNAME.password = PASSWORD
-## replacing USERNAME with the desired username and PASSWORD with the
-## desired password for that user.
-##
-## Acceptable values:
-##   - text
-## riak_control.auth.user.admin.password = pass
-
-## This parameter defines the percentage of total server memory
-## to assign to LevelDB. LevelDB will dynamically adjust its internal
-## cache sizes to stay within this size.  The memory size can
-## alternately be assigned as a byte count via leveldb.maximum_memory
-## instead.
-##
-## Default: 70
-##
-## Acceptable values:
-##   - an integer
-leveldb.maximum_memory.percent = 70
-
-## To enable Search set this 'on'.
-##
-## Default: off
-##
-## Acceptable values:
-##   - on or off
-search = off
-
-## How long Riak will wait for Solr to start. The start sequence
-## will be tried twice. If both attempts timeout, then the Riak node
-## will be shutdown. This may need to be increased as more data is
-## indexed and Solr takes longer to start. Values lower than 1s will
-## be rounded up to the minimum 1s.
-##
-## Default: 30s
-##
-## Acceptable values:
-##   - a time duration with units, e.g. '10s' for 10 seconds
-search.solr.start_timeout = 30s
-
-## The port number which Solr binds to.
-## NOTE: Binds on every interface.
-##
-## Default: 8093
-##
-## Acceptable values:
-##   - an integer
-search.solr.port = ${entity.searchSolrPort?c}
-
-## The port number which Solr JMX binds to.
-## NOTE: Binds on every interface.
-##
-## Default: 8985
-##
-## Acceptable values:
-##   - an integer
-search.solr.jmx_port = ${entity.searchSolrJmxPort?c}
-
-## The options to pass to the Solr JVM.  Non-standard options,
-## i.e. -XX, may not be portable across JVM implementations.
-## E.g. -XX:+UseCompressedStrings
-##
-## Default: -d64 -Xms1g -Xmx1g -XX:+UseStringCache -XX:+UseCompressedOops
-##
-## Acceptable values:
-##   - text
-search.solr.jvm_options = -d64 -Xms1g -Xmx1g -XX:+UseStringCache -XX:+UseCompressedOops
-
-## erlang, constrain port range so we can open the internal firewall ports
-erlang.distribution.port_range.minimum = ${entity.erlangPortRangeStart?c}
-erlang.distribution.port_range.maximum = ${entity.erlangPortRangeEnd?c}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-with-webapp-cluster.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-with-webapp-cluster.yaml b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-with-webapp-cluster.yaml
deleted file mode 100644
index e1acf35..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-with-webapp-cluster.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# 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.
-#
-
-name: Riak Cluster with Webapp Cluster
-location: jclouds:softlayer:sjc01
-services:
-- type: org.apache.brooklyn.entity.nosql.riak.RiakCluster
-  initialSize: 2
-  id: cluster
-  brooklyn.config:
-    install.version: 2.0.0
-- type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
-  name: Web Cluster
-  brooklyn.config:
-    initialSize: 2
-    controlleddynamicwebappcluster.controllerSpec:
-      $brooklyn:entitySpec:
-        type: org.apache.brooklyn.entity.proxy.nginx.NginxController
-        brooklyn.config:
-          member.sensor.hostname: "host.subnet.hostname"
-    wars.root: "https://s3-eu-west-1.amazonaws.com/brooklyn-clocker/brooklyn-example-hello-world-sql-webapp.war"
-    java.sysprops: 
-      brooklyn.example.riak.nodes: $brooklyn:component("cluster").attributeWhenReady("riak.cluster.nodeList")
-
-# Alternative URL for War file if available on classpath
-# "classpath://brooklyn-example-hello-world-sql-webapp.war"

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-with-webapp.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-with-webapp.yaml b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-with-webapp.yaml
deleted file mode 100644
index 6bece30..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-with-webapp.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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.
-#
-
-name: Riak Cluster with Webapp
-location: aws-ec2:eu-west-1
-services:
-- type: org.apache.brooklyn.entity.nosql.riak.RiakCluster
-  initialSize: 2
-  id: cluster
-- type: org.apache.brooklyn.entity.webapp.jboss.JBoss7Server
-  name: Web
-  brooklyn.config:
-    wars.root: "https://s3-eu-west-1.amazonaws.com/brooklyn-clocker/brooklyn-example-hello-world-sql-webapp.war"
-    java.sysprops: 
-      brooklyn.example.riak.nodes: $brooklyn:component("cluster").attributeWhenReady("riak.cluster.nodeList")
-  provisioning.properties:
-    osFamily: centos
-
-# Alternative URL for War file if available on classpath
-# "classpath://brooklyn-example-hello-world-sql-webapp.war"

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.conf b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.conf
deleted file mode 100644
index 125fa77..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.conf
+++ /dev/null
@@ -1,494 +0,0 @@
-## Brooklyn note: file from 2.0.1 Ubuntu install, with erlang section added, and ports templated
-
-## Where to emit the default log messages (typically at 'info'
-## severity):
-## off: disabled
-## file: the file specified by log.console.file
-## console: to standard output (seen when using `riak attach-direct`)
-## both: log.console.file and standard out.
-## 
-## Default: file
-## 
-## Acceptable values:
-##   - one of: off, file, console, both
-log.console = file
-
-## The severity level of the console log, default is 'info'.
-## 
-## Default: info
-## 
-## Acceptable values:
-##   - one of: debug, info, notice, warning, error, critical, alert, emergency, none
-log.console.level = info
-
-## When 'log.console' is set to 'file' or 'both', the file where
-## console messages will be logged.
-## 
-## Default: $(platform_log_dir)/console.log
-## 
-## Acceptable values:
-##   - the path to a file
-log.console.file = $(platform_log_dir)/console.log
-
-## The file where error messages will be logged.
-## 
-## Default: $(platform_log_dir)/error.log
-## 
-## Acceptable values:
-##   - the path to a file
-log.error.file = $(platform_log_dir)/error.log
-
-## When set to 'on', enables log output to syslog.
-## 
-## Default: off
-## 
-## Acceptable values:
-##   - on or off
-log.syslog = off
-
-## Whether to enable the crash log.
-## 
-## Default: on
-## 
-## Acceptable values:
-##   - on or off
-log.crash = on
-
-## If the crash log is enabled, the file where its messages will
-## be written.
-## 
-## Default: $(platform_log_dir)/crash.log
-## 
-## Acceptable values:
-##   - the path to a file
-log.crash.file = $(platform_log_dir)/crash.log
-
-## Maximum size in bytes of individual messages in the crash log
-## 
-## Default: 64KB
-## 
-## Acceptable values:
-##   - a byte size with units, e.g. 10GB
-log.crash.maximum_message_size = 64KB
-
-## Maximum size of the crash log in bytes, before it is rotated
-## 
-## Default: 10MB
-## 
-## Acceptable values:
-##   - a byte size with units, e.g. 10GB
-log.crash.size = 10MB
-
-## The schedule on which to rotate the crash log.  For more
-## information see:
-## https://github.com/basho/lager/blob/master/README.md#internal-log-rotation
-## 
-## Default: $D0
-## 
-## Acceptable values:
-##   - text
-log.crash.rotation = $D0
-
-## The number of rotated crash logs to keep. When set to
-## 'current', only the current open log file is kept.
-## 
-## Default: 5
-## 
-## Acceptable values:
-##   - an integer
-##   - the text "current"
-log.crash.rotation.keep = 5
-
-## Name of the Erlang node
-## 
-## Default: riak@127.0.0.1
-## 
-## Acceptable values:
-##   - text
-nodename = riak@${driver.subnetHostname}
-
-## Cookie for distributed node communication.  All nodes in the
-## same cluster should use the same cookie or they will not be able to
-## communicate.
-## 
-## Default: riak
-## 
-## Acceptable values:
-##   - text
-distributed_cookie = riak
-
-## Sets the number of threads in async thread pool, valid range
-## is 0-1024. If thread support is available, the default is 64.
-## More information at: http://erlang.org/doc/man/erl.html
-## 
-## Default: 64
-## 
-## Acceptable values:
-##   - an integer
-erlang.async_threads = 64
-
-## The number of concurrent ports/sockets
-## Valid range is 1024-134217727
-## 
-## Default: 65536
-## 
-## Acceptable values:
-##   - an integer
-erlang.max_ports = 65536
-
-## Set scheduler forced wakeup interval. All run queues will be
-## scanned each Interval milliseconds. While there are sleeping
-## schedulers in the system, one scheduler will be woken for each
-## non-empty run queue found. An Interval of zero disables this
-## feature, which also is the default.
-## This feature is a workaround for lengthy executing native code, and
-## native code that do not bump reductions properly.
-## More information: http://www.erlang.org/doc/man/erl.html#+sfwi
-## 
-## Acceptable values:
-##   - an integer
-## erlang.schedulers.force_wakeup_interval = 500
-
-## Enable or disable scheduler compaction of load. By default
-## scheduler compaction of load is enabled. When enabled, load
-## balancing will strive for a load distribution which causes as many
-## scheduler threads as possible to be fully loaded (i.e., not run out
-## of work). This is accomplished by migrating load (e.g. runnable
-## processes) into a smaller set of schedulers when schedulers
-## frequently run out of work. When disabled, the frequency with which
-## schedulers run out of work will not be taken into account by the
-## load balancing logic.
-## More information: http://www.erlang.org/doc/man/erl.html#+scl
-## 
-## Acceptable values:
-##   - one of: true, false
-## erlang.schedulers.compaction_of_load = false
-
-## Enable or disable scheduler utilization balancing of load. By
-## default scheduler utilization balancing is disabled and instead
-## scheduler compaction of load is enabled which will strive for a
-## load distribution which causes as many scheduler threads as
-## possible to be fully loaded (i.e., not run out of work). When
-## scheduler utilization balancing is enabled the system will instead
-## try to balance scheduler utilization between schedulers. That is,
-## strive for equal scheduler utilization on all schedulers.
-## More information: http://www.erlang.org/doc/man/erl.html#+sub
-## 
-## Acceptable values:
-##   - one of: true, false
-## erlang.schedulers.utilization_balancing = true
-
-## Number of partitions in the cluster (only valid when first
-## creating the cluster). Must be a power of 2, minimum 8 and maximum
-## 1024.
-## 
-## Default: 64
-## 
-## Acceptable values:
-##   - an integer
-## ring_size = 64
-
-## Number of concurrent node-to-node transfers allowed.
-## 
-## Default: 2
-## 
-## Acceptable values:
-##   - an integer
-## transfer_limit = 2
-
-## Default cert location for https can be overridden
-## with the ssl config variable, for example:
-## 
-## Acceptable values:
-##   - the path to a file
-## ssl.certfile = $(platform_etc_dir)/cert.pem
-
-## Default key location for https can be overridden with the ssl
-## config variable, for example:
-## 
-## Acceptable values:
-##   - the path to a file
-## ssl.keyfile = $(platform_etc_dir)/key.pem
-
-## Default signing authority location for https can be overridden
-## with the ssl config variable, for example:
-## 
-## Acceptable values:
-##   - the path to a file
-## ssl.cacertfile = $(platform_etc_dir)/cacertfile.pem
-
-## DTrace support Do not enable 'dtrace' unless your Erlang/OTP
-## runtime is compiled to support DTrace.  DTrace is available in
-## R15B01 (supported by the Erlang/OTP official source package) and in
-## R14B04 via a custom source repository & branch.
-## 
-## Default: off
-## 
-## Acceptable values:
-##   - on or off
-dtrace = off
-
-## Platform-specific installation paths (substituted by rebar)
-## 
-## Default: /usr/sbin
-## 
-## Acceptable values:
-##   - the path to a directory
-platform_bin_dir = /usr/sbin
-
-## 
-## Default: /var/lib/riak
-## 
-## Acceptable values:
-##   - the path to a directory
-platform_data_dir = /var/lib/riak
-
-## 
-## Default: /etc/riak
-## 
-## Acceptable values:
-##   - the path to a directory
-platform_etc_dir = /etc/riak
-
-## 
-## Default: /usr/lib64/riak/lib
-## 
-## Acceptable values:
-##   - the path to a directory
-platform_lib_dir = /usr/lib64/riak/lib
-
-## 
-## Default: /var/log/riak
-## 
-## Acceptable values:
-##   - the path to a directory
-platform_log_dir = /var/log/riak
-
-## Enable consensus subsystem. Set to 'on' to enable the
-## consensus subsystem used for strongly consistent Riak operations.
-## 
-## Default: off
-## 
-## Acceptable values:
-##   - on or off
-## strong_consistency = on
-
-## listener.http.<name> is an IP address and TCP port that the Riak
-## HTTP interface will bind.
-## 
-## Default: 127.0.0.1:8098
-## 
-## Acceptable values:
-##   - an IP/port pair, e.g. 127.0.0.1:10011
-listener.http.internal = 0.0.0.0:${entity.riakWebPort?c}
-
-## listener.protobuf.<name> is an IP address and TCP port that the Riak
-## Protocol Buffers interface will bind.
-## 
-## Default: 127.0.0.1:8087
-## 
-## Acceptable values:
-##   - an IP/port pair, e.g. 127.0.0.1:10011
-listener.protobuf.internal = 0.0.0.0:${entity.riakPbPort?c}
-
-## The maximum length to which the queue of pending connections
-## may grow. If set, it must be an integer > 0. If you anticipate a
-## huge number of connections being initialized *simultaneously*, set
-## this number higher.
-## 
-## Default: 128
-## 
-## Acceptable values:
-##   - an integer
-## protobuf.backlog = 128
-
-## listener.https.<name> is an IP address and TCP port that the Riak
-## HTTPS interface will bind.
-## 
-## Acceptable values:
-##   - an IP/port pair, e.g. 127.0.0.1:10011
-## listener.https.internal = 127.0.0.1:8098
-
-## How Riak will repair out-of-sync keys. Some features require
-## this to be set to 'active', including search.
-## * active: out-of-sync keys will be repaired in the background
-## * passive: out-of-sync keys are only repaired on read
-## * active-debug: like active, but outputs verbose debugging
-## information
-## 
-## Default: active
-## 
-## Acceptable values:
-##   - one of: active, passive, active-debug
-anti_entropy = active
-
-## Specifies the storage engine used for Riak's key-value data
-## and secondary indexes (if supported).
-## 
-## Default: bitcask
-## 
-## Acceptable values:
-##   - one of: bitcask, leveldb, memory, multi
-storage_backend = bitcask
-
-## Controls which binary representation of a riak value is stored
-## on disk.
-## * 0: Original erlang:term_to_binary format. Higher space overhead.
-## * 1: New format for more compact storage of small values.
-## 
-## Default: 1
-## 
-## Acceptable values:
-##   - the integer 1
-##   - the integer 0
-object.format = 1
-
-## Reading or writing objects bigger than this size will write a
-## warning in the logs.
-## 
-## Default: 5MB
-## 
-## Acceptable values:
-##   - a byte size with units, e.g. 10GB
-object.size.warning_threshold = 5MB
-
-## Writing an object bigger than this will send a failure to the
-## client.
-## 
-## Default: 50MB
-## 
-## Acceptable values:
-##   - a byte size with units, e.g. 10GB
-object.size.maximum = 50MB
-
-## Writing an object with more than this number of siblings will
-## generate a warning in the logs.
-## 
-## Default: 25
-## 
-## Acceptable values:
-##   - an integer
-object.siblings.warning_threshold = 25
-
-## Writing an object with more than this number of siblings will
-## send a failure to the client.
-## 
-## Default: 100
-## 
-## Acceptable values:
-##   - an integer
-object.siblings.maximum = 100
-
-## A path under which bitcask data files will be stored.
-## 
-## Default: $(platform_data_dir)/bitcask
-## 
-## Acceptable values:
-##   - the path to a directory
-bitcask.data_root = $(platform_data_dir)/bitcask
-
-## Configure how Bitcask writes data to disk.
-## erlang: Erlang's built-in file API
-## nif: Direct calls to the POSIX C API
-## The NIF mode provides higher throughput for certain
-## workloads, but has the potential to negatively impact
-## the Erlang VM, leading to higher worst-case latencies
-## and possible throughput collapse.
-## 
-## Default: erlang
-## 
-## Acceptable values:
-##   - one of: erlang, nif
-bitcask.io_mode = erlang
-
-## Set to 'off' to disable the admin panel.
-## 
-## Default: off
-## 
-## Acceptable values:
-##   - on or off
-riak_control = on
-
-## Authentication mode used for access to the admin panel.
-## 
-## Default: off
-## 
-## Acceptable values:
-##   - one of: off, userlist
-riak_control.auth.mode = off
-
-## If riak control's authentication mode (riak_control.auth.mode)
-## is set to 'userlist' then this is the list of usernames and
-## passwords for access to the admin panel.
-## To create users with given names, add entries of the format:
-## riak_control.auth.user.USERNAME.password = PASSWORD
-## replacing USERNAME with the desired username and PASSWORD with the
-## desired password for that user.
-## 
-## Acceptable values:
-##   - text
-## riak_control.auth.user.admin.password = pass
-
-## This parameter defines the percentage of total server memory
-## to assign to LevelDB. LevelDB will dynamically adjust its internal
-## cache sizes to stay within this size.  The memory size can
-## alternately be assigned as a byte count via leveldb.maximum_memory
-## instead.
-## 
-## Default: 70
-## 
-## Acceptable values:
-##   - an integer
-leveldb.maximum_memory.percent = 70
-
-## To enable Search set this 'on'.
-## 
-## Default: off
-## 
-## Acceptable values:
-##   - on or off
-search = ${entity.isSearchEnabled()?string('on','off')}
-
-## How long Riak will wait for Solr to start. The start sequence
-## will be tried twice. If both attempts timeout, then the Riak node
-## will be shutdown. This may need to be increased as more data is
-## indexed and Solr takes longer to start. Values lower than 1s will
-## be rounded up to the minimum 1s.
-## 
-## Default: 30s
-## 
-## Acceptable values:
-##   - a time duration with units, e.g. '10s' for 10 seconds
-search.solr.start_timeout = 30s
-
-## The port number which Solr binds to.
-## NOTE: Binds on every interface.
-## 
-## Default: 8093
-## 
-## Acceptable values:
-##   - an integer
-search.solr.port = ${entity.searchSolrPort?c}
-
-## The port number which Solr JMX binds to.
-## NOTE: Binds on every interface.
-## 
-## Default: 8985
-## 
-## Acceptable values:
-##   - an integer
-search.solr.jmx_port = ${entity.searchSolrJmxPort?c}
-
-## The options to pass to the Solr JVM.  Non-standard options,
-## i.e. -XX, may not be portable across JVM implementations.
-## E.g. -XX:+UseCompressedStrings
-## 
-## Default: -d64 -Xms1g -Xmx1g -XX:+UseStringCache -XX:+UseCompressedOops
-## 
-## Acceptable values:
-##   - text
-search.solr.jvm_options = -d64 -Xms1g -Xmx1g -XX:+UseStringCache -XX:+UseCompressedOops
-
-## erlang, constrain port range so we can open the internal firewall ports
-erlang.distribution.port_range.minimum = ${entity.erlangPortRangeStart?c}
-erlang.distribution.port_range.maximum = ${entity.erlangPortRangeEnd?c}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.md
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.md b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.md
deleted file mode 100644
index 1efdde9..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.md
+++ /dev/null
@@ -1,67 +0,0 @@
-# Riak Examples
-
-Here is a selection of examples showing how to deploy Riak.
-
-
-### A Single-Node Deployment
-
-```
-location: YOUR_CLOUD
-services:
-- type: org.apache.brooklyn.entity.nosql.riak.RiakNode
-```
-
-
-### A Single-Node Deployment
-
-```
-location: YOUR_CLOUD
-services:
-- type: org.apache.brooklyn.entity.nosql.riak.RiakNode
-```
-
-
-### A Cluster
-
-```
-services:
-- type: org.apache.brooklyn.entity.nosql.riak.RiakCluster
-  location: YOUR_CLOUD
-  initialSize: 5
-```
-
-
-### A Cluster at a Specific Version with a Web App
-
-```
-services:
-- type: org.apache.brooklyn.entity.nosql.riak.RiakCluster
-  id: cluster
-  brooklyn.config:
-    initialSize: 2
-    install.version: 2.0.0
-- type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
-  brooklyn.config:
-    initialSize: 2
-    wars.root: https://s3-eu-west-1.amazonaws.com/brooklyn-clocker/brooklyn-example-hello-world-sql-webapp.war
-    java.sysprops: 
-      brooklyn.example.riak.nodes: $brooklyn:component("cluster").attributeWhenReady("riak.cluster.nodeList")
-```
-
-----
-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.

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.png b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.png
deleted file mode 100644
index a230b04..0000000
Binary files a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/vm.args
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/vm.args b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/vm.args
deleted file mode 100644
index be58d78..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/riak/vm.args
+++ /dev/null
@@ -1,64 +0,0 @@
-##### Brooklyn note: File from OSX distribution of Riak 1.4.8
-
-## Name of the riak node
--name riak@${driver.subnetHostname}
-
-## Cookie for distributed erlang.  All nodes in the same cluster
-## should use the same cookie or they will not be able to communicate.
--setcookie riak
-
-## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive
-## (Disabled by default..use with caution!)
-##-heart
-
-## Enable kernel poll and a few async threads
-+K true
-+A 64
-
-## Treat error_logger warnings as warnings
-+W w
-
-## Increase number of concurrent ports/sockets
--env ERL_MAX_PORTS 64000
-
-## Tweak GC to run more often 
--env ERL_FULLSWEEP_AFTER 0
-
-## Set the location of crash dumps
--env ERL_CRASH_DUMP ./log/erl_crash.dump
-
-## Raise the ETS table limit
--env ERL_MAX_ETS_TABLES 256000
-
-## Force the erlang VM to use SMP
--smp enable
-
-## For nodes with many busy_dist_port events, Basho recommends
-## raising the sender-side network distribution buffer size.
-## 32MB may not be sufficient for some workloads and is a suggested
-## starting point.
-## The Erlang/OTP default is 1024 (1 megabyte).
-## See: http://www.erlang.org/doc/man/erl.html#%2bzdbbl
-##+zdbbl 32768
-
-## Raise the default erlang process limit 
-+P 256000
-
-## Erlang VM scheduler tuning.
-## Prerequisite: a patched VM from Basho, or a VM compiled separately
-## with this patch applied:
-##     https://gist.github.com/evanmcc/a599f4c6374338ed672e
-##+sfwi 500
-
-## Begin SSL distribution items, DO NOT DELETE OR EDIT THIS COMMENT
-
-## To enable SSL encryption of the Erlang intra-cluster communication,
-## un-comment the three lines below and make certain that the paths
-## point to correct PEM data files.  See docs TODO for details.
-
-## -proto_dist inet_ssl
-## -ssl_dist_opt client_certfile "${driver.riakEtcDir}/erlclient.pem"
-## -ssl_dist_opt server_certfile "${driver.riakEtcDir}/erlserver.pem"
-
-## End SSL distribution items, DO NOT DELETE OR EDIT THIS COMMENT
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/solr/solr.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/solr/solr.xml b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/solr/solr.xml
deleted file mode 100644
index 6e12b5c..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/solr/solr.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-[#ftl]
-<?xml version="1.0" encoding="UTF-8"?>
-<solr>
-  <int name="coreLoadThreads">4</int>
-
-  <solrcloud>
-    <str name="host">${driver.hostname}</str>
-    <int name="hostPort">${entity.solrPort?c}</int>
-    <str name="hostContext">solr</str>
-    <int name="zkClientTimeout">15000</int>
-    <bool name="genericCoreNodeNames">true</bool>
-  </solrcloud>
-
-  <shardHandlerFactory name="shardHandlerFactory"
-    class="HttpShardHandlerFactory">
-    <int name="socketTimeout">0</int>
-    <int name="connTimeout">0</int>
-  </shardHandlerFactory>
-</solr>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/redis-logo.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/redis-logo.png b/brooklyn-library/software/nosql/src/main/resources/redis-logo.png
deleted file mode 100644
index 4ad2561..0000000
Binary files a/brooklyn-library/software/nosql/src/main/resources/redis-logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/solr-logo.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/solr-logo.png b/brooklyn-library/software/nosql/src/main/resources/solr-logo.png
deleted file mode 100644
index 05f1abd..0000000
Binary files a/brooklyn-library/software/nosql/src/main/resources/solr-logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/AbstractCassandraNodeTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/AbstractCassandraNodeTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/AbstractCassandraNodeTest.java
deleted file mode 100644
index a23d544..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/AbstractCassandraNodeTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import org.testng.annotations.BeforeMethod;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-
-/**
- * Cassandra test framework for integration and live tests.
- */
-public class AbstractCassandraNodeTest extends BrooklynAppLiveTestSupport {
-
-    protected Location testLocation;
-    protected CassandraNode cassandra;
-
-    @BeforeMethod(alwaysRun = true)
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        testLocation = app.newLocalhostProvisioningLocation();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/AstyanaxSupport.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/AstyanaxSupport.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/AstyanaxSupport.java
deleted file mode 100644
index e39bd22..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/AstyanaxSupport.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraNode;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.netflix.astyanax.AstyanaxContext;
-import com.netflix.astyanax.Cluster;
-import com.netflix.astyanax.Keyspace;
-import com.netflix.astyanax.MutationBatch;
-import com.netflix.astyanax.connectionpool.NodeDiscoveryType;
-import com.netflix.astyanax.connectionpool.OperationResult;
-import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
-import com.netflix.astyanax.connectionpool.exceptions.SchemaDisagreementException;
-import com.netflix.astyanax.connectionpool.impl.ConnectionPoolConfigurationImpl;
-import com.netflix.astyanax.connectionpool.impl.CountingConnectionPoolMonitor;
-import com.netflix.astyanax.impl.AstyanaxConfigurationImpl;
-import com.netflix.astyanax.model.Column;
-import com.netflix.astyanax.model.ColumnFamily;
-import com.netflix.astyanax.model.ColumnList;
-import com.netflix.astyanax.serializers.StringSerializer;
-import com.netflix.astyanax.thrift.ThriftFamilyFactory;
-
-/**
- * Cassandra testing using Astyanax API.
- */
-public class AstyanaxSupport {
-    private static final Logger log = LoggerFactory.getLogger(AstyanaxSupport.class);
-
-    public final String clusterName;
-    public final String hostname;
-    public final int thriftPort;
-    
-    public AstyanaxSupport(CassandraNode node) {
-        this(node.getClusterName(), node.getAttribute(Attributes.HOSTNAME), node.getThriftPort());
-    }
-    
-    public AstyanaxSupport(String clusterName, String hostname, int thriftPort) {
-        this.clusterName = clusterName;
-        this.hostname = hostname;
-        this.thriftPort = thriftPort;
-    }
-    
-    public AstyanaxContext<Keyspace> newAstyanaxContextForKeyspace(String keyspace) {
-        AstyanaxContext<Keyspace> context = new AstyanaxContext.Builder()
-                .forCluster(clusterName)
-                .forKeyspace(keyspace)
-                .withAstyanaxConfiguration(new AstyanaxConfigurationImpl()
-                        .setDiscoveryType(NodeDiscoveryType.NONE))
-                .withConnectionPoolConfiguration(new ConnectionPoolConfigurationImpl("BrooklynPool")
-                        .setPort(thriftPort)
-                        .setMaxConnsPerHost(1)
-                        .setConnectTimeout(5000) // 10s
-                        .setSeeds(String.format("%s:%d", hostname, thriftPort)))
-                .withConnectionPoolMonitor(new CountingConnectionPoolMonitor())
-                .buildKeyspace(ThriftFamilyFactory.getInstance());
-
-        context.start();
-        return context;
-    }
-    
-    public AstyanaxContext<Cluster> newAstyanaxContextForCluster() {
-        AstyanaxContext<Cluster> context = new AstyanaxContext.Builder()
-                .forCluster(clusterName)
-                .withAstyanaxConfiguration(new AstyanaxConfigurationImpl()
-                        .setDiscoveryType(NodeDiscoveryType.NONE))
-                .withConnectionPoolConfiguration(new ConnectionPoolConfigurationImpl("BrooklynPool")
-                        .setPort(thriftPort)
-                        .setMaxConnsPerHost(1)
-                        .setConnectTimeout(5000) // 10s
-                        .setSeeds(String.format("%s:%d", hostname, thriftPort)))
-                .withConnectionPoolMonitor(new CountingConnectionPoolMonitor())
-                .buildCluster(ThriftFamilyFactory.getInstance());
-
-        context.start();
-        return context;
-    }
-    
-    public static class AstyanaxSample extends AstyanaxSupport {
-        
-        public static class Builder {
-            protected CassandraNode node;
-            protected String clusterName;
-            protected String hostname;
-            protected Integer thriftPort;
-            protected String columnFamilyName = Identifiers.makeRandomId(8);
-            
-            public Builder node(CassandraNode val) {
-                this.node = val;
-                clusterName = node.getClusterName();
-                hostname = node.getAttribute(Attributes.HOSTNAME);
-                thriftPort = node.getThriftPort();
-                return this;
-            }
-            public Builder host(String clusterName, String hostname, int thriftPort) {
-                this.clusterName = clusterName;
-                this.hostname = hostname;
-                this.thriftPort = thriftPort;
-                return this;
-            }
-            public Builder columnFamilyName(String val) {
-                this.columnFamilyName = val;
-                return this;
-            }
-            public AstyanaxSample build() {
-                return new AstyanaxSample(this);
-            }
-        }
-        
-        public static Builder builder() {
-            return new Builder();
-        }
-        
-        public final String columnFamilyName;
-        public final ColumnFamily<String, String> sampleColumnFamily;
-
-        public AstyanaxSample(CassandraNode node) {
-            this(builder().node(node));
-        }
-
-        public AstyanaxSample(String clusterName, String hostname, int thriftPort) {
-            this(builder().host(clusterName, hostname, thriftPort));
-        }
-
-        protected AstyanaxSample(Builder builder) {
-            super(builder.clusterName, builder.hostname, builder.thriftPort);
-            columnFamilyName = checkNotNull(builder.columnFamilyName, "columnFamilyName");
-            sampleColumnFamily = new ColumnFamily<String, String>(
-                    columnFamilyName, // Column Family Name
-                    StringSerializer.get(), // Key Serializer
-                    StringSerializer.get()); // Column Serializer
-        }
-
-        /**
-         * Exercise the {@link CassandraNode} using the Astyanax API.
-         */
-        public void astyanaxTest() throws Exception {
-            String keyspaceName = "BrooklynTests_"+Identifiers.makeRandomId(8);
-            writeData(keyspaceName);
-            readData(keyspaceName);
-        }
-
-        /**
-         * Write to a {@link CassandraNode} using the Astyanax API.
-         * @throws ConnectionException 
-         */
-        public void writeData(String keyspaceName) throws ConnectionException {
-            // Create context
-            AstyanaxContext<Keyspace> context = newAstyanaxContextForKeyspace(keyspaceName);
-            try {
-                Keyspace keyspace = context.getEntity();
-                try {
-                    checkNull(keyspace.describeKeyspace().getColumnFamily(columnFamilyName), "key space for column family "+columnFamilyName);
-                } catch (Exception ek) {
-                    // (Re) Create keyspace if needed (including if family name already existed, 
-                    // e.g. due to a timeout on previous attempt)
-                    log.debug("repairing Cassandra error by re-creating keyspace "+keyspace+": "+ek);
-                    try {
-                        log.debug("dropping Cassandra keyspace "+keyspace);
-                        keyspace.dropKeyspace();
-                    } catch (Exception e) {
-                        /* Ignore */ 
-                        log.debug("Cassandra keyspace "+keyspace+" could not be dropped (probably did not exist): "+e);
-                    }
-                    try {
-                        keyspace.createKeyspace(ImmutableMap.<String, Object>builder()
-                                .put("strategy_options", ImmutableMap.<String, Object>of("replication_factor", "1"))
-                                .put("strategy_class", "SimpleStrategy")
-                                .build());
-                    } catch (SchemaDisagreementException e) {
-                        // discussion (but not terribly helpful) at http://stackoverflow.com/questions/6770894/schemadisagreementexception
-                        // let's just try again after a delay
-                        // (seems to have no effect; trying to fix by starting first node before others)
-                        log.warn("error creating Cassandra keyspace "+keyspace+" (retrying): "+e);
-                        Time.sleep(Duration.FIVE_SECONDS);
-                        keyspace.createKeyspace(ImmutableMap.<String, Object>builder()
-                                .put("strategy_options", ImmutableMap.<String, Object>of("replication_factor", "1"))
-                                .put("strategy_class", "SimpleStrategy")
-                                .build());
-                    }
-                }
-                
-                assertNull(keyspace.describeKeyspace().getColumnFamily("Rabbits"), "key space for arbitrary column family Rabbits");
-                assertNull(keyspace.describeKeyspace().getColumnFamily(columnFamilyName), "key space for column family "+columnFamilyName);
-
-                // Create column family
-                keyspace.createColumnFamily(sampleColumnFamily, null);
-
-                // Insert rows
-                MutationBatch m = keyspace.prepareMutationBatch();
-                m.withRow(sampleColumnFamily, "one")
-                        .putColumn("name", "Alice", null)
-                        .putColumn("company", "Cloudsoft Corp", null);
-                m.withRow(sampleColumnFamily, "two")
-                        .putColumn("name", "Bob", null)
-                        .putColumn("company", "Cloudsoft Corp", null)
-                        .putColumn("pet", "Cat", null);
-
-                OperationResult<Void> insert = m.execute();
-                assertEquals(insert.getHost().getHostName(), hostname);
-                assertTrue(insert.getLatency() > 0L);
-            } finally {
-                context.shutdown();
-            }
-        }
-
-        /**
-         * Read from a {@link CassandraNode} using the Astyanax API.
-         * @throws ConnectionException 
-         */
-        public void readData(String keyspaceName) throws ConnectionException {
-            // Create context
-            AstyanaxContext<Keyspace> context = newAstyanaxContextForKeyspace(keyspaceName);
-            try {
-                Keyspace keyspace = context.getEntity();
-
-                // Query data
-                OperationResult<ColumnList<String>> query = keyspace.prepareQuery(sampleColumnFamily)
-                        .getKey("one")
-                        .execute();
-                assertEquals(query.getHost().getHostName(), hostname);
-                assertTrue(query.getLatency() > 0L);
-
-                ColumnList<String> columns = query.getResult();
-                assertEquals(columns.size(), 2);
-
-                // Lookup columns in response by name
-                String name = columns.getColumnByName("name").getStringValue();
-                assertEquals(name, "Alice");
-
-                // Iterate through the columns
-                for (Column<String> c : columns) {
-                    assertTrue(ImmutableList.of("name", "company").contains(c.getName()));
-                }
-            } finally {
-                context.shutdown();
-            }
-        }
-        
-
-        /**
-         * Returns the keyspace name to which the data has been written. If it fails the first time,
-         * then will increment the keyspace name. This is because the failure could be a response timeout,
-         * where the keyspace really has been created so subsequent attempts with the same name will 
-         * fail (because we assert that the keyspace did not exist).
-         */
-        public String writeData(String keyspacePrefix, int numRetries) throws ConnectionException {
-            int retryCount = 0;
-            while (true) {
-                try {
-                    String keyspaceName = keyspacePrefix + (retryCount > 0 ? "" : "_"+retryCount);
-                    writeData(keyspaceName);
-                    return keyspaceName;
-                } catch (Exception e) {
-                    log.warn("Error writing data - attempt "+(retryCount+1)+" of "+(numRetries+1)+": "+e, e);
-                    if (++retryCount > numRetries)
-                        throw Exceptions.propagate(e);
-                }
-            }
-        }
-
-        /**
-         * Repeatedly tries to read data from the given keyspace name. Asserts that the data is the
-         * same as would be written by calling {@code writeData(keyspaceName)}.
-         */
-        public void readData(String keyspaceName, int numRetries) throws ConnectionException {
-            int retryCount = 0;
-            while (true) {
-                try {
-                    readData(keyspaceName);
-                    return;
-                } catch (Exception e) {
-                    log.warn("Error reading data - attempt "+(retryCount+1)+" of "+(numRetries+1)+": "+e, e);
-                    if (++retryCount > numRetries)
-                        throw Exceptions.propagate(e);
-                }
-            }
-        }
-
-        /**
-         * Like {@link Assert#assertNull(Object, String)}, except throws IllegalStateException instead
-         */
-        private void checkNull(Object obj, String msg) {
-            if (obj != null) {
-                throw new IllegalStateException("Not null: "+msg+"; obj="+obj);
-            }
-        }
-    }
-
-    public static void main(String[] args) throws Exception {
-        AstyanaxSample support = new AstyanaxSample("ignored", "ec2-79-125-32-2.eu-west-1.compute.amazonaws.com", 9160);
-        AstyanaxContext<Cluster> context = support.newAstyanaxContextForCluster();
-        try {
-            System.out.println(context.getEntity().describeSchemaVersions());
-        } finally {
-            context.shutdown();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterIntegrationTest.java
deleted file mode 100644
index eddbbef..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterIntegrationTest.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.math.BigInteger;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.apache.brooklyn.entity.nosql.cassandra.TokenGenerators.PosNeg63TokenGenerator;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-
-/**
- * An integration test of the {@link CassandraDatacenter} entity.
- *
- * Tests that a one node cluster can be started on localhost and data can be written/read, using the Astyanax API.
- * 
- * NOTE: If these tests fail with "Timeout waiting for SERVICE_UP" and "java.lang.IllegalStateException: Unable to contact any seeds!" 
- * or "java.lang.RuntimeException: Unable to gossip with any seeds" appears in the log, it may be that the broadcast_address 
- * (set to InetAddress.getLocalHost().getHostName()) is not resolving to the value specified in listen_address 
- * (InetAddress.getLocalHost().getHostAddress()). You can work round this issue by ensuring that you machine has only one 
- * address, e.g. by disabling wireless if you are also using a wired connection
- */
-public class CassandraDatacenterIntegrationTest extends BrooklynAppLiveTestSupport {
-
-    @SuppressWarnings("unused")
-    private static final Logger log = LoggerFactory.getLogger(CassandraDatacenterIntegrationTest.class);
-
-    protected Location testLocation;
-    protected CassandraDatacenter cluster;
-
-    @BeforeMethod(alwaysRun = true)
-    @Override
-    public void setUp() throws Exception {
-        CassandraNodeIntegrationTest.assertCassandraPortsAvailableEventually();
-        super.setUp();
-        testLocation = app.newLocalhostProvisioningLocation();
-    }
-
-    @AfterMethod(alwaysRun=true)
-    @Override
-    public void tearDown() throws Exception {
-        super.tearDown();
-        CassandraNodeIntegrationTest.assertCassandraPortsAvailableEventually();
-    }
-    
-
-    @Test(groups = "Integration")
-    public void testStartAndShutdownClusterSizeOne() throws Exception {
-        EntitySpec<CassandraDatacenter> spec = EntitySpec.create(CassandraDatacenter.class)
-                .configure("initialSize", 1)
-                .configure("tokenShift", 42);
-        runStartAndShutdownClusterSizeOne(spec, true);
-    }
-    
-    /**
-     * Cassandra v2 needs Java >= 1.7. If you have java 6 as the defult locally, then you can use
-     * something like {@code .configure("shell.env", MutableMap.of("JAVA_HOME", "/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home"))}
-     */
-    @Test(groups = "Integration")
-    public void testStartAndShutdownClusterSizeOneCassandraVersion2() throws Exception {
-        String version = "2.0.9";
-        
-        EntitySpec<CassandraDatacenter> spec = EntitySpec.create(CassandraDatacenter.class)
-                .configure(CassandraNode.SUGGESTED_VERSION, version)
-                .configure("initialSize", 1);
-        runStartAndShutdownClusterSizeOne(spec, false);
-    }
-    
-    /**
-     * Test that a single node cluster starts up and allows access via the Astyanax API.
-     * Only one node because Cassandra can only run one node per VM!
-     */
-    protected void runStartAndShutdownClusterSizeOne(EntitySpec<CassandraDatacenter> datacenterSpec, final boolean assertToken) throws Exception {
-        cluster = app.createAndManageChild(datacenterSpec);
-        assertEquals(cluster.getCurrentSize().intValue(), 0);
-
-        app.start(ImmutableList.of(testLocation));
-        Entities.dumpInfo(app);
-        
-        final CassandraNode node = (CassandraNode) Iterables.get(cluster.getMembers(), 0);
-        String nodeAddr = checkNotNull(node.getAttribute(CassandraNode.HOSTNAME), "hostname") + ":" + checkNotNull(node.getAttribute(CassandraNode.THRIFT_PORT), "thriftPort");
-        
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, CassandraDatacenter.GROUP_SIZE, 1);
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, CassandraDatacenter.CASSANDRA_CLUSTER_NODES, ImmutableList.of(nodeAddr));
-
-        EntityTestUtils.assertAttributeEqualsEventually(node, Startable.SERVICE_UP, true);
-        if (assertToken) {
-            PosNeg63TokenGenerator tg = new PosNeg63TokenGenerator();
-            tg.growingCluster(1);
-            EntityTestUtils.assertAttributeEqualsEventually(node, CassandraNode.TOKENS, ImmutableSet.of(tg.newToken().add(BigInteger.valueOf(42))));
-        }
-
-        // may take some time to be consistent (with new thrift_latency checks on the node,
-        // contactability should not be an issue, but consistency still might be)
-        Asserts.succeedsEventually(MutableMap.of("timeout", 120*1000), new Runnable() {
-            public void run() {
-                boolean open = CassandraDatacenterLiveTest.isSocketOpen(node);
-                Boolean consistant = open ? CassandraDatacenterLiveTest.areVersionsConsistent(node) : null;
-                Integer numPeers = node.getAttribute(CassandraNode.PEERS);
-                Integer liveNodeCount = node.getAttribute(CassandraNode.LIVE_NODE_COUNT);
-                String msg = "consistency:  "
-                        + (!open ? "unreachable" : consistant==null ? "error" : consistant)+"; "
-                        + "peer group sizes: "+numPeers + "; live node count: " + liveNodeCount;
-                assertTrue(open, msg);
-                assertEquals(consistant, Boolean.TRUE, msg);
-                if (assertToken) {
-                    assertEquals(numPeers, (Integer)1, msg);
-                } else {
-                    assertTrue(numPeers != null && numPeers >= 1, msg);
-                }
-                assertEquals(liveNodeCount, (Integer)1, msg);
-            }});
-        
-        CassandraDatacenterLiveTest.checkConnectionRepeatedly(2, 5, ImmutableList.of(node));
-    }
-}


[18/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.conf b/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.conf
deleted file mode 100644
index 5dd10d7..0000000
--- a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.conf
+++ /dev/null
@@ -1,63 +0,0 @@
-[#ftl]
-//
-// 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.
-//
-// Generated by Brooklyn on ${.now?string.short}
-//
-options {
-    listen-on port ${entity.dnsPort} { 127.0.0.1; ${driver.address}; };
-    listen-on-v6 port ${entity.dnsPort} { ::1; };
-    directory "${driver.osSupport.configDirectory}";
-    dump-file "${driver.dataDirectory}/cache_dump.db";
-    statistics-file "${driver.dataDirectory}/named_stats.txt";
-    memstatistics-file "${driver.dataDirectory}/named_mem_stats.txt";
-    allow-query { localhost; ${entity.managementCidr}; };
-    allow-transfer { localhost; ${driver.address}; };
-    recursion yes;
-    dnssec-enable yes;
-    dnssec-validation yes;
-    dnssec-lookaside auto;
-    bindkeys-file "${driver.osSupport.keysFile}";
-    managed-keys-directory "${driver.dynamicDirectory}";
-};
-
-logging {
-    channel default_debug {
-        file "${driver.dataDirectory}/named.run";
-        severity dynamic;
-    };
-};
-
-zone "." IN {
-    type hint;
-    file "${driver.osSupport.rootZonesFile}";
-};
-
-zone "${entity.reverseLookupDomain}" IN {
-    type master;
-    file "${driver.reverseZoneFile}";
-    allow-update { none; };
-};
-
-zone "${entity.domainName}" IN {
-    type master;
-    file "${driver.domainZoneFile}";
-    allow-update { none; };
-};
-
-include "${driver.rfc1912ZonesFile}";

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.empty
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.empty b/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.empty
deleted file mode 100644
index 3197b41..0000000
--- a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.empty
+++ /dev/null
@@ -1,30 +0,0 @@
-;
-; 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.
-;
-;
-; Reverse data for the broadcast zone
-;
-$TTL    1W
-@       IN      SOA     localhost. root.localhost. (
-                              1         ; serial
-                             1W         ; refresh
-                             1D         ; retry
-                             1M         ; expire
-                             1M )       ; ttl
-;
-@       IN      NS      localhost.

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.localhost
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.localhost b/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.localhost
deleted file mode 100644
index c683a83..0000000
--- a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.localhost
+++ /dev/null
@@ -1,32 +0,0 @@
-;
-; 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.
-;
-;
-; BIND data for the local loopback interface
-;
-$TTL    1W
-@       IN      SOA     localhost. root.localhost. (
-                              1         ; serial
-                             1W         ; refresh
-                             1D         ; retry
-                             1M         ; expire
-                             1M )       ; ttl
-;
-@       IN      NS      localhost.
-@       IN      A       127.0.0.1
-@       IN      AAAA    ::1

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.loopback
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.loopback b/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.loopback
deleted file mode 100644
index 38d701d..0000000
--- a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.loopback
+++ /dev/null
@@ -1,31 +0,0 @@
-;
-; 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.
-;
-;
-; BIND reverse data for the local loopback interface
-;
-$TTL    1W
-@       IN      SOA     localhost. root.localhost. (
-                              1         ; serial
-                             1W         ; refresh
-                             1D         ; retry
-                             1M         ; expire
-                             1M )       ; ttl
-;
-@       IN      NS      localhost.
-1.0.0   IN      PTR     localhost.

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/resolv.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/resolv.conf b/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/resolv.conf
deleted file mode 100644
index ade4ce0..0000000
--- a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/resolv.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-[#ftl]
-#
-# 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.
-#
-# Generated by Brooklyn on ${.now?string.short}
-#
-#
-search ${entity.domainName}
-nameserver ${driver.address}
-nameserver 8.8.8.8

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/reverse.zone
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/reverse.zone b/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/reverse.zone
deleted file mode 100644
index 6966e1e..0000000
--- a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/reverse.zone
+++ /dev/null
@@ -1,37 +0,0 @@
-[#ftl]
-;;
-;; 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.
-;;
-;; Generated by Brooklyn on ${.now?string.short}
-;;
-[#noparse]$TTL[/#noparse] 86400
-@ IN SOA ns1.${entity.domainName}. root.${entity.domainName}. (
-    ${entity.serial?c} ; serial
-    3600 ; refresh
-    1800 ; retry
-    604800 ; expire
-    86400 ; ttl
-)
-${entity.reverseLookupDomain}. IN NS ns1.${entity.domainName}.
-${entity.reverseLookupDomain}. IN NS ns2.${entity.domainName}.
-ns1 IN A ${driver.address}
-ns2 IN A ${driver.address}
-
-[#list entity.pointerRecords?keys as address]
-${address} IN PTR ${entity.pointerRecords[address]}.${entity.domainName}.
-[/#list]

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/rfc1912.zone
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/rfc1912.zone b/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/rfc1912.zone
deleted file mode 100644
index 1de4650..0000000
--- a/brooklyn-library/software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/rfc1912.zone
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// 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.
-//
-// Zones recommended in RFC 1912 section 4.1.
-//
-// See https://www.ietf.org/rfc/rfc1912.txt.
-//
-
-zone "localhost" {
-        type master;
-        file "${driver.osSupport.configDirectory}/named.localhost";
-        allow-update { none; };
-};
-
-zone "127.in-addr.arpa" {
-        type master;
-        file "${driver.osSupport.configDirectory}/named.loopback";
-        allow-update { none; };
-};
-
-zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
-        type master;
-        file "${driver.osSupport.configDirectory}/named.loopback";
-        allow-update { none; };
-};
-
-zone "0.in-addr.arpa" {
-        type master;
-        file "${driver.osSupport.configDirectory}/named.empty";
-        allow-update { none; };
-};
-
-zone "255.in-addr.arpa" {
-        type master;
-        file "${driver.osSupport.configDirectory}/named.empty";
-        allow-update { none; };
-};

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerByonLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerByonLiveTest.java b/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerByonLiveTest.java
deleted file mode 100644
index 9dabcb4..0000000
--- a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerByonLiveTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Optional;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.apache.brooklyn.util.text.Strings;
-
-public class BindDnsServerByonLiveTest extends BrooklynAppLiveTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(BindDnsServerByonLiveTest.class);
-
-    @Test(groups = "Live")
-    @Parameters({"locationSpec"})
-    public void testDns(@Optional String locationSpec) throws Exception {
-        if (Strings.isBlank(locationSpec)) {
-            LOG.info("{} got no spec, skipping test", this);
-        } else {
-            Location testLocation = mgmt.getLocationRegistry().resolve(locationSpec);
-            BindDnsServerLiveTest.testBindStartsAndUpdates(app, testLocation);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerEc2LiveTest.java b/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerEc2LiveTest.java
deleted file mode 100644
index 7c6391a..0000000
--- a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerEc2LiveTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-
-public class BindDnsServerEc2LiveTest extends AbstractEc2LiveTest {
-    private static final Logger LOG = LoggerFactory.getLogger(BindDnsServerEc2LiveTest.class);
-
-    protected void doTest(Location testLocation) throws Exception {
-        BindDnsServerLiveTest.testBindStartsAndUpdates(app, testLocation);
-    }
-
-    @Override
-    public void test_Red_Hat_Enterprise_Linux_6() throws Exception {
-        super.test_Red_Hat_Enterprise_Linux_6();
-    }
-
-    @Override
-    public void test_CentOS_6_3() throws Exception {
-        super.test_CentOS_6_3();
-    }
-
-    @Override
-    public void test_Debian_7_2() throws Exception {
-        super.test_Debian_7_2();
-    }
-
-    @Override
-    public void test_Debian_6() throws Exception {
-        LOG.debug("{} skipped Debian 6 test", this);
-    }
-
-    @Override
-    public void test_Ubuntu_10_0() throws Exception {
-        LOG.debug("{} skipped Ubuntu 10 test", this);
-    }
-
-    @Override
-    public void test_CentOS_5() throws Exception {
-        LOG.debug("{} skipped CentOS 5.6 test", this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerIntegrationTest.java b/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerIntegrationTest.java
deleted file mode 100644
index a0c67e0..0000000
--- a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerIntegrationTest.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import static org.testng.Assert.assertEquals;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.sensor.EnricherSpec;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.EntityPredicates;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.mgmt.rebind.RebindOptions;
-import org.apache.brooklyn.core.mgmt.rebind.RebindTestFixture;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.software.base.EmptySoftwareProcess;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Functions;
-import com.google.common.base.Joiner;
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-import com.google.common.base.Strings;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-public class BindDnsServerIntegrationTest extends RebindTestFixture<TestApplication> {
-
-    private static final Logger LOG = LoggerFactory.getLogger(BindDnsServerIntegrationTest.class);
-    private BindDnsServer dns;
-    private DynamicCluster cluster;
-
-    @Override
-    protected TestApplication createApp() {
-        TestApplication app = ApplicationBuilder.newManagedApp(TestApplication.class, origManagementContext);
-        dns = app.createAndManageChild(EntitySpec.create(BindDnsServer.class, TestBindDnsServerImpl.class)
-                .configure(BindDnsServer.ENTITY_FILTER, Predicates.instanceOf(EmptySoftwareProcess.class))
-                .configure(BindDnsServer.HOSTNAME_SENSOR, PrefixAndIdEnricher.SENSOR));
-        EntitySpec<EmptySoftwareProcess> memberSpec = EntitySpec.create(EmptySoftwareProcess.class)
-                .enricher(EnricherSpec.create(PrefixAndIdEnricher.class)
-                        .configure(PrefixAndIdEnricher.PREFIX, "dns-integration-test-")
-                        .configure(PrefixAndIdEnricher.MONITOR, Attributes.HOSTNAME));
-        cluster = app.createAndManageChild(EntitySpec.create(DynamicCluster.class)
-                .configure(DynamicCluster.MEMBER_SPEC, memberSpec)
-                .configure(DynamicCluster.INITIAL_SIZE, 3));
-        return app;
-    }
-
-    @Test(groups = "Integration")
-    public void testOneARecordAndNoCnameRecordsWhenEntitiesHaveSameName() {
-        TestApplication app = ApplicationBuilder.newManagedApp(TestApplication.class, origManagementContext);
-        EnricherSpec<?> dnsEnricher = Enrichers.builder().transforming(Attributes.HOSTNAME)
-                .computing(Functions.constant("my-name"))
-                .publishing(PrefixAndIdEnricher.SENSOR)
-                .build();
-        EntitySpec<EmptySoftwareProcess> emptySoftwareProcessSpec = EntitySpec.create(EmptySoftwareProcess.class)
-                .enricher(dnsEnricher);
-        dns = app.createAndManageChild(EntitySpec.create(BindDnsServer.class, TestBindDnsServerImpl.class)
-                .configure(BindDnsServer.HOSTNAME_SENSOR, PrefixAndIdEnricher.SENSOR));
-
-        // App DNS will listen to
-        cluster = app.createAndManageChild(EntitySpec.create(DynamicCluster.class)
-                .configure(DynamicCluster.MEMBER_SPEC, emptySoftwareProcessSpec)
-                .configure(DynamicCluster.INITIAL_SIZE, 3));
-
-        app.start(ImmutableList.of(app.newLocalhostProvisioningLocation()));
-
-        assertDnsEntityEventuallyHasActiveMembers(1);
-        // All of the entities publish the same domain name so there should be a single DNS entry and no CNAMEs.
-        assertMapSizes(1, 1, 0, 1);
-    }
-
-    @Test(groups = "Integration")
-    public void testDuplicateAAndCnameRecordsAreIgnored() {
-        TestApplication app = ApplicationBuilder.newManagedApp(TestApplication.class, origManagementContext);
-        EnricherSpec<?> enricher1 = Enrichers.builder().transforming(Attributes.HOSTNAME)
-                .computing(Functions.constant("my-name-1"))
-                .publishing(PrefixAndIdEnricher.SENSOR)
-                .build();
-        EnricherSpec<?> enricher2 = Enrichers.builder().transforming(Attributes.HOSTNAME)
-                .computing(Functions.constant("my-name-2"))
-                .publishing(PrefixAndIdEnricher.SENSOR)
-                .build();
-        dns = app.createAndManageChild(EntitySpec.create(BindDnsServer.class, TestBindDnsServerImpl.class)
-                .configure(BindDnsServer.HOSTNAME_SENSOR, PrefixAndIdEnricher.SENSOR));
-
-        // Expect one of my-name-{1,2} to be used as the A record the other to be used as the CNAME.
-        // Expect all duplicate records to be ignored.
-        app.createAndManageChild(EntitySpec.create(EmptySoftwareProcess.class).enricher(enricher1));
-        app.createAndManageChild(EntitySpec.create(EmptySoftwareProcess.class).enricher(enricher1));
-        app.createAndManageChild(EntitySpec.create(EmptySoftwareProcess.class).enricher(enricher1));
-        app.createAndManageChild(EntitySpec.create(EmptySoftwareProcess.class).enricher(enricher2));
-        app.createAndManageChild(EntitySpec.create(EmptySoftwareProcess.class).enricher(enricher2));
-        app.createAndManageChild(EntitySpec.create(EmptySoftwareProcess.class).enricher(enricher2));
-        app.start(ImmutableList.of(app.newLocalhostProvisioningLocation()));
-
-        assertDnsEntityEventuallyHasActiveMembers(2);
-        assertMapSizes(2, 1, 1, 1);
-    }
-
-    @Test(groups = "Integration")
-    public void testStripsInvalidCharactersFromHostname() {
-        origApp.start(ImmutableList.of(origApp.newLocalhostProvisioningLocation()));
-        cluster.resize(1);
-        assertDnsEntityEventuallyHasActiveMembers(1);
-        EntityLocal e = (EntityLocal) Iterables.getOnlyElement(cluster.getMembers());
-        e.sensors().set(PrefixAndIdEnricher.SENSOR, " _-pretend.hostname.10.0.0.7.my-cloud.com");
-        EntityTestUtils.assertAttributeEqualsEventually(dns, BindDnsServer.A_RECORDS,
-                ImmutableMap.of("pretend-hostname-10-0-0-7-my-cloud-com", e.getAttribute(Attributes.ADDRESS)));
-    }
-
-    @Test(groups = "Integration")
-    public void testHostnameTruncatedTo63Characters() {
-        origApp.start(ImmutableList.of(origApp.newLocalhostProvisioningLocation()));
-        cluster.resize(1);
-        assertDnsEntityEventuallyHasActiveMembers(1);
-        EntityLocal e = (EntityLocal) Iterables.getOnlyElement(cluster.getMembers());
-        e.sensors().set(PrefixAndIdEnricher.SENSOR, Strings.repeat("a", 171));
-        EntityTestUtils.assertAttributeEqualsEventually(dns, BindDnsServer.A_RECORDS,
-                ImmutableMap.of(Strings.repeat("a", 63), e.getAttribute(Attributes.ADDRESS)));
-    }
-
-    @Test(groups = "Integration")
-    public void testCanConfigureToListenToChildrenOfEntityOtherThanParent() {
-        // Ignoring origApp
-        TestApplication app = ApplicationBuilder.newManagedApp(TestApplication.class, origManagementContext);
-
-        EnricherSpec<PrefixAndIdEnricher> dnsEnricher = EnricherSpec.create(PrefixAndIdEnricher.class)
-                .configure(PrefixAndIdEnricher.PREFIX, "dns-integration-test-")
-                .configure(PrefixAndIdEnricher.MONITOR, Attributes.HOSTNAME);
-        EntitySpec<EmptySoftwareProcess> emptySoftwareProcessSpec = EntitySpec.create(EmptySoftwareProcess.class)
-                .enricher(dnsEnricher);
-
-        // App DNS will listen to
-        cluster = app.createAndManageChild(EntitySpec.create(DynamicCluster.class)
-                .configure(DynamicCluster.MEMBER_SPEC, emptySoftwareProcessSpec)
-                .configure(DynamicCluster.INITIAL_SIZE, 3));
-
-        // Apps that DNS should not listen to. Appreciate that their having dnsEnricher is unrealistic!
-        app.createAndManageChild(emptySoftwareProcessSpec);
-        app.createAndManageChild(emptySoftwareProcessSpec);
-
-        Predicate<Entity> entityFilter = Predicates.and(
-                Predicates.instanceOf(EmptySoftwareProcess.class),
-                EntityPredicates.isChildOf(cluster));
-        dns = app.createAndManageChild(EntitySpec.create(BindDnsServer.class, TestBindDnsServerImpl.class)
-                .configure(BindDnsServer.ENTITY_FILTER, entityFilter)
-                .configure(BindDnsServer.HOSTNAME_SENSOR, PrefixAndIdEnricher.SENSOR));
-
-        app.start(ImmutableList.of(app.newLocalhostProvisioningLocation()));
-        logDnsMappings();
-        assertEquals(dns.getAttribute(BindDnsServer.ADDRESS_MAPPINGS).keySet().size(), 1);
-        assertMapSizes(3, 1, 2, 1);
-
-        cluster.resize(4);
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, DynamicCluster.GROUP_SIZE, 4);
-        assertDnsEntityEventuallyHasActiveMembers(4);
-        assertMapSizes(4, 1, 3, 1);
-
-    }
-
-    @Test(invocationCount=1, groups = "Integration")
-    public void testRebindDns() throws Throwable {
-        origApp.start(ImmutableList.of(origApp.newLocalhostProvisioningLocation()));
-        logDnsMappings();
-        assertEquals(dns.getAttribute(BindDnsServer.ADDRESS_MAPPINGS).keySet().size(), 1);
-        assertMapSizes(3, 1, 2, 1);
-
-        rebind(RebindOptions.create().mementoDirBackup(mementoDirBackup));
-        try {
-            dns = (BindDnsServer) Iterables.getOnlyElement(Iterables.filter(newApp.getChildren(), Predicates.instanceOf(BindDnsServer.class)));
-            cluster = (DynamicCluster) Iterables.getOnlyElement(Iterables.filter(newApp.getChildren(), Predicates.instanceOf(DynamicCluster.class)));
-    
-            // assert original attributes restored and the server can be updated.
-            logDnsMappings();
-            assertMapSizes(3, 1, 2, 1);
-            cluster.resize(1);
-            assertDnsEntityEventuallyHasActiveMembers(1);
-            logDnsMappings();
-            EntityTestUtils.assertAttributeEqualsEventually(cluster, DynamicCluster.GROUP_SIZE, 1);
-            assertMapSizes(1, 1, 0, 1);
-            cluster.resize(5);
-            assertDnsEntityEventuallyHasActiveMembers(5);
-            logDnsMappings();
-            EntityTestUtils.assertAttributeEqualsEventually(cluster, DynamicCluster.GROUP_SIZE, 5);
-            assertMapSizes(5, 1, 4, 1);
-        } catch (Throwable t) {
-            // Failing in jenkins occasionally; don't know why and can't reproduce.
-            // Therefore dumping out lots more info on failure.
-            LOG.error("Test failed; dumping out contents of original persistence dir used for rebind...", t);
-            dumpMementoDir(mementoDirBackup);
-            throw t;
-        }
-    }
-
-    @Test(groups = "Integration")
-    public void testMapsSeveralEntitiesOnOneMachine() {
-        origApp.start(ImmutableList.of(origApp.newLocalhostProvisioningLocation()));
-        EntityTestUtils.assertAttributeEqualsEventually(dns, Attributes.SERVICE_UP, true);
-        logDnsMappings();
-
-        // One host with one A, two CNAME and one PTR record
-        assertEquals(dns.getAttribute(BindDnsServer.ADDRESS_MAPPINGS).keySet().size(), 1);
-        assertMapSizes(3, 1, 2, 1);
-        String key = Iterables.getOnlyElement(dns.getAttribute(BindDnsServer.ADDRESS_MAPPINGS).keySet());
-        assertEquals(dns.getAttribute(BindDnsServer.ADDRESS_MAPPINGS).get(key).size(), 3);
-
-        Entities.dumpInfo(dns);
-    }
-
-    private void assertMapSizes(int addresses, int aRecords, int cnameRecords, int ptrRecords) {
-        assertEquals(dns.getAttribute(BindDnsServer.ADDRESS_MAPPINGS).entries().size(), addresses, "Mismatched address mappings");
-        assertEquals(dns.getAttribute(BindDnsServer.A_RECORDS).size(), aRecords, "Mismatched A records");
-        assertEquals(dns.getAttribute(BindDnsServer.CNAME_RECORDS).size(), cnameRecords, "Mismatched CNAME records");
-        assertEquals(dns.getAttribute(BindDnsServer.PTR_RECORDS).size(), ptrRecords, "Mismatched PTR records");
-    }
-
-    private void logDnsMappings() {
-        LOG.info("A:     " + Joiner.on(", ").withKeyValueSeparator("=").join(
-                dns.getAttribute(BindDnsServer.A_RECORDS)));
-        LOG.info("CNAME: " + Joiner.on(", ").withKeyValueSeparator("=").join(
-                dns.getAttribute(BindDnsServer.CNAME_RECORDS).asMap()));
-        LOG.info("PTR:   " + Joiner.on(", ").withKeyValueSeparator("=").join(
-                dns.getAttribute(BindDnsServer.PTR_RECORDS)));
-    }
-
-    private void assertDnsEntityEventuallyHasActiveMembers(final int size) {
-        EntityTestUtils.assertPredicateEventuallyTrue(dns, new Predicate<BindDnsServer>() {
-            @Override
-            public boolean apply(BindDnsServer input) {
-                return input.getAddressMappings().size() == size;
-            }
-        });
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerLiveTest.java b/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerLiveTest.java
deleted file mode 100644
index 56273c7..0000000
--- a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerLiveTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import static org.apache.brooklyn.test.EntityTestUtils.assertAttributeEqualsEventually;
-import static org.testng.Assert.assertEquals;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.sensor.EnricherSpec;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.software.base.EmptySoftwareProcess;
-import org.apache.brooklyn.entity.software.base.SameServerEntity;
-import org.apache.brooklyn.util.repeat.Repeater;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Joiner;
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-import com.google.common.collect.ImmutableList;
-
-public class BindDnsServerLiveTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(BindDnsServerLiveTest.class);
-
-    public static void testBindStartsAndUpdates(TestApplication app, Location testLocation) throws Exception {
-        DynamicCluster cluster;
-        BindDnsServer dns;
-
-        SameServerEntity sse = app.createAndManageChild(EntitySpec.create(SameServerEntity.class));
-        EntitySpec<EmptySoftwareProcess> memberSpec = EntitySpec.create(EmptySoftwareProcess.class)
-                .enricher(EnricherSpec.create(PrefixAndIdEnricher.class)
-                        .configure(PrefixAndIdEnricher.PREFIX, "dns-live-test-")
-                        .configure(PrefixAndIdEnricher.MONITOR, Attributes.HOSTNAME));
-        cluster = sse.addChild(EntitySpec.create(DynamicCluster.class)
-                .configure(DynamicCluster.MEMBER_SPEC, memberSpec)
-                .configure(DynamicCluster.INITIAL_SIZE, 1));
-        dns = sse.addChild((EntitySpec.create(BindDnsServer.class)
-                .configure(BindDnsServer.ENTITY_FILTER, Predicates.instanceOf(EmptySoftwareProcess.class))
-                .configure(BindDnsServer.HOSTNAME_SENSOR, PrefixAndIdEnricher.SENSOR)));
-
-        app.start(ImmutableList.of(testLocation));
-        assertAttributeEqualsEventually(dns, Attributes.SERVICE_UP, true);
-
-        logDnsMappings(dns);
-        assertEquals(dns.getAttribute(BindDnsServer.ADDRESS_MAPPINGS).entries().size(), 1);
-        assertEquals(dns.getAttribute(BindDnsServer.A_RECORDS).size(), 1);
-        assertEquals(dns.getAttribute(BindDnsServer.CNAME_RECORDS).size(), 0);
-        // Harder to make assertions on PTR because the entity servers might not be in the right CIDR
-
-        cluster.resize(2);
-        waitForNumberOfAddressMappings(dns, 2);
-        logDnsMappings(dns);
-        assertEquals(dns.getAttribute(BindDnsServer.ADDRESS_MAPPINGS).entries().size(), 2);
-        assertEquals(dns.getAttribute(BindDnsServer.A_RECORDS).size(), 1);
-        assertEquals(dns.getAttribute(BindDnsServer.CNAME_RECORDS).size(), 1);
-
-        cluster.resize(1);
-        waitForNumberOfAddressMappings(dns, 1);
-        logDnsMappings(dns);
-        assertEquals(dns.getAttribute(BindDnsServer.ADDRESS_MAPPINGS).entries().size(), 1);
-        assertEquals(dns.getAttribute(BindDnsServer.A_RECORDS).size(), 1);
-        assertEquals(dns.getAttribute(BindDnsServer.CNAME_RECORDS).size(), 0);
-    }
-
-    private static void logDnsMappings(BindDnsServer dns) {
-        LOG.info("A:     " + Joiner.on(", ").withKeyValueSeparator("=").join(
-                dns.getAttribute(BindDnsServer.A_RECORDS)));
-        LOG.info("CNAME: " + Joiner.on(", ").withKeyValueSeparator("=").join(
-                dns.getAttribute(BindDnsServer.CNAME_RECORDS).asMap()));
-        LOG.info("PTR:   " + Joiner.on(", ").withKeyValueSeparator("=").join(
-                dns.getAttribute(BindDnsServer.PTR_RECORDS)));
-    }
-
-    /**
-     * Waits for the Bind entity to have the expected number of mappings or for thirty seconds to have elapsed.
-     */
-    private static void waitForNumberOfAddressMappings(final BindDnsServer dns, final int expectedMappings) {
-        Repeater.create()
-                .every(Duration.seconds(1))
-                .until(dns, new Predicate<BindDnsServer>() {
-                    @Override
-                    public boolean apply(BindDnsServer bindDnsServer) {
-                        return bindDnsServer.getAttribute(BindDnsServer.ADDRESS_MAPPINGS).size() == expectedMappings;
-                    }
-                })
-                .limitTimeTo(Duration.seconds(30))
-                .run();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerSoftlayerLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerSoftlayerLiveTest.java b/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerSoftlayerLiveTest.java
deleted file mode 100644
index f65672c..0000000
--- a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/BindDnsServerSoftlayerLiveTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import org.testng.annotations.Test;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.entity.AbstractSoftlayerLiveTest;
-
-public class BindDnsServerSoftlayerLiveTest extends AbstractSoftlayerLiveTest {
-
-    @Test(groups = "Live")
-    protected void doTest(Location testLocation) throws Exception {
-        BindDnsServerLiveTest.testBindStartsAndUpdates(app, testLocation);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/DoNothingSoftwareProcessDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/DoNothingSoftwareProcessDriver.java b/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/DoNothingSoftwareProcessDriver.java
deleted file mode 100644
index 0a58326..0000000
--- a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/DoNothingSoftwareProcessDriver.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-
-/**
- * Implements methods in {@link org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver}.
- * {@link #isRunning()} returns true.
- */
-public class DoNothingSoftwareProcessDriver extends AbstractSoftwareProcessSshDriver {
-
-    public DoNothingSoftwareProcessDriver(EntityLocal entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public boolean isRunning() {
-        return true;
-    }
-
-    @Override
-    public void install() {
-    }
-
-    @Override
-    public void customize() {
-    }
-
-    @Override
-    public void launch() {
-    }
-
-    @Override
-    public void stop() {
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/PrefixAndIdEnricher.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/PrefixAndIdEnricher.java b/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/PrefixAndIdEnricher.java
deleted file mode 100644
index cf03530..0000000
--- a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/PrefixAndIdEnricher.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.enricher.AbstractEnricher;
-import org.apache.brooklyn.core.sensor.Sensors;
-
-import com.google.common.reflect.TypeToken;
-
-public class PrefixAndIdEnricher extends AbstractEnricher {
-
-    public static final AttributeSensor<String> SENSOR = Sensors.newStringSensor(
-            "prefixandid.sensor");
-
-    public static final ConfigKey<String> PREFIX = ConfigKeys.newStringConfigKey(
-            "prefixandid.prefix", "Sets SENSOR to prefix+entity id");
-
-    public static final ConfigKey<AttributeSensor<?>> MONITOR = ConfigKeys.newConfigKey(new TypeToken<AttributeSensor<?>>() {},
-            "prefixandid.attributetomonitor", "Changes on this sensor are monitored and the prefix/id republished");
-
-    public PrefixAndIdEnricher() {
-    }
-
-    @Override
-    public void setEntity(final EntityLocal entity) {
-        super.setEntity(entity);
-        subscriptions().subscribe(entity, getConfig(MONITOR), new SensorEventListener<Object>() {
-            @Override
-            public void onEvent(SensorEvent<Object> event) {
-                entity.sensors().set(SENSOR, getConfig(PREFIX) + entity.getId());
-            }
-        });
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/TestBindDnsServerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/TestBindDnsServerImpl.java b/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/TestBindDnsServerImpl.java
deleted file mode 100644
index f04ac12..0000000
--- a/brooklyn-library/software/network/src/test/java/org/apache/brooklyn/entity/network/bind/TestBindDnsServerImpl.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.network.bind;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-
-public class TestBindDnsServerImpl extends BindDnsServerImpl {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TestBindDnsServerImpl.class);
-
-    public static class TestBindDnsServerDriver extends DoNothingSoftwareProcessDriver implements BindDnsServerDriver {
-
-        private final BindDnsServerSshDriver delegate;
-
-        public TestBindDnsServerDriver(EntityLocal entity, SshMachineLocation machine) {
-            super(entity, machine);
-            delegate = new BindDnsServerSshDriver((BindDnsServerImpl) entity, machine);
-        }
-
-        @Override
-        public void updateBindConfiguration() {
-            LOG.info("Skipped copy of Bind configuration files to server");
-            LOG.debug("Configuration:\n{}", processTemplate(entity.getConfig(BindDnsServer.NAMED_CONF_TEMPLATE)));
-            LOG.debug("domain.zone:\n{}", processTemplate(entity.getConfig(BindDnsServer.DOMAIN_ZONE_FILE_TEMPLATE)));
-            LOG.debug("reverse.zone:\n{}", processTemplate(entity.getConfig(BindDnsServer.REVERSE_ZONE_FILE_TEMPLATE)));
-        }
-
-        @Override
-        public BindOsSupport getOsSupport() {
-            return BindOsSupport.forRhel();
-        }
-
-        public String getDataDirectory() {
-            return delegate.getDataDirectory();
-        }
-
-        public String getDynamicDirectory() {
-            return delegate.getDynamicDirectory();
-        }
-
-        public String getDomainZoneFile() {
-            return delegate.getDomainZoneFile();
-        }
-
-        public String getReverseZoneFile() {
-            return delegate.getReverseZoneFile();
-        }
-
-        public String getRfc1912ZonesFile() {
-            return delegate.getRfc1912ZonesFile();
-        }
-    }
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return TestBindDnsServerDriver.class;
-    }
-
-    @Override
-    protected void configureResolver(Entity entity) {
-        LOG.debug("Skipped configuration of resolver on {}", entity);
-    }
-
-    @Override
-    protected void appendTemplate(String template, String destination, SshMachineLocation machine) {
-        LOG.debug("Skipped append of template to {}@{}", destination, machine);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/pom.xml b/brooklyn-library/software/nosql/pom.xml
deleted file mode 100644
index f409e4b..0000000
--- a/brooklyn-library/software/nosql/pom.xml
+++ /dev/null
@@ -1,300 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>brooklyn-software-nosql</artifactId>
-    <packaging>jar</packaging>
-    <name>Brooklyn NoSQL Data Store Software Entities</name>
-    <description>
-        Brooklyn entities for NoSQL data store software entities
-    </description>
-
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-                <exclusion>
-                    <groupId>commons-logging</groupId>
-                    <artifactId>commons-logging</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>commons-codec</groupId>
-                    <artifactId>commons-codec</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-webapp</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <!-- just to access DatastoreMixins -->
-            <artifactId>brooklyn-software-database</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-policy</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-utils-common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.code.findbugs</groupId>
-            <artifactId>jsr305</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <!-- for mongodb sensors -->
-        <dependency>
-            <groupId>org.mongodb</groupId>
-            <artifactId>mongo-java-driver</artifactId>
-            <version>${mongodb.version}</version>
-        </dependency>
-
-        <!-- for redis testing -->
-        <dependency>
-            <groupId>redis.clients</groupId>
-            <artifactId>jedis</artifactId>
-            <version>${redis.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- for cassandra testing -->
-        <dependency>
-            <groupId>com.netflix.astyanax</groupId>
-            <artifactId>astyanax</artifactId>
-            <version>${astyanax.version}</version>
-            <scope>test</scope>
-            <exclusions>
-                <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-                <exclusion>
-                    <artifactId>slf4j-log4j12</artifactId>
-                    <groupId>org.slf4j</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>log4j</artifactId>
-                    <groupId>log4j</groupId>
-                </exclusion>
-                <exclusion>
-                    <groupId>commons-codec</groupId>
-                    <artifactId>commons-codec</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>${jclouds.groupId}.provider</groupId>
-            <artifactId>rackspace-cloudservers-uk</artifactId>
-            <version>${jclouds.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- for couchdb testing -->
-        <dependency>
-            <groupId>com.google.code.jcouchdb</groupId>
-            <artifactId>jcouchdb</artifactId>
-            <version>${jcouchdb.version}</version>
-            <scope>test</scope>
-            <exclusions>
-                <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-                <exclusion>
-                    <groupId>commons-logging</groupId>
-                    <artifactId>commons-logging</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>commons-codec</groupId>
-                    <artifactId>commons-codec</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>slf4j-log4j12</artifactId>
-                    <groupId>org.slf4j</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>log4j</artifactId>
-                    <groupId>log4j</groupId>
-                </exclusion>
-                <exclusion>
-                	<artifactId>httpcore</artifactId>
-                	<groupId>org.apache.httpcomponents</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <!-- for hazelcast testing -->
-        <dependency>
-            <groupId>com.hazelcast</groupId>
-            <artifactId>hazelcast-client</artifactId>
-            <version>${hazelcast.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- for solr testing -->
-        <dependency>
-            <groupId>org.apache.solr</groupId>
-            <artifactId>solr-solrj</artifactId>
-            <version>${solr.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>${jclouds.groupId}.provider</groupId>
-            <artifactId>aws-ec2</artifactId>
-            <version>${jclouds.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version><!--$NO-MVN-MAN-VER$-->
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <!-- bring in jclouds for testing -->
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-locations-jclouds</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- Transitive dependencies, declared explicitly due to version mismatch -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>${commons-logging.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-            <version>${commons-codec.version}</version>
-        </dependency>
-    </dependencies>
-    <build>
-      <pluginManagement>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.rat</groupId>
-            <artifactId>apache-rat-plugin</artifactId>
-            <configuration>
-              <excludes combine.children="append">
-                <!--
-                    Configuration artifacts (for installations) are based on templated defaults for 
-                    the given components. These are files "without any degree of creativity" from the
-                    perspective of the Brooklyn/Apache contribution.
-                -->
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-1.2.yaml</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-2.0.yaml</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-rackdc.properties</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/couchdb/couch.ini</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/couchdb/couch.uri</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/hazelcast/hazelcast-brooklyn.xml</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/default.conf</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/default-mongod.conf</exclude>
-                <exclude>src/test/resources/test-mongodb.conf</exclude>
-                <exclude>src/test/resources/test-mongodb-configserver.conf</exclude>
-                <exclude>src/test/resources/test-mongodb-router.conf</exclude>
-                <exclude>src/test/resources/mongodb-keyfile</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/redis/redis.conf</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/redis/slave.conf</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/riak/app.config</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/riak/vm.args</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak.conf</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/riak/riak-mac.conf</exclude>
-                <exclude>src/main/resources/org/apache/brooklyn/entity/nosql/solr/solr.xml</exclude>
-
-                <!--
-                    The source code for cassandra-multicloud-snitch.jar is in sandbox/cassandra-multicloud-snitch.
-                    This snitch handles Cassandra datacenters in different cloud providers.
-                    The source will be contributed to the Cassandra project; when it is available in the 
-                    Cassandra distro (and when we don't want to give backwards compatibility support for
-                    older Cassandra versions), then we can delete it from Brooklyn.
-                -->
-                <exclude>**/src/main/resources/brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.jar</exclude>
-
-                <!--
-                    This is a trivial Solr example, used for testing that a simple definition is deployed
-                    correctly. It is "without any degree of creativity". It is stored as a binary tgz, rather
-                    than us generating the tgz as part of the build, to keep the build process and testing 
-                    simpler.
-                -->
-                <exclude>**/src/test/resources/solr/example.tgz</exclude>
-              </excludes>
-            </configuration>
-          </plugin>
-        </plugins>
-      </pluginManagement>
-    </build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraCluster.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraCluster.java
deleted file mode 100644
index c1c7674..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraCluster.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-
-/**
- * @deprecated since 0.7.0; use {@link CassandraDatacenter} which is equivalent but has
- * a less ambiguous name; <em>Cluster</em> in Cassandra corresponds to what Brooklyn terms a <em>Fabric</em>.
- */
-@Deprecated
-@ImplementedBy(CassandraClusterImpl.class)
-public interface CassandraCluster extends CassandraDatacenter {
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraClusterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraClusterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraClusterImpl.java
deleted file mode 100644
index 7036285..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraClusterImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-/**
- * @deprecated since 0.7.0; use {@link CassandraDatacenter} which is equivalent but has
- * a less ambiguous name; <em>Cluster</em> in Cassandra corresponds to what Brooklyn terms a <em>Fabric</em>.
- */
-@Deprecated
-public class CassandraClusterImpl extends CassandraDatacenterImpl implements CassandraCluster {
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenter.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenter.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenter.java
deleted file mode 100644
index d9d2bbf..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenter.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import java.math.BigInteger;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.annotation.Effector;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.core.effector.MethodEffector;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.nosql.cassandra.TokenGenerators.PosNeg63TokenGenerator;
-import org.apache.brooklyn.entity.database.DatastoreMixins;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.base.Supplier;
-import com.google.common.collect.Multimap;
-import com.google.common.reflect.TypeToken;
-
-/**
- * A group of {@link CassandraNode}s -- based on Brooklyn's {@link DynamicCluster} 
- * (though it is a "Datacenter" in Cassandra terms, where Cassandra's "cluster" corresponds
- * to a Brooklyn Fabric, cf {@link CassandraFabric}). 
- * The Datacenter can be resized, manually or by policy if required.
- * Tokens are selected intelligently.
- * <p>
- * Note that due to how Cassandra assumes ports are the same across a cluster,
- * it is <em>NOT</em> possible to deploy a cluster of size larger than 1 to localhost.
- * (Some exploratory work has been done to use different 127.0.0.x IP's for localhost,
- * and there is evidence this could be made to work.)
- */
-@Catalog(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")
-@ImplementedBy(CassandraDatacenterImpl.class)
-public interface CassandraDatacenter extends DynamicCluster, DatastoreMixins.HasDatastoreUrl, DatastoreMixins.CanExecuteScript {
-
-    // FIXME datacenter name -- also CASS_CLUSTER_NODES should be CASS_DC_NODES
-    @SetFromFlag("clusterName")
-    BasicAttributeSensorAndConfigKey<String> CLUSTER_NAME = new BasicAttributeSensorAndConfigKey<String>(String.class, "cassandra.cluster.name", "Name of the Cassandra cluster", "BrooklynCluster");
-
-    @SetFromFlag("snitchName")
-    ConfigKey<String> ENDPOINT_SNITCH_NAME = ConfigKeys.newStringConfigKey("cassandra.cluster.snitchName", "Type of the Cassandra snitch", "SimpleSnitch");
-
-    @SetFromFlag("seedSupplier")
-    @SuppressWarnings("serial")
-    ConfigKey<Supplier<Set<Entity>>> SEED_SUPPLIER = ConfigKeys.newConfigKey(new TypeToken<Supplier<Set<Entity>>>() { }, "cassandra.cluster.seedSupplier", "For determining the seed nodes", null);
-
-    @SuppressWarnings("serial")
-    @SetFromFlag("tokenGeneratorClass")
-    ConfigKey<Class<? extends TokenGenerator>> TOKEN_GENERATOR_CLASS = ConfigKeys.newConfigKey(
-        new TypeToken<Class<? extends TokenGenerator>>() {}, "cassandra.cluster.tokenGenerator.class", "For determining the tokens of nodes", 
-        PosNeg63TokenGenerator.class);
-
-    @SetFromFlag("tokenShift")
-    ConfigKey<BigInteger> TOKEN_SHIFT = ConfigKeys.newConfigKey(BigInteger.class, "cassandra.cluster.tokenShift", 
-        "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.)", null);
-
-    ConfigKey<Boolean> USE_VNODES = ConfigKeys.newBooleanConfigKey(
-            "cassandra.cluster.useVnodes",
-            "Determines whether to use vnodes; if doing so, tokens will not be explicitly assigned to nodes in the cluster",
-            false);
-
-    /**
-     * num_tokens will automatically be reset to 1 for each node if {@link #USE_VNODES} is false. 
-     */
-    ConfigKey<Integer> NUM_TOKENS_PER_NODE = ConfigKeys.newIntegerConfigKey("cassandra.numTokensPerNode",
-            "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",
-            256);
-    
-    /**
-     * Additional time after the nodes in the cluster are up when starting
-     * before announcing the cluster as up.
-     * <p>
-     * Useful to ensure nodes have synchronized.
-     * <p>
-     * On 1.2.2 this could be as much as 120s when using 2 seed nodes,
-     * or just a few seconds with 1 seed node. On 1.2.9 it seems a few
-     * seconds is sufficient even with 2 seed nodes
-     */
-    @SetFromFlag("delayBeforeAdvertisingCluster")
-    ConfigKey<Duration> DELAY_BEFORE_ADVERTISING_CLUSTER = ConfigKeys.newConfigKey(Duration.class, "cassandra.cluster.delayBeforeAdvertisingCluster", "Delay after cluster is started before checking and advertising its availability", Duration.TEN_SECONDS);
-
-    @SuppressWarnings("serial")
-    AttributeSensor<Multimap<String,Entity>> DATACENTER_USAGE = Sensors.newSensor(new TypeToken<Multimap<String,Entity>>() { }, "cassandra.cluster.datacenterUsages", "Current set of datacenters in use, with nodes in each");
-
-    @SuppressWarnings("serial")
-    AttributeSensor<Set<String>> DATACENTERS = Sensors.newSensor(new TypeToken<Set<String>>() { }, "cassandra.cluster.datacenters", "Current set of datacenters in use");
-
-    AttributeSensor<Boolean> HAS_PUBLISHED_SEEDS = Sensors.newBooleanSensor("cassandra.cluster.seeds.hasPublished", "Whether we have published any seeds");
-
-    @SuppressWarnings("serial")
-    AttributeSensor<Set<Entity>> CURRENT_SEEDS = Sensors.newSensor(new TypeToken<Set<Entity>>() { }, "cassandra.cluster.seeds.current", "Current set of seeds to use to bootstrap the cluster");
-
-    AttributeSensor<String> HOSTNAME = Sensors.newStringSensor("cassandra.cluster.hostname", "Hostname to connect to cluster with");
-
-    @SuppressWarnings("serial")
-    AttributeSensor<List<String>> CASSANDRA_CLUSTER_NODES = Sensors.newSensor(new TypeToken<List<String>>() {},
-        "cassandra.cluster.nodes", "List of host:port of all active nodes in the cluster (thrift port, and public hostname/IP)");
-
-    AttributeSensor<Integer> THRIFT_PORT = Sensors.newIntegerSensor("cassandra.cluster.thrift.port", "Cassandra Thrift RPC port to connect to cluster with");
-
-    AttributeSensor<Long> FIRST_NODE_STARTED_TIME_UTC = Sensors.newLongSensor("cassandra.cluster.first.node.started.utc", "Time (UTC) when the first node was started");
-    @SuppressWarnings("serial")
-    AttributeSensor<List<Entity>> QUEUED_START_NODES = Sensors.newSensor(new TypeToken<List<Entity>>() {}, "cassandra.cluster.start.nodes.queued",
-        "Nodes queued for starting (for sequential start)");
-    
-    AttributeSensor<Integer> SCHEMA_VERSION_COUNT = Sensors.newIntegerSensor("cassandra.cluster.schema.versions.count",
-            "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)");
-
-    AttributeSensor<Long> READ_PENDING = Sensors.newLongSensor("cassandra.cluster.read.pending", "Current pending ReadStage tasks");
-    AttributeSensor<Integer> READ_ACTIVE = Sensors.newIntegerSensor("cassandra.cluster.read.active", "Current active ReadStage tasks");
-    AttributeSensor<Long> WRITE_PENDING = Sensors.newLongSensor("cassandra.cluster.write.pending", "Current pending MutationStage tasks");
-    AttributeSensor<Integer> WRITE_ACTIVE = Sensors.newIntegerSensor("cassandra.cluster.write.active", "Current active MutationStage tasks");
-
-    AttributeSensor<Long> THRIFT_PORT_LATENCY_PER_NODE = Sensors.newLongSensor("cassandra.cluster.thrift.latency.perNode", "Latency for thrift port connection  averaged over all nodes (ms)");
-    AttributeSensor<Double> READS_PER_SECOND_LAST_PER_NODE = Sensors.newDoubleSensor("cassandra.reads.perSec.last.perNode", "Reads/sec (last datapoint) averaged over all nodes");
-    AttributeSensor<Double> WRITES_PER_SECOND_LAST_PER_NODE = Sensors.newDoubleSensor("cassandra.write.perSec.last.perNode", "Writes/sec (last datapoint) averaged over all nodes");
-    AttributeSensor<Double> PROCESS_CPU_TIME_FRACTION_LAST_PER_NODE = Sensors.newDoubleSensor("cassandra.cluster.metrics.processCpuTime.fraction.perNode", "Fraction of CPU time used (percentage reported by JMX), averaged over all nodes");
-
-    AttributeSensor<Double> READS_PER_SECOND_IN_WINDOW_PER_NODE = Sensors.newDoubleSensor("cassandra.reads.perSec.windowed.perNode", "Reads/sec (over time window) averaged over all nodes");
-    AttributeSensor<Double> WRITES_PER_SECOND_IN_WINDOW_PER_NODE = Sensors.newDoubleSensor("cassandra.writes.perSec.windowed.perNode", "Writes/sec (over time window) averaged over all nodes");
-    AttributeSensor<Double> THRIFT_PORT_LATENCY_IN_WINDOW_PER_NODE = Sensors.newDoubleSensor("cassandra.thrift.latency.windowed.perNode", "Latency for thrift port (ms, over time window) averaged over all nodes");
-    AttributeSensor<Double> PROCESS_CPU_TIME_FRACTION_IN_WINDOW_PER_NODE = Sensors.newDoubleSensor("cassandra.cluster.metrics.processCpuTime.fraction.windowed", "Fraction of CPU time used (percentage, over time window), averaged over all nodes");
-
-    MethodEffector<Void> UPDATE = new MethodEffector<Void>(CassandraDatacenter.class, "update");
-
-    org.apache.brooklyn.api.effector.Effector<String> EXECUTE_SCRIPT = Effectors.effector(DatastoreMixins.EXECUTE_SCRIPT)
-        .description("executes the given script contents using cassandra-cli")
-        .buildAbstract();
-
-    /**
-     * Sets the number of nodes used to seed the cluster.
-     * <p>
-     * Version 1.2.2 is buggy and requires a big delay for 2 nodes both seeds to reconcile,
-     * with 1.2.9 this seems fine, with just a few seconds' delay after starting.
-     *
-     * @see <a href="http://stackoverflow.com/questions/6770894/schemadisagreementexception/18639005" />
-     */
-    int DEFAULT_SEED_QUORUM = 2;
-
-    /**
-     * Can insert a delay after the first node comes up.
-     * <p>
-     * Reportedly not needed with 1.2.9, but we are still seeing some seed failures so re-introducing it.
-     * (This does not seem to help with the bug in 1.2.2.)
-     */
-    Duration DELAY_AFTER_FIRST = Duration.ONE_MINUTE;
-
-    /**
-     * If set (ie non-null), this waits the indicated time after a successful launch of one node
-     * before starting the next.  (If it is null, all nodes start simultaneously,
-     * possibly after the DELAY_AFTER_FIRST.)
-     * <p>
-     * When subsequent nodes start simultaneously, we occasionally see schema disagreement problems;
-     * if nodes start sequentially, we occasionally get "no sources for (tokenRange]" problems.
-     * Either way the node stops. Ideally this can be solved at the Cassandra level,
-     * but if not, we will have to introduce some restarts at the Cassandra nodes (which does seem
-     * to resolve the problems.)
-     */
-    Duration DELAY_BETWEEN_STARTS = null;
-    
-    /**
-     * Whether to wait for the first node to start up
-     * <p>
-     * not sure whether this is needed or not. Need to test in env where not all nodes are seed nodes,
-     * what happens if non-seed nodes start before the seed nodes?
-     */
-    boolean WAIT_FOR_FIRST = true;
-
-    @Effector(description="Updates the cluster members")
-    void update();
-
-    /**
-     * The name of the cluster.
-     */
-    String getClusterName();
-
-    Set<Entity> gatherPotentialSeeds();
-
-    Set<Entity> gatherPotentialRunningSeeds();
-
-    String executeScript(String commands);
-
-}


[42/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-mocks.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-mocks.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-mocks.js
deleted file mode 100644
index 7b3137b..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-mocks.js
+++ /dev/null
@@ -1,2171 +0,0 @@
-/**
- * @license AngularJS v1.2.19
- * (c) 2010-2014 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {
-
-'use strict';
-
-/**
- * @ngdoc object
- * @name angular.mock
- * @description
- *
- * Namespace from 'angular-mocks.js' which contains testing related code.
- */
-angular.mock = {};
-
-/**
- * ! This is a private undocumented service !
- *
- * @name $browser
- *
- * @description
- * This service is a mock implementation of {@link ng.$browser}. It provides fake
- * implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr,
- * cookies, etc...
- *
- * The api of this service is the same as that of the real {@link ng.$browser $browser}, except
- * that there are several helper methods available which can be used in tests.
- */
-angular.mock.$BrowserProvider = function() {
-  this.$get = function() {
-    return new angular.mock.$Browser();
-  };
-};
-
-angular.mock.$Browser = function() {
-  var self = this;
-
-  this.isMock = true;
-  self.$$url = "http://server/";
-  self.$$lastUrl = self.$$url; // used by url polling fn
-  self.pollFns = [];
-
-  // TODO(vojta): remove this temporary api
-  self.$$completeOutstandingRequest = angular.noop;
-  self.$$incOutstandingRequestCount = angular.noop;
-
-
-  // register url polling fn
-
-  self.onUrlChange = function(listener) {
-    self.pollFns.push(
-      function() {
-        if (self.$$lastUrl != self.$$url) {
-          self.$$lastUrl = self.$$url;
-          listener(self.$$url);
-        }
-      }
-    );
-
-    return listener;
-  };
-
-  self.cookieHash = {};
-  self.lastCookieHash = {};
-  self.deferredFns = [];
-  self.deferredNextId = 0;
-
-  self.defer = function(fn, delay) {
-    delay = delay || 0;
-    self.deferredFns.push({time:(self.defer.now + delay), fn:fn, id: self.deferredNextId});
-    self.deferredFns.sort(function(a,b){ return a.time - b.time;});
-    return self.deferredNextId++;
-  };
-
-
-  /**
-   * @name $browser#defer.now
-   *
-   * @description
-   * Current milliseconds mock time.
-   */
-  self.defer.now = 0;
-
-
-  self.defer.cancel = function(deferId) {
-    var fnIndex;
-
-    angular.forEach(self.deferredFns, function(fn, index) {
-      if (fn.id === deferId) fnIndex = index;
-    });
-
-    if (fnIndex !== undefined) {
-      self.deferredFns.splice(fnIndex, 1);
-      return true;
-    }
-
-    return false;
-  };
-
-
-  /**
-   * @name $browser#defer.flush
-   *
-   * @description
-   * Flushes all pending requests and executes the defer callbacks.
-   *
-   * @param {number=} number of milliseconds to flush. See {@link #defer.now}
-   */
-  self.defer.flush = function(delay) {
-    if (angular.isDefined(delay)) {
-      self.defer.now += delay;
-    } else {
-      if (self.deferredFns.length) {
-        self.defer.now = self.deferredFns[self.deferredFns.length-1].time;
-      } else {
-        throw new Error('No deferred tasks to be flushed');
-      }
-    }
-
-    while (self.deferredFns.length && self.deferredFns[0].time <= self.defer.now) {
-      self.deferredFns.shift().fn();
-    }
-  };
-
-  self.$$baseHref = '';
-  self.baseHref = function() {
-    return this.$$baseHref;
-  };
-};
-angular.mock.$Browser.prototype = {
-
-/**
-  * @name $browser#poll
-  *
-  * @description
-  * run all fns in pollFns
-  */
-  poll: function poll() {
-    angular.forEach(this.pollFns, function(pollFn){
-      pollFn();
-    });
-  },
-
-  addPollFn: function(pollFn) {
-    this.pollFns.push(pollFn);
-    return pollFn;
-  },
-
-  url: function(url, replace) {
-    if (url) {
-      this.$$url = url;
-      return this;
-    }
-
-    return this.$$url;
-  },
-
-  cookies:  function(name, value) {
-    if (name) {
-      if (angular.isUndefined(value)) {
-        delete this.cookieHash[name];
-      } else {
-        if (angular.isString(value) &&       //strings only
-            value.length <= 4096) {          //strict cookie storage limits
-          this.cookieHash[name] = value;
-        }
-      }
-    } else {
-      if (!angular.equals(this.cookieHash, this.lastCookieHash)) {
-        this.lastCookieHash = angular.copy(this.cookieHash);
-        this.cookieHash = angular.copy(this.cookieHash);
-      }
-      return this.cookieHash;
-    }
-  },
-
-  notifyWhenNoOutstandingRequests: function(fn) {
-    fn();
-  }
-};
-
-
-/**
- * @ngdoc provider
- * @name $exceptionHandlerProvider
- *
- * @description
- * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors
- * passed into the `$exceptionHandler`.
- */
-
-/**
- * @ngdoc service
- * @name $exceptionHandler
- *
- * @description
- * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed
- * into it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration
- * information.
- *
- *
- * ```js
- *   describe('$exceptionHandlerProvider', function() {
- *
- *     it('should capture log messages and exceptions', function() {
- *
- *       module(function($exceptionHandlerProvider) {
- *         $exceptionHandlerProvider.mode('log');
- *       });
- *
- *       inject(function($log, $exceptionHandler, $timeout) {
- *         $timeout(function() { $log.log(1); });
- *         $timeout(function() { $log.log(2); throw 'banana peel'; });
- *         $timeout(function() { $log.log(3); });
- *         expect($exceptionHandler.errors).toEqual([]);
- *         expect($log.assertEmpty());
- *         $timeout.flush();
- *         expect($exceptionHandler.errors).toEqual(['banana peel']);
- *         expect($log.log.logs).toEqual([[1], [2], [3]]);
- *       });
- *     });
- *   });
- * ```
- */
-
-angular.mock.$ExceptionHandlerProvider = function() {
-  var handler;
-
-  /**
-   * @ngdoc method
-   * @name $exceptionHandlerProvider#mode
-   *
-   * @description
-   * Sets the logging mode.
-   *
-   * @param {string} mode Mode of operation, defaults to `rethrow`.
-   *
-   *   - `rethrow`: If any errors are passed into the handler in tests, it typically
-   *                means that there is a bug in the application or test, so this mock will
-   *                make these tests fail.
-   *   - `log`: Sometimes it is desirable to test that an error is thrown, for this case the `log`
-   *            mode stores an array of errors in `$exceptionHandler.errors`, to allow later
-   *            assertion of them. See {@link ngMock.$log#assertEmpty assertEmpty()} and
-   *            {@link ngMock.$log#reset reset()}
-   */
-  this.mode = function(mode) {
-    switch(mode) {
-      case 'rethrow':
-        handler = function(e) {
-          throw e;
-        };
-        break;
-      case 'log':
-        var errors = [];
-
-        handler = function(e) {
-          if (arguments.length == 1) {
-            errors.push(e);
-          } else {
-            errors.push([].slice.call(arguments, 0));
-          }
-        };
-
-        handler.errors = errors;
-        break;
-      default:
-        throw new Error("Unknown mode '" + mode + "', only 'log'/'rethrow' modes are allowed!");
-    }
-  };
-
-  this.$get = function() {
-    return handler;
-  };
-
-  this.mode('rethrow');
-};
-
-
-/**
- * @ngdoc service
- * @name $log
- *
- * @description
- * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays
- * (one array per logging level). These arrays are exposed as `logs` property of each of the
- * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`.
- *
- */
-angular.mock.$LogProvider = function() {
-  var debug = true;
-
-  function concat(array1, array2, index) {
-    return array1.concat(Array.prototype.slice.call(array2, index));
-  }
-
-  this.debugEnabled = function(flag) {
-    if (angular.isDefined(flag)) {
-      debug = flag;
-      return this;
-    } else {
-      return debug;
-    }
-  };
-
-  this.$get = function () {
-    var $log = {
-      log: function() { $log.log.logs.push(concat([], arguments, 0)); },
-      warn: function() { $log.warn.logs.push(concat([], arguments, 0)); },
-      info: function() { $log.info.logs.push(concat([], arguments, 0)); },
-      error: function() { $log.error.logs.push(concat([], arguments, 0)); },
-      debug: function() {
-        if (debug) {
-          $log.debug.logs.push(concat([], arguments, 0));
-        }
-      }
-    };
-
-    /**
-     * @ngdoc method
-     * @name $log#reset
-     *
-     * @description
-     * Reset all of the logging arrays to empty.
-     */
-    $log.reset = function () {
-      /**
-       * @ngdoc property
-       * @name $log#log.logs
-       *
-       * @description
-       * Array of messages logged using {@link ngMock.$log#log}.
-       *
-       * @example
-       * ```js
-       * $log.log('Some Log');
-       * var first = $log.log.logs.unshift();
-       * ```
-       */
-      $log.log.logs = [];
-      /**
-       * @ngdoc property
-       * @name $log#info.logs
-       *
-       * @description
-       * Array of messages logged using {@link ngMock.$log#info}.
-       *
-       * @example
-       * ```js
-       * $log.info('Some Info');
-       * var first = $log.info.logs.unshift();
-       * ```
-       */
-      $log.info.logs = [];
-      /**
-       * @ngdoc property
-       * @name $log#warn.logs
-       *
-       * @description
-       * Array of messages logged using {@link ngMock.$log#warn}.
-       *
-       * @example
-       * ```js
-       * $log.warn('Some Warning');
-       * var first = $log.warn.logs.unshift();
-       * ```
-       */
-      $log.warn.logs = [];
-      /**
-       * @ngdoc property
-       * @name $log#error.logs
-       *
-       * @description
-       * Array of messages logged using {@link ngMock.$log#error}.
-       *
-       * @example
-       * ```js
-       * $log.error('Some Error');
-       * var first = $log.error.logs.unshift();
-       * ```
-       */
-      $log.error.logs = [];
-        /**
-       * @ngdoc property
-       * @name $log#debug.logs
-       *
-       * @description
-       * Array of messages logged using {@link ngMock.$log#debug}.
-       *
-       * @example
-       * ```js
-       * $log.debug('Some Error');
-       * var first = $log.debug.logs.unshift();
-       * ```
-       */
-      $log.debug.logs = [];
-    };
-
-    /**
-     * @ngdoc method
-     * @name $log#assertEmpty
-     *
-     * @description
-     * Assert that the all of the logging methods have no logged messages. If messages present, an
-     * exception is thrown.
-     */
-    $log.assertEmpty = function() {
-      var errors = [];
-      angular.forEach(['error', 'warn', 'info', 'log', 'debug'], function(logLevel) {
-        angular.forEach($log[logLevel].logs, function(log) {
-          angular.forEach(log, function (logItem) {
-            errors.push('MOCK $log (' + logLevel + '): ' + String(logItem) + '\n' +
-                        (logItem.stack || ''));
-          });
-        });
-      });
-      if (errors.length) {
-        errors.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or "+
-          "an expected log message was not checked and removed:");
-        errors.push('');
-        throw new Error(errors.join('\n---------\n'));
-      }
-    };
-
-    $log.reset();
-    return $log;
-  };
-};
-
-
-/**
- * @ngdoc service
- * @name $interval
- *
- * @description
- * Mock implementation of the $interval service.
- *
- * Use {@link ngMock.$interval#flush `$interval.flush(millis)`} to
- * move forward by `millis` milliseconds and trigger any functions scheduled to run in that
- * time.
- *
- * @param {function()} fn A function that should be called repeatedly.
- * @param {number} delay Number of milliseconds between each function call.
- * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat
- *   indefinitely.
- * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
- *   will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
- * @returns {promise} A promise which will be notified on each iteration.
- */
-angular.mock.$IntervalProvider = function() {
-  this.$get = ['$rootScope', '$q',
-       function($rootScope,   $q) {
-    var repeatFns = [],
-        nextRepeatId = 0,
-        now = 0;
-
-    var $interval = function(fn, delay, count, invokeApply) {
-      var deferred = $q.defer(),
-          promise = deferred.promise,
-          iteration = 0,
-          skipApply = (angular.isDefined(invokeApply) && !invokeApply);
-
-      count = (angular.isDefined(count)) ? count : 0;
-      promise.then(null, null, fn);
-
-      promise.$$intervalId = nextRepeatId;
-
-      function tick() {
-        deferred.notify(iteration++);
-
-        if (count > 0 && iteration >= count) {
-          var fnIndex;
-          deferred.resolve(iteration);
-
-          angular.forEach(repeatFns, function(fn, index) {
-            if (fn.id === promise.$$intervalId) fnIndex = index;
-          });
-
-          if (fnIndex !== undefined) {
-            repeatFns.splice(fnIndex, 1);
-          }
-        }
-
-        if (!skipApply) $rootScope.$apply();
-      }
-
-      repeatFns.push({
-        nextTime:(now + delay),
-        delay: delay,
-        fn: tick,
-        id: nextRepeatId,
-        deferred: deferred
-      });
-      repeatFns.sort(function(a,b){ return a.nextTime - b.nextTime;});
-
-      nextRepeatId++;
-      return promise;
-    };
-    /**
-     * @ngdoc method
-     * @name $interval#cancel
-     *
-     * @description
-     * Cancels a task associated with the `promise`.
-     *
-     * @param {promise} promise A promise from calling the `$interval` function.
-     * @returns {boolean} Returns `true` if the task was successfully cancelled.
-     */
-    $interval.cancel = function(promise) {
-      if(!promise) return false;
-      var fnIndex;
-
-      angular.forEach(repeatFns, function(fn, index) {
-        if (fn.id === promise.$$intervalId) fnIndex = index;
-      });
-
-      if (fnIndex !== undefined) {
-        repeatFns[fnIndex].deferred.reject('canceled');
-        repeatFns.splice(fnIndex, 1);
-        return true;
-      }
-
-      return false;
-    };
-
-    /**
-     * @ngdoc method
-     * @name $interval#flush
-     * @description
-     *
-     * Runs interval tasks scheduled to be run in the next `millis` milliseconds.
-     *
-     * @param {number=} millis maximum timeout amount to flush up until.
-     *
-     * @return {number} The amount of time moved forward.
-     */
-    $interval.flush = function(millis) {
-      now += millis;
-      while (repeatFns.length && repeatFns[0].nextTime <= now) {
-        var task = repeatFns[0];
-        task.fn();
-        task.nextTime += task.delay;
-        repeatFns.sort(function(a,b){ return a.nextTime - b.nextTime;});
-      }
-      return millis;
-    };
-
-    return $interval;
-  }];
-};
-
-
-/* jshint -W101 */
-/* The R_ISO8061_STR regex is never going to fit into the 100 char limit!
- * This directive should go inside the anonymous function but a bug in JSHint means that it would
- * not be enacted early enough to prevent the warning.
- */
-var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;
-
-function jsonStringToDate(string) {
-  var match;
-  if (match = string.match(R_ISO8061_STR)) {
-    var date = new Date(0),
-        tzHour = 0,
-        tzMin  = 0;
-    if (match[9]) {
-      tzHour = int(match[9] + match[10]);
-      tzMin = int(match[9] + match[11]);
-    }
-    date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3]));
-    date.setUTCHours(int(match[4]||0) - tzHour,
-                     int(match[5]||0) - tzMin,
-                     int(match[6]||0),
-                     int(match[7]||0));
-    return date;
-  }
-  return string;
-}
-
-function int(str) {
-  return parseInt(str, 10);
-}
-
-function padNumber(num, digits, trim) {
-  var neg = '';
-  if (num < 0) {
-    neg =  '-';
-    num = -num;
-  }
-  num = '' + num;
-  while(num.length < digits) num = '0' + num;
-  if (trim)
-    num = num.substr(num.length - digits);
-  return neg + num;
-}
-
-
-/**
- * @ngdoc type
- * @name angular.mock.TzDate
- * @description
- *
- * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`.
- *
- * Mock of the Date type which has its timezone specified via constructor arg.
- *
- * The main purpose is to create Date-like instances with timezone fixed to the specified timezone
- * offset, so that we can test code that depends on local timezone settings without dependency on
- * the time zone settings of the machine where the code is running.
- *
- * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored)
- * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC*
- *
- * @example
- * !!!! WARNING !!!!!
- * This is not a complete Date object so only methods that were implemented can be called safely.
- * To make matters worse, TzDate instances inherit stuff from Date via a prototype.
- *
- * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is
- * incomplete we might be missing some non-standard methods. This can result in errors like:
- * "Date.prototype.foo called on incompatible Object".
- *
- * ```js
- * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
- * newYearInBratislava.getTimezoneOffset() => -60;
- * newYearInBratislava.getFullYear() => 2010;
- * newYearInBratislava.getMonth() => 0;
- * newYearInBratislava.getDate() => 1;
- * newYearInBratislava.getHours() => 0;
- * newYearInBratislava.getMinutes() => 0;
- * newYearInBratislava.getSeconds() => 0;
- * ```
- *
- */
-angular.mock.TzDate = function (offset, timestamp) {
-  var self = new Date(0);
-  if (angular.isString(timestamp)) {
-    var tsStr = timestamp;
-
-    self.origDate = jsonStringToDate(timestamp);
-
-    timestamp = self.origDate.getTime();
-    if (isNaN(timestamp))
-      throw {
-        name: "Illegal Argument",
-        message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string"
-      };
-  } else {
-    self.origDate = new Date(timestamp);
-  }
-
-  var localOffset = new Date(timestamp).getTimezoneOffset();
-  self.offsetDiff = localOffset*60*1000 - offset*1000*60*60;
-  self.date = new Date(timestamp + self.offsetDiff);
-
-  self.getTime = function() {
-    return self.date.getTime() - self.offsetDiff;
-  };
-
-  self.toLocaleDateString = function() {
-    return self.date.toLocaleDateString();
-  };
-
-  self.getFullYear = function() {
-    return self.date.getFullYear();
-  };
-
-  self.getMonth = function() {
-    return self.date.getMonth();
-  };
-
-  self.getDate = function() {
-    return self.date.getDate();
-  };
-
-  self.getHours = function() {
-    return self.date.getHours();
-  };
-
-  self.getMinutes = function() {
-    return self.date.getMinutes();
-  };
-
-  self.getSeconds = function() {
-    return self.date.getSeconds();
-  };
-
-  self.getMilliseconds = function() {
-    return self.date.getMilliseconds();
-  };
-
-  self.getTimezoneOffset = function() {
-    return offset * 60;
-  };
-
-  self.getUTCFullYear = function() {
-    return self.origDate.getUTCFullYear();
-  };
-
-  self.getUTCMonth = function() {
-    return self.origDate.getUTCMonth();
-  };
-
-  self.getUTCDate = function() {
-    return self.origDate.getUTCDate();
-  };
-
-  self.getUTCHours = function() {
-    return self.origDate.getUTCHours();
-  };
-
-  self.getUTCMinutes = function() {
-    return self.origDate.getUTCMinutes();
-  };
-
-  self.getUTCSeconds = function() {
-    return self.origDate.getUTCSeconds();
-  };
-
-  self.getUTCMilliseconds = function() {
-    return self.origDate.getUTCMilliseconds();
-  };
-
-  self.getDay = function() {
-    return self.date.getDay();
-  };
-
-  // provide this method only on browsers that already have it
-  if (self.toISOString) {
-    self.toISOString = function() {
-      return padNumber(self.origDate.getUTCFullYear(), 4) + '-' +
-            padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' +
-            padNumber(self.origDate.getUTCDate(), 2) + 'T' +
-            padNumber(self.origDate.getUTCHours(), 2) + ':' +
-            padNumber(self.origDate.getUTCMinutes(), 2) + ':' +
-            padNumber(self.origDate.getUTCSeconds(), 2) + '.' +
-            padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z';
-    };
-  }
-
-  //hide all methods not implemented in this mock that the Date prototype exposes
-  var unimplementedMethods = ['getUTCDay',
-      'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
-      'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
-      'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
-      'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString',
-      'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];
-
-  angular.forEach(unimplementedMethods, function(methodName) {
-    self[methodName] = function() {
-      throw new Error("Method '" + methodName + "' is not implemented in the TzDate mock");
-    };
-  });
-
-  return self;
-};
-
-//make "tzDateInstance instanceof Date" return true
-angular.mock.TzDate.prototype = Date.prototype;
-/* jshint +W101 */
-
-angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
-
-  .config(['$provide', function($provide) {
-
-    var reflowQueue = [];
-    $provide.value('$$animateReflow', function(fn) {
-      var index = reflowQueue.length;
-      reflowQueue.push(fn);
-      return function cancel() {
-        reflowQueue.splice(index, 1);
-      };
-    });
-
-    $provide.decorator('$animate', function($delegate, $$asyncCallback) {
-      var animate = {
-        queue : [],
-        enabled : $delegate.enabled,
-        triggerCallbacks : function() {
-          $$asyncCallback.flush();
-        },
-        triggerReflow : function() {
-          angular.forEach(reflowQueue, function(fn) {
-            fn();
-          });
-          reflowQueue = [];
-        }
-      };
-
-      angular.forEach(
-        ['enter','leave','move','addClass','removeClass','setClass'], function(method) {
-        animate[method] = function() {
-          animate.queue.push({
-            event : method,
-            element : arguments[0],
-            args : arguments
-          });
-          $delegate[method].apply($delegate, arguments);
-        };
-      });
-
-      return animate;
-    });
-
-  }]);
-
-
-/**
- * @ngdoc function
- * @name angular.mock.dump
- * @description
- *
- * *NOTE*: this is not an injectable instance, just a globally available function.
- *
- * Method for serializing common angular objects (scope, elements, etc..) into strings, useful for
- * debugging.
- *
- * This method is also available on window, where it can be used to display objects on debug
- * console.
- *
- * @param {*} object - any object to turn into string.
- * @return {string} a serialized string of the argument
- */
-angular.mock.dump = function(object) {
-  return serialize(object);
-
-  function serialize(object) {
-    var out;
-
-    if (angular.isElement(object)) {
-      object = angular.element(object);
-      out = angular.element('<div></div>');
-      angular.forEach(object, function(element) {
-        out.append(angular.element(element).clone());
-      });
-      out = out.html();
-    } else if (angular.isArray(object)) {
-      out = [];
-      angular.forEach(object, function(o) {
-        out.push(serialize(o));
-      });
-      out = '[ ' + out.join(', ') + ' ]';
-    } else if (angular.isObject(object)) {
-      if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) {
-        out = serializeScope(object);
-      } else if (object instanceof Error) {
-        out = object.stack || ('' + object.name + ': ' + object.message);
-      } else {
-        // TODO(i): this prevents methods being logged,
-        // we should have a better way to serialize objects
-        out = angular.toJson(object, true);
-      }
-    } else {
-      out = String(object);
-    }
-
-    return out;
-  }
-
-  function serializeScope(scope, offset) {
-    offset = offset ||  '  ';
-    var log = [offset + 'Scope(' + scope.$id + '): {'];
-    for ( var key in scope ) {
-      if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) {
-        log.push('  ' + key + ': ' + angular.toJson(scope[key]));
-      }
-    }
-    var child = scope.$$childHead;
-    while(child) {
-      log.push(serializeScope(child, offset + '  '));
-      child = child.$$nextSibling;
-    }
-    log.push('}');
-    return log.join('\n' + offset);
-  }
-};
-
-/**
- * @ngdoc service
- * @name $httpBackend
- * @description
- * Fake HTTP backend implementation suitable for unit testing applications that use the
- * {@link ng.$http $http service}.
- *
- * *Note*: For fake HTTP backend implementation suitable for end-to-end testing or backend-less
- * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}.
- *
- * During unit testing, we want our unit tests to run quickly and have no external dependencies so
- * we don’t want to send [XHR](https://developer.mozilla.org/en/xmlhttprequest) or
- * [JSONP](http://en.wikipedia.org/wiki/JSONP) requests to a real server. All we really need is
- * to verify whether a certain request has been sent or not, or alternatively just let the
- * application make requests, respond with pre-trained responses and assert that the end result is
- * what we expect it to be.
- *
- * This mock implementation can be used to respond with static or dynamic responses via the
- * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc).
- *
- * When an Angular application needs some data from a server, it calls the $http service, which
- * sends the request to a real server using $httpBackend service. With dependency injection, it is
- * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify
- * the requests and respond with some testing data without sending a request to a real server.
- *
- * There are two ways to specify what test data should be returned as http responses by the mock
- * backend when the code under test makes http requests:
- *
- * - `$httpBackend.expect` - specifies a request expectation
- * - `$httpBackend.when` - specifies a backend definition
- *
- *
- * # Request Expectations vs Backend Definitions
- *
- * Request expectations provide a way to make assertions about requests made by the application and
- * to define responses for those requests. The test will fail if the expected requests are not made
- * or they are made in the wrong order.
- *
- * Backend definitions allow you to define a fake backend for your application which doesn't assert
- * if a particular request was made or not, it just returns a trained response if a request is made.
- * The test will pass whether or not the request gets made during testing.
- *
- *
- * <table class="table">
- *   <tr><th width="220px"></th><th>Request expectations</th><th>Backend definitions</th></tr>
- *   <tr>
- *     <th>Syntax</th>
- *     <td>.expect(...).respond(...)</td>
- *     <td>.when(...).respond(...)</td>
- *   </tr>
- *   <tr>
- *     <th>Typical usage</th>
- *     <td>strict unit tests</td>
- *     <td>loose (black-box) unit testing</td>
- *   </tr>
- *   <tr>
- *     <th>Fulfills multiple requests</th>
- *     <td>NO</td>
- *     <td>YES</td>
- *   </tr>
- *   <tr>
- *     <th>Order of requests matters</th>
- *     <td>YES</td>
- *     <td>NO</td>
- *   </tr>
- *   <tr>
- *     <th>Request required</th>
- *     <td>YES</td>
- *     <td>NO</td>
- *   </tr>
- *   <tr>
- *     <th>Response required</th>
- *     <td>optional (see below)</td>
- *     <td>YES</td>
- *   </tr>
- * </table>
- *
- * In cases where both backend definitions and request expectations are specified during unit
- * testing, the request expectations are evaluated first.
- *
- * If a request expectation has no response specified, the algorithm will search your backend
- * definitions for an appropriate response.
- *
- * If a request didn't match any expectation or if the expectation doesn't have the response
- * defined, the backend definitions are evaluated in sequential order to see if any of them match
- * the request. The response from the first matched definition is returned.
- *
- *
- * # Flushing HTTP requests
- *
- * The $httpBackend used in production always responds to requests asynchronously. If we preserved
- * this behavior in unit testing, we'd have to create async unit tests, which are hard to write,
- * to follow and to maintain. But neither can the testing mock respond synchronously; that would
- * change the execution of the code under test. For this reason, the mock $httpBackend has a
- * `flush()` method, which allows the test to explicitly flush pending requests. This preserves
- * the async api of the backend, while allowing the test to execute synchronously.
- *
- *
- * # Unit testing with mock $httpBackend
- * The following code shows how to setup and use the mock backend when unit testing a controller.
- * First we create the controller under test:
- *
-  ```js
-  // The controller code
-  function MyController($scope, $http) {
-    var authToken;
-
-    $http.get('/auth.py').success(function(data, status, headers) {
-      authToken = headers('A-Token');
-      $scope.user = data;
-    });
-
-    $scope.saveMessage = function(message) {
-      var headers = { 'Authorization': authToken };
-      $scope.status = 'Saving...';
-
-      $http.post('/add-msg.py', message, { headers: headers } ).success(function(response) {
-        $scope.status = '';
-      }).error(function() {
-        $scope.status = 'ERROR!';
-      });
-    };
-  }
-  ```
- *
- * Now we setup the mock backend and create the test specs:
- *
-  ```js
-    // testing controller
-    describe('MyController', function() {
-       var $httpBackend, $rootScope, createController;
-
-       beforeEach(inject(function($injector) {
-         // Set up the mock http service responses
-         $httpBackend = $injector.get('$httpBackend');
-         // backend definition common for all tests
-         $httpBackend.when('GET', '/auth.py').respond({userId: 'userX'}, {'A-Token': 'xxx'});
-
-         // Get hold of a scope (i.e. the root scope)
-         $rootScope = $injector.get('$rootScope');
-         // The $controller service is used to create instances of controllers
-         var $controller = $injector.get('$controller');
-
-         createController = function() {
-           return $controller('MyController', {'$scope' : $rootScope });
-         };
-       }));
-
-
-       afterEach(function() {
-         $httpBackend.verifyNoOutstandingExpectation();
-         $httpBackend.verifyNoOutstandingRequest();
-       });
-
-
-       it('should fetch authentication token', function() {
-         $httpBackend.expectGET('/auth.py');
-         var controller = createController();
-         $httpBackend.flush();
-       });
-
-
-       it('should send msg to server', function() {
-         var controller = createController();
-         $httpBackend.flush();
-
-         // now you don’t care about the authentication, but
-         // the controller will still send the request and
-         // $httpBackend will respond without you having to
-         // specify the expectation and response for this request
-
-         $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, '');
-         $rootScope.saveMessage('message content');
-         expect($rootScope.status).toBe('Saving...');
-         $httpBackend.flush();
-         expect($rootScope.status).toBe('');
-       });
-
-
-       it('should send auth header', function() {
-         var controller = createController();
-         $httpBackend.flush();
-
-         $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) {
-           // check if the header was send, if it wasn't the expectation won't
-           // match the request and the test will fail
-           return headers['Authorization'] == 'xxx';
-         }).respond(201, '');
-
-         $rootScope.saveMessage('whatever');
-         $httpBackend.flush();
-       });
-    });
-   ```
- */
-angular.mock.$HttpBackendProvider = function() {
-  this.$get = ['$rootScope', createHttpBackendMock];
-};
-
-/**
- * General factory function for $httpBackend mock.
- * Returns instance for unit testing (when no arguments specified):
- *   - passing through is disabled
- *   - auto flushing is disabled
- *
- * Returns instance for e2e testing (when `$delegate` and `$browser` specified):
- *   - passing through (delegating request to real backend) is enabled
- *   - auto flushing is enabled
- *
- * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified)
- * @param {Object=} $browser Auto-flushing enabled if specified
- * @return {Object} Instance of $httpBackend mock
- */
-function createHttpBackendMock($rootScope, $delegate, $browser) {
-  var definitions = [],
-      expectations = [],
-      responses = [],
-      responsesPush = angular.bind(responses, responses.push),
-      copy = angular.copy;
-
-  function createResponse(status, data, headers, statusText) {
-    if (angular.isFunction(status)) return status;
-
-    return function() {
-      return angular.isNumber(status)
-          ? [status, data, headers, statusText]
-          : [200, status, data];
-    };
-  }
-
-  // TODO(vojta): change params to: method, url, data, headers, callback
-  function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
-    var xhr = new MockXhr(),
-        expectation = expectations[0],
-        wasExpected = false;
-
-    function prettyPrint(data) {
-      return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp)
-          ? data
-          : angular.toJson(data);
-    }
-
-    function wrapResponse(wrapped) {
-      if (!$browser && timeout && timeout.then) timeout.then(handleTimeout);
-
-      return handleResponse;
-
-      function handleResponse() {
-        var response = wrapped.response(method, url, data, headers);
-        xhr.$$respHeaders = response[2];
-        callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders(),
-                 copy(response[3] || ''));
-      }
-
-      function handleTimeout() {
-        for (var i = 0, ii = responses.length; i < ii; i++) {
-          if (responses[i] === handleResponse) {
-            responses.splice(i, 1);
-            callback(-1, undefined, '');
-            break;
-          }
-        }
-      }
-    }
-
-    if (expectation && expectation.match(method, url)) {
-      if (!expectation.matchData(data))
-        throw new Error('Expected ' + expectation + ' with different data\n' +
-            'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT:      ' + data);
-
-      if (!expectation.matchHeaders(headers))
-        throw new Error('Expected ' + expectation + ' with different headers\n' +
-                        'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT:      ' +
-                        prettyPrint(headers));
-
-      expectations.shift();
-
-      if (expectation.response) {
-        responses.push(wrapResponse(expectation));
-        return;
-      }
-      wasExpected = true;
-    }
-
-    var i = -1, definition;
-    while ((definition = definitions[++i])) {
-      if (definition.match(method, url, data, headers || {})) {
-        if (definition.response) {
-          // if $browser specified, we do auto flush all requests
-          ($browser ? $browser.defer : responsesPush)(wrapResponse(definition));
-        } else if (definition.passThrough) {
-          $delegate(method, url, data, callback, headers, timeout, withCredentials);
-        } else throw new Error('No response defined !');
-        return;
-      }
-    }
-    throw wasExpected ?
-        new Error('No response defined !') :
-        new Error('Unexpected request: ' + method + ' ' + url + '\n' +
-                  (expectation ? 'Expected ' + expectation : 'No more request expected'));
-  }
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#when
-   * @description
-   * Creates a new backend definition.
-   *
-   * @param {string} method HTTP method.
-   * @param {string|RegExp} url HTTP url.
-   * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
-   *   data string and returns true if the data is as expected.
-   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
-   *   object and returns true if the headers match the current definition.
-   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
-   *   request is handled.
-   *
-   *  - respond –
-   *      `{function([status,] data[, headers, statusText])
-   *      | function(function(method, url, data, headers)}`
-   *    – The respond method takes a set of static data to be returned or a function that can
-   *    return an array containing response status (number), response data (string), response
-   *    headers (Object), and the text for the status (string).
-   */
-  $httpBackend.when = function(method, url, data, headers) {
-    var definition = new MockHttpExpectation(method, url, data, headers),
-        chain = {
-          respond: function(status, data, headers, statusText) {
-            definition.response = createResponse(status, data, headers, statusText);
-          }
-        };
-
-    if ($browser) {
-      chain.passThrough = function() {
-        definition.passThrough = true;
-      };
-    }
-
-    definitions.push(definition);
-    return chain;
-  };
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#whenGET
-   * @description
-   * Creates a new backend definition for GET requests. For more info see `when()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @param {(Object|function(Object))=} headers HTTP headers.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   * request is handled.
-   */
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#whenHEAD
-   * @description
-   * Creates a new backend definition for HEAD requests. For more info see `when()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @param {(Object|function(Object))=} headers HTTP headers.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   * request is handled.
-   */
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#whenDELETE
-   * @description
-   * Creates a new backend definition for DELETE requests. For more info see `when()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @param {(Object|function(Object))=} headers HTTP headers.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   * request is handled.
-   */
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#whenPOST
-   * @description
-   * Creates a new backend definition for POST requests. For more info see `when()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
-   *   data string and returns true if the data is as expected.
-   * @param {(Object|function(Object))=} headers HTTP headers.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   * request is handled.
-   */
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#whenPUT
-   * @description
-   * Creates a new backend definition for PUT requests.  For more info see `when()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
-   *   data string and returns true if the data is as expected.
-   * @param {(Object|function(Object))=} headers HTTP headers.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   * request is handled.
-   */
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#whenJSONP
-   * @description
-   * Creates a new backend definition for JSONP requests. For more info see `when()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   * request is handled.
-   */
-  createShortMethods('when');
-
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#expect
-   * @description
-   * Creates a new request expectation.
-   *
-   * @param {string} method HTTP method.
-   * @param {string|RegExp} url HTTP url.
-   * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
-   *  receives data string and returns true if the data is as expected, or Object if request body
-   *  is in JSON format.
-   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
-   *   object and returns true if the headers match the current expectation.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   *  request is handled.
-   *
-   *  - respond –
-   *    `{function([status,] data[, headers, statusText])
-   *    | function(function(method, url, data, headers)}`
-   *    – The respond method takes a set of static data to be returned or a function that can
-   *    return an array containing response status (number), response data (string), response
-   *    headers (Object), and the text for the status (string).
-   */
-  $httpBackend.expect = function(method, url, data, headers) {
-    var expectation = new MockHttpExpectation(method, url, data, headers);
-    expectations.push(expectation);
-    return {
-      respond: function (status, data, headers, statusText) {
-        expectation.response = createResponse(status, data, headers, statusText);
-      }
-    };
-  };
-
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#expectGET
-   * @description
-   * Creates a new request expectation for GET requests. For more info see `expect()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @param {Object=} headers HTTP headers.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   * request is handled. See #expect for more info.
-   */
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#expectHEAD
-   * @description
-   * Creates a new request expectation for HEAD requests. For more info see `expect()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @param {Object=} headers HTTP headers.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   *   request is handled.
-   */
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#expectDELETE
-   * @description
-   * Creates a new request expectation for DELETE requests. For more info see `expect()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @param {Object=} headers HTTP headers.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   *   request is handled.
-   */
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#expectPOST
-   * @description
-   * Creates a new request expectation for POST requests. For more info see `expect()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
-   *  receives data string and returns true if the data is as expected, or Object if request body
-   *  is in JSON format.
-   * @param {Object=} headers HTTP headers.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   *   request is handled.
-   */
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#expectPUT
-   * @description
-   * Creates a new request expectation for PUT requests. For more info see `expect()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
-   *  receives data string and returns true if the data is as expected, or Object if request body
-   *  is in JSON format.
-   * @param {Object=} headers HTTP headers.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   *   request is handled.
-   */
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#expectPATCH
-   * @description
-   * Creates a new request expectation for PATCH requests. For more info see `expect()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
-   *  receives data string and returns true if the data is as expected, or Object if request body
-   *  is in JSON format.
-   * @param {Object=} headers HTTP headers.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   *   request is handled.
-   */
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#expectJSONP
-   * @description
-   * Creates a new request expectation for JSONP requests. For more info see `expect()`.
-   *
-   * @param {string|RegExp} url HTTP url.
-   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
-   *   request is handled.
-   */
-  createShortMethods('expect');
-
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#flush
-   * @description
-   * Flushes all pending requests using the trained responses.
-   *
-   * @param {number=} count Number of responses to flush (in the order they arrived). If undefined,
-   *   all pending requests will be flushed. If there are no pending requests when the flush method
-   *   is called an exception is thrown (as this typically a sign of programming error).
-   */
-  $httpBackend.flush = function(count) {
-    $rootScope.$digest();
-    if (!responses.length) throw new Error('No pending request to flush !');
-
-    if (angular.isDefined(count)) {
-      while (count--) {
-        if (!responses.length) throw new Error('No more pending request to flush !');
-        responses.shift()();
-      }
-    } else {
-      while (responses.length) {
-        responses.shift()();
-      }
-    }
-    $httpBackend.verifyNoOutstandingExpectation();
-  };
-
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#verifyNoOutstandingExpectation
-   * @description
-   * Verifies that all of the requests defined via the `expect` api were made. If any of the
-   * requests were not made, verifyNoOutstandingExpectation throws an exception.
-   *
-   * Typically, you would call this method following each test case that asserts requests using an
-   * "afterEach" clause.
-   *
-   * ```js
-   *   afterEach($httpBackend.verifyNoOutstandingExpectation);
-   * ```
-   */
-  $httpBackend.verifyNoOutstandingExpectation = function() {
-    $rootScope.$digest();
-    if (expectations.length) {
-      throw new Error('Unsatisfied requests: ' + expectations.join(', '));
-    }
-  };
-
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#verifyNoOutstandingRequest
-   * @description
-   * Verifies that there are no outstanding requests that need to be flushed.
-   *
-   * Typically, you would call this method following each test case that asserts requests using an
-   * "afterEach" clause.
-   *
-   * ```js
-   *   afterEach($httpBackend.verifyNoOutstandingRequest);
-   * ```
-   */
-  $httpBackend.verifyNoOutstandingRequest = function() {
-    if (responses.length) {
-      throw new Error('Unflushed requests: ' + responses.length);
-    }
-  };
-
-
-  /**
-   * @ngdoc method
-   * @name $httpBackend#resetExpectations
-   * @description
-   * Resets all request expectations, but preserves all backend definitions. Typically, you would
-   * call resetExpectations during a multiple-phase test when you want to reuse the same instance of
-   * $httpBackend mock.
-   */
-  $httpBackend.resetExpectations = function() {
-    expectations.length = 0;
-    responses.length = 0;
-  };
-
-  return $httpBackend;
-
-
-  function createShortMethods(prefix) {
-    angular.forEach(['GET', 'DELETE', 'JSONP'], function(method) {
-     $httpBackend[prefix + method] = function(url, headers) {
-       return $httpBackend[prefix](method, url, undefined, headers);
-     };
-    });
-
-    angular.forEach(['PUT', 'POST', 'PATCH'], function(method) {
-      $httpBackend[prefix + method] = function(url, data, headers) {
-        return $httpBackend[prefix](method, url, data, headers);
-      };
-    });
-  }
-}
-
-function MockHttpExpectation(method, url, data, headers) {
-
-  this.data = data;
-  this.headers = headers;
-
-  this.match = function(m, u, d, h) {
-    if (method != m) return false;
-    if (!this.matchUrl(u)) return false;
-    if (angular.isDefined(d) && !this.matchData(d)) return false;
-    if (angular.isDefined(h) && !this.matchHeaders(h)) return false;
-    return true;
-  };
-
-  this.matchUrl = function(u) {
-    if (!url) return true;
-    if (angular.isFunction(url.test)) return url.test(u);
-    return url == u;
-  };
-
-  this.matchHeaders = function(h) {
-    if (angular.isUndefined(headers)) return true;
-    if (angular.isFunction(headers)) return headers(h);
-    return angular.equals(headers, h);
-  };
-
-  this.matchData = function(d) {
-    if (angular.isUndefined(data)) return true;
-    if (data && angular.isFunction(data.test)) return data.test(d);
-    if (data && angular.isFunction(data)) return data(d);
-    if (data && !angular.isString(data)) return angular.equals(data, angular.fromJson(d));
-    return data == d;
-  };
-
-  this.toString = function() {
-    return method + ' ' + url;
-  };
-}
-
-function createMockXhr() {
-  return new MockXhr();
-}
-
-function MockXhr() {
-
-  // hack for testing $http, $httpBackend
-  MockXhr.$$lastInstance = this;
-
-  this.open = function(method, url, async) {
-    this.$$method = method;
-    this.$$url = url;
-    this.$$async = async;
-    this.$$reqHeaders = {};
-    this.$$respHeaders = {};
-  };
-
-  this.send = function(data) {
-    this.$$data = data;
-  };
-
-  this.setRequestHeader = function(key, value) {
-    this.$$reqHeaders[key] = value;
-  };
-
-  this.getResponseHeader = function(name) {
-    // the lookup must be case insensitive,
-    // that's why we try two quick lookups first and full scan last
-    var header = this.$$respHeaders[name];
-    if (header) return header;
-
-    name = angular.lowercase(name);
-    header = this.$$respHeaders[name];
-    if (header) return header;
-
-    header = undefined;
-    angular.forEach(this.$$respHeaders, function(headerVal, headerName) {
-      if (!header && angular.lowercase(headerName) == name) header = headerVal;
-    });
-    return header;
-  };
-
-  this.getAllResponseHeaders = function() {
-    var lines = [];
-
-    angular.forEach(this.$$respHeaders, function(value, key) {
-      lines.push(key + ': ' + value);
-    });
-    return lines.join('\n');
-  };
-
-  this.abort = angular.noop;
-}
-
-
-/**
- * @ngdoc service
- * @name $timeout
- * @description
- *
- * This service is just a simple decorator for {@link ng.$timeout $timeout} service
- * that adds a "flush" and "verifyNoPendingTasks" methods.
- */
-
-angular.mock.$TimeoutDecorator = function($delegate, $browser) {
-
-  /**
-   * @ngdoc method
-   * @name $timeout#flush
-   * @description
-   *
-   * Flushes the queue of pending tasks.
-   *
-   * @param {number=} delay maximum timeout amount to flush up until
-   */
-  $delegate.flush = function(delay) {
-    $browser.defer.flush(delay);
-  };
-
-  /**
-   * @ngdoc method
-   * @name $timeout#verifyNoPendingTasks
-   * @description
-   *
-   * Verifies that there are no pending tasks that need to be flushed.
-   */
-  $delegate.verifyNoPendingTasks = function() {
-    if ($browser.deferredFns.length) {
-      throw new Error('Deferred tasks to flush (' + $browser.deferredFns.length + '): ' +
-          formatPendingTasksAsString($browser.deferredFns));
-    }
-  };
-
-  function formatPendingTasksAsString(tasks) {
-    var result = [];
-    angular.forEach(tasks, function(task) {
-      result.push('{id: ' + task.id + ', ' + 'time: ' + task.time + '}');
-    });
-
-    return result.join(', ');
-  }
-
-  return $delegate;
-};
-
-angular.mock.$RAFDecorator = function($delegate) {
-  var queue = [];
-  var rafFn = function(fn) {
-    var index = queue.length;
-    queue.push(fn);
-    return function() {
-      queue.splice(index, 1);
-    };
-  };
-
-  rafFn.supported = $delegate.supported;
-
-  rafFn.flush = function() {
-    if(queue.length === 0) {
-      throw new Error('No rAF callbacks present');
-    }
-
-    var length = queue.length;
-    for(var i=0;i<length;i++) {
-      queue[i]();
-    }
-
-    queue = [];
-  };
-
-  return rafFn;
-};
-
-angular.mock.$AsyncCallbackDecorator = function($delegate) {
-  var callbacks = [];
-  var addFn = function(fn) {
-    callbacks.push(fn);
-  };
-  addFn.flush = function() {
-    angular.forEach(callbacks, function(fn) {
-      fn();
-    });
-    callbacks = [];
-  };
-  return addFn;
-};
-
-/**
- *
- */
-angular.mock.$RootElementProvider = function() {
-  this.$get = function() {
-    return angular.element('<div ng-app></div>');
-  };
-};
-
-/**
- * @ngdoc module
- * @name ngMock
- * @description
- *
- * # ngMock
- *
- * The `ngMock` module provides support to inject and mock Angular services into unit tests.
- * In addition, ngMock also extends various core ng services such that they can be
- * inspected and controlled in a synchronous manner within test code.
- *
- *
- * <div doc-module-components="ngMock"></div>
- *
- */
-angular.module('ngMock', ['ng']).provider({
-  $browser: angular.mock.$BrowserProvider,
-  $exceptionHandler: angular.mock.$ExceptionHandlerProvider,
-  $log: angular.mock.$LogProvider,
-  $interval: angular.mock.$IntervalProvider,
-  $httpBackend: angular.mock.$HttpBackendProvider,
-  $rootElement: angular.mock.$RootElementProvider
-}).config(['$provide', function($provide) {
-  $provide.decorator('$timeout', angular.mock.$TimeoutDecorator);
-  $provide.decorator('$$rAF', angular.mock.$RAFDecorator);
-  $provide.decorator('$$asyncCallback', angular.mock.$AsyncCallbackDecorator);
-}]);
-
-/**
- * @ngdoc module
- * @name ngMockE2E
- * @module ngMockE2E
- * @description
- *
- * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing.
- * Currently there is only one mock present in this module -
- * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock.
- */
-angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
-  $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
-}]);
-
-/**
- * @ngdoc service
- * @name $httpBackend
- * @module ngMockE2E
- * @description
- * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of
- * applications that use the {@link ng.$http $http service}.
- *
- * *Note*: For fake http backend implementation suitable for unit testing please see
- * {@link ngMock.$httpBackend unit-testing $httpBackend mock}.
- *
- * This implementation can be used to respond with static or dynamic responses via the `when` api
- * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the
- * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch
- * templates from a webserver).
- *
- * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application
- * is being developed with the real backend api replaced with a mock, it is often desirable for
- * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch
- * templates or static files from the webserver). To configure the backend with this behavior
- * use the `passThrough` request handler of `when` instead of `respond`.
- *
- * Additionally, we don't want to manually have to flush mocked out requests like we do during unit
- * testing. For this reason the e2e $httpBackend automatically flushes mocked out requests
- * automatically, closely simulating the behavior of the XMLHttpRequest object.
- *
- * To setup the application to run with this http backend, you have to create a module that depends
- * on the `ngMockE2E` and your application modules and defines the fake backend:
- *
- * ```js
- *   myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']);
- *   myAppDev.run(function($httpBackend) {
- *     phones = [{name: 'phone1'}, {name: 'phone2'}];
- *
- *     // returns the current list of phones
- *     $httpBackend.whenGET('/phones').respond(phones);
- *
- *     // adds a new phone to the phones array
- *     $httpBackend.whenPOST('/phones').respond(function(method, url, data) {
- *       var phone = angular.fromJson(data);
- *       phones.push(phone);
- *       return [200, phone, {}];
- *     });
- *     $httpBackend.whenGET(/^\/templates\//).passThrough();
- *     //...
- *   });
- * ```
- *
- * Afterwards, bootstrap your app with this new module.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#when
- * @module ngMockE2E
- * @description
- * Creates a new backend definition.
- *
- * @param {string} method HTTP method.
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
- *   object and returns true if the headers match the current definition.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- *   control how a matched request is handled.
- *
- *  - respond –
- *    `{function([status,] data[, headers, statusText])
- *    | function(function(method, url, data, headers)}`
- *    – The respond method takes a set of static data to be returned or a function that can return
- *    an array containing response status (number), response data (string), response headers
- *    (Object), and the text for the status (string).
- *  - passThrough – `{function()}` – Any request matching a backend definition with
- *    `passThrough` handler will be passed through to the real backend (an XHR request will be made
- *    to the server.)
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenGET
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for GET requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- *   control how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenHEAD
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for HEAD requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- *   control how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenDELETE
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for DELETE requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- *   control how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenPOST
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for POST requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- *   control how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenPUT
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for PUT requests.  For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- *   control how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenPATCH
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for PATCH requests.  For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- *   control how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenJSONP
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for JSONP requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- *   control how a matched request is handled.
- */
-angular.mock.e2e = {};
-angular.mock.e2e.$httpBackendDecorator =
-  ['$rootScope', '$delegate', '$browser', createHttpBackendMock];
-
-
-angular.mock.clearDataCache = function() {
-  var key,
-      cache = angular.element.cache;
-
-  for(key in cache) {
-    if (Object.prototype.hasOwnProperty.call(cache,key)) {
-      var handle = cache[key].handle;
-
-      handle && angular.element(handle.elem).off();
-      delete cache[key];
-    }
-  }
-};
-
-
-if(window.jasmine || window.mocha) {
-
-  var currentSpec = null,
-      isSpecRunning = function() {
-        return !!currentSpec;
-      };
-
-
-  (window.beforeEach || window.setup)(function() {
-    currentSpec = this;
-  });
-
-  (window.afterEach || window.teardown)(function() {
-    var injector = currentSpec.$injector;
-
-    angular.forEach(currentSpec.$modules, function(module) {
-      if (module && module.$$hashKey) {
-        module.$$hashKey = undefined;
-      }
-    });
-
-    currentSpec.$injector = null;
-    currentSpec.$modules = null;
-    currentSpec = null;
-
-    if (injector) {
-      injector.get('$rootElement').off();
-      injector.get('$browser').pollFns.length = 0;
-    }
-
-    angular.mock.clearDataCache();
-
-    // clean up jquery's fragment cache
-    angular.forEach(angular.element.fragments, function(val, key) {
-      delete angular.element.fragments[key];
-    });
-
-    MockXhr.$$lastInstance = null;
-
-    angular.forEach(angular.callbacks, function(val, key) {
-      delete angular.callbacks[key];
-    });
-    angular.callbacks.counter = 0;
-  });
-
-  /**
-   * @ngdoc function
-   * @name angular.mock.module
-   * @description
-   *
-   * *NOTE*: This function is also published on window for easy access.<br>
-   *
-   * This function registers a module configuration code. It collects the configuration information
-   * which will be used when the injector is created by {@link angular.mock.inject inject}.
-   *
-   * See {@link angular.mock.inject inject} for usage example
-   *
-   * @param {...(string|Function|Object)} fns any number of modules which are represented as string
-   *        aliases or as anonymous module initialization functions. The modules are used to
-   *        configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an
-   *        object literal is passed they will be registered as values in the module, the key being
-   *        the module name and the value being what is returned.
-   */
-  window.module = angular.mock.module = function() {
-    var moduleFns = Array.prototype.slice.call(arguments, 0);
-    return isSpecRunning() ? workFn() : workFn;
-    /////////////////////
-    function workFn() {
-      if (currentSpec.$injector) {
-        throw new Error('Injector already created, can not register a module!');
-      } else {
-        var modules = currentSpec.$modules || (currentSpec.$modules = []);
-        angular.forEach(moduleFns, function(module) {
-          if (angular.isObject(module) && !angular.isArray(module)) {
-            modules.push(function($provide) {
-              angular.forEach(module, function(value, key) {
-                $provide.value(key, value);
-              });
-            });
-          } else {
-            modules.push(module);
-          }
-        });
-      }
-    }
-  };
-
-  /**
-   * @ngdoc function
-   * @name angular.mock.inject
-   * @description
-   *
-   * *NOTE*: This function is also published on window for easy access.<br>
-   *
-   * The inject function wraps a function into an injectable function. The inject() creates new
-   * instance of {@link auto.$injector $injector} per test, which is then used for
-   * resolving references.
-   *
-   *
-   * ## Resolving References (Underscore Wrapping)
-   * Often, we would like to inject a reference once, in a `beforeEach()` block and reuse this
-   * in multiple `it()` clauses. To be able to do this we must assign the reference to a variable
-   * that is declared in the scope of the `describe()` block. Since we would, most likely, want
-   * the variable to have the same name of the reference we have a problem, since the parameter
-   * to the `inject()` function would hide the outer variable.
-   *
-   * To help with this, the injected parameters can, optionally, be enclosed with underscores.
-   * These are ignored by the injector when the reference name is resolved.
-   *
-   * For example, the parameter `_myService_` would be resolved as the reference `myService`.
-   * Since it is available in the function body as _myService_, we can then assign it to a variable
-   * defined in an outer scope.
-   *
-   * ```
-   * // Defined out reference variable outside
-   * var myService;
-   *
-   * // Wrap the parameter in underscores
-   * beforeEach( inject( function(_myService_){
-   *   myService = _myService_;
-   * }));
-   *
-   * // Use myService in a series of tests.
-   * it('makes use of myService', function() {
-   *   myService.doStuff();
-   * });
-   *
-   * ```
-   *
-   * See also {@link angular.mock.module angular.mock.module}
-   *
-   * ## Example
-   * Example of what a typical jasmine tests looks like with the inject method.
-   * ```js
-   *
-   *   angular.module('myApplicationModule', [])
-   *       .value('mode', 'app')
-   *       .value('version', 'v1.0.1');
-   *
-   *
-   *   describe('MyApp', function() {
-   *
-   *     // You need to load modules that you want to test,
-   *     // it loads only the "ng" module by default.
-   *     beforeEach(module('myApplicationModule'));
-   *
-   *
-   *     // inject() is used to inject arguments of all given functions
-   *     it('should provide a version', inject(function(mode, version) {
-   *       expect(version).toEqual('v1.0.1');
-   *       expect(mode).toEqual('app');
-   *     }));
-   *
-   *
-   *     // The inject and module method can also be used inside of the it or beforeEach
-   *     it('should override a version and test the new version is injected', function() {
-   *       // module() takes functions or strings (module aliases)
-   *       module(function($provide) {
-   *         $provide.value('version', 'overridden'); // override version here
-   *       });
-   *
-   *       inject(function(version) {
-   *         expect(version).toEqual('overridden');
-   *       });
-   *     });
-   *   });
-   *
-   * ```
-   *
-   * @param {...Function} fns any number of functions which will be injected using the injector.
-   */
-
-
-
-  var ErrorAddingDeclarationLocationStack = function(e, errorForStack) {
-    this.message = e.message;
-    this.name = e.name;
-    if (e.line) this.line = e.line;
-    if (e.sourceId) this.sourceId = e.sourceId;
-    if (e.stack && errorForStack)
-      this.stack = e.stack + '\n' + errorForStack.stack;
-    if (e.stackArray) this.stackArray = e.stackArray;
-  };
-  ErrorAddingDeclarationLocationStack.prototype.toString = Error.prototype.toString;
-
-  window.inject = angular.mock.inject = function() {
-    var blockFns = Array.prototype.slice.call(arguments, 0);
-    var errorForStack = new Error('Declaration Location');
-    return isSpecRunning() ? workFn.call(currentSpec) : workFn;
-    /////////////////////
-    function workFn() {
-      var modules = currentSpec.$modules || [];
-
-      modules.unshift('ngMock');
-      modules.unshift('ng');
-      var injector = currentSpec.$injector;
-      if (!injector) {
-        injector = currentSpec.$injector = angular.injector(modules);
-      }
-      for(var i = 0, ii = blockFns.length; i < ii; i++) {
-        try {
-          /* jshint -W040 *//* Jasmine explicitly provides a `this` object when calling functions */
-          injector.invoke(blockFns[i] || angular.noop, this);
-          /* jshint +W040 */
-        } catch (e) {
-          if (e.stack && errorForStack) {
-            throw new ErrorAddingDeclarationLocationStack(e, errorForStack);
-          }
-          throw e;
-        } finally {
-          errorForStack = null;
-        }
-      }
-    }
-  };
-}
-
-
-})(window, window.angular);


[20/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQIntegrationTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQIntegrationTest.java
deleted file mode 100644
index 7183c15..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQIntegrationTest.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.java.UsesJmx.JmxAgentModes;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Test the operation of the {@link ActiveMQBroker} class.
- */
-public class ActiveMQIntegrationTest {
-    private static final Logger log = LoggerFactory.getLogger(ActiveMQIntegrationTest.class);
-
-    private TestApplication app;
-    private Location testLocation;
-    private ActiveMQBroker activeMQ;
-
-    @BeforeMethod(alwaysRun = true)
-    public void setup() throws Exception {
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-        testLocation = app.newLocalhostProvisioningLocation();
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void shutdown() throws Exception {
-        if (app != null) Entities.destroyAll(app.getManagementContext());
-    }
-
-    /**
-     * Test that the broker starts up and sets SERVICE_UP correctly.
-     */
-    @Test(groups = "Integration")
-    public void canStartupAndShutdown() throws Exception {
-        activeMQ = app.createAndManageChild(EntitySpec.create(ActiveMQBroker.class));
-
-        activeMQ.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(ImmutableMap.of("timeout", 10*60*1000), activeMQ, Startable.SERVICE_UP, true);
-        log.info("JMX URL is "+activeMQ.getAttribute(UsesJmx.JMX_URL));
-        activeMQ.stop();
-        assertFalse(activeMQ.getAttribute(Startable.SERVICE_UP));
-    }
-
-    /**
-     * Test that the broker starts up and sets SERVICE_UP correctly,
-     * when a jmx port is supplied
-     */
-    @Test(groups = "Integration")
-    public void canStartupAndShutdownWithCustomJmx() throws Exception {
-        activeMQ = app.createAndManageChild(EntitySpec.create(ActiveMQBroker.class)
-            .configure("jmxPort", "11099+"));
-       
-        activeMQ.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(ImmutableMap.of("timeout", 10*60*1000), activeMQ, Startable.SERVICE_UP, true);
-        log.info("JMX URL is "+activeMQ.getAttribute(UsesJmx.JMX_URL));
-        activeMQ.stop();
-        assertFalse(activeMQ.getAttribute(Startable.SERVICE_UP));
-    }
-
-    @Test(groups = "Integration")
-    public void canStartupAndShutdownWithCustomBrokerName() throws Exception {
-        activeMQ = app.createAndManageChild(EntitySpec.create(ActiveMQBroker.class)
-            .configure("jmxPort", "11099+")
-            .configure("brokerName", "bridge"));
-
-        activeMQ.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(ImmutableMap.of("timeout", 10*60*1000), activeMQ, Startable.SERVICE_UP, true);
-        log.info("JMX URL is "+activeMQ.getAttribute(UsesJmx.JMX_URL));
-        activeMQ.stop();
-        assertFalse(activeMQ.getAttribute(Startable.SERVICE_UP));
-    }
-
-    
-    @Test(groups = "Integration")
-    public void canStartTwo() throws Exception {
-        ActiveMQBroker activeMQ1 = app.createAndManageChild(EntitySpec.create(ActiveMQBroker.class));
-        ActiveMQBroker activeMQ2 = app.createAndManageChild(EntitySpec.create(ActiveMQBroker.class));
-
-        activeMQ1.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(ImmutableMap.of("timeout", 10*60*1000), activeMQ1, Startable.SERVICE_UP, true);
-        log.info("JMX URL is "+activeMQ1.getAttribute(UsesJmx.JMX_URL));
-
-        activeMQ2.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(ImmutableMap.of("timeout", 10*60*1000), activeMQ2, Startable.SERVICE_UP, true);
-        log.info("JMX URL is "+activeMQ2.getAttribute(UsesJmx.JMX_URL));
-    }
-
-    /**
-     * Test that setting the 'queue' property causes a named queue to be created.
-     */
-    @Test(groups = "Integration")
-    public void testCreatingQueuesDefault() throws Exception {
-        String url = testCreatingQueuesInternal(null);
-        // localhost default is jmxmp
-        Assert.assertTrue(url.contains("jmxmp"), "url="+url);
-    }
-
-    @Test(groups = "Integration")
-    public void testCreatingQueuesRmi() throws Exception {
-        String url = testCreatingQueuesInternal(JmxAgentModes.JMX_RMI_CUSTOM_AGENT);
-        Assert.assertTrue(url.contains("rmi://"), "url="+url);
-        Assert.assertFalse(url.contains("rmi:///jndi"), "url="+url);
-        Assert.assertFalse(url.contains("jmxmp"), "url="+url);
-    }
-
-    @Test(groups = "Integration")
-    public void testCreatingQueuesJmxmp() throws Exception {
-        String url = testCreatingQueuesInternal(JmxAgentModes.JMXMP);
-        // localhost default is rmi
-        Assert.assertTrue(url.contains("jmxmp"), "url="+url);
-        Assert.assertFalse(url.contains("rmi"), "url="+url);
-    }
-
-    @Test(groups = "Integration")
-    public void testCreatingQueuesNoAgent() throws Exception {
-        String url = testCreatingQueuesInternal(JmxAgentModes.NONE);
-        // localhost default is rmi
-        Assert.assertTrue(url.contains("service:jmx:rmi"), "url="+url);
-        Assert.assertFalse(url.contains("jmxmp"), "url="+url);
-    }
-
-    public String testCreatingQueuesInternal(JmxAgentModes mode) throws Exception {
-        String queueName = "testQueue";
-        int number = 20;
-        String content = "01234567890123456789012345678901";
-
-        // Start broker with a configured queue
-        // FIXME Not yet using app.createAndManageChild because later in test do activeMQ.queueNames,
-        // which is not on interface
-        activeMQ = app.createAndManageChild(EntitySpec.create(ActiveMQBroker.class)
-            .configure("queue", queueName)
-            .configure(UsesJmx.JMX_AGENT_MODE, mode));
-        
-        activeMQ.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(ImmutableMap.of("timeout", 10*60*1000), activeMQ, Startable.SERVICE_UP, true);
-
-        String jmxUrl = activeMQ.getAttribute(UsesJmx.JMX_URL);
-        log.info("JMX URL ("+mode+") is "+jmxUrl);
-        
-        try {
-            // Check queue created
-            assertFalse(activeMQ.getQueueNames().isEmpty());
-            assertEquals(activeMQ.getQueueNames().size(), 1);
-            assertTrue(activeMQ.getQueueNames().contains(queueName));
-            assertEquals(activeMQ.getChildren().size(), 1);
-            assertFalse(activeMQ.getQueues().isEmpty());
-            assertEquals(activeMQ.getQueues().size(), 1);
-
-            // Get the named queue entity
-            ActiveMQQueue queue = activeMQ.getQueues().get(queueName);
-            assertNotNull(queue);
-            assertEquals(queue.getName(), queueName);
-
-            // Connect to broker using JMS and send messages
-            Connection connection = getActiveMQConnection(activeMQ);
-            clearQueue(connection, queueName);
-            EntityTestUtils.assertAttributeEqualsEventually(queue, ActiveMQQueue.QUEUE_DEPTH_MESSAGES, 0);
-            sendMessages(connection, number, queueName, content);
-            // Check messages arrived
-            EntityTestUtils.assertAttributeEqualsEventually(queue, ActiveMQQueue.QUEUE_DEPTH_MESSAGES, number);
-
-            // Clear the messages
-            assertEquals(clearQueue(connection, queueName), number);
-
-            // Check messages cleared
-            EntityTestUtils.assertAttributeEqualsEventually(queue, ActiveMQQueue.QUEUE_DEPTH_MESSAGES, 0);
-
-            connection.close();
-
-            // Close the JMS connection
-        } finally {
-            // Stop broker
-            activeMQ.stop();
-        }
-        
-        return jmxUrl;
-    }
-
-    private Connection getActiveMQConnection(ActiveMQBroker activeMQ) throws Exception {
-        int port = activeMQ.getAttribute(ActiveMQBroker.OPEN_WIRE_PORT);
-        String address = activeMQ.getAttribute(ActiveMQBroker.ADDRESS);
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://"+address+":"+port);
-        Connection connection = factory.createConnection("admin", "activemq");
-        connection.start();
-        return connection;
-    }
-
-    private void sendMessages(Connection connection, int count, String queueName, String content) throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue destination = session.createQueue(queueName);
-        MessageProducer messageProducer = session.createProducer(destination);
-
-        for (int i = 0; i < count; i++) {
-            TextMessage message = session.createTextMessage(content);
-            messageProducer.send(message);
-        }
-
-        session.close();
-    }
-
-    private int clearQueue(Connection connection, String queueName) throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue destination = session.createQueue(queueName);
-        MessageConsumer messageConsumer = session.createConsumer(destination);
-
-        int received = 0;
-        while (messageConsumer.receive(500) != null) received++;
-
-        session.close();
-        
-        return received;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/kafka/KafkaIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/kafka/KafkaIntegrationTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/kafka/KafkaIntegrationTest.java
deleted file mode 100644
index 744b2d5..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/kafka/KafkaIntegrationTest.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-
-import java.util.concurrent.Callable;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.location.LocationSpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.time.Duration;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.messaging.activemq.ActiveMQBroker;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Test the operation of the {@link ActiveMQBroker} class.
- *
- * TODO test that sensors update.
- */
-public class KafkaIntegrationTest {
-
-    private TestApplication app;
-    private Location testLocation;
-
-    @BeforeMethod(alwaysRun = true)
-    public void setup() {
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-        LocationSpec<LocalhostMachineProvisioningLocation> locationSpec = LocationSpec.create(LocalhostMachineProvisioningLocation.class);
-        testLocation = app.getManagementContext().getLocationManager().createLocation(locationSpec);
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void shutdown() {
-        if (app != null) Entities.destroyAll(app.getManagementContext());
-    }
-
-    /**
-     * Test that we can start a zookeeper.
-     */
-    @Test(groups = "Integration")
-    public void testZookeeper() {
-        final KafkaZooKeeper zookeeper = app.createAndManageChild(EntitySpec.create(KafkaZooKeeper.class));
-
-        zookeeper.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(ImmutableMap.of("timeout", 60*1000), zookeeper, Startable.SERVICE_UP, true);
-
-        zookeeper.stop();
-        assertFalse(zookeeper.getAttribute(Startable.SERVICE_UP));
-    }
-
-    /**
-     * Test that we can start a  broker and zookeeper together.
-     */
-    @Test(groups = "Integration")
-    public void testBrokerPlusZookeeper() {
-        final KafkaZooKeeper zookeeper = app.createAndManageChild(EntitySpec.create(KafkaZooKeeper.class));
-        final KafkaBroker broker = app.createAndManageChild(EntitySpec.create(KafkaBroker.class).configure(KafkaBroker.ZOOKEEPER, zookeeper));
-
-        zookeeper.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(ImmutableMap.of("timeout", 60*1000), zookeeper, Startable.SERVICE_UP, true);
-
-        broker.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(ImmutableMap.of("timeout", 60*1000), broker, Startable.SERVICE_UP, true);
-
-        zookeeper.stop();
-        assertFalse(zookeeper.getAttribute(Startable.SERVICE_UP));
-
-        broker.stop();
-        assertFalse(broker.getAttribute(Startable.SERVICE_UP));
-    }
-
-    /**
-     * Test that we can start a cluster with zookeeper and one broker.
-     *
-     * Connects to the zookeeper controller and tests sending and receiving messages on a topic.
-     */
-    @Test(groups = "Integration")
-    public void testTwoBrokerCluster() throws InterruptedException {
-        final KafkaCluster cluster = app.createAndManageChild(EntitySpec.create(KafkaCluster.class)
-                .configure(KafkaCluster.INITIAL_SIZE, 2));
-
-        cluster.start(ImmutableList.of(testLocation));
-        Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TWO_MINUTES), new Callable<Void>() {
-            @Override
-            public Void call() {
-                assertTrue(cluster.getAttribute(Startable.SERVICE_UP));
-                assertTrue(cluster.getZooKeeper().getAttribute(Startable.SERVICE_UP));
-                assertEquals(cluster.getCurrentSize().intValue(), 2);
-                return null;
-            }
-        });
-
-        Entities.dumpInfo(cluster);
-
-        final KafkaSupport support = new KafkaSupport(cluster);
-
-        support.sendMessage("brooklyn", "TEST_MESSAGE");
-
-        Asserts.succeedsEventually(MutableMap.of("timeout", Duration.FIVE_SECONDS), new Runnable() {
-            @Override
-            public void run() {
-                String message = support.getMessage("brooklyn");
-                assertEquals(message, "TEST_MESSAGE");
-            }
-        });
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/kafka/KafkaLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/kafka/KafkaLiveTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/kafka/KafkaLiveTest.java
deleted file mode 100644
index 096bdeb..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/kafka/KafkaLiveTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.concurrent.Callable;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.util.collections.MutableMap;
-
-import com.google.common.collect.ImmutableList;
-
-public class KafkaLiveTest extends AbstractEc2LiveTest {
-
-    /**
-     * Test that can install, start and use a Kafka cluster with two brokers.
-     */
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        final KafkaCluster cluster = app.createAndManageChild(EntitySpec.create(KafkaCluster.class)
-                .configure("startTimeout", 300) // 5 minutes
-                .configure("initialSize", 2));
-        app.start(ImmutableList.of(loc));
-
-        Asserts.succeedsEventually(MutableMap.of("timeout", 300000l), new Callable<Void>() {
-            @Override
-            public Void call() {
-                assertTrue(cluster.getAttribute(Startable.SERVICE_UP));
-                assertTrue(cluster.getZooKeeper().getAttribute(Startable.SERVICE_UP));
-                assertEquals(cluster.getCurrentSize().intValue(), 2);
-                return null;
-            }
-        });
-
-        Entities.dumpInfo(cluster);
-
-        KafkaSupport support = new KafkaSupport(cluster);
-
-        support.sendMessage("brooklyn", "TEST_MESSAGE");
-        String message = support.getMessage("brooklyn");
-        assertEquals(message, "TEST_MESSAGE");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/kafka/KafkaSupport.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/kafka/KafkaSupport.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/kafka/KafkaSupport.java
deleted file mode 100644
index f385e10..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/kafka/KafkaSupport.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperNode;
-
-import com.google.common.base.Optional;
-import com.google.common.base.Predicates;
-import com.google.common.collect.Iterables;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.core.entity.EntityPredicates;
-import org.apache.kafka.clients.consumer.KafkaConsumer;
-import org.apache.kafka.clients.producer.KafkaProducer;
-import org.apache.kafka.clients.producer.Producer;
-import org.apache.kafka.clients.producer.ProducerRecord;
-
-import java.security.InvalidParameterException;
-import java.util.Properties;
-
-import static java.lang.String.format;
-
-/**
- * Kafka test framework for integration and live tests, using the Kafka Java API.
- */
-public class KafkaSupport {
-
-    private final KafkaCluster cluster;
-
-    public KafkaSupport(KafkaCluster cluster) {
-        this.cluster = cluster;
-    }
-
-    /**
-     * Send a message to the {@link KafkaCluster} on the given topic.
-     */
-    public void sendMessage(String topic, String message) {
-        Optional<Entity> anyBrokerNodeInCluster = Iterables.tryFind(cluster.getCluster().getChildren(), Predicates.and(
-                Predicates.instanceOf(KafkaBroker.class),
-                EntityPredicates.attributeEqualTo(KafkaBroker.SERVICE_UP, true)));
-        if (anyBrokerNodeInCluster.isPresent()) {
-            KafkaBroker broker = (KafkaBroker)anyBrokerNodeInCluster.get();
-
-            Properties props = new Properties();
-
-            props.put("metadata.broker.list", format("%s:%d", broker.getAttribute(KafkaBroker.HOSTNAME), broker.getKafkaPort()));
-            props.put("bootstrap.servers", format("%s:%d", broker.getAttribute(KafkaBroker.HOSTNAME), broker.getKafkaPort()));
-            props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
-            props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
-
-            Producer<String, String> producer = new KafkaProducer<>(props);
-            ((KafkaZooKeeper)cluster.getZooKeeper()).createTopic(topic);
-
-            ProducerRecord<String, String> data = new ProducerRecord<>(topic, message);
-            producer.send(data);
-            producer.close();
-        } else {
-            throw new InvalidParameterException("No kafka broker node found");
-        }
-    }
-
-    /**
-     * Retrieve the next message on the given topic from the {@link KafkaCluster}.
-     */
-    public String getMessage(String topic) {
-        ZooKeeperNode zookeeper = cluster.getZooKeeper();
-        Optional<Entity> anyBrokerNodeInCluster = Iterables.tryFind(cluster.getCluster().getChildren(), Predicates.and(
-                Predicates.instanceOf(KafkaBroker.class),
-                EntityPredicates.attributeEqualTo(KafkaBroker.SERVICE_UP, true)));
-        if (anyBrokerNodeInCluster.isPresent()) {
-            KafkaBroker broker = (KafkaBroker)anyBrokerNodeInCluster.get();
-
-            Properties props = new Properties();
-
-            props.put("bootstrap.servers", format("%s:%d", broker.getAttribute(KafkaBroker.HOSTNAME), broker.getKafkaPort()));
-            props.put("zookeeper.connect", format(zookeeper.getHostname(), zookeeper.getZookeeperPort()));
-            props.put("group.id", "brooklyn");
-            props.put("partition.assignment.strategy", "RoundRobin");
-            props.put("value.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
-            props.put("key.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
-
-            KafkaConsumer consumer = new KafkaConsumer(props);
-
-            consumer.subscribe(topic);
-            // FIXME unimplemented KafkaConsumer.poll
-//            Object consumerRecords = consumer.poll(Duration.seconds(3).toMilliseconds()).get(topic);
-            return "TEST_MESSAGE";
-        } else {
-            throw new InvalidParameterException("No kafka broker node found");
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/qpid/QpidEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/qpid/QpidEc2LiveTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/qpid/QpidEc2LiveTest.java
deleted file mode 100644
index 6d793c8..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/qpid/QpidEc2LiveTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.qpid;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-public class QpidEc2LiveTest extends AbstractEc2LiveTest {
-
-    // TODO Also check can connect (e.g. to send/receive messages)
-    
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        QpidBroker qpid = app.createAndManageChild(EntitySpec.create(QpidBroker.class)
-                .configure("jmxPort", "9909+")
-                .configure("rmiRegistryPort", "9910+"));
-        
-        qpid.start(ImmutableList.of(loc));
-        EntityTestUtils.assertAttributeEqualsEventually(qpid, QpidBroker.SERVICE_UP, true);
-    }
-    
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this really does have test methods  
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/qpid/QpidIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/qpid/QpidIntegrationTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/qpid/QpidIntegrationTest.java
deleted file mode 100644
index 977b934..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/qpid/QpidIntegrationTest.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.qpid;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Map;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.test.HttpTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.qpid.client.AMQConnectionFactory;
-import org.apache.qpid.configuration.ClientProperties;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * Test the operation of the {@link QpidBroker} class.
- */
-public class QpidIntegrationTest {
-    private static final Logger log = LoggerFactory.getLogger(QpidIntegrationTest.class);
-
-    private TestApplication app;
-    private Location testLocation;
-    private QpidBroker qpid;
-
-    @BeforeMethod(groups = "Integration")
-    public void setup() {
-        String workingDir = System.getProperty("user.dir");
-        log.info("Qpid working dir: {}", workingDir);
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-        testLocation = app.newLocalhostProvisioningLocation();
-    }
-
-    @AfterMethod(alwaysRun=true)
-    public void shutdown() {
-        if (app != null) Entities.destroyAll(app.getManagementContext());
-    }
-
-    /**
-     * Test that the broker starts up with JMX and RMI ports configured, and sets SERVICE_UP correctly.
-     */
-    @Test(groups = "Integration")
-    public void canStartupAndShutdown() {
-        qpid = app.createAndManageChild(EntitySpec.create(QpidBroker.class)
-                .configure("jmxPort", "9909+")
-                .configure("rmiRegistryPort", "9910+"));
-        qpid.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(qpid, Startable.SERVICE_UP, true);
-        qpid.stop();
-        assertFalse(qpid.getAttribute(Startable.SERVICE_UP));
-    }
-
-    /**
-     * Test that the broker starts up with HTTP management enabled, and we can connect to the URL.
-     */
-    @Test(groups = "Integration")
-    public void canStartupAndShutdownWithHttpManagement() {
-        qpid = app.createAndManageChild(EntitySpec.create(QpidBroker.class)
-                .configure("httpManagementPort", "8888+"));
-        qpid.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(qpid, Startable.SERVICE_UP, true);
-        String httpUrl = "http://"+qpid.getAttribute(QpidBroker.HOSTNAME)+":"+qpid.getAttribute(QpidBroker.HTTP_MANAGEMENT_PORT)+"/management";
-        HttpTestUtils.assertHttpStatusCodeEventuallyEquals(httpUrl, 200);
-        // TODO check actual REST output
-        qpid.stop();
-        assertFalse(qpid.getAttribute(Startable.SERVICE_UP));
-    }
-
-    /**
-     * Test that the broker starts up and sets SERVICE_UP correctly when plugins are configured.
-     * 
-     * FIXME the custom plugin was written against qpid 0.14, so that's the version we need to run
-     * this test against. However, v0.14 is no longer available from the download site.
-     * We should update this plugin so it works with the latest qpid.
-     */
-    @Test(enabled = false, groups = "Integration")
-    public void canStartupAndShutdownWithPlugin() {
-        Map<String,String> qpidRuntimeFiles = MutableMap.<String,String>builder()
-                .put("classpath://qpid-test-config.xml", "etc/config.xml")
-                .put("http://developers.cloudsoftcorp.com/brooklyn/repository-test/0.7.0/QpidBroker/qpid-test-plugin.jar", "lib/plugins/sample-plugin.jar")
-                .build();
-        qpid = app.createAndManageChild(EntitySpec.create(QpidBroker.class)
-                .configure(SoftwareProcess.RUNTIME_FILES, qpidRuntimeFiles)
-                .configure(QpidBroker.SUGGESTED_VERSION, "0.14"));
-        qpid.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(qpid, Startable.SERVICE_UP, true);
-        qpid.stop();
-        assertFalse(qpid.getAttribute(Startable.SERVICE_UP));
-    }
-
-    /**
-     * Test that setting the 'queue' property causes a named queue to be created.
-     *
-     * This test is disabled, pending further investigation. Issue with AMQP 0-10 queue names.
-     * 
-     * FIXME disabled becausing failing in jenkins CI (in QpidIntegrationTest.getQpidConnection()).
-     *     url=amqp://admin:********@brooklyn/localhost?brokerlist='tcp://localhost:5672'
-     * Was previously enabled, dispite comment above about "test is disabled".	
-     */
-    @Test(enabled = false, groups = { "Integration", "WIP" })
-    public void testCreatingQueues() {
-        final String queueName = "testQueue";
-        final int number = 20;
-        final String content = "01234567890123456789012345678901";
-
-        // Start broker with a configured queue
-        // FIXME Can't use app.createAndManageChild, because of QpidDestination reffing impl directly
-        qpid = app.createAndManageChild(EntitySpec.create(QpidBroker.class)
-                .configure("queue", queueName));
-        qpid.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(qpid, Startable.SERVICE_UP, true);
-
-        try {
-            // Check queue created
-            assertFalse(qpid.getQueueNames().isEmpty());
-            assertEquals(qpid.getQueueNames().size(), 1);
-            assertTrue(qpid.getQueueNames().contains(queueName));
-            assertEquals(qpid.getChildren().size(), 1);
-            assertFalse(qpid.getQueues().isEmpty());
-            assertEquals(qpid.getQueues().size(), 1);
-
-            // Get the named queue entity
-            final QpidQueue queue = qpid.getQueues().get(queueName);
-            assertNotNull(queue);
-
-            // Connect to broker using JMS and send messages
-            Connection connection = getQpidConnection(qpid);
-            clearQueue(connection, queue.getQueueName());
-            Asserts.succeedsEventually(new Runnable() {
-                @Override
-                public void run() {
-                    assertEquals(queue.getAttribute(QpidQueue.QUEUE_DEPTH_MESSAGES), Integer.valueOf(0));
-                }
-            });
-            sendMessages(connection, number, queue.getQueueName(), content);
-
-            // Check messages arrived
-            Asserts.succeedsEventually(new Runnable() {
-                @Override
-                public void run() {
-                    assertEquals(queue.getAttribute(QpidQueue.QUEUE_DEPTH_MESSAGES), Integer.valueOf(number));
-                    assertEquals(queue.getAttribute(QpidQueue.QUEUE_DEPTH_BYTES), Integer.valueOf(number * content.length()));
-                }
-            });
-
-            //TODO clearing the queue currently returns 0
-//            // Clear the messages -- should get 20
-//            assertEquals clearQueue(connection, queue.queueName), 20
-//
-//            // Check messages cleared
-//            executeUntilSucceeds {
-//                assertEquals queue.getAttribute(QpidQueue.QUEUE_DEPTH_MESSAGES), 0
-//                assertEquals queue.getAttribute(QpidQueue.QUEUE_DEPTH_BYTES), 0
-//            }
-
-            // Close the JMS connection
-            connection.close();
-        } catch (JMSException jmse) {
-            log.warn("JMS exception caught", jmse);
-            throw Exceptions.propagate(jmse);
-        } finally {
-            // Stop broker
-            qpid.stop();
-            qpid = null;
-            app = null;
-        }
-    }
-
-    private Connection getQpidConnection(QpidBroker qpid) {
-        int port = qpid.getAttribute(Attributes.AMQP_PORT);
-        System.setProperty(ClientProperties.AMQP_VERSION, "0-10");
-        System.setProperty(ClientProperties.DEST_SYNTAX, "ADDR");
-        String connectionUrl = String.format("amqp://admin:admin@brooklyn/localhost?brokerlist='tcp://localhost:%d'", port);
-        try {
-            AMQConnectionFactory factory = new AMQConnectionFactory(connectionUrl);
-            Connection connection = factory.createConnection();
-            connection.start();
-            return connection;
-        } catch (Exception e) {
-            log.error(String.format("Error connecting to qpid: %s", connectionUrl), e);
-            throw Exceptions.propagate(e);
-        }
-    }
-
-    private void sendMessages(Connection connection, int count, String queueName, String content) throws JMSException {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue destination = session.createQueue(queueName);
-        MessageProducer messageProducer = session.createProducer(destination);
-
-        for (int i = 0; i < count; i++) {
-            TextMessage message = session.createTextMessage(content);
-            messageProducer.send(message);
-        }
-
-        session.close();
-    }
-
-    private int clearQueue(Connection connection, String queueName) throws JMSException {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue destination = session.createQueue(queueName);
-        MessageConsumer messageConsumer = session.createConsumer(destination);
-
-        int received = 0;
-        while (messageConsumer.receive(500) != null) received++;
-
-        session.close();
-
-        return received;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitEc2LiveTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitEc2LiveTest.java
deleted file mode 100644
index d6959b8..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitEc2LiveTest.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.rabbit;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityAsserts;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.entity.messaging.MessageBroker;
-import org.apache.brooklyn.entity.messaging.amqp.AmqpExchange;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.SkipException;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Charsets;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Maps;
-import com.rabbitmq.client.Channel;
-import com.rabbitmq.client.Connection;
-import com.rabbitmq.client.ConnectionFactory;
-import com.rabbitmq.client.QueueingConsumer;
-
-public class RabbitEc2LiveTest extends AbstractEc2LiveTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(RabbitEc2LiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        RabbitBroker rabbit = app.createAndManageChild(EntitySpec.create(RabbitBroker.class));
-        rabbit.start(ImmutableList.of(loc));
-        EntityTestUtils.assertAttributeEqualsEventually(rabbit, RabbitBroker.SERVICE_UP, true);
-
-        byte[] content = "MessageBody".getBytes(Charsets.UTF_8);
-        String queue = "queueName";
-        Channel producer = null;
-        Channel consumer = null;
-        try {
-            producer = getAmqpChannel(rabbit);
-            consumer = getAmqpChannel(rabbit);
-
-            producer.queueDeclare(queue, true, false, false, Maps.<String,Object>newHashMap());
-            producer.queueBind(queue, AmqpExchange.DIRECT, queue);
-            producer.basicPublish(AmqpExchange.DIRECT, queue, null, content);
-            
-            QueueingConsumer queueConsumer = new QueueingConsumer(consumer);
-            consumer.basicConsume(queue, true, queueConsumer);
-        
-            QueueingConsumer.Delivery delivery = queueConsumer.nextDelivery();
-            assertEquals(delivery.getBody(), content);
-        } finally {
-            if (producer != null) producer.close();
-            if (consumer != null) consumer.close();
-        }
-    }
-
-    private Channel getAmqpChannel(RabbitBroker rabbit) throws Exception {
-        String uri = rabbit.getAttribute(MessageBroker.BROKER_URL);
-        LOG.warn("connecting to rabbit {}", uri);
-        ConnectionFactory factory = new ConnectionFactory();
-        factory.setUri(uri);
-        Connection conn = factory.newConnection();
-        Channel channel = conn.createChannel();
-        return channel;
-    }
-
-    @Override
-    public void test_CentOS_5() throws SkipException {
-        // Not supported. The EPEL repository described here at [1] does not contain erlang, and the
-        // Erlang repository at [1] requires old versions of rpmlib. Additionally, [2] suggests that
-        // Centos 5 is not supported
-        // [1]:http://www.rabbitmq.com/install-rpm.html
-        // [2]: https://www.erlang-solutions.com/downloads/download-erlang-otp
-        throw new SkipException("Centos 5 is not supported");
-    }
-
-    @Test(groups = {"Live"})
-    public void testWithOnlyPort22() throws Exception {
-        // CentOS-6.3-x86_64-GA-EBS-02-85586466-5b6c-4495-b580-14f72b4bcf51-ami-bb9af1d2.1
-        jcloudsLocation = mgmt.getLocationRegistry().resolve(LOCATION_SPEC, ImmutableMap.of(
-                "tags", ImmutableList.of(getClass().getName()),
-                "imageId", "us-east-1/ami-a96b01c0", 
-                "hardwareId", SMALL_HARDWARE_ID));
-
-        final RabbitBroker server = app.createAndManageChild(EntitySpec.create(RabbitBroker.class)
-                .configure(RabbitBroker.PROVISIONING_PROPERTIES.subKey(CloudLocationConfig.INBOUND_PORTS.getName()), ImmutableList.of(22)));
-        
-        app.start(ImmutableList.of(jcloudsLocation));
-        
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_UP, true);
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-        
-        Integer port = server.getAttribute(RabbitBroker.AMQP_PORT);
-        assertNotNull(port);
-        
-        assertViaSshLocalPortListeningEventually(server, port);
-    }
-    
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this really does have test methods  
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitIntegrationTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitIntegrationTest.java
deleted file mode 100644
index fc59dec..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitIntegrationTest.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.rabbit;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-
-import java.io.IOException;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.messaging.MessageBroker;
-import org.apache.brooklyn.entity.messaging.amqp.AmqpExchange;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.base.Charsets;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.rabbitmq.client.Channel;
-import com.rabbitmq.client.Connection;
-import com.rabbitmq.client.ConnectionFactory;
-import com.rabbitmq.client.QueueingConsumer;
-
-/**
- * Test the operation of the {@link RabbitBroker} class.
- * 
- * TODO If you're having problems running this test successfully, here are a few tips:
- * 
- *  - Is `erl` on your path for a non-interactive ssh session?
- *    Look in rabbit's $RUN_DIR/console-err.log (e.g. /tmp/brooklyn-aled/apps/someappid/entities/RabbitBroker_2.8.7_JROYTcSL/console-err.log)
- *    I worked around that by adding to my ~/.brooklyn/brooklyn.properties:
- *      brooklyn.ssh.config.scriptHeader=#!/bin/bash -e\nif [ -f ~/.bashrc ] ; then . ~/.bashrc ; fi\nif [ -f ~/.profile ] ; then . ~/.profile ; fi\necho $PATH > /tmp/mypath.txt
- *    
- *  - Is the hostname resolving properly?
- *    Look in $RUN_DIR/console-out.log; is there a message like:
- *      ERROR: epmd error for host "Aleds-MacBook-Pro": timeout (timed out establishing tcp connection)
- *    I got around that with disabling my wifi and running when not connected to the internet.
- */
-public class RabbitIntegrationTest {
-    private static final Logger log = LoggerFactory.getLogger(RabbitIntegrationTest.class);
-
-    private TestApplication app;
-    private Location testLocation;
-    private RabbitBroker rabbit;
-
-    @BeforeMethod(groups = "Integration")
-    public void setup() {
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-        testLocation = new LocalhostMachineProvisioningLocation();
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void shutdown() {
-        if (app != null) Entities.destroyAll(app.getManagementContext());
-    }
-
-    /**
-     * Test that the broker starts up and sets SERVICE_UP correctly.
-     */
-    @Test(groups = {"Integration", "WIP"})
-    public void canStartupAndShutdown() throws Exception {
-        rabbit = app.createAndManageChild(EntitySpec.create(RabbitBroker.class));
-        rabbit.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(rabbit, Startable.SERVICE_UP, true);
-        rabbit.stop();
-        assertFalse(rabbit.getAttribute(Startable.SERVICE_UP));
-    }
-
-    /**
-     * Test that an AMQP client can connect to and use the broker.
-     */
-    @Test(groups = {"Integration", "WIP"})
-    public void testClientConnection() throws Exception {
-        rabbit = app.createAndManageChild(EntitySpec.create(RabbitBroker.class));
-        rabbit.start(ImmutableList.of(testLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(rabbit, Startable.SERVICE_UP, true);
-
-        byte[] content = "MessageBody".getBytes(Charsets.UTF_8);
-        String queue = "queueName";
-        Channel producer = null;
-        Channel consumer = null;
-        try {
-            producer = getAmqpChannel(rabbit);
-            consumer = getAmqpChannel(rabbit);
-
-            producer.queueDeclare(queue, true, false, false, ImmutableMap.<String,Object>of());
-            producer.queueBind(queue, AmqpExchange.DIRECT, queue);
-            producer.basicPublish(AmqpExchange.DIRECT, queue, null, content);
-            
-            QueueingConsumer queueConsumer = new QueueingConsumer(consumer);
-            consumer.basicConsume(queue, true, queueConsumer);
-        
-            QueueingConsumer.Delivery delivery = queueConsumer.nextDelivery(60 * 1000l); // one minute timeout
-            assertEquals(delivery.getBody(), content);
-        } finally {
-            closeSafely(producer, 10*1000);
-            closeSafely(consumer, 10*1000);
-        }
-    }
-
-    /**
-     * Closes the channel, guaranteeing the call won't hang this thread forever!
-     * 
-     * Saw this during jenkins testing:
-     * "main" prio=10 tid=0x00007f69c8008000 nid=0x5d70 in Object.wait() [0x00007f69d1318000]
-     *         java.lang.Thread.State: WAITING (on object monitor)
-     *         at java.lang.Object.wait(Native Method)
-     *         - waiting on <0x00000000e0947cf8> (a com.rabbitmq.utility.BlockingValueOrException)
-     *         at java.lang.Object.wait(Object.java:502)
-     *         at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:50)
-     *         - locked <0x00000000e0947cf8> (a com.rabbitmq.utility.BlockingValueOrException)
-     *         at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:65)
-     *         - locked <0x00000000e0947cf8> (a com.rabbitmq.utility.BlockingValueOrException)
-     *         at com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:111)
-     *         - locked <0x00000000e0947cf8> (a com.rabbitmq.utility.BlockingValueOrException)
-     *         at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:37)
-     *         at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:349)
-     *         at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:543)
-     *         at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:480)
-     *         at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:473)
-     *         at com.rabbitmq.client.Channel$close.call(Unknown Source)
-     *         at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
-     *         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
-     *         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
-     *         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(AbstractCallSite.java:75)
-     *         at org.apache.brooklyn.entity.messaging.rabbit.RabbitIntegrationTest.testClientConnection(RabbitIntegrationTest.groovy:107)
-     */
-    private void closeSafely(final Channel channel, int timeoutMs) throws InterruptedException {
-        if (channel == null) return;
-        Thread t = new Thread(new Runnable() {
-                @Override public void run() {
-                    try {
-                        channel.close();
-                    } catch (IOException e) {
-                        log.error("Error closing RabbitMQ Channel; continuing", e);
-                    }
-                }});
-        try {
-            t.start();
-            t.join(timeoutMs);
-            
-            if (t.isAlive()) {
-                log.error("Timeout when closing RabbitMQ Channel "+channel+"; aborting close and continuing");
-            }
-        } finally {
-            t.interrupt();
-            t.join(1*1000);
-            if (t.isAlive()) t.stop();
-        }
-    }
-    
-    private Channel getAmqpChannel(RabbitBroker rabbit) throws Exception {
-        String uri = rabbit.getAttribute(MessageBroker.BROKER_URL);
-        log.warn("connecting to rabbit {}", uri);
-        ConnectionFactory factory = new ConnectionFactory();
-        factory.setUri(uri);
-        Connection conn = factory.newConnection();
-        Channel channel = conn.createChannel();
-        return channel;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/LocalhostLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/LocalhostLiveTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/LocalhostLiveTest.java
deleted file mode 100644
index 89afe00..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/LocalhostLiveTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.storm;
-
-import org.testng.annotations.Test;
-
-@Test(groups="Live")
-public class LocalhostLiveTest extends StormAbstractCloudLiveTest {
-
-    private static final String NAMED_LOCATION = "localhost";
-
-    public String getLocation() {
-        return NAMED_LOCATION;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/SoftLayerLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/SoftLayerLiveTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/SoftLayerLiveTest.java
deleted file mode 100644
index 17cb7d2..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/SoftLayerLiveTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.storm;
-
-import org.testng.annotations.Test;
-
-@Test(groups="Live")
-public class SoftLayerLiveTest extends StormAbstractCloudLiveTest {
-
-    private static final String NAMED_LOCATION = "softlayer";
-
-    @Override
-    public String getLocation() {
-        return NAMED_LOCATION;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/StormAbstractCloudLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/StormAbstractCloudLiveTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/StormAbstractCloudLiveTest.java
deleted file mode 100644
index 5633f74..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/StormAbstractCloudLiveTest.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.storm;
-
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.attributeWhenReady;
-import static org.apache.brooklyn.entity.messaging.storm.Storm.NIMBUS_HOSTNAME;
-import static org.apache.brooklyn.entity.messaging.storm.Storm.ZOOKEEPER_ENSEMBLE;
-import static org.apache.brooklyn.entity.messaging.storm.Storm.Role.NIMBUS;
-import static org.apache.brooklyn.entity.messaging.storm.Storm.Role.SUPERVISOR;
-import static org.apache.brooklyn.entity.messaging.storm.Storm.Role.UI;
-
-import java.io.File;
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.ResourceUtils;
-import org.apache.brooklyn.util.core.file.ArchiveBuilder;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import backtype.storm.Config;
-import backtype.storm.StormSubmitter;
-import backtype.storm.generated.AlreadyAliveException;
-import backtype.storm.generated.InvalidTopologyException;
-import backtype.storm.generated.StormTopology;
-import backtype.storm.testing.TestWordSpout;
-import backtype.storm.topology.TopologyBuilder;
-
-import org.apache.brooklyn.entity.messaging.storm.topologies.ExclamationBolt;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperEnsemble;
-
-import com.google.common.base.Throwables;
-import com.google.common.collect.ImmutableList;
-
-public abstract class StormAbstractCloudLiveTest extends BrooklynAppLiveTestSupport {
-
-    protected static final Logger log = LoggerFactory
-            .getLogger(StormAbstractCloudLiveTest.class);
-    private Location location;
-    private ZooKeeperEnsemble zooKeeperEnsemble;
-    private Storm nimbus;
-    private Storm supervisor;
-    private Storm ui;
-
-    @BeforeClass(alwaysRun = true)
-    public void beforeClass() throws Exception {
-        mgmt = new LocalManagementContext();
-        location = mgmt.getLocationRegistry()
-                .resolve(getLocation(), getFlags());
-        super.setUp();
-    }
-
-    @AfterClass(alwaysRun = true)
-    public void afterClass() throws Exception {
-        // Entities.destroyAll(mgmt);
-    }
-
-    public abstract String getLocation();
-
-    public Map<String, ?> getFlags() {
-        return MutableMap.of();
-    }
-
-    @Test(groups = {"Live","WIP"})  // needs repair to avoid hard dependency on Andrea's environment
-    public void deployStorm() throws Exception {
-        try {
-            zooKeeperEnsemble = app.createAndManageChild(EntitySpec.create(
-                    ZooKeeperEnsemble.class).configure(
-                    ZooKeeperEnsemble.INITIAL_SIZE, 3));
-            nimbus = app.createAndManageChild(EntitySpec
-                    .create(Storm.class)
-                    .configure(Storm.ROLE, NIMBUS)
-                    .configure(NIMBUS_HOSTNAME, "localhost")
-                    .configure(ZOOKEEPER_ENSEMBLE, zooKeeperEnsemble)
-                    );
-            supervisor = app.createAndManageChild(EntitySpec
-                    .create(Storm.class)
-                    .configure(Storm.ROLE, SUPERVISOR)
-                    .configure(ZOOKEEPER_ENSEMBLE, zooKeeperEnsemble)
-                    .configure(NIMBUS_HOSTNAME,
-                            attributeWhenReady(nimbus, Attributes.HOSTNAME)));
-            ui = app.createAndManageChild(EntitySpec
-                    .create(Storm.class)
-                    .configure(Storm.ROLE, UI)
-                    .configure(ZOOKEEPER_ENSEMBLE, zooKeeperEnsemble)
-                    .configure(NIMBUS_HOSTNAME,
-                            attributeWhenReady(nimbus, Attributes.HOSTNAME)));
-            log.info("Started Storm deployment on '" + getLocation() + "'");
-            app.start(ImmutableList.of(location));
-            Entities.dumpInfo(app);
-            EntityTestUtils.assertAttributeEqualsEventually(app, Startable.SERVICE_UP, true);
-            EntityTestUtils.assertAttributeEqualsEventually(zooKeeperEnsemble, Startable.SERVICE_UP, true);
-            EntityTestUtils.assertAttributeEqualsEventually(nimbus, Startable.SERVICE_UP, true);
-            EntityTestUtils.assertAttributeEqualsEventually(supervisor, Startable.SERVICE_UP, true);
-            EntityTestUtils.assertAttributeEqualsEventually(ui, Startable.SERVICE_UP, true);
-            
-            StormTopology stormTopology = createTopology();
-            submitTopology(stormTopology, "myExclamation", 3, true, 60000);
-        } catch (Exception e) {
-            log.error("Failed to deploy Storm", e);
-            Assert.fail();
-            throw e;
-        }
-    }
-
-    private StormTopology createTopology()
-            throws AlreadyAliveException, InvalidTopologyException {
-        TopologyBuilder builder = new TopologyBuilder();
-
-        builder.setSpout("word", new TestWordSpout(), 10);
-        builder.setBolt("exclaim1", new ExclamationBolt(), 3).shuffleGrouping("word");
-        builder.setBolt("exclaim2", new ExclamationBolt(), 2).shuffleGrouping("exclaim1");
-        
-        return builder.createTopology();
-    }
-
-    public boolean submitTopology(StormTopology stormTopology, String topologyName, int numOfWorkers, boolean debug, long timeoutMs) {
-        if (log.isDebugEnabled()) log.debug("Connecting to NimbusClient: {}", nimbus.getConfig(Storm.NIMBUS_HOSTNAME));
-        Config conf = new Config();
-        conf.setDebug(debug);
-        conf.setNumWorkers(numOfWorkers);
-
-        // TODO - confirm this creats the JAR correctly
-        String jar = createJar(
-            new File(Os.mergePaths(ResourceUtils.create(this).getClassLoaderDir(), "org/apache/brooklyn/entity/messaging/storm/topologies")),
-            "org/apache/brooklyn/entity/messaging/storm/");
-        System.setProperty("storm.jar", jar);
-        long startMs = System.currentTimeMillis();
-        long endMs = (timeoutMs == -1) ? Long.MAX_VALUE : (startMs + timeoutMs);
-        long currentTime = startMs;
-        Throwable lastError = null;
-        int attempt = 0;
-        while (currentTime <= endMs) {
-            currentTime = System.currentTimeMillis();
-            if (attempt != 0) Time.sleep(Duration.ONE_SECOND);
-            if (log.isTraceEnabled()) log.trace("trying connection to {} at time {}", nimbus.getConfig(Storm.NIMBUS_HOSTNAME), currentTime);
-
-            try {
-                StormSubmitter.submitTopology(topologyName, conf, stormTopology);
-                return true;
-            } catch (Exception e) {
-                if (shouldRetryOn(e)) {
-                    if (log.isDebugEnabled()) log.debug("Attempt {} failed connecting to {} ({})", new Object[] {attempt + 1, nimbus.getConfig(Storm.NIMBUS_HOSTNAME), e.getMessage()});
-                    lastError = e;
-                } else {
-                    throw Throwables.propagate(e);
-                }
-            }
-            attempt++;
-        }
-        log.warn("unable to connect to Nimbus client: ", lastError);
-        Assert.fail();
-        return false;
-    }
-    
-    private boolean shouldRetryOn(Exception e) {
-        if (e.getMessage().equals("org.apache.thrift7.transport.TTransportException: java.net.ConnectException: Connection refused"))  return true;
-        return false;
-    }
-    
-    private String createJar(File dir, String parentDirInJar) {
-        if (dir.isDirectory()) {
-            File jarFile = ArchiveBuilder.jar().addAt(dir, parentDirInJar).create(Os.newTempDir(getClass())+"/topologies.jar");
-            return jarFile.getAbsolutePath();
-        } else {
-            return dir.getAbsolutePath(); // An existing Jar archive?
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/StormEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/StormEc2LiveTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/StormEc2LiveTest.java
deleted file mode 100644
index bf54003..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/StormEc2LiveTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.storm;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperNode;
-
-import com.google.common.collect.ImmutableList;
-
-public class StormEc2LiveTest extends AbstractEc2LiveTest {
-
-    /**
-     * Test that can install, start and use a Storm cluster: 1 nimbus, 1 zookeeper, 1 supervisor (worker node).
-     */
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        ZooKeeperNode zookeeper = app.createAndManageChild(EntitySpec.create(ZooKeeperNode.class));
-        Storm nimbus = app.createAndManageChild(EntitySpec.create(Storm.class).configure("storm.role",
-                Storm.Role.NIMBUS));
-        Storm supervisor = app.createAndManageChild(EntitySpec.create(Storm.class).configure("storm.role",
-                Storm.Role.SUPERVISOR));
-        Storm ui = app.createAndManageChild(EntitySpec.create(Storm.class).configure("storm.role",
-                Storm.Role.UI));        
-        app.start(ImmutableList.of(loc));
-        Entities.dumpInfo(app);
-        
-        EntityTestUtils.assertAttributeEqualsEventually(zookeeper, Startable.SERVICE_UP, true);
-        EntityTestUtils.assertAttributeEqualsEventually(nimbus, Startable.SERVICE_UP, true);
-        EntityTestUtils.assertAttributeEqualsEventually(supervisor, Startable.SERVICE_UP, true);
-        EntityTestUtils.assertAttributeEqualsEventually(ui, Startable.SERVICE_UP, true);
-    }
-
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this really does have test methods
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/StormGceLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/StormGceLiveTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/StormGceLiveTest.java
deleted file mode 100644
index e1a9ad4..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/StormGceLiveTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.storm;
-
-import java.util.Map;
-
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.testng.annotations.Test;
-
-@Test(groups="Live")
-public class StormGceLiveTest extends StormAbstractCloudLiveTest {
-
-    private static final String NAMED_LOCATION = "gce-europe-west1";
-    private static final String LOCATION_ID = "gce-europe-west1-a";
-    private static final String URI = "https://www.googleapis.com/compute/v1beta15/projects/google/global/images/centos-6-v20130325";
-    private static final String IMAGE_ID = "centos-6-v20130325";
-
-    @Override
-    public String getLocation() {
-        return NAMED_LOCATION;
-    }
-
-    @Override
-    public Map<String, ?> getFlags() {
-        return MutableMap.of(
-                "locationId", LOCATION_ID,
-                "imageId", IMAGE_ID,
-                "uri", URI + IMAGE_ID,
-                "groupId", "storm-test",
-                "stopIptables", "true"
-        );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/topologies/ExclamationBolt.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/topologies/ExclamationBolt.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/topologies/ExclamationBolt.java
deleted file mode 100644
index a10a30e..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/storm/topologies/ExclamationBolt.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.storm.topologies;
-
-import java.util.Map;
-
-import backtype.storm.task.OutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.IRichBolt;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.topology.base.BaseRichBolt;
-import backtype.storm.tuple.Fields;
-import backtype.storm.tuple.Tuple;
-import backtype.storm.tuple.Values;
-
-public class ExclamationBolt extends BaseRichBolt {
-    OutputCollector _collector;
-
-    @Override
-    public void prepare(Map conf, TopologyContext context,
-            OutputCollector collector) {
-        _collector = collector;
-    }
-
-    @Override
-    public void execute(Tuple tuple) {
-        _collector.emit(tuple, new Values(tuple.getString(0) + "!!!"));
-        _collector.ack(tuple);
-    }
-
-    @Override
-    public void declareOutputFields(OutputFieldsDeclarer declarer) {
-        declarer.declare(new Fields("word"));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/zookeeper/ZooKeeperEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/zookeeper/ZooKeeperEc2LiveTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/zookeeper/ZooKeeperEc2LiveTest.java
deleted file mode 100644
index e8d49ee..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/zookeeper/ZooKeeperEc2LiveTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.zookeeper;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperNode;
-
-import com.google.common.collect.ImmutableList;
-
-public class ZooKeeperEc2LiveTest extends AbstractEc2LiveTest {
-
-    /**
-     * Test that can install, start and use a Zookeeper instance.
-     */
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        ZooKeeperNode zookeeper = app.createAndManageChild(EntitySpec.create(ZooKeeperNode.class).configure("jmxPort", "31001+"));
-        app.start(ImmutableList.of(loc));
-        Entities.dumpInfo(zookeeper);
-        EntityTestUtils.assertAttributeEqualsEventually(zookeeper, Startable.SERVICE_UP, true);
-    }
-    
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this really does have test methods
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/zookeeper/ZooKeeperEnsembleLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/zookeeper/ZooKeeperEnsembleLiveTest.java b/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/zookeeper/ZooKeeperEnsembleLiveTest.java
deleted file mode 100644
index f143df7..0000000
--- a/brooklyn-library/software/messaging/src/test/java/org/apache/brooklyn/entity/messaging/zookeeper/ZooKeeperEnsembleLiveTest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.zookeeper;
-
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperEnsemble;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperNode;
-
-import com.google.common.base.Throwables;
-import com.google.common.collect.ImmutableList;
-import com.google.common.util.concurrent.Uninterruptibles;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import java.net.Socket;
-import java.util.concurrent.TimeUnit;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-/**
- * A live test of the {@link org.apache.brooklyn.entity.zookeeper.ZooKeeperEnsemble} entity.
- *
- * Tests that a 3 node cluster can be started on Amazon EC2 and data written on one {@link org.apache.brooklyn.entity.zookeeper.ZooKeeperEnsemble}
- * can be read from another, using the Astyanax API.
- */
-public class ZooKeeperEnsembleLiveTest {
-
-    private static final Logger log = LoggerFactory.getLogger(ZooKeeperEnsembleLiveTest.class);
-    
-    private String provider = 
-            "gce-europe-west1";
-//            "aws-ec2:eu-west-1";
-//            "named:hpcloud-compute-at";
-//            "localhost";
-
-    protected TestApplication app;
-    protected Location testLocation;
-    protected ZooKeeperEnsemble cluster;
-
-    @BeforeMethod(alwaysRun = true)
-    public void setup() {
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-        testLocation = app.getManagementContext().getLocationRegistry().resolve(provider);
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void shutdown() {
-        Entities.destroyAll(app.getManagementContext());
-    }
-
-    /**
-     * Test that a two node cluster starts up and allows access through both nodes.
-     */
-    @Test(groups = "Live")
-    public void testStartUpConnectAndResize() throws Exception {
-        try {
-            cluster = app.createAndManageChild(EntitySpec.create(ZooKeeperEnsemble.class)
-                    .configure("initialSize", 3)
-                    .configure("clusterName", "ZooKeeperEnsembleLiveTest"));
-            assertEquals(cluster.getCurrentSize().intValue(), 0);
-
-            app.start(ImmutableList.of(testLocation));
-
-            EntityTestUtils.assertAttributeEqualsEventually(cluster, ZooKeeperEnsemble.GROUP_SIZE, 3);
-            Entities.dumpInfo(app);
-
-            EntityTestUtils.assertAttributeEqualsEventually(cluster, Startable.SERVICE_UP, true);
-            for(Entity zkNode : cluster.getMembers()) {
-                assertTrue(isSocketOpen((ZooKeeperNode) zkNode));
-            }
-            cluster.resize(1);
-            EntityTestUtils.assertAttributeEqualsEventually(cluster, ZooKeeperEnsemble.GROUP_SIZE, 1);
-            Entities.dumpInfo(app);
-            EntityTestUtils.assertAttributeEqualsEventually(cluster, Startable.SERVICE_UP, true);
-            for (Entity zkNode : cluster.getMembers()) {
-                assertTrue(isSocketOpen((ZooKeeperNode) zkNode));
-            }
-        } catch (Throwable e) {
-            throw Throwables.propagate(e);
-        }
-    }
-
-    protected static boolean isSocketOpen(ZooKeeperNode node) {
-        int attempt = 0, maxAttempts = 20;
-        while(attempt < maxAttempts) {
-            try {
-                Socket s = new Socket(node.getAttribute(Attributes.HOSTNAME), node.getZookeeperPort());
-                s.close();
-                return true;
-            } catch (Exception e) {
-                attempt++;
-            }
-            Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
-        }
-        return false;
-    }
-    
-}


[03/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/solr/example/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/solr/example/conf/solrconfig.xml b/brooklyn-library/software/nosql/src/test/resources/solr/example/conf/solrconfig.xml
deleted file mode 100644
index 1373790..0000000
--- a/brooklyn-library/software/nosql/src/test/resources/solr/example/conf/solrconfig.xml
+++ /dev/null
@@ -1,1791 +0,0 @@
-<?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.
--->
-<!-- 
-     For more details about configurations options that may appear in
-     this file, see http://wiki.apache.org/solr/SolrConfigXml. 
--->
-<config>
-  <!-- In all configuration below, a prefix of "solr." for class names
-       is an alias that causes solr to search appropriate packages,
-       including org.apache.solr.(search|update|request|core|analysis)
-
-       You may also specify a fully qualified Java classname if you
-       have your own custom plugins.
-    -->
-
-  <!-- Controls what version of Lucene various components of Solr
-       adhere to.  Generally, you want to use the latest version to
-       get all bug fixes and improvements. It is highly recommended
-       that you fully re-index after changing this setting as it can
-       affect both how text is indexed and queried.
-  -->
-  <luceneMatchVersion>4.6</luceneMatchVersion>
-
-  <!-- <lib/> directives can be used to instruct Solr to load an Jars
-       identified and use them to resolve any "plugins" specified in
-       your solrconfig.xml or schema.xml (ie: Analyzers, Request
-       Handlers, etc...).
-
-       All directories and paths are resolved relative to the
-       instanceDir.
-
-       Please note that <lib/> directives are processed in the order
-       that they appear in your solrconfig.xml file, and are "stacked" 
-       on top of each other when building a ClassLoader - so if you have 
-       plugin jars with dependencies on other jars, the "lower level" 
-       dependency jars should be loaded first.
-
-       If a "./lib" directory exists in your instanceDir, all files
-       found in it are included as if you had used the following
-       syntax...
-       
-              <lib dir="./lib" />
-    -->
-  <lib dir="../../lib" regex="solr-.*.jar" />
-  <lib dir="../../contrib" />
-
-  <!-- A 'dir' option by itself adds any files found in the directory 
-       to the classpath, this is useful for including all jars in a
-       directory.
-
-       When a 'regex' is specified in addition to a 'dir', only the
-       files in that directory which completely match the regex
-       (anchored on both ends) will be included.
-
-       If a 'dir' option (with or without a regex) is used and nothing
-       is found that matches, a warning will be logged.
-
-       The examples below can be used to load some solr-contribs along 
-       with their external dependencies.
-    -->
-
-  <!-- an exact 'path' can be used instead of a 'dir' to specify a 
-       specific jar file.  This will cause a serious error to be logged 
-       if it can't be loaded.
-    -->
-  <!--
-     <lib path="../a-jar-that-does-not-exist.jar" /> 
-  -->
-  
-  <!-- Data Directory
-
-       Used to specify an alternate directory to hold all index data
-       other than the default ./data under the Solr home.  If
-       replication is in use, this should match the replication
-       configuration.
-    -->
-  <dataDir>${solr.data.dir:}</dataDir>
-
-
-  <!-- The DirectoryFactory to use for indexes.
-       
-       solr.StandardDirectoryFactory is filesystem
-       based and tries to pick the best implementation for the current
-       JVM and platform.  solr.NRTCachingDirectoryFactory, the default,
-       wraps solr.StandardDirectoryFactory and caches small files in memory
-       for better NRT performance.
-
-       One can force a particular implementation via solr.MMapDirectoryFactory,
-       solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
-
-       solr.RAMDirectoryFactory is memory based, not
-       persistent, and doesn't work with replication.
-    -->
-  <directoryFactory name="DirectoryFactory" 
-                    class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/> 
-
-  <!-- The CodecFactory for defining the format of the inverted index.
-       The default implementation is SchemaCodecFactory, which is the official Lucene
-       index format, but hooks into the schema to provide per-field customization of
-       the postings lists and per-document values in the fieldType element
-       (postingsFormat/docValuesFormat). Note that most of the alternative implementations
-       are experimental, so if you choose to customize the index format, its a good
-       idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
-       before upgrading to a newer version to avoid unnecessary reindexing.
-  -->
-  <codecFactory class="solr.SchemaCodecFactory"/>
-
-  <!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>:
-  
-       <schemaFactory class="ManagedIndexSchemaFactory">
-         <bool name="mutable">true</bool>
-         <str name="managedSchemaResourceName">managed-schema</str>
-       </schemaFactory>
-       
-       When ManagedIndexSchemaFactory is specified, Solr will load the schema from
-       he resource named in 'managedSchemaResourceName', rather than from schema.xml.
-       Note that the managed schema resource CANNOT be named schema.xml.  If the managed
-       schema does not exist, Solr will create it after reading schema.xml, then rename
-       'schema.xml' to 'schema.xml.bak'. 
-       
-       Do NOT hand edit the managed schema - external modifications will be ignored and
-       overwritten as a result of schema modification REST API calls.
-
-       When ManagedIndexSchemaFactory is specified with mutable = true, schema
-       modification REST API calls will be allowed; otherwise, error responses will be
-       sent back for these requests. 
-  -->
-  <schemaFactory class="ClassicIndexSchemaFactory"/>
-
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-       Index Config - These settings control low-level behavior of indexing
-       Most example settings here show the default value, but are commented
-       out, to more easily see where customizations have been made.
-       
-       Note: This replaces <indexDefaults> and <mainIndex> from older versions
-       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <indexConfig>
-    <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a 
-         LimitTokenCountFilterFactory in your fieldType definition. E.g. 
-     <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
-    -->
-    <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
-    <!-- <writeLockTimeout>1000</writeLockTimeout>  -->
-
-    <!-- The maximum number of simultaneous threads that may be
-         indexing documents at once in IndexWriter; if more than this
-         many threads arrive they will wait for others to finish.
-         Default in Solr/Lucene is 8. -->
-    <!-- <maxIndexingThreads>8</maxIndexingThreads>  -->
-
-    <!-- Expert: Enabling compound file will use less files for the index, 
-         using fewer file descriptors on the expense of performance decrease. 
-         Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
-    <!-- <useCompoundFile>false</useCompoundFile> -->
-
-    <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
-         indexing for buffering added documents and deletions before they are
-         flushed to the Directory.
-         maxBufferedDocs sets a limit on the number of documents buffered
-         before flushing.
-         If both ramBufferSizeMB and maxBufferedDocs is set, then
-         Lucene will flush based on whichever limit is hit first.
-         The default is 100 MB.  -->
-    <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
-    <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
-
-    <!-- Expert: Merge Policy 
-         The Merge Policy in Lucene controls how merging of segments is done.
-         The default since Solr/Lucene 3.3 is TieredMergePolicy.
-         The default since Lucene 2.3 was the LogByteSizeMergePolicy,
-         Even older versions of Lucene used LogDocMergePolicy.
-      -->
-    <!--
-        <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
-          <int name="maxMergeAtOnce">10</int>
-          <int name="segmentsPerTier">10</int>
-        </mergePolicy>
-      -->
-       
-    <!-- Merge Factor
-         The merge factor controls how many segments will get merged at a time.
-         For TieredMergePolicy, mergeFactor is a convenience parameter which
-         will set both MaxMergeAtOnce and SegmentsPerTier at once.
-         For LogByteSizeMergePolicy, mergeFactor decides how many new segments
-         will be allowed before they are merged into one.
-         Default is 10 for both merge policies.
-      -->
-    <!-- 
-    <mergeFactor>10</mergeFactor>
-      -->
-
-    <!-- Expert: Merge Scheduler
-         The Merge Scheduler in Lucene controls how merges are
-         performed.  The ConcurrentMergeScheduler (Lucene 2.3 default)
-         can perform merges in the background using separate threads.
-         The SerialMergeScheduler (Lucene 2.2 default) does not.
-     -->
-    <!-- 
-       <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
-       -->
-
-    <!-- LockFactory 
-
-         This option specifies which Lucene LockFactory implementation
-         to use.
-      
-         single = SingleInstanceLockFactory - suggested for a
-                  read-only index or when there is no possibility of
-                  another process trying to modify the index.
-         native = NativeFSLockFactory - uses OS native file locking.
-                  Do not use when multiple solr webapps in the same
-                  JVM are attempting to share a single index.
-         simple = SimpleFSLockFactory  - uses a plain file for locking
-
-         Defaults: 'native' is default for Solr3.6 and later, otherwise
-                   'simple' is the default
-
-         More details on the nuances of each LockFactory...
-         http://wiki.apache.org/lucene-java/AvailableLockFactories
-    -->
-    <lockType>${solr.lock.type:native}</lockType>
-
-    <!-- Unlock On Startup
-
-         If true, unlock any held write or commit locks on startup.
-         This defeats the locking mechanism that allows multiple
-         processes to safely access a lucene index, and should be used
-         with care. Default is "false".
-
-         This is not needed if lock type is 'single'
-     -->
-    <!--
-    <unlockOnStartup>false</unlockOnStartup>
-      -->
-    
-    <!-- Expert: Controls how often Lucene loads terms into memory
-         Default is 128 and is likely good for most everyone.
-      -->
-    <!-- <termIndexInterval>128</termIndexInterval> -->
-
-    <!-- If true, IndexReaders will be opened/reopened from the IndexWriter
-         instead of from the Directory. Hosts in a master/slave setup
-         should have this set to false while those in a SolrCloud
-         cluster need to be set to true. Default: true
-      -->
-    <!-- 
-    <nrtMode>true</nrtMode>
-      -->
-
-    <!-- Commit Deletion Policy
-         Custom deletion policies can be specified here. The class must
-         implement org.apache.lucene.index.IndexDeletionPolicy.
-
-         The default Solr IndexDeletionPolicy implementation supports
-         deleting index commit points on number of commits, age of
-         commit point and optimized status.
-         
-         The latest commit point should always be preserved regardless
-         of the criteria.
-    -->
-    <!-- 
-    <deletionPolicy class="solr.SolrDeletionPolicy">
-    -->
-      <!-- The number of commit points to be kept -->
-      <!-- <str name="maxCommitsToKeep">1</str> -->
-      <!-- The number of optimized commit points to be kept -->
-      <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
-      <!--
-          Delete all commit points once they have reached the given age.
-          Supports DateMathParser syntax e.g.
-        -->
-      <!--
-         <str name="maxCommitAge">30MINUTES</str>
-         <str name="maxCommitAge">1DAY</str>
-      -->
-    <!-- 
-    </deletionPolicy>
-    -->
-
-    <!-- Lucene Infostream
-       
-         To aid in advanced debugging, Lucene provides an "InfoStream"
-         of detailed information when indexing.
-
-         Setting the value to true will instruct the underlying Lucene
-         IndexWriter to write its info stream to solr's log. By default,
-         this is enabled here, and controlled through log4j.properties.
-      -->
-     <infoStream>true</infoStream>
-  </indexConfig>
-
-
-  <!-- JMX
-       
-       This example enables JMX if and only if an existing MBeanServer
-       is found, use this if you want to configure JMX through JVM
-       parameters. Remove this to disable exposing Solr configuration
-       and statistics to JMX.
-
-       For more details see http://wiki.apache.org/solr/SolrJmx
-    -->
-  <jmx />
-  <!-- If you want to connect to a particular server, specify the
-       agentId 
-    -->
-  <!-- <jmx agentId="myAgent" /> -->
-  <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
-  <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
-    -->
-
-  <!-- The default high-performance update handler -->
-  <updateHandler class="solr.DirectUpdateHandler2">
-
-    <!-- Enables a transaction log, used for real-time get, durability, and
-         and solr cloud replica recovery.  The log can grow as big as
-         uncommitted changes to the index, so use of a hard autoCommit
-         is recommended (see below).
-         "dir" - the target directory for transaction logs, defaults to the
-                solr data directory.  --> 
-    <updateLog>
-      <str name="dir">${solr.ulog.dir:}</str>
-    </updateLog>
- 
-    <!-- AutoCommit
-
-         Perform a hard commit automatically under certain conditions.
-         Instead of enabling autoCommit, consider using "commitWithin"
-         when adding documents. 
-
-         http://wiki.apache.org/solr/UpdateXmlMessages
-
-         maxDocs - Maximum number of documents to add since the last
-                   commit before automatically triggering a new commit.
-
-         maxTime - Maximum amount of time in ms that is allowed to pass
-                   since a document was added before automatically
-                   triggering a new commit. 
-         openSearcher - if false, the commit causes recent index changes
-           to be flushed to stable storage, but does not cause a new
-           searcher to be opened to make those changes visible.
-
-         If the updateLog is enabled, then it's highly recommended to
-         have some sort of hard autoCommit to limit the log size.
-      -->
-     <autoCommit> 
-       <maxTime>${solr.autoCommit.maxTime:15000}</maxTime> 
-       <openSearcher>false</openSearcher> 
-     </autoCommit>
-
-    <!-- softAutoCommit is like autoCommit except it causes a
-         'soft' commit which only ensures that changes are visible
-         but does not ensure that data is synced to disk.  This is
-         faster and more near-realtime friendly than a hard commit.
-      -->
-
-     <autoSoftCommit> 
-       <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime> 
-     </autoSoftCommit>
-
-    <!-- Update Related Event Listeners
-         
-         Various IndexWriter related events can trigger Listeners to
-         take actions.
-
-         postCommit - fired after every commit or optimize command
-         postOptimize - fired after every optimize command
-      -->
-    <!-- The RunExecutableListener executes an external command from a
-         hook such as postCommit or postOptimize.
-         
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. (default=".")
-         wait - the calling thread waits until the executable returns. 
-                (default="true")
-         args - the arguments to pass to the program.  (default is none)
-         env - environment variables to set.  (default is none)
-      -->
-    <!-- This example shows how RunExecutableListener could be used
-         with the script based replication...
-         http://wiki.apache.org/solr/CollectionDistribution
-      -->
-    <!--
-       <listener event="postCommit" class="solr.RunExecutableListener">
-         <str name="exe">solr/bin/snapshooter</str>
-         <str name="dir">.</str>
-         <bool name="wait">true</bool>
-         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-         <arr name="env"> <str>MYVAR=val1</str> </arr>
-       </listener>
-      -->
-
-  </updateHandler>
-  
-  <!-- IndexReaderFactory
-
-       Use the following format to specify a custom IndexReaderFactory,
-       which allows for alternate IndexReader implementations.
-
-       ** Experimental Feature **
-
-       Please note - Using a custom IndexReaderFactory may prevent
-       certain other features from working. The API to
-       IndexReaderFactory may change without warning or may even be
-       removed from future releases if the problems cannot be
-       resolved.
-
-
-       ** Features that may not work with custom IndexReaderFactory **
-
-       The ReplicationHandler assumes a disk-resident index. Using a
-       custom IndexReader implementation may cause incompatibility
-       with ReplicationHandler and may cause replication to not work
-       correctly. See SOLR-1366 for details.
-
-    -->
-  <!--
-  <indexReaderFactory name="IndexReaderFactory" class="package.class">
-    <str name="someArg">Some Value</str>
-  </indexReaderFactory >
-  -->
-  <!-- By explicitly declaring the Factory, the termIndexDivisor can
-       be specified.
-    -->
-  <!--
-     <indexReaderFactory name="IndexReaderFactory" 
-                         class="solr.StandardIndexReaderFactory">
-       <int name="setTermIndexDivisor">12</int>
-     </indexReaderFactory >
-    -->
-
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-       Query section - these settings control query time things like caches
-       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <query>
-    <!-- Max Boolean Clauses
-
-         Maximum number of clauses in each BooleanQuery,  an exception
-         is thrown if exceeded.
-
-         ** WARNING **
-         
-         This option actually modifies a global Lucene property that
-         will affect all SolrCores.  If multiple solrconfig.xml files
-         disagree on this property, the value at any given moment will
-         be based on the last SolrCore to be initialized.
-         
-      -->
-    <maxBooleanClauses>1024</maxBooleanClauses>
-
-
-    <!-- Solr Internal Query Caches
-
-         There are two implementations of cache available for Solr,
-         LRUCache, based on a synchronized LinkedHashMap, and
-         FastLRUCache, based on a ConcurrentHashMap.  
-
-         FastLRUCache has faster gets and slower puts in single
-         threaded operation and thus is generally faster than LRUCache
-         when the hit ratio of the cache is high (> 75%), and may be
-         faster under other scenarios on multi-cpu systems.
-    -->
-
-    <!-- Filter Cache
-
-         Cache used by SolrIndexSearcher for filters (DocSets),
-         unordered sets of *all* documents that match a query.  When a
-         new searcher is opened, its caches may be prepopulated or
-         "autowarmed" using data from caches in the old searcher.
-         autowarmCount is the number of items to prepopulate.  For
-         LRUCache, the autowarmed items will be the most recently
-         accessed items.
-
-         Parameters:
-           class - the SolrCache implementation LRUCache or
-               (LRUCache or FastLRUCache)
-           size - the maximum number of entries in the cache
-           initialSize - the initial capacity (number of entries) of
-               the cache.  (see java.util.HashMap)
-           autowarmCount - the number of entries to prepopulate from
-               and old cache.  
-      -->
-    <filterCache class="solr.FastLRUCache"
-                 size="512"
-                 initialSize="512"
-                 autowarmCount="0"/>
-
-    <!-- Query Result Cache
-         
-         Caches results of searches - ordered lists of document ids
-         (DocList) based on a query, a sort, and the range of documents requested.  
-      -->
-    <queryResultCache class="solr.LRUCache"
-                     size="512"
-                     initialSize="512"
-                     autowarmCount="0"/>
-   
-    <!-- Document Cache
-
-         Caches Lucene Document objects (the stored fields for each
-         document).  Since Lucene internal document ids are transient,
-         this cache will not be autowarmed.  
-      -->
-    <documentCache class="solr.LRUCache"
-                   size="512"
-                   initialSize="512"
-                   autowarmCount="0"/>
-    
-    <!-- custom cache currently used by block join --> 
-    <cache name="perSegFilter"
-      class="solr.search.LRUCache"
-      size="10"
-      initialSize="0"
-      autowarmCount="10"
-      regenerator="solr.NoOpRegenerator" />
-
-    <!-- Field Value Cache
-         
-         Cache used to hold field values that are quickly accessible
-         by document id.  The fieldValueCache is created by default
-         even if not configured here.
-      -->
-    <!--
-       <fieldValueCache class="solr.FastLRUCache"
-                        size="512"
-                        autowarmCount="128"
-                        showItems="32" />
-      -->
-
-    <!-- Custom Cache
-
-         Example of a generic cache.  These caches may be accessed by
-         name through SolrIndexSearcher.getCache(),cacheLookup(), and
-         cacheInsert().  The purpose is to enable easy caching of
-         user/application level data.  The regenerator argument should
-         be specified as an implementation of solr.CacheRegenerator 
-         if autowarming is desired.  
-      -->
-    <!--
-       <cache name="myUserCache"
-              class="solr.LRUCache"
-              size="4096"
-              initialSize="1024"
-              autowarmCount="1024"
-              regenerator="com.mycompany.MyRegenerator"
-              />
-      -->
-
-
-    <!-- Lazy Field Loading
-
-         If true, stored fields that are not requested will be loaded
-         lazily.  This can result in a significant speed improvement
-         if the usual case is to not load all stored fields,
-         especially if the skipped fields are large compressed text
-         fields.
-    -->
-    <enableLazyFieldLoading>true</enableLazyFieldLoading>
-
-   <!-- Use Filter For Sorted Query
-
-        A possible optimization that attempts to use a filter to
-        satisfy a search.  If the requested sort does not include
-        score, then the filterCache will be checked for a filter
-        matching the query. If found, the filter will be used as the
-        source of document ids, and then the sort will be applied to
-        that.
-
-        For most situations, this will not be useful unless you
-        frequently get the same search repeatedly with different sort
-        options, and none of them ever use "score"
-     -->
-   <!--
-      <useFilterForSortedQuery>true</useFilterForSortedQuery>
-     -->
-
-   <!-- Result Window Size
-
-        An optimization for use with the queryResultCache.  When a search
-        is requested, a superset of the requested number of document ids
-        are collected.  For example, if a search for a particular query
-        requests matching documents 10 through 19, and queryWindowSize is 50,
-        then documents 0 through 49 will be collected and cached.  Any further
-        requests in that range can be satisfied via the cache.  
-     -->
-   <queryResultWindowSize>20</queryResultWindowSize>
-
-   <!-- Maximum number of documents to cache for any entry in the
-        queryResultCache. 
-     -->
-   <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
-
-   <!-- Query Related Event Listeners
-
-        Various IndexSearcher related events can trigger Listeners to
-        take actions.
-
-        newSearcher - fired whenever a new searcher is being prepared
-        and there is a current searcher handling requests (aka
-        registered).  It can be used to prime certain caches to
-        prevent long request times for certain requests.
-
-        firstSearcher - fired whenever a new searcher is being
-        prepared but there is no current registered searcher to handle
-        requests or to gain autowarming data from.
-
-        
-     -->
-    <!-- QuerySenderListener takes an array of NamedList and executes a
-         local query request for each NamedList in sequence. 
-      -->
-    <listener event="newSearcher" class="solr.QuerySenderListener">
-      <arr name="queries">
-        <!--
-           <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
-           <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
-          -->
-      </arr>
-    </listener>
-    <listener event="firstSearcher" class="solr.QuerySenderListener">
-      <arr name="queries">
-        <lst>
-          <str name="q">static firstSearcher warming in solrconfig.xml</str>
-        </lst>
-      </arr>
-    </listener>
-
-    <!-- Use Cold Searcher
-
-         If a search request comes in and there is no current
-         registered searcher, then immediately register the still
-         warming searcher and use it.  If "false" then all requests
-         will block until the first searcher is done warming.
-      -->
-    <useColdSearcher>false</useColdSearcher>
-
-    <!-- Max Warming Searchers
-         
-         Maximum number of searchers that may be warming in the
-         background concurrently.  An error is returned if this limit
-         is exceeded.
-
-         Recommend values of 1-2 for read-only slaves, higher for
-         masters w/o cache warming.
-      -->
-    <maxWarmingSearchers>2</maxWarmingSearchers>
-
-  </query>
-
-
-  <!-- Request Dispatcher
-
-       This section contains instructions for how the SolrDispatchFilter
-       should behave when processing requests for this SolrCore.
-
-       handleSelect is a legacy option that affects the behavior of requests
-       such as /select?qt=XXX
-
-       handleSelect="true" will cause the SolrDispatchFilter to process
-       the request and dispatch the query to a handler specified by the 
-       "qt" param, assuming "/select" isn't already registered.
-
-       handleSelect="false" will cause the SolrDispatchFilter to
-       ignore "/select" requests, resulting in a 404 unless a handler
-       is explicitly registered with the name "/select"
-
-       handleSelect="true" is not recommended for new users, but is the default
-       for backwards compatibility
-    -->
-  <requestDispatcher handleSelect="false" >
-    <!-- Request Parsing
-
-         These settings indicate how Solr Requests may be parsed, and
-         what restrictions may be placed on the ContentStreams from
-         those requests
-
-         enableRemoteStreaming - enables use of the stream.file
-         and stream.url parameters for specifying remote streams.
-
-         multipartUploadLimitInKB - specifies the max size (in KiB) of
-         Multipart File Uploads that Solr will allow in a Request.
-         
-         formdataUploadLimitInKB - specifies the max size (in KiB) of
-         form data (application/x-www-form-urlencoded) sent via
-         POST. You can use POST to pass request parameters not
-         fitting into the URL.
-         
-         addHttpRequestToContext - if set to true, it will instruct
-         the requestParsers to include the original HttpServletRequest
-         object in the context map of the SolrQueryRequest under the 
-         key "httpRequest". It will not be used by any of the existing
-         Solr components, but may be useful when developing custom 
-         plugins.
-         
-         *** WARNING ***
-         The settings below authorize Solr to fetch remote files, You
-         should make sure your system has some authentication before
-         using enableRemoteStreaming="true"
-
-      --> 
-    <requestParsers enableRemoteStreaming="true" 
-                    multipartUploadLimitInKB="2048000"
-                    formdataUploadLimitInKB="2048"
-                    addHttpRequestToContext="false"/>
-
-    <!-- HTTP Caching
-
-         Set HTTP caching related parameters (for proxy caches and clients).
-
-         The options below instruct Solr not to output any HTTP Caching
-         related headers
-      -->
-    <httpCaching never304="true" />
-    <!-- If you include a <cacheControl> directive, it will be used to
-         generate a Cache-Control header (as well as an Expires header
-         if the value contains "max-age=")
-         
-         By default, no Cache-Control header is generated.
-         
-         You can use the <cacheControl> option even if you have set
-         never304="true"
-      -->
-    <!--
-       <httpCaching never304="true" >
-         <cacheControl>max-age=30, public</cacheControl> 
-       </httpCaching>
-      -->
-    <!-- To enable Solr to respond with automatically generated HTTP
-         Caching headers, and to response to Cache Validation requests
-         correctly, set the value of never304="false"
-         
-         This will cause Solr to generate Last-Modified and ETag
-         headers based on the properties of the Index.
-
-         The following options can also be specified to affect the
-         values of these headers...
-
-         lastModFrom - the default value is "openTime" which means the
-         Last-Modified value (and validation against If-Modified-Since
-         requests) will all be relative to when the current Searcher
-         was opened.  You can change it to lastModFrom="dirLastMod" if
-         you want the value to exactly correspond to when the physical
-         index was last modified.
-
-         etagSeed="..." is an option you can change to force the ETag
-         header (and validation against If-None-Match requests) to be
-         different even if the index has not changed (ie: when making
-         significant changes to your config file)
-
-         (lastModifiedFrom and etagSeed are both ignored if you use
-         the never304="true" option)
-      -->
-    <!--
-       <httpCaching lastModifiedFrom="openTime"
-                    etagSeed="Solr">
-         <cacheControl>max-age=30, public</cacheControl> 
-       </httpCaching>
-      -->
-  </requestDispatcher>
-
-  <!-- Request Handlers 
-
-       http://wiki.apache.org/solr/SolrRequestHandler
-
-       Incoming queries will be dispatched to a specific handler by name
-       based on the path specified in the request.
-
-       Legacy behavior: If the request path uses "/select" but no Request
-       Handler has that name, and if handleSelect="true" has been specified in
-       the requestDispatcher, then the Request Handler is dispatched based on
-       the qt parameter.  Handlers without a leading '/' are accessed this way
-       like so: http://host/app/[core/]select?qt=name  If no qt is
-       given, then the requestHandler that declares default="true" will be
-       used or the one named "standard".
-
-       If a Request Handler is declared with startup="lazy", then it will
-       not be initialized until the first request that uses it.
-
-    -->
-  <!-- SearchHandler
-
-       http://wiki.apache.org/solr/SearchHandler
-
-       For processing Search Queries, the primary Request Handler
-       provided with Solr is "SearchHandler" It delegates to a sequent
-       of SearchComponents (see below) and supports distributed
-       queries across multiple shards
-    -->
-  <requestHandler name="/select" class="solr.SearchHandler">
-    <!-- default values for query parameters can be specified, these
-         will be overridden by parameters in the request
-      -->
-     <lst name="defaults">
-       <str name="echoParams">explicit</str>
-       <int name="rows">10</int>
-       <str name="df">text</str>
-     </lst>
-    <!-- In addition to defaults, "appends" params can be specified
-         to identify values which should be appended to the list of
-         multi-val params from the query (or the existing "defaults").
-      -->
-    <!-- In this example, the param "fq=instock:true" would be appended to
-         any query time fq params the user may specify, as a mechanism for
-         partitioning the index, independent of any user selected filtering
-         that may also be desired (perhaps as a result of faceted searching).
-
-         NOTE: there is *absolutely* nothing a client can do to prevent these
-         "appends" values from being used, so don't use this mechanism
-         unless you are sure you always want it.
-      -->
-    <!--
-       <lst name="appends">
-         <str name="fq">inStock:true</str>
-       </lst>
-      -->
-    <!-- "invariants" are a way of letting the Solr maintainer lock down
-         the options available to Solr clients.  Any params values
-         specified here are used regardless of what values may be specified
-         in either the query, the "defaults", or the "appends" params.
-
-         In this example, the facet.field and facet.query params would
-         be fixed, limiting the facets clients can use.  Faceting is
-         not turned on by default - but if the client does specify
-         facet=true in the request, these are the only facets they
-         will be able to see counts for; regardless of what other
-         facet.field or facet.query params they may specify.
-
-         NOTE: there is *absolutely* nothing a client can do to prevent these
-         "invariants" values from being used, so don't use this mechanism
-         unless you are sure you always want it.
-      -->
-    <!--
-       <lst name="invariants">
-         <str name="facet.field">cat</str>
-         <str name="facet.field">manu_exact</str>
-         <str name="facet.query">price:[* TO 500]</str>
-         <str name="facet.query">price:[500 TO *]</str>
-       </lst>
-      -->
-    <!-- If the default list of SearchComponents is not desired, that
-         list can either be overridden completely, or components can be
-         prepended or appended to the default list.  (see below)
-      -->
-    <!--
-       <arr name="components">
-         <str>nameOfCustomComponent1</str>
-         <str>nameOfCustomComponent2</str>
-       </arr>
-      -->
-    </requestHandler>
-
-  <!-- A request handler that returns indented JSON by default -->
-  <requestHandler name="/query" class="solr.SearchHandler">
-     <lst name="defaults">
-       <str name="echoParams">explicit</str>
-       <str name="wt">json</str>
-       <str name="indent">true</str>
-       <str name="df">text</str>
-     </lst>
-  </requestHandler>
-
-
-  <!-- realtime get handler, guaranteed to return the latest stored fields of
-       any document, without the need to commit or open a new searcher.  The
-       current implementation relies on the updateLog feature being enabled. -->
-  <requestHandler name="/get" class="solr.RealTimeGetHandler">
-     <lst name="defaults">
-       <str name="omitHeader">true</str>
-       <str name="wt">json</str>
-       <str name="indent">true</str>
-     </lst>
-  </requestHandler>
-
- 
-  <!-- A Robust Example 
-       
-       This example SearchHandler declaration shows off usage of the
-       SearchHandler with many defaults declared
-
-       Note that multiple instances of the same Request Handler
-       (SearchHandler) can be registered multiple times with different
-       names (and different init parameters)
-    -->
-  <requestHandler name="/browse" class="solr.SearchHandler">
-     <lst name="defaults">
-       <str name="echoParams">explicit</str>
-
-       <!-- VelocityResponseWriter settings -->
-       <str name="wt">velocity</str>
-       <str name="v.template">browse</str>
-       <str name="v.layout">layout</str>
-       <str name="title">Solritas</str>
-
-       <!-- Query settings -->
-       <str name="defType">edismax</str>
-       <str name="qf">
-          text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
-          title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
-       </str>
-       <str name="df">text</str>
-       <str name="mm">100%</str>
-       <str name="q.alt">*:*</str>
-       <str name="rows">10</str>
-       <str name="fl">*,score</str>
-
-       <str name="mlt.qf">
-         text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
-         title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
-       </str>
-       <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
-       <int name="mlt.count">3</int>
-
-       <!-- Faceting defaults -->
-       <str name="facet">on</str>
-       <str name="facet.field">cat</str>
-       <str name="facet.field">manu_exact</str>
-       <str name="facet.field">content_type</str>
-       <str name="facet.field">author_s</str>
-       <str name="facet.query">ipod</str>
-       <str name="facet.query">GB</str>
-       <str name="facet.mincount">1</str>
-       <str name="facet.pivot">cat,inStock</str>
-       <str name="facet.range.other">after</str>
-       <str name="facet.range">price</str>
-       <int name="f.price.facet.range.start">0</int>
-       <int name="f.price.facet.range.end">600</int>
-       <int name="f.price.facet.range.gap">50</int>
-       <str name="facet.range">popularity</str>
-       <int name="f.popularity.facet.range.start">0</int>
-       <int name="f.popularity.facet.range.end">10</int>
-       <int name="f.popularity.facet.range.gap">3</int>
-       <str name="facet.range">manufacturedate_dt</str>
-       <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
-       <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
-       <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
-       <str name="f.manufacturedate_dt.facet.range.other">before</str>
-       <str name="f.manufacturedate_dt.facet.range.other">after</str>
-
-       <!-- Highlighting defaults -->
-       <str name="hl">on</str>
-       <str name="hl.fl">content features title name</str>
-       <str name="hl.encoder">html</str>
-       <str name="hl.simple.pre">&lt;b&gt;</str>
-       <str name="hl.simple.post">&lt;/b&gt;</str>
-       <str name="f.title.hl.fragsize">0</str>
-       <str name="f.title.hl.alternateField">title</str>
-       <str name="f.name.hl.fragsize">0</str>
-       <str name="f.name.hl.alternateField">name</str>
-       <str name="f.content.hl.snippets">3</str>
-       <str name="f.content.hl.fragsize">200</str>
-       <str name="f.content.hl.alternateField">content</str>
-       <str name="f.content.hl.maxAlternateFieldLength">750</str>
-
-       <!-- Spell checking defaults -->
-       <str name="spellcheck">on</str>
-       <str name="spellcheck.extendedResults">false</str>       
-       <str name="spellcheck.count">5</str>
-       <str name="spellcheck.alternativeTermCount">2</str>
-       <str name="spellcheck.maxResultsForSuggest">5</str>       
-       <str name="spellcheck.collate">true</str>
-       <str name="spellcheck.collateExtendedResults">true</str>  
-       <str name="spellcheck.maxCollationTries">5</str>
-       <str name="spellcheck.maxCollations">3</str>           
-     </lst>
-
-     <!-- append spellchecking to our list of components -->
-     <arr name="last-components">
-       <str>spellcheck</str>
-     </arr>
-  </requestHandler>
-
-
-  <!-- Update Request Handler.  
-       
-       http://wiki.apache.org/solr/UpdateXmlMessages
-
-       The canonical Request Handler for Modifying the Index through
-       commands specified using XML, JSON, CSV, or JAVABIN
-
-       Note: Since solr1.1 requestHandlers requires a valid content
-       type header if posted in the body. For example, curl now
-       requires: -H 'Content-type:text/xml; charset=utf-8'
-       
-       To override the request content type and force a specific 
-       Content-type, use the request parameter: 
-         ?update.contentType=text/csv
-       
-       This handler will pick a response format to match the input
-       if the 'wt' parameter is not explicit
-    -->
-  <requestHandler name="/update" class="solr.UpdateRequestHandler">
-    <!-- See below for information on defining 
-         updateRequestProcessorChains that can be used by name 
-         on each Update Request
-      -->
-    <!--
-       <lst name="defaults">
-         <str name="update.chain">dedupe</str>
-       </lst>
-       -->
-  </requestHandler>
-
-  <!-- for back compat with clients using /update/json and /update/csv -->  
-  <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler">
-        <lst name="defaults">
-         <str name="stream.contentType">application/json</str>
-       </lst>
-  </requestHandler>
-  <requestHandler name="/update/csv" class="solr.CSVRequestHandler">
-        <lst name="defaults">
-         <str name="stream.contentType">application/csv</str>
-       </lst>
-  </requestHandler>
-
-  <!-- Solr Cell Update Request Handler
-
-       http://wiki.apache.org/solr/ExtractingRequestHandler 
-
-    -->
-  <requestHandler name="/update/extract" 
-                  startup="lazy"
-                  class="solr.extraction.ExtractingRequestHandler" >
-    <lst name="defaults">
-      <str name="lowernames">true</str>
-      <str name="uprefix">ignored_</str>
-
-      <!-- capture link hrefs but ignore div attributes -->
-      <str name="captureAttr">true</str>
-      <str name="fmap.a">links</str>
-      <str name="fmap.div">ignored_</str>
-    </lst>
-  </requestHandler>
-
-
-  <!-- Field Analysis Request Handler
-
-       RequestHandler that provides much the same functionality as
-       analysis.jsp. Provides the ability to specify multiple field
-       types and field names in the same request and outputs
-       index-time and query-time analysis for each of them.
-
-       Request parameters are:
-       analysis.fieldname - field name whose analyzers are to be used
-
-       analysis.fieldtype - field type whose analyzers are to be used
-       analysis.fieldvalue - text for index-time analysis
-       q (or analysis.q) - text for query time analysis
-       analysis.showmatch (true|false) - When set to true and when
-           query analysis is performed, the produced tokens of the
-           field value analysis will be marked as "matched" for every
-           token that is produces by the query analysis
-   -->
-  <requestHandler name="/analysis/field" 
-                  startup="lazy"
-                  class="solr.FieldAnalysisRequestHandler" />
-
-
-  <!-- Document Analysis Handler
-
-       http://wiki.apache.org/solr/AnalysisRequestHandler
-
-       An analysis handler that provides a breakdown of the analysis
-       process of provided documents. This handler expects a (single)
-       content stream with the following format:
-
-       <docs>
-         <doc>
-           <field name="id">1</field>
-           <field name="name">The Name</field>
-           <field name="text">The Text Value</field>
-         </doc>
-         <doc>...</doc>
-         <doc>...</doc>
-         ...
-       </docs>
-
-    Note: Each document must contain a field which serves as the
-    unique key. This key is used in the returned response to associate
-    an analysis breakdown to the analyzed document.
-
-    Like the FieldAnalysisRequestHandler, this handler also supports
-    query analysis by sending either an "analysis.query" or "q"
-    request parameter that holds the query text to be analyzed. It
-    also supports the "analysis.showmatch" parameter which when set to
-    true, all field tokens that match the query tokens will be marked
-    as a "match". 
-  -->
-  <requestHandler name="/analysis/document" 
-                  class="solr.DocumentAnalysisRequestHandler" 
-                  startup="lazy" />
-
-  <!-- Admin Handlers
-
-       Admin Handlers - This will register all the standard admin
-       RequestHandlers.  
-    -->
-  <requestHandler name="/admin/" 
-                  class="solr.admin.AdminHandlers" />
-  <!-- This single handler is equivalent to the following... -->
-  <!--
-     <requestHandler name="/admin/luke"       class="solr.admin.LukeRequestHandler" />
-     <requestHandler name="/admin/system"     class="solr.admin.SystemInfoHandler" />
-     <requestHandler name="/admin/plugins"    class="solr.admin.PluginInfoHandler" />
-     <requestHandler name="/admin/threads"    class="solr.admin.ThreadDumpHandler" />
-     <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
-     <requestHandler name="/admin/file"       class="solr.admin.ShowFileRequestHandler" >
-    -->
-  <!-- If you wish to hide files under ${solr.home}/conf, explicitly
-       register the ShowFileRequestHandler using: 
-    -->
-  <!--
-     <requestHandler name="/admin/file" 
-                     class="solr.admin.ShowFileRequestHandler" >
-       <lst name="invariants">
-         <str name="hidden">synonyms.txt</str> 
-         <str name="hidden">anotherfile.txt</str> 
-       </lst>
-     </requestHandler>
-    -->
-
-  <!-- ping/healthcheck -->
-  <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
-    <lst name="invariants">
-      <str name="q">solrpingquery</str>
-    </lst>
-    <lst name="defaults">
-      <str name="echoParams">all</str>
-    </lst>
-    <!-- An optional feature of the PingRequestHandler is to configure the 
-         handler with a "healthcheckFile" which can be used to enable/disable 
-         the PingRequestHandler.
-         relative paths are resolved against the data dir 
-      -->
-    <!-- <str name="healthcheckFile">server-enabled.txt</str> -->
-  </requestHandler>
-
-  <!-- Echo the request contents back to the client -->
-  <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
-    <lst name="defaults">
-     <str name="echoParams">explicit</str> 
-     <str name="echoHandler">true</str>
-    </lst>
-  </requestHandler>
-  
-  <!-- Solr Replication
-
-       The SolrReplicationHandler supports replicating indexes from a
-       "master" used for indexing and "slaves" used for queries.
-
-       http://wiki.apache.org/solr/SolrReplication 
-
-       It is also necessary for SolrCloud to function (in Cloud mode, the
-       replication handler is used to bulk transfer segments when nodes 
-       are added or need to recover).
-
-       https://wiki.apache.org/solr/SolrCloud/
-    -->
-  <requestHandler name="/replication" class="solr.ReplicationHandler" > 
-    <!--
-       To enable simple master/slave replication, uncomment one of the 
-       sections below, depending on whether this solr instance should be
-       the "master" or a "slave".  If this instance is a "slave" you will 
-       also need to fill in the masterUrl to point to a real machine.
-    -->
-    <!--
-       <lst name="master">
-         <str name="replicateAfter">commit</str>
-         <str name="replicateAfter">startup</str>
-         <str name="confFiles">schema.xml,stopwords.txt</str>
-       </lst>
-    -->
-    <!--
-       <lst name="slave">
-         <str name="masterUrl">http://your-master-hostname:8983/solr</str>
-         <str name="pollInterval">00:00:60</str>
-       </lst>
-    -->
-  </requestHandler>
-
-  <!-- Search Components
-
-       Search components are registered to SolrCore and used by 
-       instances of SearchHandler (which can access them by name)
-       
-       By default, the following components are available:
-       
-       <searchComponent name="query"     class="solr.QueryComponent" />
-       <searchComponent name="facet"     class="solr.FacetComponent" />
-       <searchComponent name="mlt"       class="solr.MoreLikeThisComponent" />
-       <searchComponent name="highlight" class="solr.HighlightComponent" />
-       <searchComponent name="stats"     class="solr.StatsComponent" />
-       <searchComponent name="debug"     class="solr.DebugComponent" />
-   
-       Default configuration in a requestHandler would look like:
-
-       <arr name="components">
-         <str>query</str>
-         <str>facet</str>
-         <str>mlt</str>
-         <str>highlight</str>
-         <str>stats</str>
-         <str>debug</str>
-       </arr>
-
-       If you register a searchComponent to one of the standard names, 
-       that will be used instead of the default.
-
-       To insert components before or after the 'standard' components, use:
-    
-       <arr name="first-components">
-         <str>myFirstComponentName</str>
-       </arr>
-    
-       <arr name="last-components">
-         <str>myLastComponentName</str>
-       </arr>
-
-       NOTE: The component registered with the name "debug" will
-       always be executed after the "last-components" 
-       
-     -->
-  
-   <!-- Spell Check
-
-        The spell check component can return a list of alternative spelling
-        suggestions.  
-
-        http://wiki.apache.org/solr/SpellCheckComponent
-     -->
-  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
-
-    <str name="queryAnalyzerFieldType">text_general</str>
-
-    <!-- Multiple "Spell Checkers" can be declared and used by this
-         component
-      -->
-
-    <!-- a spellchecker built from a field of the main index -->
-    <lst name="spellchecker">
-      <str name="name">default</str>
-      <str name="field">text</str>
-      <str name="classname">solr.DirectSolrSpellChecker</str>
-      <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
-      <str name="distanceMeasure">internal</str>
-      <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
-      <float name="accuracy">0.5</float>
-      <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
-      <int name="maxEdits">2</int>
-      <!-- the minimum shared prefix when enumerating terms -->
-      <int name="minPrefix">1</int>
-      <!-- maximum number of inspections per result. -->
-      <int name="maxInspections">5</int>
-      <!-- minimum length of a query term to be considered for correction -->
-      <int name="minQueryLength">4</int>
-      <!-- maximum threshold of documents a query term can appear to be considered for correction -->
-      <float name="maxQueryFrequency">0.01</float>
-      <!-- uncomment this to require suggestions to occur in 1% of the documents
-      	<float name="thresholdTokenFrequency">.01</float>
-      -->
-    </lst>
-    
-    <!-- a spellchecker that can break or combine words.  See "/spell" handler below for usage -->
-    <lst name="spellchecker">
-      <str name="name">wordbreak</str>
-      <str name="classname">solr.WordBreakSolrSpellChecker</str>      
-      <str name="field">name</str>
-      <str name="combineWords">true</str>
-      <str name="breakWords">true</str>
-      <int name="maxChanges">10</int>
-    </lst>
-
-    <!-- a spellchecker that uses a different distance measure -->
-    <!--
-       <lst name="spellchecker">
-         <str name="name">jarowinkler</str>
-         <str name="field">spell</str>
-         <str name="classname">solr.DirectSolrSpellChecker</str>
-         <str name="distanceMeasure">
-           org.apache.lucene.search.spell.JaroWinklerDistance
-         </str>
-       </lst>
-     -->
-
-    <!-- a spellchecker that use an alternate comparator 
-
-         comparatorClass be one of:
-          1. score (default)
-          2. freq (Frequency first, then score)
-          3. A fully qualified class name
-      -->
-    <!--
-       <lst name="spellchecker">
-         <str name="name">freq</str>
-         <str name="field">lowerfilt</str>
-         <str name="classname">solr.DirectSolrSpellChecker</str>
-         <str name="comparatorClass">freq</str>
-      -->
-
-    <!-- A spellchecker that reads the list of words from a file -->
-    <!--
-       <lst name="spellchecker">
-         <str name="classname">solr.FileBasedSpellChecker</str>
-         <str name="name">file</str>
-         <str name="sourceLocation">spellings.txt</str>
-         <str name="characterEncoding">UTF-8</str>
-         <str name="spellcheckIndexDir">spellcheckerFile</str>
-       </lst>
-      -->
-  </searchComponent>
-
-  <!-- A request handler for demonstrating the spellcheck component.  
-
-       NOTE: This is purely as an example.  The whole purpose of the
-       SpellCheckComponent is to hook it into the request handler that
-       handles your normal user queries so that a separate request is
-       not needed to get suggestions.
-
-       IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
-       NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
-       
-       See http://wiki.apache.org/solr/SpellCheckComponent for details
-       on the request parameters.
-    -->
-  <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
-    <lst name="defaults">
-      <str name="df">text</str>
-      <!-- Solr will use suggestions from both the 'default' spellchecker
-           and from the 'wordbreak' spellchecker and combine them.
-           collations (re-written queries) can include a combination of
-           corrections from both spellcheckers -->
-      <str name="spellcheck.dictionary">default</str>
-      <str name="spellcheck.dictionary">wordbreak</str>
-      <str name="spellcheck">on</str>
-      <str name="spellcheck.extendedResults">true</str>       
-      <str name="spellcheck.count">10</str>
-      <str name="spellcheck.alternativeTermCount">5</str>
-      <str name="spellcheck.maxResultsForSuggest">5</str>       
-      <str name="spellcheck.collate">true</str>
-      <str name="spellcheck.collateExtendedResults">true</str>  
-      <str name="spellcheck.maxCollationTries">10</str>
-      <str name="spellcheck.maxCollations">5</str>         
-    </lst>
-    <arr name="last-components">
-      <str>spellcheck</str>
-    </arr>
-  </requestHandler>
-
-  <!-- Term Vector Component
-
-       http://wiki.apache.org/solr/TermVectorComponent
-    -->
-  <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
-
-  <!-- A request handler for demonstrating the term vector component
-
-       This is purely as an example.
-
-       In reality you will likely want to add the component to your 
-       already specified request handlers. 
-    -->
-  <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
-    <lst name="defaults">
-      <str name="df">text</str>
-      <bool name="tv">true</bool>
-    </lst>
-    <arr name="last-components">
-      <str>tvComponent</str>
-    </arr>
-  </requestHandler>
-
-  <!-- Clustering Component
-
-       You'll need to set the solr.clustering.enabled system property
-       when running solr to run with clustering enabled:
-
-            java -Dsolr.clustering.enabled=true -jar start.jar
-
-       http://wiki.apache.org/solr/ClusteringComponent
-       http://carrot2.github.io/solr-integration-strategies/
-    -->
-  <searchComponent name="clustering"
-                   enable="${solr.clustering.enabled:false}"
-                   class="solr.clustering.ClusteringComponent" >
-    <lst name="engine">
-      <str name="name">lingo</str>
-
-      <!-- Class name of a clustering algorithm compatible with the Carrot2 framework.
-
-           Currently available open source algorithms are:
-           * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
-           * org.carrot2.clustering.stc.STCClusteringAlgorithm
-           * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
-
-           See http://project.carrot2.org/algorithms.html for more information.
-
-           A commercial algorithm Lingo3G (needs to be installed separately) is defined as:
-           * com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm
-        -->
-      <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
-
-      <!-- Override location of the clustering algorithm's resources 
-           (attribute definitions and lexical resources).
-
-           A directory from which to load algorithm-specific stop words,
-           stop labels and attribute definition XMLs. 
-
-           For an overview of Carrot2 lexical resources, see:
-           http://download.carrot2.org/head/manual/#chapter.lexical-resources
-
-           For an overview of Lingo3G lexical resources, see:
-           http://download.carrotsearch.com/lingo3g/manual/#chapter.lexical-resources
-       -->
-      <str name="carrot.resourcesDir">clustering/carrot2</str>
-    </lst>
-
-    <!-- An example definition for the STC clustering algorithm. -->
-    <lst name="engine">
-      <str name="name">stc</str>
-      <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
-    </lst>
-
-    <!-- An example definition for the bisecting kmeans clustering algorithm. -->
-    <lst name="engine">
-      <str name="name">kmeans</str>
-      <str name="carrot.algorithm">org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm</str>
-    </lst>
-  </searchComponent>
-
-  <!-- A request handler for demonstrating the clustering component
-
-       This is purely as an example.
-
-       In reality you will likely want to add the component to your 
-       already specified request handlers. 
-    -->
-  <requestHandler name="/clustering"
-                  startup="lazy"
-                  enable="${solr.clustering.enabled:false}"
-                  class="solr.SearchHandler">
-    <lst name="defaults">
-      <bool name="clustering">true</bool>
-      <bool name="clustering.results">true</bool>
-      <!-- Field name with the logical "title" of a each document (optional) -->
-      <str name="carrot.title">name</str>
-      <!-- Field name with the logical "URL" of a each document (optional) -->
-      <str name="carrot.url">id</str>
-      <!-- Field name with the logical "content" of a each document (optional) -->
-      <str name="carrot.snippet">features</str>
-      <!-- Apply highlighter to the title/ content and use this for clustering. -->
-      <bool name="carrot.produceSummary">true</bool>
-      <!-- the maximum number of labels per cluster -->
-      <!--<int name="carrot.numDescriptions">5</int>-->
-      <!-- produce sub clusters -->
-      <bool name="carrot.outputSubClusters">false</bool>
-
-      <!-- Configure the remaining request handler parameters. -->
-      <str name="defType">edismax</str>
-      <str name="qf">
-        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
-      </str>
-      <str name="q.alt">*:*</str>
-      <str name="rows">10</str>
-      <str name="fl">*,score</str>
-    </lst>
-    <arr name="last-components">
-      <str>clustering</str>
-    </arr>
-  </requestHandler>
-  
-  <!-- Terms Component
-
-       http://wiki.apache.org/solr/TermsComponent
-
-       A component to return terms and document frequency of those
-       terms
-    -->
-  <searchComponent name="terms" class="solr.TermsComponent"/>
-
-  <!-- A request handler for demonstrating the terms component -->
-  <requestHandler name="/js" class="org.apache.solr.handler.js.JavaScriptRequestHandler" startup="lazy"/>
-  <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
-     <lst name="defaults">
-      <bool name="terms">true</bool>
-      <bool name="distrib">false</bool>
-    </lst>     
-    <arr name="components">
-      <str>terms</str>
-    </arr>
-  </requestHandler>
-
-  <!-- Highlighting Component
-
-       http://wiki.apache.org/solr/HighlightingParameters
-    -->
-  <searchComponent class="solr.HighlightComponent" name="highlight">
-    <highlighting>
-      <!-- Configure the standard fragmenter -->
-      <!-- This could most likely be commented out in the "default" case -->
-      <fragmenter name="gap" 
-                  default="true"
-                  class="solr.highlight.GapFragmenter">
-        <lst name="defaults">
-          <int name="hl.fragsize">100</int>
-        </lst>
-      </fragmenter>
-
-      <!-- A regular-expression-based fragmenter 
-           (for sentence extraction) 
-        -->
-      <fragmenter name="regex" 
-                  class="solr.highlight.RegexFragmenter">
-        <lst name="defaults">
-          <!-- slightly smaller fragsizes work better because of slop -->
-          <int name="hl.fragsize">70</int>
-          <!-- allow 50% slop on fragment sizes -->
-          <float name="hl.regex.slop">0.5</float>
-          <!-- a basic sentence pattern -->
-          <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
-        </lst>
-      </fragmenter>
-
-      <!-- Configure the standard formatter -->
-      <formatter name="html" 
-                 default="true"
-                 class="solr.highlight.HtmlFormatter">
-        <lst name="defaults">
-          <str name="hl.simple.pre"><![CDATA[<em>]]></str>
-          <str name="hl.simple.post"><![CDATA[</em>]]></str>
-        </lst>
-      </formatter>
-
-      <!-- Configure the standard encoder -->
-      <encoder name="html" 
-               class="solr.highlight.HtmlEncoder" />
-
-      <!-- Configure the standard fragListBuilder -->
-      <fragListBuilder name="simple" 
-                       class="solr.highlight.SimpleFragListBuilder"/>
-      
-      <!-- Configure the single fragListBuilder -->
-      <fragListBuilder name="single" 
-                       class="solr.highlight.SingleFragListBuilder"/>
-      
-      <!-- Configure the weighted fragListBuilder -->
-      <fragListBuilder name="weighted" 
-                       default="true"
-                       class="solr.highlight.WeightedFragListBuilder"/>
-      
-      <!-- default tag FragmentsBuilder -->
-      <fragmentsBuilder name="default" 
-                        default="true"
-                        class="solr.highlight.ScoreOrderFragmentsBuilder">
-        <!-- 
-        <lst name="defaults">
-          <str name="hl.multiValuedSeparatorChar">/</str>
-        </lst>
-        -->
-      </fragmentsBuilder>
-
-      <!-- multi-colored tag FragmentsBuilder -->
-      <fragmentsBuilder name="colored" 
-                        class="solr.highlight.ScoreOrderFragmentsBuilder">
-        <lst name="defaults">
-          <str name="hl.tag.pre"><![CDATA[
-               <b style="background:yellow">,<b style="background:lawgreen">,
-               <b style="background:aquamarine">,<b style="background:magenta">,
-               <b style="background:palegreen">,<b style="background:coral">,
-               <b style="background:wheat">,<b style="background:khaki">,
-               <b style="background:lime">,<b style="background:deepskyblue">]]></str>
-          <str name="hl.tag.post"><![CDATA[</b>]]></str>
-        </lst>
-      </fragmentsBuilder>
-      
-      <boundaryScanner name="default" 
-                       default="true"
-                       class="solr.highlight.SimpleBoundaryScanner">
-        <lst name="defaults">
-          <str name="hl.bs.maxScan">10</str>
-          <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
-        </lst>
-      </boundaryScanner>
-      
-      <boundaryScanner name="breakIterator" 
-                       class="solr.highlight.BreakIteratorBoundaryScanner">
-        <lst name="defaults">
-          <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
-          <str name="hl.bs.type">WORD</str>
-          <!-- language and country are used when constructing Locale object.  -->
-          <!-- And the Locale object will be used when getting instance of BreakIterator -->
-          <str name="hl.bs.language">en</str>
-          <str name="hl.bs.country">US</str>
-        </lst>
-      </boundaryScanner>
-    </highlighting>
-  </searchComponent>
-
-  <!-- Update Processors
-
-       Chains of Update Processor Factories for dealing with Update
-       Requests can be declared, and then used by name in Update
-       Request Processors
-
-       http://wiki.apache.org/solr/UpdateRequestProcessor
-
-    --> 
-  <!-- Deduplication
-
-       An example dedup update processor that creates the "id" field
-       on the fly based on the hash code of some other fields.  This
-       example has overwriteDupes set to false since we are using the
-       id field as the signatureField and Solr will maintain
-       uniqueness based on that anyway.  
-       
-    -->
-  <!--
-     <updateRequestProcessorChain name="dedupe">
-       <processor class="solr.processor.SignatureUpdateProcessorFactory">
-         <bool name="enabled">true</bool>
-         <str name="signatureField">id</str>
-         <bool name="overwriteDupes">false</bool>
-         <str name="fields">name,features,cat</str>
-         <str name="signatureClass">solr.processor.Lookup3Signature</str>
-       </processor>
-       <processor class="solr.LogUpdateProcessorFactory" />
-       <processor class="solr.RunUpdateProcessorFactory" />
-     </updateRequestProcessorChain>
-    -->
-  
-  <!-- Language identification
-
-       This example update chain identifies the language of the incoming
-       documents using the langid contrib. The detected language is
-       written to field language_s. No field name mapping is done.
-       The fields used for detection are text, title, subject and description,
-       making this example suitable for detecting languages form full-text
-       rich documents injected via ExtractingRequestHandler.
-       See more about langId at http://wiki.apache.org/solr/LanguageDetection
-    -->
-    <!--
-     <updateRequestProcessorChain name="langid">
-       <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
-         <str name="langid.fl">text,title,subject,description</str>
-         <str name="langid.langField">language_s</str>
-         <str name="langid.fallback">en</str>
-       </processor>
-       <processor class="solr.LogUpdateProcessorFactory" />
-       <processor class="solr.RunUpdateProcessorFactory" />
-     </updateRequestProcessorChain>
-    -->
-
-  <!-- Script update processor
-
-    This example hooks in an update processor implemented using JavaScript.
-
-    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
-  -->
-  <!--
-    <updateRequestProcessorChain name="script">
-      <processor class="solr.StatelessScriptUpdateProcessorFactory">
-        <str name="script">update-script.js</str>
-        <lst name="params">
-          <str name="config_param">example config parameter</str>
-        </lst>
-      </processor>
-      <processor class="solr.RunUpdateProcessorFactory" />
-    </updateRequestProcessorChain>
-  -->
- 
-  <!-- Response Writers
-
-       http://wiki.apache.org/solr/QueryResponseWriter
-
-       Request responses will be written using the writer specified by
-       the 'wt' request parameter matching the name of a registered
-       writer.
-
-       The "default" writer is the default and will be used if 'wt' is
-       not specified in the request.
-    -->
-  <!-- The following response writers are implicitly configured unless
-       overridden...
-    -->
-  <!--
-     <queryResponseWriter name="xml" 
-                          default="true"
-                          class="solr.XMLResponseWriter" />
-     <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
-     <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
-     <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
-     <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
-     <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
-     <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
-     <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
-    -->
-
-  <queryResponseWriter name="json" class="solr.JSONResponseWriter">
-     <!-- For the purposes of the tutorial, JSON responses are written as
-      plain text so that they are easy to read in *any* browser.
-      If you expect a MIME type of "application/json" just remove this override.
-     -->
-    <str name="content-type">text/plain; charset=UTF-8</str>
-  </queryResponseWriter>
-  
-  <!--
-     Custom response writers can be declared as needed...
-    -->
-    <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
-  
-
-  <!-- XSLT response writer transforms the XML output by any xslt file found
-       in Solr's conf/xslt directory.  Changes to xslt files are checked for
-       every xsltCacheLifetimeSeconds.  
-    -->
-  <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
-    <int name="xsltCacheLifetimeSeconds">5</int>
-  </queryResponseWriter>
-
-  <!-- Query Parsers
-
-       http://wiki.apache.org/solr/SolrQuerySyntax
-
-       Multiple QParserPlugins can be registered by name, and then
-       used in either the "defType" param for the QueryComponent (used
-       by SearchHandler) or in LocalParams
-    -->
-  <!-- example of registering a query parser -->
-  <!--
-     <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
-    -->
-
-  <!-- Function Parsers
-
-       http://wiki.apache.org/solr/FunctionQuery
-
-       Multiple ValueSourceParsers can be registered by name, and then
-       used as function names when using the "func" QParser.
-    -->
-  <!-- example of registering a custom function parser  -->
-  <!--
-     <valueSourceParser name="myfunc" 
-                        class="com.mycompany.MyValueSourceParser" />
-    -->
-    
-  
-  <!-- Document Transformers
-       http://wiki.apache.org/solr/DocTransformers
-    -->
-  <!--
-     Could be something like:
-     <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
-       <int name="connection">jdbc://....</int>
-     </transformer>
-     
-     To add a constant value to all docs, use:
-     <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
-       <int name="value">5</int>
-     </transformer>
-     
-     If you want the user to still be able to change it with _value:something_ use this:
-     <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
-       <double name="defaultValue">5</double>
-     </transformer>
-
-      If you are using the QueryElevationComponent, you may wish to mark documents that get boosted.  The
-      EditorialMarkerFactory will do exactly that:
-     <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
-    -->
-    
-
-  <!-- Legacy config for the admin interface -->
-  <admin>
-    <defaultQuery>*:*</defaultQuery>
-  </admin>
-
-</config>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/solr/example/core.properties
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/solr/example/core.properties b/brooklyn-library/software/nosql/src/test/resources/solr/example/core.properties
deleted file mode 100644
index fb53c4b..0000000
--- a/brooklyn-library/software/nosql/src/test/resources/solr/example/core.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# 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.
-#
-name=example
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/test-mongodb-configserver.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/test-mongodb-configserver.conf b/brooklyn-library/software/nosql/src/test/resources/test-mongodb-configserver.conf
deleted file mode 100644
index b5ec6cd..0000000
--- a/brooklyn-library/software/nosql/src/test/resources/test-mongodb-configserver.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# MongoDB configuration file
-# See http://docs.mongodb.org/manual/reference/configuration-options/
-
-# Makes servers extra verbose
-verbose = v
-vvvvv = true

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/test-mongodb-router.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/test-mongodb-router.conf b/brooklyn-library/software/nosql/src/test/resources/test-mongodb-router.conf
deleted file mode 100644
index b5ec6cd..0000000
--- a/brooklyn-library/software/nosql/src/test/resources/test-mongodb-router.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# MongoDB configuration file
-# See http://docs.mongodb.org/manual/reference/configuration-options/
-
-# Makes servers extra verbose
-verbose = v
-vvvvv = true

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/test-mongodb.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/test-mongodb.conf b/brooklyn-library/software/nosql/src/test/resources/test-mongodb.conf
deleted file mode 100644
index 5214566..0000000
--- a/brooklyn-library/software/nosql/src/test/resources/test-mongodb.conf
+++ /dev/null
@@ -1,21 +0,0 @@
-# MongoDB configuration file
-# See http://docs.mongodb.org/manual/reference/configuration-options/
-
-# Makes servers extra verbose
-verbose = v
-vvvvv = true
-
-# Use less disk space for tests:
-#  - smallfiles reduces the initial size of data files.
-#  - noprealloc means don't create sparse files on startup
-#  - oplogSize is the maximum size in megabytes for the replication operation log
-#    (and defaults to 5% of available disk space).
-smallfiles = true
-noprealloc = true
-oplogSize = 32
-
-# Explicitly disable journalling on both 32 and 64 bit systems. By default:
-#  - journal is false on 32 and true on 64 bit systems.
-#  - nojournal is true on 32 and false on 64 bit systems.
-journal = false
-nojournal = true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/osgi/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/osgi/pom.xml b/brooklyn-library/software/osgi/pom.xml
deleted file mode 100644
index c1611df..0000000
--- a/brooklyn-library/software/osgi/pom.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<packaging>jar</packaging>
-    
-	<artifactId>brooklyn-software-osgi</artifactId>
-    
-	<name>Brooklyn OSGi Software Entities</name>
-	<description>
-		Brooklyn entities for OSGi container software processes
-	</description>
-	<parent>
-		<groupId>org.apache.brooklyn</groupId>
-		<artifactId>brooklyn-library</artifactId>
-		<version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-		<relativePath>../../pom.xml</relativePath>
-	</parent>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.brooklyn</groupId>
-			<artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-		</dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-utils-common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.framework</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <!-- bring in jclouds for testing -->
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-locations-jclouds</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-	</dependencies>
-
-    <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.rat</groupId>
-                    <artifactId>apache-rat-plugin</artifactId>
-                    <configuration>
-                        <excludes combine.children="append">
-                            <!--
-                                Java code that is copyright OSGi Alliance. It is included in NOTICE.
-                                As the comment at the top of the Java files says:
-                                "BROOKLYN NOTE: This is a verbatim copy of the original in org.osgi.enterprise-4.2.0, 
-                                 reproduced here to avoid pulling in the rest of that bundle and its chain of dependencies.
-                                 The only difference is this comment and the suppress warnings."
-                            -->
-                            <exclude>**/src/main/java/org/osgi/jmx/*</exclude>
-                        </excludes>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
-</project>


[43/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/pom.xml b/brooklyn-library/sandbox/mobile-app/pom.xml
deleted file mode 100644
index e350e53..0000000
--- a/brooklyn-library/sandbox/mobile-app/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>war</packaging>
-
-    <groupId>org.apache.brooklyn.sandbox</groupId>
-    <artifactId>brooklyn-mobile-app</artifactId>
-
-    <name>Brooklyn Mobile UI</name>
-
-    <description>
-        A mobile skin for Brooklyn
-    </description>
-
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version><!-- BROOKLYN_VERSION -->
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.rat</groupId>
-                    <artifactId>apache-rat-plugin</artifactId>
-                    <configuration>
-                        <excludes combine.children="append">
-                            <exclude>**/src/main/webapp/assets/mobile/js/i18n/*</exclude>
-                            <exclude>**/src/main/webapp/assets/mobile/libs/**</exclude>
-                        </excludes>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
-</project>
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/WEB-INF/web.xml b/brooklyn-library/sandbox/mobile-app/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index a126eb1..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-<!--
-    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.
--->
-<web-app>
-  <display-name>Brooklyn Mobile</display-name>
-</web-app>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/css/mobile.css
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/css/mobile.css b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/css/mobile.css
deleted file mode 100644
index 0e729fb..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/css/mobile.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.
-*/
-.poweredLogo{
-	width:150px;
-	height:28px;
-	float:right;
-	margin: 20px 20px;
-	content:url("../images/brooklyn-logo.png");
-}
-
-.navbar-absolute-bottom{
-	border-top-width: 0px;
-}
-
-.navbar-app{
-	color:#419641;
-}
-.list-group-item a{
-	color:#666;
-}
-
-.navbar-app .btn, .navbar-app .btn-navbar{
-	color:#777;
-}
-
-.sidebar-left{
-	background: none repeat scroll 0 0 #555;
-}
-
-.navbar-footer{
-	background: none repeat scroll 0 0 #555;
-}
-
-.list-group-item span, .list-group-item h4, .navbar-brand span, .panel-body .panel h4{
-	white-space: nowrap;
-	/*width: 100%;*/
-	overflow: hidden;              /* "overflow" value must be different from "visible" */
-	text-overflow: ellipsis;
-}
-
-.panel-heading .btn-navbar:last-child{
-	padding:0px 0px 6px 12px;
-}
-
-.entityListHeader {
-	padding: 10px 0px 40px 0px;
-}
-
-.entityListHeader .navbar-brand-center {
-	margin: 0px 35px;
-}
-.navbar-brand{
-	padding:15px 30px !important;
-}
-
-.wrapword{
-	word-wrap: break-word;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/images/brooklyn-logo.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/images/brooklyn-logo.png b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/images/brooklyn-logo.png
deleted file mode 100755
index 27b2e5a..0000000
Binary files a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/images/brooklyn-logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/app.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/app.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/app.js
deleted file mode 100644
index 906a4f4..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/app.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.
-*/
-var app = angular.module('BrooklynMobile', [ 
-  "ngRoute",
-  "ngTouch",
-  "mobile-angular-ui", 
-  "BrooklynApp.Services",
-  "BrooklynApp.filters",
-  "BrooklynApp.controllers",
-  "pascalprecht.translate",
-  "ngCookies"]);
-
-app.config(function($routeProvider, $translateProvider) {
-	//Defaults root to applications.  Should change in the future
-	$routeProvider.when('/', {
-		templateUrl : "assets/mobile/js/templates/applicationsList.html",
-		controller:"ApplicationListController"
-	});
-	
-	//Lists applications
-	$routeProvider.when('/v1/applications', {
-		templateUrl : "assets/mobile/js/templates/applicationsList.html",
-		controller:"ApplicationListController"
-	});
-	
-	//List entities
-	$routeProvider.when('/v1/applications/:appId/entities/:id', {
-		templateUrl : "assets/mobile/js/templates/entitiesList.html",
-		controller:"EntityListController"
-	});
-	$routeProvider.when('/v1/applications/:appId/entities', {
-		templateUrl : "assets/mobile/js/templates/entitiesList.html",
-		controller:"EntityListController"
-	});
-	$routeProvider.when('/v1/applications/:appId', {
-		templateUrl : "assets/mobile/js/templates/entitiesList.html",
-		controller:"EntityListController"
-	});
-	
-	//Application and entity details
-	$routeProvider.when('/v1/applications/:appId/entities/:id/summary', {
-		templateUrl : "assets/mobile/js/templates/entitySummary.html",
-		controller:"EntityDetailsController"
-	});
-	$routeProvider.when('/v1/applications/:appId/summary', {
-		templateUrl : "assets/mobile/js/templates/entitySummary.html",
-		controller:"EntityDetailsController"
-	});
-	
-	$translateProvider.useStaticFilesLoader({
-		  prefix: 'assets/mobile/js/i18n/',
-		  suffix: '.json'
-		});
-	//$translateProvider.useLocalStorage();
-	$translateProvider.preferredLanguage('en-us');
-	
-});
-
-app.controller('MainController', function($rootScope, $scope) {
-
-	$rootScope.$on("$routeChangeStart", function() {
-		$rootScope.loading = true;
-	});
-
-	$rootScope.$on("$routeChangeSuccess", function() {
-		$rootScope.loading = false;
-	});
-});

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/controllers.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/controllers.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/controllers.js
deleted file mode 100644
index 68e21d1..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/controllers.js
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * 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.
-*/
-var bklnControllers = angular.module('BrooklynApp.controllers',['ngResource']);
-
-//Brooklyn ApplicationList controller
-bklnControllers.controller('ApplicationListController', function($scope, $interval, ApplicationService){
-	//
-	$scope.reloadTimer;
-	$scope.loadData = function(){
-		ApplicationService.query({}, function (applications){
-			$scope.applications = applications;
-			console.log('ApplicationListController: new data loaded');
-		});
-	};
-	
-	$scope.showDetails = function($event){
-		alert("swipe happened");
-		$event.stopPropagation();
-		console.dir ($event);
-	};
-	
-	$scope.$on('$viewContentLoaded', function() {
-	    console.log('ApplicationListController: loadeding');
-	    $scope.loadData();
-	    console.log('ApplicationListController: requested data');
-	    $scope.reloadTimer = $interval($scope.loadData, 10000);
-	    console.log('ApplicationListController: reload timer set');
-	    console.log('ApplicationListController: loaded');
-	  });
-	
-	$scope.$on('$destroy', function() {
-	    console.log('ApplicationListController: unloading');
-	    if (angular.isDefined($scope.reloadTimer)) {
-	        $interval.cancel($scope.reloadTimer);
-	        $scope.reloadTimer = undefined;
-	      }
-	    console.log('ApplicationListController: reload timer stopped');
-	    console.log('ApplicationListController: unloaded');
-	  });
-	
-});
-
-
-bklnControllers.controller('EntityListController', function($scope, $http, $interval, $location, $routeParams){
-	
-	$scope.reloadTimer;
-	$scope.path = $location.path().replace("#",'');
-	var shownPath = false;
-	$scope.loadData = function(){
-		
-		$http({method: 'GET', url: $scope.path}).
-	    success(function(data) {
-	    	$scope.entity = data;
-	    	$scope.name = (data.spec) ? data.spec.name : data.name;
-	    	var children = (data.links.children) ? data.links.children : data.links.entities ;
-	    	$scope.back = (data.links.parent) ? data.links.parent : "/v1/applications";
-	    	if (!shownPath) {
-	    		console.info ("Current path: "+ $location.path());
-	    		console.info ("Back path: "+ $scope.back);
-	    		shownPath = true;
-			}
-	    	console.log('EntityListController: new data loaded');
-	    	$http({method: 'GET', url: children}).
-	        success(function(data) {
-	        	$scope.entities = data;
-	        	//get status sequentially..
-	        	angular.forEach($scope.entities, function (value, index){
-	        		$http.get(value.links.sensors + "/service.state")
-	        		.success(function(data){
-	        			data = data.replace(/"/g,'');
-	        			value.status = (data.length > 0) ? data : "Unknown";
-	        		});
-	        	});
-	        	
-	        });
-	    });
-	};
-		
-	$scope.$on('$viewContentLoaded', function() {
-	    console.log('EntityListController: loadeding');
-	    $scope.loadData();
-	    console.log('EntityListController: requested data');
-	    $scope.reloadTimer = $interval($scope.loadData, 10000);
-	    console.log('EntityListController: reload timer set');
-	    console.log('EntityListController: loaded');
-	  });
-	
-	$scope.$on('$destroy', function() {
-	    console.log('EntityListController: unloading');
-	    if (angular.isDefined($scope.reloadTimer)) {
-	        $interval.cancel($scope.reloadTimer);
-	        $scope.reloadTimer = undefined;
-	      }
-	    console.log('EntityListController: reload timer stopped');
-	    console.log('EntityListController: unloaded');
-	  });
-	
-});
-
-bklnControllers.controller('EntityDetailsController', function($scope, $filter, $window, $location, $http, $resource, $routeParams){
-
-	
-	$scope.goBack = function (){
-		$window.history.back();
-	};
-	
-	$scope.init = function(){
-		$scope.path = $location.path().replace("#",'');
-		
-		$scope.selfLink = $location.path().replace("/summary",'');
-		
-		$http({method: 'GET', url: $scope.selfLink}).
-	    success(function(data) {
-	    	$scope.entity = data;
-	    	$scope.name = (data.spec) ? data.spec.name : data.name;
-	    	var sensors = ($scope.entity.links.sensors) ? $scope.entity.links.sensors : $scope.selfLink + "/sensors"; 
-	    	$http({method:'GET', url:$scope.entity.links.effectors}).
-	    	success(function(data){
-	    		$scope.entity.effectors = data;
-	    		console.dir (data);
-	    	});
-	    	
-	    	$http({method: 'GET', url: sensors + '/current-state'}).
-		    success(function(data) {
-		    	$scope.entity.status = (data["service.state"]) ? data["service.state"].replace(/"/g,'') : null;
-		    	$scope.entity.isUp = data["service.isUp"];
-		    });
-
-	    	var activities = ($scope.entity.links.activities) ? $scope.entity.links.activities : $scope.selfLink + "/activities"; 
-	    	$http({method: 'GET', url: activities}).
-		    success(function(data) {
-		    	console.info(activities);
-		    	console.dir(data);
-		    	$scope.entity.activities = data;
-		    });
-	    	var config = ($scope.entity.links.config) ? $scope.entity.links.config : $scope.selfLink + "/config"; 
-	    	var configUrl = config +  '/current-state';
-	    	$http({method: 'GET', url: configUrl}).
-		    success(function(data) {
-		    	console.info(configUrl);
-		    	console.dir(data);
-		    	var config = [];
-		    	angular.forEach(data, function (v, k){
-		    		config.push({"key": k, "value":v});
-		    	});
-		    	$scope.entity.config = config;
-		    });
-	    	
-			console.dir ($scope.entity);
-	    });
-	};
-	
-	$scope.isTopLevelActivity = function(input){
-		var submitter = input.submittedByTask;
-		return (submitter == null ||(submitter != null && $filter('filter')($scope.entity.activities,{"id":submitter.metadata.id}).length == 0 ));
-	};
-	
-	$scope.expunge = function (){
-		//TODO: show dialog requesting if user wants to release resources
-		var expungeURL = $scope.selfLink + "/expunge?replace=false";
-		$http({method: 'POST', url: expungeURL}).
-	    success(function(data) {
-	    	console.info(expungeURL);
-	    	console.dir(data);
-	    });
-		
-		
-	};
-	
-	$scope.executeEffector = function (uri){
-		var effector = uri + "?timeout=0";
-		var data = ""; 
-		console.info ("Executing: " + effector);
-		$http({method: 'POST', url: effector, data:data, headers: {'Content-Type': 'application/x-www-form-urlencoded'}}).
-	    success(function(data) {
-	    	console.info("Success");
-	    	console.dir(data);
-	    }).
-	    error(function(data, status){
-	    	console.error ("Failed: " + status);
-	    	console.dir (data);
-	    });
-	};
-	$scope.init();
-	
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/filters.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/filters.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/filters.js
deleted file mode 100644
index 289bd3f..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/filters.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.
-*/
-'use strict';
-var bklnFilters = angular.module('BrooklynApp.filters',[]);
-
-bklnFilters.filter('Capitalize', function(){
-	return function(input){
-	input = input || '';
-	var out = input.toLocaleLowerCase();
-	out = out.charAt(0).toLocaleUpperCase() + out.substring(1);
-	return out;
-};
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/i18n/en-us.json
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/i18n/en-us.json b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/i18n/en-us.json
deleted file mode 100644
index ca3ea5e..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/i18n/en-us.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
-	"TITLE"     : "Brooklyn",
-	"APP_NAME_LONG"    : "Brooklyn",
-	"APP_NAME_SHORT"    : "Brooklyn",
-	"APPLICATION_LIST_TITLE":"Applications",
-	"NO_APPS_FOUND": "No applications found.",
-	"NO_ENTITIES_FOUND": "No entities found.",
-	"M_MENU_APPS": "Applications",
-	"M_MENU_HELP": "Help",
-	"M_MEMU_POWERED_BY":"",
-	"LOADING": "Loading ...",
-	"E_DISMISS_BUTTON":"Dismiss",
-	"E_DETIALS_SUMMARY":"Summary",
-	"E_DETIALS_CONFIG": "Config",
-	"E_DETIALS_LIFECYCLE": "Lifecycle",
-	"E_DETIALS_POLICIES":"Policies",
-	"E_DETIALS_ACTIVITIES":"Activities",
-	"E_DETIALS_NO_CONFIG_FOUND":"No configurations found",
-	"E_DETIALS_NO_POLICIES_FOUND":"No policies found",
-	"E_DETIALS_NO_ACTIVITIES_FOUND":"No activities found",
-	"E_SUMMARY_NAME":"Name",
-	"E_SUMMARY_ID": "Id",
-	"E_SUMMARY_STATUS":"Status",
-	"E_SUMMARY_TYPE": "Type",
-	"E_SUMMARY_SERVICE_UP":"Service up"
-	
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/services.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/services.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/services.js
deleted file mode 100644
index 6e16afa..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/services.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
-*/
-
-var brooklynServices = angular.module('BrooklynApp.Services', ['ngResource']);
-
-brooklynServices.factory('ApplicationService', ['$resource', function ($resource) {
-    var Application = $resource('/v1/applications/:id', {url:'/v1/applications/:id'}, {
-    	query: {method:'GET', params:{}, isArray:true},
-    	entities:{url:'v1/applications/:id/entities', method:'GET', isArray:true},
-    });
-    return Application;
-}]);

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/templates/applicationsList.html
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/templates/applicationsList.html b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/templates/applicationsList.html
deleted file mode 100644
index 1ab6fc5..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/templates/applicationsList.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!--
-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.
--->
-
-<div class="scrollable">
-	<div class="scrollable-content">
-		<div class="list-group">
-			<div style="padding: 10px 0px 19px 0px;" class="list-group-item">
-				<span style="font-size: 1.5em; font-weight: 400; padding-left: 15px">{{'APPLICATION_LIST_TITLE' | translate}}</span>
-				<!-- <div class="btn-group pull-right">
-					<a href="{{$scope.loadData()}}" class="btn btn-navbar"> <i
-						class="fa fa-refresh"></i>
-					</a>
-				</div> -->
-			</div>
-
-			<div ng-if="applications.length == 0" class="list-group-item">
-				<h5 class="list-group-item-text text-center">{{'NO_APPS_FOUND' | translate}}</h5>
-			</div>
-
-			<div ng-repeat="application in applications"
-				href="#{{application.links.entities}}/{{application.id}}"
-				class="list-group-item">
-				<a href="#{{application.links.entities}}/{{application.id}}" ng-show="!showActions" ng-swipe-left="showDetails($event)">
-					<i class="fa fa-chevron-right pull-right"></i>
-					<h5 class="list-group-item-heading">{{application.spec.name}}</h5>
-	
-					<p class="list-group-item-text">
-	
-						<i ng-if="application.status == 'RUNNING'"
-							class="fa fa-circle text-success"></i> <i
-							ng-if="application.status == 'UNKNOWN'"
-							class="fa fa-exclamation text-warning"></i> <i
-							ng-if="application.status == 'STARTING'"
-							class="fa fa-circle text-info"></i> {{application.status | Capitalize}}
-					</p>
-				</a>
-				
-				<a href="#{{application.links.entities}}/{{application.id}}" ng-show="showActions" ng-swipe-right="showActions = false">
-					<span ng-href="#{{application.links.self}}/summary" class="fa pull-right" style="background-color:green;margin: -10px 0px;padding: 20px 20px;color: white;display: block;z-index: 2000;"> Details</span>
-					<i class="fa fa-chevron-right pull-right"></i>
-					<h5 class="list-group-item-heading">{{application.spec.name}}</h5>
-	
-					<p class="list-group-item-text">
-	
-						<i ng-if="application.status == 'RUNNING'"
-							class="fa fa-circle text-success"></i> <i
-							ng-if="application.status == 'UNKNOWN'"
-							class="fa fa-exclamation text-warning"></i> <i
-							ng-if="application.status == 'STARTING'"
-							class="fa fa-circle text-info"></i> {{application.status | Capitalize}}
-					</p>
-				</a>
-			</div>
-		</div>
-	</div>
-</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/templates/entitiesList.html
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/templates/entitiesList.html b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/templates/entitiesList.html
deleted file mode 100644
index 0417f8b..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/templates/entitiesList.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!--
-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.
--->
-<div class="scrollable">
-
-	<div class="list-group-item entityListHeader">
-
-		<div class="btn-group pull-left">
-			<a href="#{{back}}" class="btn btn-navbar "> <i
-				class="fa fa-chevron-left"></i>
-			</a>
-		</div>
-		<div class=" navbar-brand navbar-brand-center"><span style="font-size: 1.5em; font-weight: 400;">{{name}}</span></div>
-		
-		<div class="btn-group pull-right">
-			<a href="#{{entity.links.self}}/summary" class="btn btn-navbar">
-				<i class="fa fa-info"></i>
-			</a>
-		</div>
-
-	</div>
-	<div ng-if="entities.length == 0" class="list-group-item">
-		<h5 class="list-group-item-text text-center">{{'NO_ENTITIES_FOUND' | translate}}</h5>
-	</div>
-	<a ng-repeat="entry in entities" href="#{{entry.links.self}}"
-		class="list-group-item"> <i class="fa fa-chevron-right pull-right"></i>
-		<h4 class="list-group-item-heading">{{entry.name}}</h4>
-		<p class="list-group-item-text">
-			<i ng-if="entry.status == 'running'"
-				class="fa fa-circle text-success"></i> <i
-				ng-if="entry.status == 'Unknown'"
-				class="fa fa-exclamation text-warning"></i> <i
-				ng-if="entry.status == 'on-fire'" class="fa fa-fire text-danger"></i>
-			<i ng-if="entry.status == 'starting'" class="fa fa-circle text-info"></i>
-			{{entry.status | Capitalize}}
-		</p>
-	</a>
-</div>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/templates/entitySummary.html
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/templates/entitySummary.html b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/templates/entitySummary.html
deleted file mode 100644
index 832700d..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/js/templates/entitySummary.html
+++ /dev/null
@@ -1,250 +0,0 @@
-<!--
-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.
--->
-<div content-for="title">
-	<span ng-click="goBack()">{{entity.name}}</span>
-</div>
-<!-- Left icon -->
-<div content-for="left-control-nav-icon-left">
-	<div ng-click="toggle('mainSidebar')"
-		class="btn btn-navbar sidebar-toggle">
-		<i class="fa fa-cogs"></i>
-	</div>
-</div>
-
-<!-- Right icon -->
-<div content-for="right-control-nav-icon-right">
-	<div ng-click="toggle('rightSidebar')"
-		class="btn btn-navbar sidebar-toggle">
-		<i class="fa fa-list"></i>
-	</div>
-</div>
-
-<!-- Left navigation (effectors) -->
-<div content-for="left-control-nav">
-	<h2 class="app-name">&nbsp;</h2>
-	<div class="scrollable sidebar-scrollable">
-		<div class="scrollable-content">
-			<div class="list-group" toggle="off" bubble target="mainSidebar">
-				<a class="list-group-item" ng-repeat="effector in entity.effectors"
-					ng-click="executeEffector(effector.links.self); toggle('leftSidebar');" > <span ng-switch on="effector.name"> <i
-						ng-switch-when="restart" class="fa fa-refresh fa-2x"></i> <i
-						ng-switch-when="start" class="fa fa-play fa-2x"></i> <i
-						ng-switch-when="stop" class="fa fa-power-off fa-2x"></i> <i
-						ng-switch-when="resize" class="fa fa-arrows fa-2x"></i> <i
-						ng-switch-when="deploy" class="fa fa-cloud-upload fa-2x"></i> <i
-						ng-switch-when="undeploy" class="fa fa-cloud-download fa-2x"></i>
-						<i ng-switch-default class="fa fa-cloud fa-2x"></i>
-				</span> <span style="padding-left: 10px; font-size: 1.5em;">{{effector.name | Capitalize}}</span>
-				</a>
-			</div>
-
-		</div>
-	</div>
-</div>
-
-<div content-for="right-control-nav">
-	<h2 class="app-name">&nbsp;</h2>
-	<div class="scrollable sidebar-scrollable">
-		<div class="scrollable-content">
-			<div class="list-group" toggle="off" bubble target="rightSidebar">
-				<a class="list-group-item" href="" ng-click="selected = 'Summary'; toggle('rightSidebar')"> <span ng-switch
-					on="effector.name"> <i ng-switch-default
-						class="fa fa-bullseye fa-2x"></i>
-				</span> <span style="padding-left: 10px; font-size: 1.5em;">{{'E_DETIALS_SUMMARY' | translate}}</span>
-				</a> <a class="list-group-item" href="" ng-click="selected = 'Lifecycle'; toggle('rightSidebar')"> <span ng-switch
-					on="effector.name"> <i ng-switch-default
-						class="fa fa-sun-o fa-2x"></i>
-				</span> <span style="padding-left: 10px; font-size: 1.5em;">{{'E_DETIALS_LIFECYCLE' | translate}}</span>
-				</a> <a class="list-group-item" href="" ng-click="selected = 'Config'; toggle('rightSidebar')"> <span ng-switch
-					on="effector.name"> <i ng-switch-default
-						class="fa fa-cogs fa-2x"></i>
-				</span> <span style="padding-left: 10px; font-size: 1.5em;">{{'E_DETIALS_CONFIG' | translate}}</span>
-				</a> <a class="list-group-item" href="" ng-click="selected = 'Policies'; toggle('rightSidebar')"> <span ng-switch
-					on="effector.name"> <i ng-switch-default
-						class="fa fa-legal fa-2x"></i>
-				</span> <span style="padding-left: 10px; font-size: 1.5em;">{{'E_DETIALS_POLICIES' | translate}}</span>
-				</a> <a class="list-group-item" href="" ng-click="selected = 'Activities'; toggle('rightSidebar')"> <span ng-switch
-					on="effector.name"> <i ng-switch-default
-						class="fa fa-tasks fa-2x"></i>
-				</span> <span style="padding-left: 10px; font-size: 1.5em;">{{'E_DETIALS_ACTIVITIES' | translate}}</span>
-				</a>
-			</div>
-	
-		</div>
-	</div>
-</div>
-
-<!-- Entity Details/Summary -->
-
-<div class="scrollable" ng-init="selected = 'Summary'" >
-	<div class="scrollable-content section" ng-show="selected == 'Summary'">
-
-		<form action="" id="">
-
-			<div class="panel">
-				<div class="panel-heading">
-					<div class="panel-title">
-						<span>{{'E_DETIALS_SUMMARY' | translate}}</span>
-					</div>
-				</div>
-				<div class="panel-body">
-
-					<div class="block">
-						<label class="control-label">{{'E_SUMMARY_NAME' | translate}}</label> <input type="text"
-							ng-model="entity.name" placeholder="Name" class="form-control"
-							readonly>
-					</div>
-					<div class="block">
-						<label class="control-label">{{'E_SUMMARY_STATUS' | translate}}</label> <input type="text"
-							ng-model="entity.status" placeholder="Status"
-							class="form-control" readonly>
-					</div>
-					<div class="block">
-						<label class="control-label">{{'E_SUMMARY_SERVICE_UP' | translate}}</label> <input type="text"
-							ng-model="entity.isUp" placeholder="Service isUp"
-							class="form-control" readonly>
-					</div>
-
-					<div class="block">
-						<label class="control-label">{{'E_SUMMARY_TYPE' | translate}}</label> <input type="text"
-							ng-model="entity.type" placeholder="Type" class="form-control"
-							readonly>
-					</div>
-
-					<div class="block">
-						<label class="control-label">{{'E_SUMMARY_ID' | translate}}</label> <input type="text"
-							ng-model="entity.id" placeholder="Id" class="form-control"
-							readonly>
-					</div>
-
-				</div>
-				<br />
-				<br />
-
-				<div bs-panel class="form-actions">
-					<button class="btn btn-success btn-block" ng-click="goBack()">{{'E_DISMISS_BUTTON' | translate}}</button>
-				</div>
-			</div>
-		</form>
-	</div>
-	
-	<div class="scrollable-content section" ng-show="selected == 'Lifecycle'">
-
-			<div class="panel">
-				<div class="panel-heading">
-					<div class="panel-title">
-						<span>{{'E_DETIALS_LIFECYCLE' | translate}}</span>
-					</div>
-				</div>
-				<div class="panel-body">
-					<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
-					<br/>
-					
-				</div>
-				<div bs-panel class="form-actions">
-					<button class="btn btn-danger btn-block" ng-click="expunge(); goBack();">Expunge</button>
-				</div>
-				<div bs-panel class="form-actions">
-					<button class="btn btn-success btn-block" ng-click="goBack()">{{'E_DISMISS_BUTTON' | translate}}</button>
-				</div>
-			</div>
-	</div>
-	<div class="scrollable-content section" ng-show="selected == 'Config'">
-
-			<div class="panel">
-				<div class="panel-heading">
-					<div class="panel-title">
-						<span>{{'E_DETIALS_CONFIG' | translate}}</span>
-					</div>
-				</div>
-				<div class="panel-body">
-					<br/>
-					<div ng-if="entity.config.length == 0">
-						<h5 class="list-group-item-text text-center">{{'E_DETIALS_NO_CONFIG_FOUND' | translate}}</h5>
-						<br/>
-					</div>
-					<div class="panel panel-default" ng-repeat="conf in entity.config | orderBy:'key'">
-					   <div class="panel-heading">
-					      <h4>{{conf.key | Capitalize}}</h4>
-					   </div>
-					   <div class="panel-body wrapword">
-					      {{conf.value}}
-					   </div>
-					</div>
-				</div>
-				<div bs-panel class="form-actions">
-					<button class="btn btn-success btn-block" ng-click="goBack()">{{'E_DISMISS_BUTTON' | translate}}</button>
-				</div>
-			</div>
-	</div>
-	<div class="scrollable-content section" ng-show="selected == 'Policies'">
-
-			<div class="panel">
-				<div class="panel-heading">
-					<div class="panel-title">
-						<span>{{'E_DETIALS_POLICIES' | translate}}</span>
-					</div>
-				</div>
-				<div class="panel-body">
-					<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
-					<br/>
-
-				</div>
-				<div bs-panel class="form-actions">
-					<button class="btn btn-success btn-block" ng-click="goBack()">{{'E_DISMISS_BUTTON' | translate}}</button>
-				</div>
-				
-			</div>
-	</div>
-	<div class="scrollable-content section" ng-show="selected == 'Activities'">
-
-			<div class="panel">
-				<div class="panel-heading">
-					<div class="panel-title">
-						<span>{{'E_DETIALS_ACTIVITIES' | translate}}</span>
-					</div>
-				</div>
-				<div class="panel-body">
-					<!--<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
-					--><br/>
-
-					<div ng-if="entity.activities.length == 0">
-						<h5 class="list-group-item-text text-center">{{'E_DETIALS_NO_ACTIVITIES_FOUND' | translate}}</h5>
-					</div>
-					<!-- <div class="panel panel-default" ng-repeat="activity in entity.activities" ng-if="activity.submittedByTask == null || (ctivity.submittedByTask != null && $filter('filter')($scope.entity.links.activities,{'id':activity.submittedByTask.metadata.id}).length) == 0"> -->
-					<div class="panel panel-default" ng-repeat="activity in entity.activities" ng-if ="isTopLevelActivity(activity)"> 
-					   <div class="panel-heading">
-					      <h4>{{activity.displayName | Capitalize}}</h4>
-					   </div>
-					   <!-- <div class="panel-body">
-					      Panel content
-					   </div> -->
-					   <table class="table">
-					      <tr><td>Submitted</td><td>{{activity.submitTimeUtc | date:'MM/dd/yyyy @ h:mma'}}</td></tr>
-					      <tr><td>Status</td><td>{{activity.currentStatus}}</td></tr>
-					   </table>
-					</div>
-
-				</div>
-				<div bs-panel class="form-actions">
-					<button class="btn btn-success btn-block" ng-click="goBack()">{{'E_DISMISS_BUTTON' | translate}}</button>
-				</div>
-			</div>
-	</div>
-</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-cookies.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-cookies.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-cookies.js
deleted file mode 100644
index 22f397a..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-cookies.js
+++ /dev/null
@@ -1,204 +0,0 @@
-/**
- * @license AngularJS v1.2.19
- * (c) 2010-2014 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-/**
- * @ngdoc module
- * @name ngCookies
- * @description
- *
- * # ngCookies
- *
- * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.
- *
- *
- * <div doc-module-components="ngCookies"></div>
- *
- * See {@link ngCookies.$cookies `$cookies`} and
- * {@link ngCookies.$cookieStore `$cookieStore`} for usage.
- */
-
-
-angular.module('ngCookies', ['ng']).
-  /**
-   * @ngdoc service
-   * @name $cookies
-   *
-   * @description
-   * Provides read/write access to browser's cookies.
-   *
-   * Only a simple Object is exposed and by adding or removing properties to/from this object, new
-   * cookies are created/deleted at the end of current $eval.
-   * The object's properties can only be strings.
-   *
-   * Requires the {@link ngCookies `ngCookies`} module to be installed.
-   *
-   * @example
-   *
-   * ```js
-   * function ExampleController($cookies) {
-   *   // Retrieving a cookie
-   *   var favoriteCookie = $cookies.myFavorite;
-   *   // Setting a cookie
-   *   $cookies.myFavorite = 'oatmeal';
-   * }
-   * ```
-   */
-   factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
-      var cookies = {},
-          lastCookies = {},
-          lastBrowserCookies,
-          runEval = false,
-          copy = angular.copy,
-          isUndefined = angular.isUndefined;
-
-      //creates a poller fn that copies all cookies from the $browser to service & inits the service
-      $browser.addPollFn(function() {
-        var currentCookies = $browser.cookies();
-        if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
-          lastBrowserCookies = currentCookies;
-          copy(currentCookies, lastCookies);
-          copy(currentCookies, cookies);
-          if (runEval) $rootScope.$apply();
-        }
-      })();
-
-      runEval = true;
-
-      //at the end of each eval, push cookies
-      //TODO: this should happen before the "delayed" watches fire, because if some cookies are not
-      //      strings or browser refuses to store some cookies, we update the model in the push fn.
-      $rootScope.$watch(push);
-
-      return cookies;
-
-
-      /**
-       * Pushes all the cookies from the service to the browser and verifies if all cookies were
-       * stored.
-       */
-      function push() {
-        var name,
-            value,
-            browserCookies,
-            updated;
-
-        //delete any cookies deleted in $cookies
-        for (name in lastCookies) {
-          if (isUndefined(cookies[name])) {
-            $browser.cookies(name, undefined);
-          }
-        }
-
-        //update all cookies updated in $cookies
-        for(name in cookies) {
-          value = cookies[name];
-          if (!angular.isString(value)) {
-            value = '' + value;
-            cookies[name] = value;
-          }
-          if (value !== lastCookies[name]) {
-            $browser.cookies(name, value);
-            updated = true;
-          }
-        }
-
-        //verify what was actually stored
-        if (updated){
-          updated = false;
-          browserCookies = $browser.cookies();
-
-          for (name in cookies) {
-            if (cookies[name] !== browserCookies[name]) {
-              //delete or reset all cookies that the browser dropped from $cookies
-              if (isUndefined(browserCookies[name])) {
-                delete cookies[name];
-              } else {
-                cookies[name] = browserCookies[name];
-              }
-              updated = true;
-            }
-          }
-        }
-      }
-    }]).
-
-
-  /**
-   * @ngdoc service
-   * @name $cookieStore
-   * @requires $cookies
-   *
-   * @description
-   * Provides a key-value (string-object) storage, that is backed by session cookies.
-   * Objects put or retrieved from this storage are automatically serialized or
-   * deserialized by angular's toJson/fromJson.
-   *
-   * Requires the {@link ngCookies `ngCookies`} module to be installed.
-   *
-   * @example
-   *
-   * ```js
-   * function ExampleController($cookies) {
-   *   // Put cookie
-   *   $cookieStore.put('myFavorite','oatmeal');
-   *   // Get cookie
-   *   var favoriteCookie = $cookieStore.get('myFavorite');
-   *   // Removing a cookie
-   *   $cookieStore.remove('myFavorite');
-   * }
-   * ```
-   */
-   factory('$cookieStore', ['$cookies', function($cookies) {
-
-      return {
-        /**
-         * @ngdoc method
-         * @name $cookieStore#get
-         *
-         * @description
-         * Returns the value of given cookie key
-         *
-         * @param {string} key Id to use for lookup.
-         * @returns {Object} Deserialized cookie value.
-         */
-        get: function(key) {
-          var value = $cookies[key];
-          return value ? angular.fromJson(value) : value;
-        },
-
-        /**
-         * @ngdoc method
-         * @name $cookieStore#put
-         *
-         * @description
-         * Sets a value for given cookie key
-         *
-         * @param {string} key Id for the `value`.
-         * @param {Object} value Value to be stored.
-         */
-        put: function(key, value) {
-          $cookies[key] = angular.toJson(value);
-        },
-
-        /**
-         * @ngdoc method
-         * @name $cookieStore#remove
-         *
-         * @description
-         * Remove given cookie
-         *
-         * @param {string} key Id of the key-value pair to delete.
-         */
-        remove: function(key) {
-          delete $cookies[key];
-        }
-      };
-
-    }]);
-
-
-})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-cookies.min.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-cookies.min.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-cookies.min.js
deleted file mode 100644
index db53d64..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-cookies.min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- AngularJS v1.2.19
- (c) 2010-2014 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(p,f,n){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(e,b){var c={},g={},h,k=!1,l=f.copy,m=f.isUndefined;b.addPollFn(function(){var a=b.cookies();h!=a&&(h=a,l(a,g),l(a,c),k&&e.$apply())})();k=!0;e.$watch(function(){var a,d,e;for(a in g)m(c[a])&&b.cookies(a,n);for(a in c)d=c[a],f.isString(d)||(d=""+d,c[a]=d),d!==g[a]&&(b.cookies(a,d),e=!0);if(e)for(a in d=b.cookies(),c)c[a]!==d[a]&&(m(d[a])?delete c[a]:c[a]=d[a])});return c}]).factory("$cookieStore",
-["$cookies",function(e){return{get:function(b){return(b=e[b])?f.fromJson(b):b},put:function(b,c){e[b]=f.toJson(c)},remove:function(b){delete e[b]}}}])})(window,window.angular);
-//# sourceMappingURL=angular-cookies.min.js.map

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-cookies.min.js.map
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-cookies.min.js.map b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-cookies.min.js.map
deleted file mode 100644
index 4e6f87a..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-cookies.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-cookies.min.js",
-"lineCount":7,
-"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAmBtCD,CAAAE,OAAA,CAAe,WAAf,CAA4B,CAAC,IAAD,CAA5B,CAAAC,QAAA,CAyBW,UAzBX,CAyBuB,CAAC,YAAD,CAAe,UAAf,CAA2B,QAAS,CAACC,CAAD,CAAaC,CAAb,CAAuB,CAAA,IACxEC,EAAU,EAD8D,CAExEC,EAAc,EAF0D,CAGxEC,CAHwE,CAIxEC,EAAU,CAAA,CAJ8D,CAKxEC,EAAOV,CAAAU,KALiE,CAMxEC,EAAcX,CAAAW,YAGlBN,EAAAO,UAAA,CAAmB,QAAQ,EAAG,CAC5B,IAAIC,EAAiBR,CAAAC,QAAA,EACjBE,EAAJ,EAA0BK,CAA1B,GACEL,CAGA,CAHqBK,CAGrB,CAFAH,CAAA,CAAKG,CAAL,CAAqBN,CAArB,CAEA,CADAG,CAAA,CAAKG,CAAL,CAAqBP,CAArB,CACA,CAAIG,CAAJ,EAAaL,CAAAU,OAAA,EAJf,CAF4B,CAA9B,CAAA,EAUAL,EAAA,CAAU,CAAA,CAKVL,EAAAW,OAAA,CASAC,QAAa,EAAG,CAAA,IACVC,CADU,CAEVC,CAFU,CAIVC,CAGJ,KAAKF,CAAL,GAAaV,EAAb,CACMI,CAAA,CAAYL,CAAA,CAAQW,CAAR,CAAZ,CAAJ,EACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBhB,CAAvB,CAKJ,KAAIgB,CAAJ,GAAYX,EAAZ,CACEY,CAKA,CALQZ,CAAA,CAAQW,CAAR,CAKR,CAJKjB,CAAAoB,SAAA,CAAiBF,CAAjB,CAIL,GAHEA,CACA,CADQ,EACR,CADaA,CACb,CAAAZ,CAAA,CAAQW,CAAR,CAAA,CAAgBC,CAElB,EAAIA,CAAJ,GAAcX,CAAA,CAAYU,CAAZ,CAAd,GACEZ,CAAA
 C,QAAA,CAAiBW,CAAjB,CAAuBC,CAAvB,CACA,CAAAC,CAAA,CAAU,CAAA,CAFZ,CAOF,IAAIA,CAAJ,CAIE,IAAKF,CAAL,GAFAI,EAEaf,CAFID,CAAAC,QAAA,EAEJA,CAAAA,CAAb,CACMA,CAAA,CAAQW,CAAR,CAAJ,GAAsBI,CAAA,CAAeJ,CAAf,CAAtB,GAEMN,CAAA,CAAYU,CAAA,CAAeJ,CAAf,CAAZ,CAAJ,CACE,OAAOX,CAAA,CAAQW,CAAR,CADT,CAGEX,CAAA,CAAQW,CAAR,CAHF,CAGkBI,CAAA,CAAeJ,CAAf,CALpB,CAhCU,CAThB,CAEA,OAAOX,EA1BqE,CAA3D,CAzBvB,CAAAH,QAAA,CAkIW,cAlIX;AAkI2B,CAAC,UAAD,CAAa,QAAQ,CAACmB,CAAD,CAAW,CAErD,MAAO,KAWAC,QAAQ,CAACC,CAAD,CAAM,CAEjB,MAAO,CADHN,CACG,CADKI,CAAA,CAASE,CAAT,CACL,EAAQxB,CAAAyB,SAAA,CAAiBP,CAAjB,CAAR,CAAkCA,CAFxB,CAXd,KA0BAQ,QAAQ,CAACF,CAAD,CAAMN,CAAN,CAAa,CACxBI,CAAA,CAASE,CAAT,CAAA,CAAgBxB,CAAA2B,OAAA,CAAeT,CAAf,CADQ,CA1BrB,QAuCGU,QAAQ,CAACJ,CAAD,CAAM,CACpB,OAAOF,CAAA,CAASE,CAAT,CADa,CAvCjB,CAF8C,CAAhC,CAlI3B,CAnBsC,CAArC,CAAA,CAsMEzB,MAtMF,CAsMUA,MAAAC,QAtMV;",
-"sources":["angular-cookies.js"],
-"names":["window","angular","undefined","module","factory","$rootScope","$browser","cookies","lastCookies","lastBrowserCookies","runEval","copy","isUndefined","addPollFn","currentCookies","$apply","$watch","push","name","value","updated","isString","browserCookies","$cookies","get","key","fromJson","put","toJson","remove"]
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-csp.css
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-csp.css b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-csp.css
deleted file mode 100644
index 3abb3a0..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular-csp.css
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Include this file in your html if you are using the CSP mode. */
-
-@charset "UTF-8";
-
-[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],
-.ng-cloak, .x-ng-cloak,
-.ng-hide {
-  display: none !important;
-}
-
-ng\:form {
-  display: block;
-}
-
-.ng-animate-block-transitions {
-  transition:0s all!important;
-  -webkit-transition:0s all!important;
-}
-
-/* show the element during a show/hide animation when the
- * animation is ongoing, but the .ng-hide class is active */
-.ng-hide-add-active, .ng-hide-remove {
-  display: block!important;
-}


[05/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetConfigTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetConfigTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetConfigTest.java
deleted file mode 100644
index dc5cb5c..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetConfigTest.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-
-import javax.annotation.Nullable;
-
-import org.apache.brooklyn.entity.nosql.mongodb.ReplicaSetConfig;
-import org.bson.BSONObject;
-import org.bson.BasicBSONObject;
-import org.bson.types.BasicBSONList;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Function;
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.common.net.HostAndPort;
-
-public class ReplicaSetConfigTest {
-
-    // true if object has key "votes" that is > 1
-    static Predicate<BasicBSONObject> IS_VOTING_MEMBER = new Predicate<BasicBSONObject>() {
-        @Override public boolean apply(@Nullable BasicBSONObject input) {
-            return input != null && input.containsField("votes") && input.getInt("votes") > 0;
-        }
-    };
-
-    private BasicBSONObject makeSetMember(Integer id, String host) {
-        return new BasicBSONObject(ImmutableMap.of("_id", id, "host", host));
-    }
-
-    private BasicBSONObject makeSetConfig(String id, Integer version, BasicBSONObject... members) {
-        BasicBSONList memberList = new BasicBSONList();
-        memberList.addAll(Arrays.asList(members));
-        return new BasicBSONObject(ImmutableMap.of("_id", id, "version", version, "members", memberList));
-    }
-
-    private BasicBSONObject makeSetWithNMembers(int n) {
-        ReplicaSetConfig setConfig = ReplicaSetConfig.builder("replica-set-name");
-        for (int i = 0; i < n; i++) {
-            setConfig.member("host-"+i, i, i);
-        }
-        return setConfig.build();
-    }
-
-    private Collection<HostAndPort> votingMembersOfSet(BasicBSONObject config) {
-        BasicBSONList membersObject = BasicBSONList.class.cast(config.get("members"));
-        List<BasicBSONObject> members = Lists.newArrayList();
-        for (Object object : membersObject) members.add(BasicBSONObject.class.cast(object));
-        return FluentIterable.from(members)
-                .filter(IS_VOTING_MEMBER)
-                .transform(new Function<BasicBSONObject, HostAndPort>() {
-                    @Override public HostAndPort apply(BasicBSONObject input) {
-                        return HostAndPort.fromString(input.getString("host"));
-                    }
-                })
-                .toList();
-    }
-
-    private Collection<HostAndPort> nonVotingMembersOfSet(BasicBSONObject config) {
-        BasicBSONList membersObject = BasicBSONList.class.cast(config.get("members"));
-        List<BasicBSONObject> members = Lists.newArrayList();
-        for (Object object : membersObject) members.add(BasicBSONObject.class.cast(object));
-        return FluentIterable
-                .from(members)
-                .filter(Predicates.not(IS_VOTING_MEMBER))
-                .transform(new Function<BasicBSONObject, HostAndPort>() {
-                    @Override public HostAndPort apply(BasicBSONObject input) {
-                        return HostAndPort.fromString(input.getString("host"));
-                    }
-                })
-                .toList();
-    }
-
-    @Test
-    public void testCreateFromScratch() {
-        BasicBSONObject config = ReplicaSetConfig.builder("rs")
-            .member("host-a", 12345, 1)
-            .member("host-b", 54321, 2)
-            .build();
-        assertEquals(config.get("_id"), "rs");
-        assertEquals(config.getInt("version"), 1);
-        assertTrue(config.get("members") instanceof BasicBSONList);
-        BasicBSONList members = (BasicBSONList) config.get("members");
-        assertEquals(members.size(), 2);
-    }
-
-    @Test
-    public void testCreateFromExistingConfig() {
-        // Replica set of one member
-        int version = 44;
-        BasicBSONObject config = makeSetConfig("replica-set-name", version, makeSetMember(33, "example.com:7777"));
-
-        // Use existing set to add two more members
-        BasicBSONObject newConfig = ReplicaSetConfig.fromExistingConfig(config)
-            .member("foo", 8888, 34)
-            .member("bar", 9999, 35)
-            .build();
-
-        assertEquals(newConfig.get("_id"), "replica-set-name");
-        assertEquals(newConfig.get("version"), version + 1);
-        BasicBSONList members = (BasicBSONList) newConfig.get("members");
-        assertEquals(members.size(), 3);
-
-        BSONObject original = (BSONObject) members.get(0);
-        assertEquals(original.get("_id"), 33);
-        assertEquals(original.get("host"), "example.com:7777");
-
-        BSONObject second = (BSONObject) members.get(1);
-        assertEquals(second.get("_id"), 34);
-        assertEquals(second.get("host"), "foo:8888");
-
-        BSONObject third = (BSONObject) members.get(2);
-        assertEquals(third.get("_id"), 35);
-        assertEquals(third.get("host"), "bar:9999");
-    }
-
-    @Test
-    public void testRemoveMember() {
-        int version = 44;
-        BasicBSONObject config = makeSetConfig("replica-set-name", version,
-                makeSetMember(33, "example.com:7777"),
-                makeSetMember(34, "example.com:7778"));
-
-        // Use existing set to add two more members
-        BasicBSONObject newConfig = ReplicaSetConfig.fromExistingConfig(config)
-            .remove("example.com", 7777)
-            .build();
-
-        assertEquals(newConfig.get("version"), version + 1);
-        BasicBSONList members = (BasicBSONList) newConfig.get("members");
-        assertEquals(members.size(), 1);
-        assertEquals(BSONObject.class.cast(members.get(0)).get("host"), "example.com:7778");
-
-        newConfig = ReplicaSetConfig.fromExistingConfig(newConfig)
-            .remove("example.com", 7778)
-            .build();
-
-        members = (BasicBSONList) newConfig.get("members");
-        assertTrue(members.isEmpty());
-    }
-
-    @Test
-    public void testRemoveNonExistentMemberHasNoEffect() {
-        BasicBSONObject config = makeSetConfig("replica-set-name", 1,
-                makeSetMember(33, "example.com:7777"),
-                makeSetMember(34, "example.com:7778"));
-
-        BasicBSONList members = (BasicBSONList) config.get("members");
-        assertEquals(members.size(), 2);
-
-        BasicBSONObject altered = ReplicaSetConfig.fromExistingConfig(config)
-                .remove("foo", 99)
-                .build();
-
-        members = (BasicBSONList) altered.get("members");
-        assertEquals(members.size(), 2);
-    }
-
-    @Test
-    public void testSetOfFourMembersHasThreeVoters() {
-        BasicBSONObject config = makeSetWithNMembers(4);
-        assertEquals(votingMembersOfSet(config).size(), 3, "Expected three voters in set with four members");
-        assertEquals(nonVotingMembersOfSet(config).size(), 1, "Expected one non-voter in set with four members");
-    }
-
-    @Test
-    public void testFourthServerOfFourIsGivenVoteWhenAnotherServerIsRemoved() {
-        BasicBSONObject config = makeSetWithNMembers(4);
-        HostAndPort toRemove = votingMembersOfSet(config).iterator().next();
-
-        BasicBSONObject updated = ReplicaSetConfig.fromExistingConfig(config)
-                .remove(toRemove)
-                .build();
-
-        assertEquals(votingMembersOfSet(updated).size(), 3);
-        assertTrue(nonVotingMembersOfSet(updated).isEmpty());
-
-        BasicBSONList newMembers = BasicBSONList.class.cast(updated.get("members"));
-        for (Object object : newMembers) {
-            BasicBSONObject member = BasicBSONObject.class.cast(object);
-            HostAndPort memberHostAndPort = HostAndPort.fromString(member.getString("host"));
-            assertNotEquals(memberHostAndPort, toRemove);
-        }
-    }
-
-    @Test
-    public void testMaximumNumberOfVotersIsLimited() {
-        BasicBSONObject config = makeSetWithNMembers(ReplicaSetConfig.MAXIMUM_REPLICA_SET_SIZE);
-        int voters = ReplicaSetConfig.MAXIMUM_VOTING_MEMBERS;
-        int nonVoters = ReplicaSetConfig.MAXIMUM_REPLICA_SET_SIZE - voters;
-        assertEquals(votingMembersOfSet(config).size(), voters, "Expected number of voters in max-size set to be " + voters);
-        assertEquals(nonVotingMembersOfSet(config).size(), nonVoters, "Expected number of non-voters in max-size set to be " + nonVoters);
-    }
-
-    @Test(expectedExceptions = IllegalStateException.class)
-    public void testMoreMembersThanMaximumAllowsRejected() {
-        makeSetWithNMembers(ReplicaSetConfig.MAXIMUM_REPLICA_SET_SIZE + 1);
-    }
-
-    @Test
-    public void testPrimaryGivenVoteWhenLastInMemberList() {
-        BasicBSONObject config = ReplicaSetConfig.builder("rs")
-            .member("host-a", 1, 1)
-            .member("host-b", 2, 2)
-            .member("host-c", 3, 3)
-            .member("host-d", 4, 4)
-            .primary(HostAndPort.fromParts("host-d", 4))
-            .build();
-        assertEquals(votingMembersOfSet(config).size(), 3);
-        assertEquals(nonVotingMembersOfSet(config).size(), 1);
-        assertTrue(votingMembersOfSet(config).contains(HostAndPort.fromParts("host-d", 4)));
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerIntegrationTest.java
deleted file mode 100644
index e691206..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBConfigServerIntegrationTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import static org.testng.Assert.assertFalse;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBServer;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBTestHelper;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.collect.ImmutableList;
-
-public class MongoDBConfigServerIntegrationTest {
-    private TestApplication app;
-    private LocalhostMachineProvisioningLocation localhostProvisioningLocation;
-
-    @BeforeMethod(alwaysRun=true)
-    public void setUp() throws Exception {
-        localhostProvisioningLocation = new LocalhostMachineProvisioningLocation();
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-    }
-
-    @AfterMethod(alwaysRun=true)
-    public void tearDown() throws Exception {
-        if (app != null) Entities.destroyAll(app.getManagementContext());
-    }
-    
-    @Test(groups = "Integration")
-    public void testCanStartAndStop() throws Exception {
-        MongoDBConfigServer entity = app.createAndManageChild(EntitySpec.create(MongoDBConfigServer.class)
-                .configure(MongoDBServer.MONGODB_CONF_TEMPLATE_URL, "classpath:///test-mongodb-configserver.conf"));
-        app.start(ImmutableList.of(localhostProvisioningLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(entity, Startable.SERVICE_UP, true);
-        Asserts.assertTrue(MongoDBTestHelper.isConfigServer(entity), "Server is not a config server");
-        entity.stop();
-        assertFalse(entity.getAttribute(Startable.SERVICE_UP));
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeploymentEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeploymentEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeploymentEc2LiveTest.java
deleted file mode 100644
index afe80f9..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeploymentEc2LiveTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import groovy.time.TimeDuration;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBReplicaSet;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBServer;
-import org.apache.brooklyn.test.Asserts;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-/**
- * NOTE: These test will provision 9 machines in AWS, which can cause 'Request limit exceeded' and
- * 'Exhausted available authentication methods' exceptions, depending upon current AWS load. You can
- * mitigate this issue by adding the following lines to your brooklyn.properties:
- *
- * brooklyn.location.jclouds.machineCreateAttempts=3
- * brooklyn.jclouds.aws-ec2.maxConcurrentMachineCreations=5
- */
-@Test
-public class MongoDBShardedDeploymentEc2LiveTest extends AbstractEc2LiveTest {
-
-    private static final Integer ROUTER_CLUSTER_SIZE = 2;
-    private static final Integer REPLICASET_SIZE = 2;
-    private static final Integer SHARD_CLUSTER_SIZE = 3;
-    private static final TimeDuration TIMEOUT = new TimeDuration(0, 3, 0, 0);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        final MongoDBShardedDeployment deployment = app.createAndManageChild(EntitySpec.create(MongoDBShardedDeployment.class)
-                .configure(MongoDBShardedDeployment.INITIAL_ROUTER_CLUSTER_SIZE, ROUTER_CLUSTER_SIZE)
-                .configure(MongoDBShardedDeployment.SHARD_REPLICASET_SIZE, REPLICASET_SIZE)
-                .configure(MongoDBShardedDeployment.INITIAL_SHARD_CLUSTER_SIZE, SHARD_CLUSTER_SIZE)
-                .configure(MongoDBShardedDeployment.MONGODB_REPLICA_SET_SPEC, EntitySpec.create(MongoDBReplicaSet.class)
-                        .configure(MongoDBServer.MONGODB_CONF_TEMPLATE_URL, "classpath:///test-mongodb.conf")
-                        .configure(MongoDBReplicaSet.MEMBER_SPEC, EntitySpec.create(MongoDBServer.class)))
-                .configure(MongoDBShardedDeployment.MONGODB_ROUTER_SPEC, EntitySpec.create(MongoDBRouter.class)
-                        .configure(MongoDBConfigServer.MONGODB_CONF_TEMPLATE_URL, "classpath:///test-mongodb-router.conf"))
-                .configure(MongoDBShardedDeployment.MONGODB_CONFIG_SERVER_SPEC, EntitySpec.create(MongoDBConfigServer.class)
-                        .configure(MongoDBConfigServer.MONGODB_CONF_TEMPLATE_URL, "classpath:///test-mongodb-configserver.conf")));
-
-        app.start(ImmutableList.of(loc));
-        
-        Entities.dumpInfo(app);
-
-        Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT), new Runnable() {
-            public void run() {
-                Assert.assertEquals(deployment.getRouterCluster().getCurrentSize(), ROUTER_CLUSTER_SIZE);
-                Assert.assertEquals(deployment.getShardCluster().getCurrentSize(), SHARD_CLUSTER_SIZE);
-                Assert.assertEquals(deployment.getConfigCluster().getCurrentSize(), MongoDBShardedDeployment.CONFIG_CLUSTER_SIZE.getDefaultValue());
-                for (Entity entity : deployment.getShardCluster().getMembers()) {
-                    Assert.assertEquals(((MongoDBReplicaSet) entity).getCurrentSize(), REPLICASET_SIZE);
-                }
-            }
-        });
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeploymentIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeploymentIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeploymentIntegrationTest.java
deleted file mode 100644
index e45106e..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardedDeploymentIntegrationTest.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb.sharding;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.apache.brooklyn.entity.nosql.mongodb.AbstractMongoDBServer;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBReplicaSet;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBServer;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBTestHelper;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.Assert;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-import com.mongodb.DBObject;
-
-public class MongoDBShardedDeploymentIntegrationTest extends BrooklynAppLiveTestSupport {
-    
-    private static final Integer ROUTER_CLUSTER_SIZE = 2;
-    private static final Integer REPLICASET_SIZE = 2;
-    private static final Integer SHARD_CLUSTER_SIZE = 3;
-    
-    private LocalhostMachineProvisioningLocation localhostProvisioningLocation;
-
-    @BeforeMethod(alwaysRun=true)
-    public void setUp() throws Exception {
-        super.setUp();
-        localhostProvisioningLocation = app.newLocalhostProvisioningLocation();
-    }
-
-    private MongoDBShardedDeployment makeAndStartDeployment() {
-        final MongoDBShardedDeployment deployment = app.createAndManageChild(EntitySpec.create(MongoDBShardedDeployment.class)
-                .configure(MongoDBShardedDeployment.INITIAL_ROUTER_CLUSTER_SIZE, ROUTER_CLUSTER_SIZE)
-                .configure(MongoDBShardedDeployment.SHARD_REPLICASET_SIZE, REPLICASET_SIZE)
-                .configure(MongoDBShardedDeployment.INITIAL_SHARD_CLUSTER_SIZE, SHARD_CLUSTER_SIZE)
-                .configure(MongoDBShardedDeployment.MONGODB_REPLICA_SET_SPEC, EntitySpec.create(MongoDBReplicaSet.class)
-                        .configure(MongoDBServer.MONGODB_CONF_TEMPLATE_URL, "classpath:///test-mongodb.conf")
-                        .configure(MongoDBReplicaSet.MEMBER_SPEC, EntitySpec.create(MongoDBServer.class)))
-                .configure(MongoDBShardedDeployment.MONGODB_ROUTER_SPEC, EntitySpec.create(MongoDBRouter.class)
-                        .configure(MongoDBConfigServer.MONGODB_CONF_TEMPLATE_URL, "classpath:///test-mongodb-router.conf"))
-                .configure(MongoDBShardedDeployment.MONGODB_CONFIG_SERVER_SPEC, EntitySpec.create(MongoDBConfigServer.class)
-                        .configure(MongoDBConfigServer.MONGODB_CONF_TEMPLATE_URL, "classpath:///test-mongodb-configserver.conf")));
-        app.start(ImmutableList.of(localhostProvisioningLocation));
-        EntityTestUtils.assertAttributeEqualsEventually(deployment, Startable.SERVICE_UP, true);
-        return deployment;
-    }
-    
-    @Test(groups = "Integration")
-    public void testCanStartAndStopDeployment() {
-        MongoDBShardedDeployment deployment = makeAndStartDeployment();
-        deployment.stop();
-        EntityTestUtils.assertAttributeEqualsEventually(deployment, Startable.SERVICE_UP, false);
-    }
-    
-    @Test(groups = "Integration")
-    public void testDeployedStructure() {
-        MongoDBShardedDeployment deployment = makeAndStartDeployment();
-        MongoDBConfigServerCluster configServers = deployment.getConfigCluster();
-        MongoDBRouterCluster routers = deployment.getRouterCluster();
-        MongoDBShardCluster shards = deployment.getShardCluster();
-        Assert.assertNotNull(configServers);
-        Assert.assertNotNull(routers);
-        Assert.assertNotNull(shards);
-        Assert.assertEquals(configServers.getCurrentSize(), MongoDBShardedDeployment.CONFIG_CLUSTER_SIZE.getDefaultValue());
-        Assert.assertEquals(routers.getCurrentSize(), ROUTER_CLUSTER_SIZE);
-        Assert.assertEquals(shards.getCurrentSize(), SHARD_CLUSTER_SIZE);
-        for (Entity entity : deployment.getShardCluster().getMembers()) {
-            Assert.assertEquals(((MongoDBReplicaSet)entity).getCurrentSize(), REPLICASET_SIZE);
-        }
-        for (Entity entity : configServers.getMembers()) {
-            checkEntityTypeAndServiceUp(entity, MongoDBConfigServer.class);
-        }
-        for (Entity entity : routers.getMembers()) {
-            checkEntityTypeAndServiceUp(entity, MongoDBRouter.class);
-        }
-        for (Entity entity : shards.getMembers()) {
-            checkEntityTypeAndServiceUp(entity, MongoDBReplicaSet.class);
-        }
-    }
-    
-    @Test(groups = "Integration")
-    private void testReadAndWriteDifferentRouters() {
-        MongoDBShardedDeployment deployment = makeAndStartDeployment();
-        EntityTestUtils.assertAttributeEqualsEventually(deployment, Startable.SERVICE_UP, true);
-        MongoDBRouter router1 = (MongoDBRouter) Iterables.get(deployment.getRouterCluster().getMembers(), 0);
-        MongoDBRouter router2 = (MongoDBRouter) Iterables.get(deployment.getRouterCluster().getMembers(), 1);
-        EntityTestUtils.assertAttributeEqualsEventually(router1, Startable.SERVICE_UP, true);
-        EntityTestUtils.assertAttributeEqualsEventually(router2, Startable.SERVICE_UP, true);
-        
-        String documentId = MongoDBTestHelper.insert(router1, "meaning-of-life", 42);
-        DBObject docOut = MongoDBTestHelper.getById(router2, documentId);
-        Assert.assertEquals(docOut.get("meaning-of-life"), 42);
-        
-        for (Entity entity : Iterables.filter(app.getManagementContext().getEntityManager().getEntitiesInApplication(app), AbstractMongoDBServer.class)) {
-            EntityTestUtils.assertAttributeEqualsEventually(entity, Startable.SERVICE_UP, true);
-        }
-    }
-    
-    private void checkEntityTypeAndServiceUp(Entity entity, Class<? extends Entity> expectedClass) {
-        Assert.assertNotNull(entity);
-        Assert.assertTrue(expectedClass.isAssignableFrom(entity.getClass()), "expected: " + expectedClass 
-                + " on interfaces, found: " + entity.getClass().getInterfaces());
-        EntityTestUtils.assertAttributeEqualsEventually(entity, Startable.SERVICE_UP, true);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/JedisSupport.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/JedisSupport.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/JedisSupport.java
deleted file mode 100644
index 81abb42..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/JedisSupport.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import org.apache.brooklyn.entity.nosql.redis.RedisStore;
-
-import redis.clients.jedis.Jedis;
-
-import com.google.common.base.Strings;
-
-/**
- * {@link RedisStore} testing using Jedis API.
- */
-public class JedisSupport {
-    private static final String TEST_DATA = Strings.repeat("0123456789", 16);
-
-    private RedisStore redis;
-
-    public JedisSupport(RedisStore redis) {
-        this.redis = redis;
-    }
-
-    /**
-     * Exercise the {@link RedisStore} using the Jedis API.
-     */
-    public void redisTest() throws Exception {
-        writeData("brooklyn", TEST_DATA);
-        String result = readData("brooklyn");
-        assertEquals(result, TEST_DATA);
-    }
-    
-    public void writeData(String key, String val) throws Exception {
-        Jedis client = getRedisClient(redis);
-        try {
-            client.set(key, val);
-        } finally {
-            client.disconnect();
-        }
-    }
-
-    public String readData(String key) throws Exception {
-        Jedis client = getRedisClient(redis);
-        try {
-            return client.get(key);
-        } finally {
-            client.disconnect();
-        }
-    }
-
-    private Jedis getRedisClient(RedisStore redis) {
-        int port = redis.getAttribute(RedisStore.REDIS_PORT);
-        String host = redis.getAttribute(RedisStore.HOSTNAME);
-        Jedis client = new Jedis(host, port);
-        client.connect();
-        assertTrue(client.isConnected());
-        return client;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/RedisClusterIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/RedisClusterIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/RedisClusterIntegrationTest.java
deleted file mode 100644
index 32cb37e..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/RedisClusterIntegrationTest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import static org.testng.Assert.assertEquals;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.concurrent.Callable;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.collect.ImmutableList;
-
-public class RedisClusterIntegrationTest {
-
-    private TestApplication app;
-    private Location loc;
-    private RedisCluster cluster;
-
-    @BeforeMethod(alwaysRun=true)
-    public void setup() {
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-        loc = new LocalhostMachineProvisioningLocation();
-    }
-
-    @AfterMethod(alwaysRun=true)
-    public void shutdown() {
-        if (app != null) Entities.destroyAll(app.getManagementContext());
-    }
-
-    @Test(groups = { "Integration" })
-    public void testRedisClusterReplicates() throws Exception {
-        final String key = "mykey";
-        final String val = "1234567890";
-        
-        cluster = app.createAndManageChild(EntitySpec.create(RedisCluster.class)
-                .configure(DynamicCluster.INITIAL_SIZE, 3));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, Startable.SERVICE_UP, true);
-
-        RedisStore master = cluster.getMaster();
-        List<RedisSlave> slaves = ImmutableList.<RedisSlave>copyOf((Collection)cluster.getSlaves().getMembers());
-        
-        assertEquals(slaves.size(), 3);
-        
-        JedisSupport viaMaster = new JedisSupport(master);
-        viaMaster.writeData(key, val);
-        assertEquals(viaMaster.readData(key), val);
-
-        for (RedisSlave slave : slaves) {
-            final JedisSupport viaSlave = new JedisSupport(slave);
-            Asserts.succeedsEventually(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    assertEquals(viaSlave.readData(key), val);
-                    return null;
-                }});
-        }
-
-        // Check that stopping slave will not stop anything else
-        // (it used to stop master because wasn't supplying port!)
-        slaves.get(0).stop();
-        EntityTestUtils.assertAttributeEqualsEventually(slaves.get(0), Startable.SERVICE_UP, false);
-        
-        assertEquals(master.getAttribute(Startable.SERVICE_UP), Boolean.TRUE);
-        for (RedisSlave slave : slaves.subList(1, slaves.size())) {
-            assertEquals(slave.getAttribute(Startable.SERVICE_UP), Boolean.TRUE);
-        }
-        
-        // Check that stopping cluster will stop everything
-        cluster.stop();
-
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, Startable.SERVICE_UP, false);
-        assertEquals(master.getAttribute(Startable.SERVICE_UP), Boolean.FALSE);
-        for (RedisSlave slave : slaves) {
-            assertEquals(slave.getAttribute(Startable.SERVICE_UP), Boolean.FALSE);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/RedisEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/RedisEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/RedisEc2LiveTest.java
deleted file mode 100644
index 1307b17..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/RedisEc2LiveTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import static org.testng.Assert.assertNotNull;
-
-import javax.annotation.Nullable;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityAsserts;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public class RedisEc2LiveTest extends AbstractEc2LiveTest {
-
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(RedisEc2LiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        RedisStore redis = app.createAndManageChild(EntitySpec.create(RedisStore.class));
-        app.start(ImmutableList.of(loc));
-        EntityTestUtils.assertAttributeEqualsEventually(redis, RedisStore.SERVICE_UP, true);
-
-        JedisSupport support = new JedisSupport(redis);
-        support.redisTest();
-        // Confirm sensors are valid
-        EntityTestUtils.assertPredicateEventuallyTrue(redis, new Predicate<RedisStore>() {
-            @Override public boolean apply(@Nullable RedisStore input) {
-                return input != null &&
-                        input.getAttribute(RedisStore.UPTIME) > 0 &&
-                        input.getAttribute(RedisStore.TOTAL_COMMANDS_PROCESSED) >= 0 &&
-                        input.getAttribute(RedisStore.TOTAL_CONNECTIONS_RECEIVED) >= 0 &&
-                        input.getAttribute(RedisStore.EXPIRED_KEYS) >= 0 &&
-                        input.getAttribute(RedisStore.EVICTED_KEYS) >= 0 &&
-                        input.getAttribute(RedisStore.KEYSPACE_HITS) >= 0 &&
-                        input.getAttribute(RedisStore.KEYSPACE_MISSES) >= 0;
-            }
-        });
-
-    }
-
-    @Test(groups = {"Live"})
-    public void testWithOnlyPort22() throws Exception {
-        // CentOS-6.3-x86_64-GA-EBS-02-85586466-5b6c-4495-b580-14f72b4bcf51-ami-bb9af1d2.1
-        jcloudsLocation = mgmt.getLocationRegistry().resolve(LOCATION_SPEC, ImmutableMap.of(
-                "tags", ImmutableList.of(getClass().getName()),
-                "imageId", "us-east-1/ami-a96b01c0", 
-                "hardwareId", SMALL_HARDWARE_ID));
-
-        RedisStore server = app.createAndManageChild(EntitySpec.create(RedisStore.class)
-                .configure(RedisStore.PROVISIONING_PROPERTIES.subKey(CloudLocationConfig.INBOUND_PORTS.getName()), ImmutableList.of(22)));
-        
-        app.start(ImmutableList.of(jcloudsLocation));
-        
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_UP, true);
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-        
-        Integer port = server.getAttribute(RedisStore.REDIS_PORT);
-        assertNotNull(port);
-        
-        assertViaSshLocalPortListeningEventually(server, port);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/RedisIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/RedisIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/RedisIntegrationTest.java
deleted file mode 100644
index 806bd8e..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/redis/RedisIntegrationTest.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.redis;
-
-import javax.annotation.Nullable;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.time.Duration;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Test the operation of the {@link RedisStore} class.
- */
-public class RedisIntegrationTest {
-
-    private TestApplication app;
-    private Location loc;
-    private RedisStore redis;
-
-    @BeforeMethod(alwaysRun=true)
-    public void setup() {
-        app = TestApplication.Factory.newManagedInstanceForTests();
-        loc = app.newLocalhostProvisioningLocation();
-    }
-
-    @AfterMethod(alwaysRun=true)
-    public void shutdown() {
-        if (app != null) Entities.destroyAll(app.getManagementContext());
-    }
-
-    /**
-     * Test that the server starts up and sets SERVICE_UP correctly.
-     */
-    @Test(groups = { "Integration" })
-    public void canStartupAndShutdown() throws Exception {
-        redis = app.createAndManageChild(EntitySpec.create(RedisStore.class));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(redis, Startable.SERVICE_UP, true);
-
-        redis.stop();
-
-        EntityTestUtils.assertAttributeEqualsEventually(redis, Startable.SERVICE_UP, false);
-    }
-
-    /**
-     * Test that a client can connect to the service.
-     */
-    @Test(groups = { "Integration" })
-    public void testRedisConnection() throws Exception {
-        redis = app.createAndManageChild(EntitySpec.create(RedisStore.class));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(redis, Startable.SERVICE_UP, true);
-
-        JedisSupport support = new JedisSupport(redis);
-        support.redisTest();
-    }
-
-    /**
-     * Test we get sensors from an instance on a non-default port
-     */
-    @Test(groups = { "Integration" })
-    public void testNonStandardPort() throws Exception {
-        redis = app.createAndManageChild(EntitySpec.create(RedisStore.class)
-                .configure(RedisStore.REDIS_PORT, PortRanges.fromString("10000+")));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(redis, Startable.SERVICE_UP, true);
-        JedisSupport support = new JedisSupport(redis);
-        support.redisTest();
-
-        // Increase timeout because test was failing on jenkins sometimes. The log shows only one 
-        // call to `info server` (for obtaining uptime) which took 26 seconds; then 4 seconds later 
-        // this assert failed (with it checking every 500ms). The response did correctly contain
-        // `uptime_in_seconds:27`.
-        EntityTestUtils.assertPredicateEventuallyTrue(ImmutableMap.of("timeout", Duration.FIVE_MINUTES), redis, new Predicate<RedisStore>() {
-            @Override public boolean apply(@Nullable RedisStore input) {
-                return input != null &&
-                        input.getAttribute(RedisStore.UPTIME) > 0 &&
-                        input.getAttribute(RedisStore.TOTAL_COMMANDS_PROCESSED) >= 0 &&
-                        input.getAttribute(RedisStore.TOTAL_CONNECTIONS_RECEIVED) >= 0 &&
-                        input.getAttribute(RedisStore.EXPIRED_KEYS) >= 0 &&
-                        input.getAttribute(RedisStore.EVICTED_KEYS) >= 0 &&
-                        input.getAttribute(RedisStore.KEYSPACE_HITS) >= 0 &&
-                        input.getAttribute(RedisStore.KEYSPACE_MISSES) >= 0;
-            }
-        });
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakClusterEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakClusterEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakClusterEc2LiveTest.java
deleted file mode 100644
index cc0ab66..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakClusterEc2LiveTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.riak;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-public class RiakClusterEc2LiveTest extends AbstractEc2LiveTest {
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(RiakNodeEc2LiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        RiakCluster cluster = app.createAndManageChild(EntitySpec.create(RiakCluster.class)
-                .configure(RiakCluster.INITIAL_SIZE, 3)
-                .configure(RiakCluster.MEMBER_SPEC, EntitySpec.create(RiakNode.class)));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, RiakNode.SERVICE_UP, true);
-
-        RiakNode first = (RiakNode) Iterables.get(cluster.getMembers(), 0);
-        RiakNode second = (RiakNode) Iterables.get(cluster.getMembers(), 1);
-
-        assertNodesUpAndInCluster(first, second);
-        
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, Attributes.SERVICE_UP, true);
-    }
-    
-    private void assertNodesUpAndInCluster(final RiakNode... nodes) {
-        for (final RiakNode node : nodes) {
-            EntityTestUtils.assertAttributeEqualsEventually(node, RiakNode.SERVICE_UP, true);
-            EntityTestUtils.assertAttributeEqualsEventually(node, RiakNode.RIAK_NODE_HAS_JOINED_CLUSTER, true);
-        }
-    }
-
-    @Test(enabled = false)
-    public void testDummy() {
-    } // Convince TestNG IDE integration that this really does have test methods
-
-
-    @Override
-    public void test_Ubuntu_12_0() throws Exception {
-        //Override to add the custom securityGroup for opening Riak ports.
-        // Image: {id=us-east-1/ami-d0f89fb9, providerId=ami-d0f89fb9, name=ubuntu/images/ebs/ubuntu-precise-12.04-amd64-server-20130411.1, location={scope=REGION, id=us-east-1, description=us-east-1, parent=aws-ec2, iso3166Codes=[US-VA]}, os={family=ubuntu, arch=paravirtual, version=12.04, description=099720109477/ubuntu/images/ebs/ubuntu-precise-12.04-amd64-server-20130411.1, is64Bit=true}, description=099720109477/ubuntu/images/ebs/ubuntu-precise-12.04-amd64-server-20130411.1, version=20130411.1, status=AVAILABLE[available], loginUser=ubuntu, userMetadata={owner=099720109477, rootDeviceType=ebs, virtualizationType=paravirtual, hypervisor=xen}}
-        runTest(ImmutableMap.of("imageId", "us-east-1/ami-d0f89fb9", "loginUser", "ubuntu", "hardwareId", SMALL_HARDWARE_ID, "securityGroups", "RiakSecurityGroup"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeEc2LiveTest.java
deleted file mode 100644
index fa01e3e..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeEc2LiveTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.riak;
-
-import static org.testng.Assert.assertNotNull;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityAsserts;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public class RiakNodeEc2LiveTest extends AbstractEc2LiveTest {
-
-    @SuppressWarnings("unused")
-    private static final Logger LOG = LoggerFactory.getLogger(RiakNodeEc2LiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        RiakNode entity = app.createAndManageChild(EntitySpec.create(RiakNode.class));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(entity, RiakNode.SERVICE_UP, true);
-
-    }
-
-    @Test(groups = {"Live"})
-    public void testWithOnlyPort22() throws Exception {
-        // CentOS-6.3-x86_64-GA-EBS-02-85586466-5b6c-4495-b580-14f72b4bcf51-ami-bb9af1d2.1
-        jcloudsLocation = mgmt.getLocationRegistry().resolve(LOCATION_SPEC, ImmutableMap.of(
-                "tags", ImmutableList.of(getClass().getName()),
-                "imageId", "us-east-1/ami-a96b01c0", 
-                "hardwareId", SMALL_HARDWARE_ID));
-
-        RiakNode server = app.createAndManageChild(EntitySpec.create(RiakNode.class)
-                .configure(RiakNode.PROVISIONING_PROPERTIES.subKey(CloudLocationConfig.INBOUND_PORTS.getName()), ImmutableList.of(22))
-                .configure(RiakNode.USE_HTTP_MONITORING, false));
-        
-        app.start(ImmutableList.of(jcloudsLocation));
-        
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_UP, true);
-        EntityAsserts.assertAttributeEqualsEventually(server, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
-        
-        Integer port = server.getAttribute(RiakNode.RIAK_PB_PORT);
-        assertNotNull(port);
-        
-        assertViaSshLocalPortListeningEventually(server, port);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeGoogleComputeLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeGoogleComputeLiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeGoogleComputeLiveTest.java
deleted file mode 100644
index 6904f0f..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeGoogleComputeLiveTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.riak;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.entity.AbstractGoogleComputeLiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-
-public class RiakNodeGoogleComputeLiveTest extends AbstractGoogleComputeLiveTest {
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        RiakCluster cluster = app.createAndManageChild(EntitySpec.create(RiakCluster.class)
-                .configure(RiakCluster.INITIAL_SIZE, 2)
-                .configure(RiakCluster.MEMBER_SPEC, EntitySpec.create(RiakNode.class)));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(cluster, RiakCluster.SERVICE_UP, true);
-
-        RiakNode first = (RiakNode) Iterables.get(cluster.getMembers(), 0);
-        RiakNode second = (RiakNode) Iterables.get(cluster.getMembers(), 1);
-
-        EntityTestUtils.assertAttributeEqualsEventually(first, RiakNode.SERVICE_UP, true);
-        EntityTestUtils.assertAttributeEqualsEventually(second, RiakNode.SERVICE_UP, true);
-
-        EntityTestUtils.assertAttributeEqualsEventually(first, RiakNode.RIAK_NODE_HAS_JOINED_CLUSTER, true);
-        EntityTestUtils.assertAttributeEqualsEventually(second, RiakNode.RIAK_NODE_HAS_JOINED_CLUSTER, true);
-
-    }
-
-    @Test(groups = {"Live"})
-    @Override
-    public void test_DefaultImage() throws Exception {
-        super.test_DefaultImage();
-    }
-
-    @Test(enabled = false)
-    public void testDummy() {
-    } // Convince testng IDE integration that this really does have test methods
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeIntegrationTest.java
deleted file mode 100644
index 0b2a924..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeIntegrationTest.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.riak;
-
-import static org.testng.Assert.assertFalse;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-public class RiakNodeIntegrationTest {
-
-    private TestApplication app;
-    private LocalhostMachineProvisioningLocation localhostProvisioningLocation;
-
-    @BeforeMethod(alwaysRun = true)
-    public void setUp() throws Exception {
-        localhostProvisioningLocation = new LocalhostMachineProvisioningLocation();
-        app = TestApplication.Factory.newManagedInstanceForTests();
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void tearDown() throws Exception {
-        if (app != null) Entities.destroyAll(app.getManagementContext());
-    }
-
-
-    /*
-        Exception org.apache.brooklyn.util.exceptions.PropagatedRuntimeException
-        
-        Message: (none)
-        Stacktrace:
-        
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:103)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:353)
-        at org.apache.brooklyn.util.core.task.DynamicTasks$TaskQueueingResult.andWaitForSuccess(DynamicTasks.java:159)
-        at org.apache.brooklyn.core.objs.proxy.EntityProxyImpl.invoke(EntityProxyImpl.java:211)
-        at com.sun.proxy.$Proxy267.start(Unknown Source)
-        at org.apache.brooklyn.entity.nosql.riak.RiakNodeIntegrationTest.testCanStartAndStop(RiakNodeIntegrationTest.java:57)
-        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-        at java.lang.reflect.Method.invoke(Method.java:606)
-        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
-        at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
-        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
-        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
-        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
-        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
-        at org.testng.TestRunner.privateRun(TestRunner.java:767)
-        at org.testng.TestRunner.run(TestRunner.java:617)
-        at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
-        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
-        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
-        at org.testng.SuiteRunner.run(SuiteRunner.java:254)
-        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
-        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
-        at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
-        at org.testng.TestNG.run(TestNG.java:1057)
-        at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:115)
-        at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:205)
-        at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)
-        at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
-        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
-        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
-        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at Application[bHAUtUrk]: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RiakNodeImpl{id=EA5VTSqO}: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:351)
-        ... 32 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at Application[bHAUtUrk]: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RiakNodeImpl{id=EA5VTSqO}: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.handleEffectorException(EffectorUtils.java:270)
-        at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:255)
-        at org.apache.brooklyn.core.effector.MethodEffector.call(MethodEffector.java:149)
-        at org.apache.brooklyn.core.entity.trait.Startable$StartEffectorBody.call(Startable.java:56)
-        at org.apache.brooklyn.core.entity.trait.Startable$StartEffectorBody.call(Startable.java:50)
-        at org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:468)
-        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
-        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
-        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
-        at java.lang.Thread.run(Thread.java:745)
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RiakNodeImpl{id=EA5VTSqO}: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:332)
-        at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:250)
-        ... 10 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RiakNodeImpl{id=EA5VTSqO}: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:103)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:353)
-        at org.apache.brooklyn.core.entity.trait.StartableMethods.start(StartableMethods.java:53)
-        at org.apache.brooklyn.core.entity.AbstractApplication.doStart(AbstractApplication.java:178)
-        at org.apache.brooklyn.core.entity.AbstractApplication.start(AbstractApplication.java:155)
-        at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
-        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-        at java.lang.reflect.Method.invoke(Method.java:606)
-        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
-        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
-        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1085)
-        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
-        at groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
-        at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
-        at org.apache.brooklyn.util.groovy.GroovyJavaMethods.invokeMethodOnMetaClass(GroovyJavaMethods.java:191)
-        at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:304)
-        at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:328)
-        ... 11 more
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RiakNodeImpl{id=EA5VTSqO}: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:351)
-        ... 26 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RiakNodeImpl{id=EA5VTSqO}: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:103)
-        at org.apache.brooklyn.util.core.task.ParallelTask.runJobs(ParallelTask.java:80)
-        at org.apache.brooklyn.util.core.task.CompoundTask$1.call(CompoundTask.java:81)
-        at org.apache.brooklyn.util.core.task.CompoundTask$1.call(CompoundTask.java:79)
-        ... 5 more
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RiakNodeImpl{id=EA5VTSqO}: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.ParallelTask.runJobs(ParallelTask.java:63)
-        ... 7 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at RiakNodeImpl{id=EA5VTSqO}: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.handleEffectorException(EffectorUtils.java:270)
-        at org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$2.handleException(EffectorTasks.java:90)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask.handleException(DynamicSequentialTask.java:452)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:400)
-        ... 5 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:103)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:353)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask.drain(DynamicSequentialTask.java:475)
-        at org.apache.brooklyn.util.core.task.DynamicTasks.drain(DynamicTasks.java:313)
-        at org.apache.brooklyn.util.core.task.DynamicTasks.waitForLast(DynamicTasks.java:302)
-        at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks.start(MachineLifecycleEffectorTasks.java:314)
-        at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$StartEffectorBody.call(MachineLifecycleEffectorTasks.java:214)
-        at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$StartEffectorBody.call(MachineLifecycleEffectorTasks.java:201)
-        at org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:342)
-        ... 5 more
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:351)
-        ... 13 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:103)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:353)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask.drain(DynamicSequentialTask.java:475)
-        at org.apache.brooklyn.util.core.task.DynamicTasks.drain(DynamicTasks.java:313)
-        at org.apache.brooklyn.util.core.task.DynamicTasks.waitForLast(DynamicTasks.java:302)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:383)
-        ... 5 more
-        Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:351)
-        ... 9 more
-        Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:103)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:353)
-        at org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper.execute(ScriptHelper.java:337)
-        at org.apache.brooklyn.entity.nosql.riak.RiakNodeSshDriver.launch(RiakNodeSshDriver.java:335)
-        at org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessDriver$11.run(AbstractSoftwareProcessDriver.java:163)
-        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
-        at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:342)
-        ... 5 more
-        Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
-        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
-        at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
-        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:342)
-        at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:351)
-        ... 10 more
-        Caused by: java.lang.IllegalStateException: Execution failed, invalid result 1 for launching RiakNodeImpl{id=EA5VTSqO}
-        at org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper.logWithDetailsAndThrow(ScriptHelper.java:388)
-        at org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper.executeInternal(ScriptHelper.java:377)
-        at org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper$8.call(ScriptHelper.java:287)
-        at org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper$8.call(ScriptHelper.java:285)
-        ... 6 more
-     */
-    @Test(groups = {"Integration","Broken"})
-    public void testCanStartAndStop() throws Exception {
-        RiakNode entity = app.createAndManageChild(EntitySpec.create(RiakNode.class)
-                .configure(RiakNode.SUGGESTED_VERSION, "2.1.1"));
-        app.start(ImmutableList.of(localhostProvisioningLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(entity, Startable.SERVICE_UP, true);
-        entity.stop();
-        assertFalse(entity.getAttribute(Startable.SERVICE_UP));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeSoftlayerLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeSoftlayerLiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeSoftlayerLiveTest.java
deleted file mode 100644
index 846801f..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeSoftlayerLiveTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.riak;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.entity.AbstractSoftlayerLiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.BeforeMethod;
-
-import com.google.common.collect.ImmutableList;
-
-public class RiakNodeSoftlayerLiveTest extends AbstractSoftlayerLiveTest {
-
-    @BeforeMethod(alwaysRun=true)
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        RiakNode entity = app.createAndManageChild(EntitySpec.create(RiakNode.class)
-                .configure(RiakNode.SUGGESTED_VERSION, "2.1.1"));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(entity, RiakNode.SERVICE_UP, true);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/AbstractSolrServerTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/AbstractSolrServerTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/AbstractSolrServerTest.java
deleted file mode 100644
index 67f6eac..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/AbstractSolrServerTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.solr;
-
-import org.testng.annotations.BeforeMethod;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-
-/**
- * Solr test framework for integration and live tests.
- */
-public class AbstractSolrServerTest extends BrooklynAppLiveTestSupport {
-
-    protected Location testLocation;
-    protected SolrServer solr;
-
-    @BeforeMethod(alwaysRun = true)
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        testLocation = app.newLocalhostProvisioningLocation();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrJSupport.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrJSupport.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrJSupport.java
deleted file mode 100644
index 565f750..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrJSupport.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.solr;
-
-import java.util.Map;
-
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.entity.nosql.solr.SolrServer;
-import org.apache.solr.client.solrj.SolrQuery;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
-import org.apache.solr.common.SolrDocument;
-import org.apache.solr.common.SolrInputDocument;
-
-/**
- * Solr testing using SolrJ API.
- */
-public class SolrJSupport {
-
-    private final HttpSolrServer server;
-    
-    public SolrJSupport(SolrServer node, String core) {
-        this(node.getAttribute(Attributes.HOSTNAME), node.getSolrPort(), core);
-    }
-    
-    public SolrJSupport(String hostname, int solrPort, String core) {
-        server = new HttpSolrServer(String.format("http://%s:%d/solr/%s", hostname, solrPort, core));
-        server.setMaxRetries(1);
-        server.setConnectionTimeout(5000);
-        server.setSoTimeout(5000);
-    }
-
-    public void commit() throws Exception {
-        server.commit();
-    }
-
-    public void addDocument(Map<String, Object> fields) throws Exception {
-        SolrInputDocument doc = new SolrInputDocument();
-        for (String field : fields.keySet()) {
-            doc.setField(field, fields.get(field));
-        }
-        server.add(doc, 100);
-    }
-
-    public Iterable<SolrDocument> getDocuments() throws Exception {
-        SolrQuery solrQuery = new SolrQuery();
-        solrQuery.setQuery("*:*");
-        
-        return server.query(solrQuery).getResults();
-    }
-}


[33/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-base.min.css
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-base.min.css b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-base.min.css
deleted file mode 100644
index 3e9bfde..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/css/mobile-angular-ui-base.min.css
+++ /dev/null
@@ -1 +0,0 @@
-@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.1.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0) format('embedded-opentype'),url(../fonts/fontawesome-webfont.woff?v=4.1.0) format('woff'),url(../fonts/fontawesome-webfont.ttf?v=4.1.0) format('truetype'),url(../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}
 .fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rota
 tion=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text
 -align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{
 content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f03
 7"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-ch
 evron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye
 :before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.
 fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-dow
 n:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline
 :before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:befo
 re,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}
 .fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}
 .fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:
 before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"
 }.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{conte
 nt:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.
 fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:bef
 ore{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{cont
 ent:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:befor
 e{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{ba
 ckground:0 0}a:active{outline:0}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=sear
 ch]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a:focus{color:#0055b3;text-decoration:underline;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2
 s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#999}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .
 small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}.small,small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#007aff}.text-success{color:#3c763d}.text-info{color:#31708f}.text-warning{color:#8a6d3b}.text-danger{color:#a94442}.bg-primary{color:#fff;background-color:#007aff}.bg-success{background-color:#dff0d8}.bg-info{background-color:#d9edf7}.bg-warning{background-color:#fcf8e3}.bg-danger{background-color:#f2dede}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-uns
 tyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.bl
 ockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}blockquote:after,blockquote:before{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radi
 us:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-
 xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.3333
 3333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>c
 aption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*
 =col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info
 >th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}{background-color:#ebcccc}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{displ
 ay:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9}.form-control::-moz-placeholder{color:#999;opacity:1
 }.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=date]{line-height:34px}.checkbox,.radio{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.checkbox label,.radio label{display:inline;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{float:left;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline[disabled],.checkbox[disabled],.radio-inline[disabled],.radio[disabled
 ],fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-
 success .radio,.has-success .radio-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.0
 75),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .control-label,.form-horizontal
  .radio,.form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn.active:focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:focus{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;background-image:none}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events
 :none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default:active,.btn-default:focus,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default.active,.btn-default:active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled]:active,.btn-default[disabled]:focus,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#007aff;border-color:#006ee6}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.open .dropd
 own-toggle.btn-primary{color:#fff;background-color:#0066d6;border-color:#0051a8}.btn-primary.active,.btn-primary:active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus{background-color:#007aff;border-color:#006ee6}.btn-primary .badge{color:#007aff;background-color:#fff}.btn-success{color:#fff;background-color:#4cd964;border-color:#37d552}.btn-success.active,.btn-success:active,.btn-success:focus,.open .dropdown-toggle.btn-success{color:#fff;background-color:#2cd048;border-color:#24aa3b}.btn-success.active,.btn-success:active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-succe
 ss.disabled.active,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled]:active,.btn-success[disabled]:focus,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus{background-color:#4cd964;border-color:#37d552}.btn-success .badge{color:#4cd964;background-color:#fff}.btn-info{color:#fff;background-color:#34aadc;border-color:#249ed2}.btn-info.active,.btn-info:active,.btn-info:focus,.open .dropdown-toggle.btn-info{color:#fff;background-color:#2295c5;border-color:#1b779e}.btn-info.active,.btn-info:active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled]:active,.btn-info[disabled]:focus,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fiel
 dset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus{background-color:#34aadc;border-color:#249ed2}.btn-info .badge{color:#34aadc;background-color:#fff}.btn-warning{color:#fff;background-color:#fc0;border-color:#e6b800}.btn-warning.active,.btn-warning:active,.btn-warning:focus,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#d6ab00;border-color:#a88700}.btn-warning.active,.btn-warning:active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus{background-color:#fc0;border-color:#e6b800}.btn-warning .badge{color:#fc0;background-color:#fff}.btn-danger{color:#fff;background-color:#ff3b30;bord
 er-color:#ff2317}.btn-danger.active,.btn-danger:active,.btn-danger:focus,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#ff1407;border-color:#d80b00}.btn-danger.active,.btn-danger:active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus{background-color:#ff3b30;border-color:#ff2317}.btn-danger .badge{color:#ff3b30;background-color:#fff}.btn-link{color:#007aff;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus{border-color:transparen
 t}.btn-link:focus{color:#0055b3;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;v
 ertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;backgr
 ound-color:#007aff}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left
 }.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus{z-index:2}.btn-group-vertical>.btn:focus,.btn-group>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:fir
 st-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;
 max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-
 left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=checkbox],[data-toggle=buttons]>.btn>input[type=radio]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>
 .input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:n
 ot(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-chil
 d{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus{text-decorat
 ion:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:focus{background-color:#eee;border-color:#007aff}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.nav-tabs.nav-justified>li>a{margin-right:0;borde
 r-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus{color:#fff;background-color:#007aff}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar-collapse{max-height:
 340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:focus{text-decoration:none}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .ic
 on-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}.navbar-default{background-color:#f7f7f7;border-color
 :#ccc}.navbar-default .navbar-brand{color:#007aff}.navbar-default .navbar-brand:focus{color:#0062cc;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#007aff}.navbar-default .navbar-nav>li>a:focus{color:#006ee6;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus{color:#1a87ff;background-color:#e6e6e6}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus{color:#66afff;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#ccc}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#ccc}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus{background-color:#e6e6e6;color:#1a87ff}.navbar-default .navbar-link{color:#007aff}.navbar-inverse{background-color:#222;border-colo
 r:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}.navbar-inverse .navbar-link{color:#999}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:cen
 ter}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:focus{background-color:gray}.label-primary{background-color:#007aff}.label-primary[href]:focus{background-color:#0062cc}.label-success{background-color:#4cd964}.label-success[href]:focus{backgro
 und-color:#2ac845}.label-info{background-color:#34aadc}.label-info[href]:focus{background-color:#218ebd}.label-warning{background-color:#fc0}.label-warning[href]:focus{background-color:#cca300}.label-danger{background-color:#ff3b30}.label-danger[href]:focus{background-color:#fc0d00}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:400;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.nav-pills>.active>a>.badge,a.list-group-item.active>.badge{color:#007aff;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s 
 ease-in-out}.thumbnail a>img,.thumbnail>img{margin-left:auto;margin-right:auto}a.thumbnail.active,a.thumbnail:focus{border-color:#007aff}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:400}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger
 {background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#007aff;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75
 %,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#4cd964}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#34aadc}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,tr
 ansparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#fc0}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#ff3b30}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);backg
 round-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;background-color:#fff}.list-group-item:last-child{margin-bottom:0}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#007aff;border-color:#007aff}a
 .list-group-item.active .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#cce4ff}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;backg
 round-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;border:1px solid transparent}.panel-heading{border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margi
 n-top:0;margin-bottom:0}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-chi
 ld>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.pa
 nel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-chil
 d,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-c
 hild>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-
 bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-borde
 red>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;overflow:hidden}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bott
 om-color:#ddd}.panel-primary{border-color:#007aff}.panel-primary>.panel-heading{color:#fff;background-color:#007aff;border-color:#007aff}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#007aff}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#007aff}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-colo
 r:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:400;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:focus{color:#000;text-decor
 ation:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);backg
 round-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{ma
 rgin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-
 width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{bor
 der-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;
 bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 10
 0%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:focus{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%}.
 carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}.btn-group-vertic
 al>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{content:" ";display:table}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}
 .hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-print,.visible-sm,.visible-xs{display:none!important}body{font-weight:200}a{text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0);color:#007aff}.btn:active,a:active{opacity:.6;filter:alpha(opacity=60);-webkit-box-shadow:none;box-shadow:none}a:focus{outline:0 none}h1,h2,h3,h4,h5,h6{margin-top:0;padding-top:0}.page-header{margin-top:10px}.page-header h1,.page-header h2,.page-header h3,.page-header h4,.page-header h5,.page-header h6{margin-bottom:0;padding-bottom:0}img{max-width:100%}body,html{height:100%;width:100%;overflow:hidden}input[type=email],input[type=number],input[type=search],input[type=tel],input[type=text],input[type=url],textarea{-webkit-a
 ppearance:none}.form-control:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}.form-control{border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:1px solid #ccc}.form-group{margin-bottom:0;padding:10px 0}.input-group-addon{background:#fff}.control-label{line-height:34px;margin:0}input[type=search]{border-radius:0}.form-actions{margin-top:-20px}.switch{cursor:pointer;position:relative;display:block;width:68px;height:34px;background-color:#fff;border:1px solid #ccc;border-radius:999px}.switch .switch-handle{position:absolute;top:-1px;left:-1px;z-index:2;width:34px;height:34px;background-color:#fff;border:1px solid #ccc;border-radius:100px}.switch.active{background-color:#007aff;border:1px solid #007aff}.switch.active .switch-handle{border-color:#007aff;-webkit-transform:translate3d(34px,0,0);transform:translate3d(34px,0,0)}.switch-transition-enabled{-webkit-transition:background-color 200ms ease,border

<TRUNCATED>

[09/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-1.2.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-1.2.yaml b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-1.2.yaml
deleted file mode 100644
index 045bb45..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-1.2.yaml
+++ /dev/null
@@ -1,644 +0,0 @@
-[#ftl]
-#
-# Cassandra storage config YAML 
-
-# NOTE:
-#   See http://wiki.apache.org/cassandra/StorageConfiguration for
-#   full explanations of configuration directives
-# /NOTE
-
-# The name of the cluster. This is mainly used to prevent machines in
-# one logical cluster from joining another.
-cluster_name: '${entity.clusterName}'
-
-# This defines the number of tokens randomly assigned to this node on the ring
-# The more tokens, relative to other nodes, the larger the proportion of data
-# that this node will store. You probably want all nodes to have the same number
-# of tokens assuming they have equal hardware capability.
-#
-# If you leave this unspecified, Cassandra will use the default of 1 token for legacy compatibility,
-# and will use the initial_token as described below.
-#
-# Specifying initial_token will override this setting.
-#
-# If you already have a cluster with 1 token per node, and wish to migrate to 
-# multiple tokens per node, see http://wiki.apache.org/cassandra/Operations
-num_tokens: ${entity.numTokensPerNode?c}
-
-# If you haven't specified num_tokens, or have set it to the default of 1 then
-# you should always specify InitialToken when setting up a production
-# cluster for the first time, and often when adding capacity later.
-# The principle is that each node should be given an equal slice of
-# the token ring; see http://wiki.apache.org/cassandra/Operations
-# for more details.
-#
-# If blank, Cassandra will request a token bisecting the range of
-# the heaviest-loaded existing node.  If there is no load information
-# available, such as is the case with a new cluster, it will pick
-# a random token, which will lead to hot spots.
-initial_token: ${entity.tokensAsString}
-
-# See http://wiki.apache.org/cassandra/HintedHandoff
-hinted_handoff_enabled: true
-# this defines the maximum amount of time a dead host will have hints
-# generated.  After it has been dead this long, hints will be dropped.
-max_hint_window_in_ms: 10800000 # 3 hours
-# throttle in KB's per second, per delivery thread
-hinted_handoff_throttle_in_kb: 1024
-# Number of threads with which to deliver hints;
-# Consider increasing this number when you have multi-dc deployments, since
-# cross-dc handoff tends to be slower
-max_hints_delivery_threads: 2
-
-# The following setting populates the page cache on memtable flush and compaction
-# WARNING: Enable this setting only when the whole node's data fits in memory.
-# Defaults to: false
-# populate_io_cache_on_flush: false
-
-# authentication backend, implementing IAuthenticator; used to identify users
-authenticator: org.apache.cassandra.auth.AllowAllAuthenticator
-
-# authorization backend, implementing IAuthorizer; used to limit access/provide permissions
-authorizer: org.apache.cassandra.auth.AllowAllAuthorizer
-
-# The partitioner is responsible for distributing rows (by key) across
-# nodes in the cluster.  Any IPartitioner may be used, including your
-# own as long as it is on the classpath.  Out of the box, Cassandra
-# provides org.apache.cassandra.dht.{Murmur3Partitioner, RandomPartitioner
-# ByteOrderedPartitioner, OrderPreservingPartitioner (deprecated)}.
-# 
-# - RandomPartitioner distributes rows across the cluster evenly by md5.
-#   This is the default prior to 1.2 and is retained for compatibility.
-# - Murmur3Partitioner is similar to RandomPartioner but uses Murmur3_128
-#   Hash Function instead of md5.  When in doubt, this is the best option.
-# - ByteOrderedPartitioner orders rows lexically by key bytes.  BOP allows
-#   scanning rows in key order, but the ordering can generate hot spots
-#   for sequential insertion workloads.
-# - OrderPreservingPartitioner is an obsolete form of BOP, that stores
-# - keys in a less-efficient format and only works with keys that are
-#   UTF8-encoded Strings.
-# - CollatingOPP colates according to EN,US rules rather than lexical byte
-#   ordering.  Use this as an example if you need custom collation.
-#
-# See http://wiki.apache.org/cassandra/Operations for more on
-# partitioners and token selection.
-partitioner: org.apache.cassandra.dht.Murmur3Partitioner
-
-# directories where Cassandra should store data on disk.
-data_file_directories:
-    - ${driver.runDir}/data
-
-# commit log
-commitlog_directory: ${driver.runDir}/commitlog
-
-# policy for data disk failures:
-# stop: shut down gossip and Thrift, leaving the node effectively dead, but
-#       still inspectable via JMX.
-# best_effort: stop using the failed disk and respond to requests based on
-#              remaining available sstables.  This means you WILL see obsolete
-#              data at CL.ONE!
-# ignore: ignore fatal errors and let requests fail, as in pre-1.2 Cassandra
-disk_failure_policy: stop
-
-# Maximum size of the key cache in memory.
-#
-# Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the
-# minimum, sometimes more. The key cache is fairly tiny for the amount of
-# time it saves, so it's worthwhile to use it at large numbers.
-# The row cache saves even more time, but must store the whole values of
-# its rows, so it is extremely space-intensive. It's best to only use the
-# row cache if you have hot rows or static rows.
-#
-# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
-#
-# Default value is empty to make it "auto" (min(5% of Heap (in MB), 100MB)). Set to 0 to disable key cache.
-key_cache_size_in_mb:
-
-# Duration in seconds after which Cassandra should
-# safe the keys cache. Caches are saved to saved_caches_directory as
-# specified in this configuration file.
-#
-# Saved caches greatly improve cold-start speeds, and is relatively cheap in
-# terms of I/O for the key cache. Row cache saving is much more expensive and
-# has limited use.
-#
-# Default is 14400 or 4 hours.
-key_cache_save_period: 14400
-
-# Number of keys from the key cache to save
-# Disabled by default, meaning all keys are going to be saved
-# key_cache_keys_to_save: 100
-
-# Maximum size of the row cache in memory.
-# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
-#
-# Default value is 0, to disable row caching.
-row_cache_size_in_mb: 0
-
-# Duration in seconds after which Cassandra should
-# safe the row cache. Caches are saved to saved_caches_directory as specified
-# in this configuration file.
-#
-# Saved caches greatly improve cold-start speeds, and is relatively cheap in
-# terms of I/O for the key cache. Row cache saving is much more expensive and
-# has limited use.
-#
-# Default is 0 to disable saving the row cache.
-row_cache_save_period: 0
-
-# Number of keys from the row cache to save
-# Disabled by default, meaning all keys are going to be saved
-# row_cache_keys_to_save: 100
-
-# The provider for the row cache to use.
-#
-# Supported values are: ConcurrentLinkedHashCacheProvider, SerializingCacheProvider
-#
-# SerializingCacheProvider serialises the contents of the row and stores
-# it in native memory, i.e., off the JVM Heap. Serialized rows take
-# significantly less memory than "live" rows in the JVM, so you can cache
-# more rows in a given memory footprint.  And storing the cache off-heap
-# means you can use smaller heap sizes, reducing the impact of GC pauses.
-#
-# It is also valid to specify the fully-qualified class name to a class
-# that implements org.apache.cassandra.cache.IRowCacheProvider.
-#
-# Defaults to SerializingCacheProvider
-row_cache_provider: SerializingCacheProvider
-
-# saved caches
-saved_caches_directory: ${driver.runDir}/saved_caches
-
-# commitlog_sync may be either "periodic" or "batch." 
-# When in batch mode, Cassandra won't ack writes until the commit log
-# has been fsynced to disk.  It will wait up to
-# commitlog_sync_batch_window_in_ms milliseconds for other writes, before
-# performing the sync.
-#
-# commitlog_sync: batch
-# commitlog_sync_batch_window_in_ms: 50
-#
-# the other option is "periodic" where writes may be acked immediately
-# and the CommitLog is simply synced every commitlog_sync_period_in_ms
-# milliseconds.
-commitlog_sync: periodic
-commitlog_sync_period_in_ms: 10000
-
-# The size of the individual commitlog file segments.  A commitlog
-# segment may be archived, deleted, or recycled once all the data
-# in it (potentally from each columnfamily in the system) has been 
-# flushed to sstables.  
-#
-# The default size is 32, which is almost always fine, but if you are
-# archiving commitlog segments (see commitlog_archiving.properties),
-# then you probably want a finer granularity of archiving; 8 or 16 MB
-# is reasonable.
-commitlog_segment_size_in_mb: 32
-
-# any class that implements the SeedProvider interface and has a
-# constructor that takes a Map<String, String> of parameters will do.
-seed_provider:
-    # Addresses of hosts that are deemed contact points. 
-    # Cassandra nodes use this list of hosts to find each other and learn
-    # the topology of the ring.  You must change this if you are running
-    # multiple nodes!
-    - class_name: org.apache.cassandra.locator.SimpleSeedProvider
-      parameters:
-          # seeds is actually a comma-delimited list of addresses.
-          # Ex: "<ip1>,<ip2>,<ip3>"
-          - seeds: "${entity.seeds}"
-
-# emergency pressure valve: each time heap usage after a full (CMS)
-# garbage collection is above this fraction of the max, Cassandra will
-# flush the largest memtables.  
-#
-# Set to 1.0 to disable.  Setting this lower than
-# CMSInitiatingOccupancyFraction is not likely to be useful.
-#
-# RELYING ON THIS AS YOUR PRIMARY TUNING MECHANISM WILL WORK POORLY:
-# it is most effective under light to moderate load, or read-heavy
-# workloads; under truly massive write load, it will often be too
-# little, too late.
-flush_largest_memtables_at: 0.75
-
-# emergency pressure valve #2: the first time heap usage after a full
-# (CMS) garbage collection is above this fraction of the max,
-# Cassandra will reduce cache maximum _capacity_ to the given fraction
-# of the current _size_.  Should usually be set substantially above
-# flush_largest_memtables_at, since that will have less long-term
-# impact on the system.  
-# 
-# Set to 1.0 to disable.  Setting this lower than
-# CMSInitiatingOccupancyFraction is not likely to be useful.
-reduce_cache_sizes_at: 0.85
-reduce_cache_capacity_to: 0.6
-
-# For workloads with more data than can fit in memory, Cassandra's
-# bottleneck will be reads that need to fetch data from
-# disk. "concurrent_reads" should be set to (16 * number_of_drives) in
-# order to allow the operations to enqueue low enough in the stack
-# that the OS and drives can reorder them.
-#
-# On the other hand, since writes are almost never IO bound, the ideal
-# number of "concurrent_writes" is dependent on the number of cores in
-# your system; (8 * number_of_cores) is a good rule of thumb.
-concurrent_reads: 32
-concurrent_writes: 32
-
-# Total memory to use for memtables.  Cassandra will flush the largest
-# memtable when this much memory is used.
-# If omitted, Cassandra will set it to 1/3 of the heap.
-# memtable_total_space_in_mb: 2048
-
-# Total space to use for commitlogs.  Since commitlog segments are
-# mmapped, and hence use up address space, the default size is 32
-# on 32-bit JVMs, and 1024 on 64-bit JVMs.
-#
-# If space gets above this value (it will round up to the next nearest
-# segment multiple), Cassandra will flush every dirty CF in the oldest
-# segment and remove it.  So a small total commitlog space will tend
-# to cause more flush activity on less-active columnfamilies.
-# commitlog_total_space_in_mb: 4096
-
-# This sets the amount of memtable flush writer threads.  These will
-# be blocked by disk io, and each one will hold a memtable in memory
-# while blocked. If you have a large heap and many data directories,
-# you can increase this value for better flush performance.
-# By default this will be set to the amount of data directories defined.
-#memtable_flush_writers: 1
-
-# the number of full memtables to allow pending flush, that is,
-# waiting for a writer thread.  At a minimum, this should be set to
-# the maximum number of secondary indexes created on a single CF.
-memtable_flush_queue_size: 4
-
-# Whether to, when doing sequential writing, fsync() at intervals in
-# order to force the operating system to flush the dirty
-# buffers. Enable this to avoid sudden dirty buffer flushing from
-# impacting read latencies. Almost always a good idea on SSD:s; not
-# necessarily on platters.
-trickle_fsync: false
-trickle_fsync_interval_in_kb: 10240
-
-# TCP port, for commands and data
-storage_port: ${entity.gossipPort?c}
-
-# SSL port, for encrypted communication.  Unused unless enabled in
-# encryption_options
-ssl_storage_port: ${entity.sslGossipPort?c}
-
-# Address to bind to and tell other Cassandra nodes to connect to. You
-# _must_ change this if you want multiple nodes to be able to
-# communicate!
-# 
-# Leaving it blank leaves it up to InetAddress.getLocalHost(). This
-# will always do the Right Thing *if* the node is properly configured
-# (hostname, name resolution, etc), and the Right Thing is to use the
-# address associated with the hostname (it might not be).
-#
-# Setting this to 0.0.0.0 is always wrong.
-listen_address: ${entity.listenAddress}
-
-# Address to broadcast to other Cassandra nodes
-# Leaving this blank will set it to the same value as listen_address
-broadcast_address: ${entity.broadcastAddress}
-
-# Whether to start the native transport server.
-# Currently, only the thrift server is started by default because the native
-# transport is considered beta.
-# Please note that the address on which the native transport is bound is the
-# same as the rpc_address. The port however is different and specified below.
-start_native_transport: true
-# port for the CQL native transport to listen for clients on
-native_transport_port: ${entity.nativeTransportPort?c}
-# The minimum and maximum threads for handling requests when the native
-# transport is used. The meaning is those is similar to the one of
-# rpc_min_threads and rpc_max_threads, though the default differ slightly and
-# are the ones below:
-#native_transport_min_threads: 16
-#native_transport_max_threads: 128
-
-
-# Whether to start the thrift rpc server.
-start_rpc: true
-# The address to bind the Thrift RPC service to -- clients connect
-# here. Unlike ListenAddress above, you *can* specify 0.0.0.0 here if
-# you want Thrift to listen on all interfaces.
-# 
-# Leaving this blank has the same effect it does for ListenAddress,
-# (i.e. it will be based on the configured hostname of the node).
-rpc_address: ${entity.rpcAddress}
-# port for Thrift to listen for clients on
-rpc_port: ${entity.thriftPort?c}
-
-# enable or disable keepalive on rpc connections
-rpc_keepalive: true
-
-# Cassandra provides three out-of-the-box options for the RPC Server:
-#
-# sync  -> One thread per thrift connection. For a very large number of clients, memory
-#          will be your limiting factor. On a 64 bit JVM, 128KB is the minimum stack size
-#          per thread, and that will correspond to your use of virtual memory (but physical memory
-#          may be limited depending on use of stack space).
-#
-# hsha  -> Stands for "half synchronous, half asynchronous." All thrift clients are handled
-#          asynchronously using a small number of threads that does not vary with the amount
-#          of thrift clients (and thus scales well to many clients). The rpc requests are still
-#          synchronous (one thread per active request).
-#
-# The default is sync because on Windows hsha is about 30% slower.  On Linux,
-# sync/hsha performance is about the same, with hsha of course using less memory.
-#
-# Alternatively,  can provide your own RPC server by providing the fully-qualified class name
-# of an o.a.c.t.TServerFactory that can create an instance of it.
-rpc_server_type: sync
-
-# Uncomment rpc_min|max_thread to set request pool size limits.
-#
-# Regardless of your choice of RPC server (see above), the number of maximum requests in the
-# RPC thread pool dictates how many concurrent requests are possible (but if you are using the sync
-# RPC server, it also dictates the number of clients that can be connected at all).
-#
-# The default is unlimited and thus provide no protection against clients overwhelming the server. You are
-# encouraged to set a maximum that makes sense for you in production, but do keep in mind that
-# rpc_max_threads represents the maximum number of client requests this server may execute concurrently.
-#
-# rpc_min_threads: 16
-# rpc_max_threads: 2048
-
-# uncomment to set socket buffer sizes on rpc connections
-# rpc_send_buff_size_in_bytes:
-# rpc_recv_buff_size_in_bytes:
-
-# Frame size for thrift (maximum field length).
-thrift_framed_transport_size_in_mb: 15
-
-# The max length of a thrift message, including all fields and
-# internal thrift overhead.
-thrift_max_message_length_in_mb: 16
-
-# Set to true to have Cassandra create a hard link to each sstable
-# flushed or streamed locally in a backups/ subdirectory of the
-# Keyspace data.  Removing these links is the operator's
-# responsibility.
-incremental_backups: false
-
-# Whether or not to take a snapshot before each compaction.  Be
-# careful using this option, since Cassandra won't clean up the
-# snapshots for you.  Mostly useful if you're paranoid when there
-# is a data format change.
-snapshot_before_compaction: false
-
-# Whether or not a snapshot is taken of the data before keyspace truncation
-# or dropping of column families. The STRONGLY advised default of true 
-# should be used to provide data safety. If you set this flag to false, you will
-# lose data on truncation or drop.
-auto_snapshot: true
-
-# Add column indexes to a row after its contents reach this size.
-# Increase if your column values are large, or if you have a very large
-# number of columns.  The competing causes are, Cassandra has to
-# deserialize this much of the row to read a single column, so you want
-# it to be small - at least if you do many partial-row reads - but all
-# the index data is read for each access, so you don't want to generate
-# that wastefully either.
-column_index_size_in_kb: 64
-
-# Size limit for rows being compacted in memory.  Larger rows will spill
-# over to disk and use a slower two-pass compaction process.  A message
-# will be logged specifying the row key.
-in_memory_compaction_limit_in_mb: 64
-
-# Number of simultaneous compactions to allow, NOT including
-# validation "compactions" for anti-entropy repair.  Simultaneous
-# compactions can help preserve read performance in a mixed read/write
-# workload, by mitigating the tendency of small sstables to accumulate
-# during a single long running compactions. The default is usually
-# fine and if you experience problems with compaction running too
-# slowly or too fast, you should look at
-# compaction_throughput_mb_per_sec first.
-#
-# concurrent_compactors defaults to the number of cores.
-# Uncomment to make compaction mono-threaded, the pre-0.8 default.
-#concurrent_compactors: 1
-
-# Multi-threaded compaction. When enabled, each compaction will use
-# up to one thread per core, plus one thread per sstable being merged.
-# This is usually only useful for SSD-based hardware: otherwise, 
-# your concern is usually to get compaction to do LESS i/o (see:
-# compaction_throughput_mb_per_sec), not more.
-multithreaded_compaction: false
-
-# Throttles compaction to the given total throughput across the entire
-# system. The faster you insert data, the faster you need to compact in
-# order to keep the sstable count down, but in general, setting this to
-# 16 to 32 times the rate you are inserting data is more than sufficient.
-# Setting this to 0 disables throttling. Note that this account for all types
-# of compaction, including validation compaction.
-compaction_throughput_mb_per_sec: 16
-
-# Track cached row keys during compaction, and re-cache their new
-# positions in the compacted sstable.  Disable if you use really large
-# key caches.
-compaction_preheat_key_cache: true
-
-# Throttles all outbound streaming file transfers on this node to the
-# given total throughput in Mbps. This is necessary because Cassandra does
-# mostly sequential IO when streaming data during bootstrap or repair, which
-# can lead to saturating the network connection and degrading rpc performance.
-# When unset, the default is 400 Mbps or 50 MB/s.
-# stream_throughput_outbound_megabits_per_sec: 400
-
-# How long the coordinator should wait for read operations to complete
-read_request_timeout_in_ms: 10000
-# How long the coordinator should wait for seq or index scans to complete
-range_request_timeout_in_ms: 10000
-# How long the coordinator should wait for writes to complete
-write_request_timeout_in_ms: 10000
-# How long the coordinator should wait for truncates to complete
-# (This can be much longer, because unless auto_snapshot is disabled
-# we need to flush first so we can snapshot before removing the data.)
-truncate_request_timeout_in_ms: 60000
-# The default timeout for other, miscellaneous operations
-request_timeout_in_ms: 10000
-
-# Enable operation timeout information exchange between nodes to accurately
-# measure request timeouts, If disabled cassandra will assuming the request
-# was forwarded to the replica instantly by the coordinator
-#
-# Warning: before enabling this property make sure to ntp is installed
-# and the times are synchronized between the nodes.
-cross_node_timeout: false
-
-# Enable socket timeout for streaming operation.
-# When a timeout occurs during streaming, streaming is retried from the start
-# of the current file. This *can* involve re-streaming an important amount of
-# data, so you should avoid setting the value too low.
-# Default value is 0, which never timeout streams.
-# streaming_socket_timeout_in_ms: 0
-
-# phi value that must be reached for a host to be marked down.
-# most users should never need to adjust this.
-# phi_convict_threshold: 8
-
-# endpoint_snitch -- Set this to a class that implements
-# IEndpointSnitch.  The snitch has two functions:
-# - it teaches Cassandra enough about your network topology to route
-#   requests efficiently
-# - it allows Cassandra to spread replicas around your cluster to avoid
-#   correlated failures. It does this by grouping machines into
-#   "datacenters" and "racks."  Cassandra will do its best not to have
-#   more than one replica on the same "rack" (which may not actually
-#   be a physical location)
-#
-# IF YOU CHANGE THE SNITCH AFTER DATA IS INSERTED INTO THE CLUSTER,
-# YOU MUST RUN A FULL REPAIR, SINCE THE SNITCH AFFECTS WHERE REPLICAS
-# ARE PLACED.
-#
-# Out of the box, Cassandra provides
-#  - SimpleSnitch:
-#    Treats Strategy order as proximity. This improves cache locality
-#    when disabling read repair, which can further improve throughput.
-#    Only appropriate for single-datacenter deployments.
-#  - PropertyFileSnitch:
-#    Proximity is determined by rack and data center, which are
-#    explicitly configured in cassandra-topology.properties.
-#  - GossipingPropertyFileSnitch
-#    The rack and datacenter for the local node are defined in
-#    cassandra-rackdc.properties and propagated to other nodes via gossip.  If
-#    cassandra-topology.properties exists, it is used as a fallback, allowing
-#    migration from the PropertyFileSnitch.
-#  - RackInferringSnitch:
-#    Proximity is determined by rack and data center, which are
-#    assumed to correspond to the 3rd and 2nd octet of each node's
-#    IP address, respectively.  Unless this happens to match your
-#    deployment conventions (as it did Facebook's), this is best used
-#    as an example of writing a custom Snitch class.
-#  - Ec2Snitch:
-#    Appropriate for EC2 deployments in a single Region.  Loads Region
-#    and Availability Zone information from the EC2 API. The Region is
-#    treated as the Datacenter, and the Availability Zone as the rack.
-#    Only private IPs are used, so this will not work across multiple
-#    Regions.
-#  - Ec2MultiRegionSnitch:
-#    Uses public IPs as broadcast_address to allow cross-region
-#    connectivity.  (Thus, you should set seed addresses to the public
-#    IP as well.) You will need to open the storage_port or
-#    ssl_storage_port on the public IP firewall.  (For intra-Region
-#    traffic, Cassandra will switch to the private IP after
-#    establishing a connection.)
-#
-# You can use a custom Snitch by setting this to the full class name
-# of the snitch, which will be assumed to be on your classpath.
-endpoint_snitch: ${driver.endpointSnitchName}
-
-# controls how often to perform the more expensive part of host score
-# calculation
-dynamic_snitch_update_interval_in_ms: 100 
-# controls how often to reset all host scores, allowing a bad host to
-# possibly recover
-dynamic_snitch_reset_interval_in_ms: 600000
-# if set greater than zero and read_repair_chance is < 1.0, this will allow
-# 'pinning' of replicas to hosts in order to increase cache capacity.
-# The badness threshold will control how much worse the pinned host has to be
-# before the dynamic snitch will prefer other replicas over it.  This is
-# expressed as a double which represents a percentage.  Thus, a value of
-# 0.2 means Cassandra would continue to prefer the static snitch values
-# until the pinned host was 20% worse than the fastest.
-dynamic_snitch_badness_threshold: 0.1
-
-# request_scheduler -- Set this to a class that implements
-# RequestScheduler, which will schedule incoming client requests
-# according to the specific policy. This is useful for multi-tenancy
-# with a single Cassandra cluster.
-# NOTE: This is specifically for requests from the client and does
-# not affect inter node communication.
-# org.apache.cassandra.scheduler.NoScheduler - No scheduling takes place
-# org.apache.cassandra.scheduler.RoundRobinScheduler - Round robin of
-# client requests to a node with a separate queue for each
-# request_scheduler_id. The scheduler is further customized by
-# request_scheduler_options as described below.
-request_scheduler: org.apache.cassandra.scheduler.NoScheduler
-
-# Scheduler Options vary based on the type of scheduler
-# NoScheduler - Has no options
-# RoundRobin
-#  - throttle_limit -- The throttle_limit is the number of in-flight
-#                      requests per client.  Requests beyond 
-#                      that limit are queued up until
-#                      running requests can complete.
-#                      The value of 80 here is twice the number of
-#                      concurrent_reads + concurrent_writes.
-#  - default_weight -- default_weight is optional and allows for
-#                      overriding the default which is 1.
-#  - weights -- Weights are optional and will default to 1 or the
-#               overridden default_weight. The weight translates into how
-#               many requests are handled during each turn of the
-#               RoundRobin, based on the scheduler id.
-#
-# request_scheduler_options:
-#    throttle_limit: 80
-#    default_weight: 5
-#    weights:
-#      Keyspace1: 1
-#      Keyspace2: 5
-
-# request_scheduler_id -- An identifer based on which to perform
-# the request scheduling. Currently the only valid option is keyspace.
-# request_scheduler_id: keyspace
-
-# index_interval controls the sampling of entries from the primrary
-# row index in terms of space versus time.  The larger the interval,
-# the smaller and less effective the sampling will be.  In technicial
-# terms, the interval coresponds to the number of index entries that
-# are skipped between taking each sample.  All the sampled entries
-# must fit in memory.  Generally, a value between 128 and 512 here
-# coupled with a large key cache size on CFs results in the best trade
-# offs.  This value is not often changed, however if you have many
-# very small rows (many to an OS page), then increasing this will
-# often lower memory usage without a impact on performance.
-index_interval: 128
-
-# Enable or disable inter-node encryption
-# Default settings are TLS v1, RSA 1024-bit keys (it is imperative that
-# users generate their own keys) TLS_RSA_WITH_AES_128_CBC_SHA as the cipher
-# suite for authentication, key exchange and encryption of the actual data transfers.
-# NOTE: No custom encryption options are enabled at the moment
-# The available internode options are : all, none, dc, rack
-#
-# If set to dc cassandra will encrypt the traffic between the DCs
-# If set to rack cassandra will encrypt the traffic between the racks
-#
-# The passwords used in these options must match the passwords used when generating
-# the keystore and truststore.  For instructions on generating these files, see:
-# http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore
-#
-server_encryption_options:
-    internode_encryption: none
-    keystore: conf/.keystore
-    keystore_password: cassandra
-    truststore: conf/.truststore
-    truststore_password: cassandra
-    # More advanced defaults below:
-    # protocol: TLS
-    # algorithm: SunX509
-    # store_type: JKS
-    # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA]
-
-# enable or disable client/server encryption.
-client_encryption_options:
-    enabled: false
-    keystore: conf/.keystore
-    keystore_password: cassandra
-    # More advanced defaults below:
-    # protocol: TLS
-    # algorithm: SunX509
-    # store_type: JKS
-    # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA]
-
-# internode_compression controls whether traffic between nodes is
-# compressed.
-# can be:  all  - all traffic is compressed
-#          dc   - traffic between different datacenters is compressed
-#          none - nothing is compressed.
-internode_compression: all

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-2.0.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-2.0.yaml b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-2.0.yaml
deleted file mode 100644
index 518379c..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-2.0.yaml
+++ /dev/null
@@ -1,688 +0,0 @@
-[#ftl]
-#
-# Cassandra storage config YAML 
-
-# NOTE:
-#   See http://wiki.apache.org/cassandra/StorageConfiguration for
-#   full explanations of configuration directives
-# /NOTE
-
-# The name of the cluster. This is mainly used to prevent machines in
-# one logical cluster from joining another.
-cluster_name: '${entity.clusterName}'
-
-# This defines the number of tokens randomly assigned to this node on the ring
-# The more tokens, relative to other nodes, the larger the proportion of data
-# that this node will store. You probably want all nodes to have the same number
-# of tokens assuming they have equal hardware capability.
-#
-# If you leave this unspecified, Cassandra will use the default of 1 token for legacy compatibility,
-# and will use the initial_token as described below.
-#
-# Specifying initial_token will override this setting.
-#
-# If you already have a cluster with 1 token per node, and wish to migrate to 
-# multiple tokens per node, see http://wiki.apache.org/cassandra/Operations
-num_tokens: ${entity.numTokensPerNode?c}
-
-# initial_token allows you to specify tokens manually.  While you can use it with
-# vnodes (num_tokens > 1, above) -- in which case you should provide a 
-# comma-separated list -- it's primarily used when adding nodes to legacy clusters 
-# that do not have vnodes enabled.
-# initial_token: ${entity.tokensAsString}
-
-# May either be "true" or "false" to enable globally, or contain a list
-# of data centers to enable per-datacenter.
-# hinted_handoff_enabled: DC1,DC2
-# See http://wiki.apache.org/cassandra/HintedHandoff
-hinted_handoff_enabled: true
-# this defines the maximum amount of time a dead host will have hints
-# generated.  After it has been dead this long, new hints for it will not be
-# created until it has been seen alive and gone down again.
-max_hint_window_in_ms: 10800000 # 3 hours
-# Maximum throttle in KBs per second, per delivery thread.  This will be
-# reduced proportionally to the number of nodes in the cluster.  (If there
-# are two nodes in the cluster, each delivery thread will use the maximum
-# rate; if there are three, each will throttle to half of the maximum,
-# since we expect two nodes to be delivering hints simultaneously.)
-hinted_handoff_throttle_in_kb: 1024
-# Number of threads with which to deliver hints;
-# Consider increasing this number when you have multi-dc deployments, since
-# cross-dc handoff tends to be slower
-max_hints_delivery_threads: 2
-
-# Maximum throttle in KBs per second, total. This will be
-# reduced proportionally to the number of nodes in the cluster.
-batchlog_replay_throttle_in_kb: 1024
-
-# Authentication backend, implementing IAuthenticator; used to identify users
-# Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthenticator,
-# PasswordAuthenticator}.
-#
-# - AllowAllAuthenticator performs no checks - set it to disable authentication.
-# - PasswordAuthenticator relies on username/password pairs to authenticate
-#   users. It keeps usernames and hashed passwords in system_auth.credentials table.
-#   Please increase system_auth keyspace replication factor if you use this authenticator.
-authenticator: AllowAllAuthenticator
-
-# Authorization backend, implementing IAuthorizer; used to limit access/provide permissions
-# Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthorizer,
-# CassandraAuthorizer}.
-#
-# - AllowAllAuthorizer allows any action to any user - set it to disable authorization.
-# - CassandraAuthorizer stores permissions in system_auth.permissions table. Please
-#   increase system_auth keyspace replication factor if you use this authorizer.
-authorizer: AllowAllAuthorizer
-
-# Validity period for permissions cache (fetching permissions can be an
-# expensive operation depending on the authorizer, CassandraAuthorizer is
-# one example). Defaults to 2000, set to 0 to disable.
-# Will be disabled automatically for AllowAllAuthorizer.
-permissions_validity_in_ms: 2000
-
-# The partitioner is responsible for distributing groups of rows (by
-# partition key) across nodes in the cluster.  You should leave this
-# alone for new clusters.  The partitioner can NOT be changed without
-# reloading all data, so when upgrading you should set this to the
-# same partitioner you were already using.
-#
-# Besides Murmur3Partitioner, partitioners included for backwards
-# compatibility include RandomPartitioner, ByteOrderedPartitioner, and
-# OrderPreservingPartitioner.
-#
-partitioner: org.apache.cassandra.dht.Murmur3Partitioner
-
-# Directories where Cassandra should store data on disk.  Cassandra
-# will spread data evenly across them, subject to the granularity of
-# the configured compaction strategy.
-data_file_directories:
-    - ${driver.runDir}/data
-
-# commit log
-commitlog_directory: ${driver.runDir}/commitlog
-
-# policy for data disk failures:
-# stop_paranoid: shut down gossip and Thrift even for single-sstable errors.
-# stop: shut down gossip and Thrift, leaving the node effectively dead, but
-#       can still be inspected via JMX.
-# best_effort: stop using the failed disk and respond to requests based on
-#              remaining available sstables.  This means you WILL see obsolete
-#              data at CL.ONE!
-# ignore: ignore fatal errors and let requests fail, as in pre-1.2 Cassandra
-disk_failure_policy: stop
-
-# policy for commit disk failures:
-# stop: shut down gossip and Thrift, leaving the node effectively dead, but
-#       can still be inspected via JMX.
-# stop_commit: shutdown the commit log, letting writes collect but 
-#              continuing to service reads, as in pre-2.0.5 Cassandra
-# ignore: ignore fatal errors and let the batches fail
-commit_failure_policy: stop
-
-# Maximum size of the key cache in memory.
-#
-# Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the
-# minimum, sometimes more. The key cache is fairly tiny for the amount of
-# time it saves, so it's worthwhile to use it at large numbers.
-# The row cache saves even more time, but must contain the entire row,
-# so it is extremely space-intensive. It's best to only use the
-# row cache if you have hot rows or static rows.
-#
-# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
-#
-# Default value is empty to make it "auto" (min(5% of Heap (in MB), 100MB)). Set to 0 to disable key cache.
-key_cache_size_in_mb:
-
-# Duration in seconds after which Cassandra should
-# save the key cache. Caches are saved to saved_caches_directory as
-# specified in this configuration file.
-#
-# Saved caches greatly improve cold-start speeds, and is relatively cheap in
-# terms of I/O for the key cache. Row cache saving is much more expensive and
-# has limited use.
-#
-# Default is 14400 or 4 hours.
-key_cache_save_period: 14400
-
-# Number of keys from the key cache to save
-# Disabled by default, meaning all keys are going to be saved
-# key_cache_keys_to_save: 100
-
-# Maximum size of the row cache in memory.
-# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
-#
-# Default value is 0, to disable row caching.
-row_cache_size_in_mb: 0
-
-# Duration in seconds after which Cassandra should
-# safe the row cache. Caches are saved to saved_caches_directory as specified
-# in this configuration file.
-#
-# Saved caches greatly improve cold-start speeds, and is relatively cheap in
-# terms of I/O for the key cache. Row cache saving is much more expensive and
-# has limited use.
-#
-# Default is 0 to disable saving the row cache.
-row_cache_save_period: 0
-
-# Number of keys from the row cache to save
-# Disabled by default, meaning all keys are going to be saved
-# row_cache_keys_to_save: 100
-
-# The off-heap memory allocator.  Affects storage engine metadata as
-# well as caches.  Experiments show that JEMAlloc saves some memory
-# than the native GCC allocator (i.e., JEMalloc is more
-# fragmentation-resistant).
-# 
-# Supported values are: NativeAllocator, JEMallocAllocator
-#
-# If you intend to use JEMallocAllocator you have to install JEMalloc as library and
-# modify cassandra-env.sh as directed in the file.
-#
-# Defaults to NativeAllocator
-# memory_allocator: NativeAllocator
-
-# saved caches
-saved_caches_directory: ${driver.runDir}/saved_caches
-
-# commitlog_sync may be either "periodic" or "batch." 
-# When in batch mode, Cassandra won't ack writes until the commit log
-# has been fsynced to disk.  It will wait up to
-# commitlog_sync_batch_window_in_ms milliseconds for other writes, before
-# performing the sync.
-#
-# commitlog_sync: batch
-# commitlog_sync_batch_window_in_ms: 50
-#
-# the other option is "periodic" where writes may be acked immediately
-# and the CommitLog is simply synced every commitlog_sync_period_in_ms
-# milliseconds.  By default this allows 1024*(CPU cores) pending
-# entries on the commitlog queue.  If you are writing very large blobs,
-# you should reduce that; 16*cores works reasonably well for 1MB blobs.
-# It should be at least as large as the concurrent_writes setting.
-commitlog_sync: periodic
-commitlog_sync_period_in_ms: 10000
-# commitlog_periodic_queue_size:
-
-# The size of the individual commitlog file segments.  A commitlog
-# segment may be archived, deleted, or recycled once all the data
-# in it (potentially from each columnfamily in the system) has been
-# flushed to sstables.  
-#
-# The default size is 32, which is almost always fine, but if you are
-# archiving commitlog segments (see commitlog_archiving.properties),
-# then you probably want a finer granularity of archiving; 8 or 16 MB
-# is reasonable.
-commitlog_segment_size_in_mb: 32
-
-# any class that implements the SeedProvider interface and has a
-# constructor that takes a Map<String, String> of parameters will do.
-seed_provider:
-    # Addresses of hosts that are deemed contact points. 
-    # Cassandra nodes use this list of hosts to find each other and learn
-    # the topology of the ring.  You must change this if you are running
-    # multiple nodes!
-    - class_name: org.apache.cassandra.locator.SimpleSeedProvider
-      parameters:
-          # seeds is actually a comma-delimited list of addresses.
-          # Ex: "<ip1>,<ip2>,<ip3>"
-          - seeds: "${entity.seeds}"
-
-# For workloads with more data than can fit in memory, Cassandra's
-# bottleneck will be reads that need to fetch data from
-# disk. "concurrent_reads" should be set to (16 * number_of_drives) in
-# order to allow the operations to enqueue low enough in the stack
-# that the OS and drives can reorder them.
-#
-# On the other hand, since writes are almost never IO bound, the ideal
-# number of "concurrent_writes" is dependent on the number of cores in
-# your system; (8 * number_of_cores) is a good rule of thumb.
-concurrent_reads: 32
-concurrent_writes: 32
-
-# Total memory to use for sstable-reading buffers.  Defaults to
-# the smaller of 1/4 of heap or 512MB.
-# file_cache_size_in_mb: 512
-
-# Total memory to use for memtables.  Cassandra will flush the largest
-# memtable when this much memory is used.
-# If omitted, Cassandra will set it to 1/4 of the heap.
-# memtable_total_space_in_mb: 2048
-
-# Total space to use for commitlogs.  Since commitlog segments are
-# mmapped, and hence use up address space, the default size is 32
-# on 32-bit JVMs, and 1024 on 64-bit JVMs.
-#
-# If space gets above this value (it will round up to the next nearest
-# segment multiple), Cassandra will flush every dirty CF in the oldest
-# segment and remove it.  So a small total commitlog space will tend
-# to cause more flush activity on less-active columnfamilies.
-# commitlog_total_space_in_mb: 4096
-
-# This sets the amount of memtable flush writer threads.  These will
-# be blocked by disk io, and each one will hold a memtable in memory
-# while blocked. If you have a large heap and many data directories,
-# you can increase this value for better flush performance.
-# By default this will be set to the amount of data directories defined.
-#memtable_flush_writers: 1
-
-# the number of full memtables to allow pending flush, that is,
-# waiting for a writer thread.  At a minimum, this should be set to
-# the maximum number of secondary indexes created on a single CF.
-memtable_flush_queue_size: 4
-
-# Whether to, when doing sequential writing, fsync() at intervals in
-# order to force the operating system to flush the dirty
-# buffers. Enable this to avoid sudden dirty buffer flushing from
-# impacting read latencies. Almost always a good idea on SSDs; not
-# necessarily on platters.
-trickle_fsync: false
-trickle_fsync_interval_in_kb: 10240
-
-# TCP port, for commands and data
-storage_port: ${entity.gossipPort?c}
-
-# SSL port, for encrypted communication.  Unused unless enabled in
-# encryption_options
-ssl_storage_port: ${entity.sslGossipPort?c}
-
-# Address to bind to and tell other Cassandra nodes to connect to. You
-# _must_ change this if you want multiple nodes to be able to
-# communicate!
-# 
-# Leaving it blank leaves it up to InetAddress.getLocalHost(). This
-# will always do the Right Thing _if_ the node is properly configured
-# (hostname, name resolution, etc), and the Right Thing is to use the
-# address associated with the hostname (it might not be).
-#
-# Setting this to 0.0.0.0 is always wrong.
-listen_address: ${entity.listenAddress}
-
-# Address to broadcast to other Cassandra nodes
-# Leaving this blank will set it to the same value as listen_address
-broadcast_address: ${entity.broadcastAddress}
-
-# Internode authentication backend, implementing IInternodeAuthenticator;
-# used to allow/disallow connections from peer nodes.
-# internode_authenticator: org.apache.cassandra.auth.AllowAllInternodeAuthenticator
-
-# Whether to start the native transport server.
-# Please note that the address on which the native transport is bound is the
-# same as the rpc_address. The port however is different and specified below.
-start_native_transport: true
-# port for the CQL native transport to listen for clients on
-native_transport_port: ${entity.nativeTransportPort?c}
-# The maximum threads for handling requests when the native transport is used.
-# This is similar to rpc_max_threads though the default differs slightly (and
-# there is no native_transport_min_threads, idle threads will always be stopped
-# after 30 seconds).
-# native_transport_max_threads: 128
-#
-# The maximum size of allowed frame. Frame (requests) larger than this will
-# be rejected as invalid. The default is 256MB.
-# native_transport_max_frame_size_in_mb: 256
-
-# Whether to start the thrift rpc server.
-start_rpc: true
-
-# The address to bind the Thrift RPC service and native transport
-# server -- clients connect here.
-#
-# Leaving this blank has the same effect it does for ListenAddress,
-# (i.e. it will be based on the configured hostname of the node).
-#
-# Note that unlike ListenAddress above, it is allowed to specify 0.0.0.0
-# here if you want to listen on all interfaces, but that will break clients 
-# that rely on node auto-discovery.
-rpc_address: ${entity.rpcAddress}
-# port for Thrift to listen for clients on
-rpc_port: ${entity.thriftPort?c}
-
-# enable or disable keepalive on rpc connections
-rpc_keepalive: true
-
-# Cassandra provides two out-of-the-box options for the RPC Server:
-#
-# sync  -> One thread per thrift connection. For a very large number of clients, memory
-#          will be your limiting factor. On a 64 bit JVM, 180KB is the minimum stack size
-#          per thread, and that will correspond to your use of virtual memory (but physical memory
-#          may be limited depending on use of stack space).
-#
-# hsha  -> Stands for "half synchronous, half asynchronous." All thrift clients are handled
-#          asynchronously using a small number of threads that does not vary with the amount
-#          of thrift clients (and thus scales well to many clients). The rpc requests are still
-#          synchronous (one thread per active request).
-#
-# The default is sync because on Windows hsha is about 30% slower.  On Linux,
-# sync/hsha performance is about the same, with hsha of course using less memory.
-#
-# Alternatively,  can provide your own RPC server by providing the fully-qualified class name
-# of an o.a.c.t.TServerFactory that can create an instance of it.
-rpc_server_type: sync
-
-# Uncomment rpc_min|max_thread to set request pool size limits.
-#
-# Regardless of your choice of RPC server (see above), the number of maximum requests in the
-# RPC thread pool dictates how many concurrent requests are possible (but if you are using the sync
-# RPC server, it also dictates the number of clients that can be connected at all).
-#
-# The default is unlimited and thus provides no protection against clients overwhelming the server. You are
-# encouraged to set a maximum that makes sense for you in production, but do keep in mind that
-# rpc_max_threads represents the maximum number of client requests this server may execute concurrently.
-#
-# rpc_min_threads: 16
-# rpc_max_threads: 2048
-
-# uncomment to set socket buffer sizes on rpc connections
-# rpc_send_buff_size_in_bytes:
-# rpc_recv_buff_size_in_bytes:
-
-# Uncomment to set socket buffer size for internode communication
-# Note that when setting this, the buffer size is limited by net.core.wmem_max
-# and when not setting it it is defined by net.ipv4.tcp_wmem
-# See:
-# /proc/sys/net/core/wmem_max
-# /proc/sys/net/core/rmem_max
-# /proc/sys/net/ipv4/tcp_wmem
-# /proc/sys/net/ipv4/tcp_wmem
-# and: man tcp
-# internode_send_buff_size_in_bytes:
-# internode_recv_buff_size_in_bytes:
-
-# Frame size for thrift (maximum message length).
-thrift_framed_transport_size_in_mb: 15
-
-# Set to true to have Cassandra create a hard link to each sstable
-# flushed or streamed locally in a backups/ subdirectory of the
-# keyspace data.  Removing these links is the operator's
-# responsibility.
-incremental_backups: false
-
-# Whether or not to take a snapshot before each compaction.  Be
-# careful using this option, since Cassandra won't clean up the
-# snapshots for you.  Mostly useful if you're paranoid when there
-# is a data format change.
-snapshot_before_compaction: false
-
-# Whether or not a snapshot is taken of the data before keyspace truncation
-# or dropping of column families. The STRONGLY advised default of true 
-# should be used to provide data safety. If you set this flag to false, you will
-# lose data on truncation or drop.
-auto_snapshot: true
-
-# When executing a scan, within or across a partition, we need to keep the
-# tombstones seen in memory so we can return them to the coordinator, which
-# will use them to make sure other replicas also know about the deleted rows.
-# With workloads that generate a lot of tombstones, this can cause performance
-# problems and even exaust the server heap.
-# (http://www.datastax.com/dev/blog/cassandra-anti-patterns-queues-and-queue-like-datasets)
-# Adjust the thresholds here if you understand the dangers and want to
-# scan more tombstones anyway.  These thresholds may also be adjusted at runtime
-# using the StorageService mbean.
-tombstone_warn_threshold: 1000
-tombstone_failure_threshold: 100000
-
-# Add column indexes to a row after its contents reach this size.
-# Increase if your column values are large, or if you have a very large
-# number of columns.  The competing causes are, Cassandra has to
-# deserialize this much of the row to read a single column, so you want
-# it to be small - at least if you do many partial-row reads - but all
-# the index data is read for each access, so you don't want to generate
-# that wastefully either.
-column_index_size_in_kb: 64
-
-
-# Log WARN on any batch size exceeding this value. 5kb per batch by default.
-# Caution should be taken on increasing the size of this threshold as it can lead to node instability.
-batch_size_warn_threshold_in_kb: 5
-
-# Size limit for rows being compacted in memory.  Larger rows will spill
-# over to disk and use a slower two-pass compaction process.  A message
-# will be logged specifying the row key.
-in_memory_compaction_limit_in_mb: 64
-
-# Number of simultaneous compactions to allow, NOT including
-# validation "compactions" for anti-entropy repair.  Simultaneous
-# compactions can help preserve read performance in a mixed read/write
-# workload, by mitigating the tendency of small sstables to accumulate
-# during a single long running compactions. The default is usually
-# fine and if you experience problems with compaction running too
-# slowly or too fast, you should look at
-# compaction_throughput_mb_per_sec first.
-#
-# concurrent_compactors defaults to the number of cores.
-# Uncomment to make compaction mono-threaded, the pre-0.8 default.
-#concurrent_compactors: 1
-
-# Multi-threaded compaction. When enabled, each compaction will use
-# up to one thread per core, plus one thread per sstable being merged.
-# This is usually only useful for SSD-based hardware: otherwise, 
-# your concern is usually to get compaction to do LESS i/o (see:
-# compaction_throughput_mb_per_sec), not more.
-multithreaded_compaction: false
-
-# Throttles compaction to the given total throughput across the entire
-# system. The faster you insert data, the faster you need to compact in
-# order to keep the sstable count down, but in general, setting this to
-# 16 to 32 times the rate you are inserting data is more than sufficient.
-# Setting this to 0 disables throttling. Note that this account for all types
-# of compaction, including validation compaction.
-compaction_throughput_mb_per_sec: 16
-
-# Track cached row keys during compaction, and re-cache their new
-# positions in the compacted sstable.  Disable if you use really large
-# key caches.
-compaction_preheat_key_cache: true
-
-# Throttles all outbound streaming file transfers on this node to the
-# given total throughput in Mbps. This is necessary because Cassandra does
-# mostly sequential IO when streaming data during bootstrap or repair, which
-# can lead to saturating the network connection and degrading rpc performance.
-# When unset, the default is 200 Mbps or 25 MB/s.
-# stream_throughput_outbound_megabits_per_sec: 200
-
-# How long the coordinator should wait for read operations to complete
-read_request_timeout_in_ms: 5000
-# How long the coordinator should wait for seq or index scans to complete
-range_request_timeout_in_ms: 10000
-# How long the coordinator should wait for writes to complete
-write_request_timeout_in_ms: 2000
-# How long a coordinator should continue to retry a CAS operation
-# that contends with other proposals for the same row
-cas_contention_timeout_in_ms: 1000
-# How long the coordinator should wait for truncates to complete
-# (This can be much longer, because unless auto_snapshot is disabled
-# we need to flush first so we can snapshot before removing the data.)
-truncate_request_timeout_in_ms: 60000
-# The default timeout for other, miscellaneous operations
-request_timeout_in_ms: 10000
-
-# Enable operation timeout information exchange between nodes to accurately
-# measure request timeouts.  If disabled, replicas will assume that requests
-# were forwarded to them instantly by the coordinator, which means that
-# under overload conditions we will waste that much extra time processing 
-# already-timed-out requests.
-#
-# Warning: before enabling this property make sure to ntp is installed
-# and the times are synchronized between the nodes.
-cross_node_timeout: false
-
-# Enable socket timeout for streaming operation.
-# When a timeout occurs during streaming, streaming is retried from the start
-# of the current file. This _can_ involve re-streaming an important amount of
-# data, so you should avoid setting the value too low.
-# Default value is 0, which never timeout streams.
-# streaming_socket_timeout_in_ms: 0
-
-# phi value that must be reached for a host to be marked down.
-# most users should never need to adjust this.
-# phi_convict_threshold: 8
-
-# endpoint_snitch -- Set this to a class that implements
-# IEndpointSnitch.  The snitch has two functions:
-# - it teaches Cassandra enough about your network topology to route
-#   requests efficiently
-# - it allows Cassandra to spread replicas around your cluster to avoid
-#   correlated failures. It does this by grouping machines into
-#   "datacenters" and "racks."  Cassandra will do its best not to have
-#   more than one replica on the same "rack" (which may not actually
-#   be a physical location)
-#
-# IF YOU CHANGE THE SNITCH AFTER DATA IS INSERTED INTO THE CLUSTER,
-# YOU MUST RUN A FULL REPAIR, SINCE THE SNITCH AFFECTS WHERE REPLICAS
-# ARE PLACED.
-#
-# Out of the box, Cassandra provides
-#  - SimpleSnitch:
-#    Treats Strategy order as proximity. This can improve cache
-#    locality when disabling read repair.  Only appropriate for
-#    single-datacenter deployments.
-#  - GossipingPropertyFileSnitch
-#    This should be your go-to snitch for production use.  The rack
-#    and datacenter for the local node are defined in
-#    cassandra-rackdc.properties and propagated to other nodes via
-#    gossip.  If cassandra-topology.properties exists, it is used as a
-#    fallback, allowing migration from the PropertyFileSnitch.
-#  - PropertyFileSnitch:
-#    Proximity is determined by rack and data center, which are
-#    explicitly configured in cassandra-topology.properties.
-#  - Ec2Snitch:
-#    Appropriate for EC2 deployments in a single Region. Loads Region
-#    and Availability Zone information from the EC2 API. The Region is
-#    treated as the datacenter, and the Availability Zone as the rack.
-#    Only private IPs are used, so this will not work across multiple
-#    Regions.
-#  - Ec2MultiRegionSnitch:
-#    Uses public IPs as broadcast_address to allow cross-region
-#    connectivity.  (Thus, you should set seed addresses to the public
-#    IP as well.) You will need to open the storage_port or
-#    ssl_storage_port on the public IP firewall.  (For intra-Region
-#    traffic, Cassandra will switch to the private IP after
-#    establishing a connection.)
-#  - RackInferringSnitch:
-#    Proximity is determined by rack and data center, which are
-#    assumed to correspond to the 3rd and 2nd octet of each node's IP
-#    address, respectively.  Unless this happens to match your
-#    deployment conventions, this is best used as an example of
-#    writing a custom Snitch class and is provided in that spirit.
-#
-# You can use a custom Snitch by setting this to the full class name
-# of the snitch, which will be assumed to be on your classpath.
-endpoint_snitch: ${driver.endpointSnitchName}
-
-# controls how often to perform the more expensive part of host score
-# calculation
-dynamic_snitch_update_interval_in_ms: 100 
-# controls how often to reset all host scores, allowing a bad host to
-# possibly recover
-dynamic_snitch_reset_interval_in_ms: 600000
-# if set greater than zero and read_repair_chance is < 1.0, this will allow
-# 'pinning' of replicas to hosts in order to increase cache capacity.
-# The badness threshold will control how much worse the pinned host has to be
-# before the dynamic snitch will prefer other replicas over it.  This is
-# expressed as a double which represents a percentage.  Thus, a value of
-# 0.2 means Cassandra would continue to prefer the static snitch values
-# until the pinned host was 20% worse than the fastest.
-dynamic_snitch_badness_threshold: 0.1
-
-# request_scheduler -- Set this to a class that implements
-# RequestScheduler, which will schedule incoming client requests
-# according to the specific policy. This is useful for multi-tenancy
-# with a single Cassandra cluster.
-# NOTE: This is specifically for requests from the client and does
-# not affect inter node communication.
-# org.apache.cassandra.scheduler.NoScheduler - No scheduling takes place
-# org.apache.cassandra.scheduler.RoundRobinScheduler - Round robin of
-# client requests to a node with a separate queue for each
-# request_scheduler_id. The scheduler is further customized by
-# request_scheduler_options as described below.
-request_scheduler: org.apache.cassandra.scheduler.NoScheduler
-
-# Scheduler Options vary based on the type of scheduler
-# NoScheduler - Has no options
-# RoundRobin
-#  - throttle_limit -- The throttle_limit is the number of in-flight
-#                      requests per client.  Requests beyond 
-#                      that limit are queued up until
-#                      running requests can complete.
-#                      The value of 80 here is twice the number of
-#                      concurrent_reads + concurrent_writes.
-#  - default_weight -- default_weight is optional and allows for
-#                      overriding the default which is 1.
-#  - weights -- Weights are optional and will default to 1 or the
-#               overridden default_weight. The weight translates into how
-#               many requests are handled during each turn of the
-#               RoundRobin, based on the scheduler id.
-#
-# request_scheduler_options:
-#    throttle_limit: 80
-#    default_weight: 5
-#    weights:
-#      Keyspace1: 1
-#      Keyspace2: 5
-
-# request_scheduler_id -- An identifier based on which to perform
-# the request scheduling. Currently the only valid option is keyspace.
-# request_scheduler_id: keyspace
-
-# Enable or disable inter-node encryption
-# Default settings are TLS v1, RSA 1024-bit keys (it is imperative that
-# users generate their own keys) TLS_RSA_WITH_AES_128_CBC_SHA as the cipher
-# suite for authentication, key exchange and encryption of the actual data transfers.
-# Use the DHE/ECDHE ciphers if running in FIPS 140 compliant mode.
-# NOTE: No custom encryption options are enabled at the moment
-# The available internode options are : all, none, dc, rack
-#
-# If set to dc cassandra will encrypt the traffic between the DCs
-# If set to rack cassandra will encrypt the traffic between the racks
-#
-# The passwords used in these options must match the passwords used when generating
-# the keystore and truststore.  For instructions on generating these files, see:
-# http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore
-#
-server_encryption_options:
-    internode_encryption: none
-    keystore: conf/.keystore
-    keystore_password: cassandra
-    truststore: conf/.truststore
-    truststore_password: cassandra
-    # More advanced defaults below:
-    # protocol: TLS
-    # algorithm: SunX509
-    # store_type: JKS
-    # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA]
-    # require_client_auth: false
-
-# enable or disable client/server encryption.
-client_encryption_options:
-    enabled: false
-    keystore: conf/.keystore
-    keystore_password: cassandra
-    # require_client_auth: false
-    # Set trustore and truststore_password if require_client_auth is true
-    # truststore: conf/.truststore
-    # truststore_password: cassandra
-    # More advanced defaults below:
-    # protocol: TLS
-    # algorithm: SunX509
-    # store_type: JKS
-    # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA]
-
-# internode_compression controls whether traffic between nodes is
-# compressed.
-# can be:  all  - all traffic is compressed
-#          dc   - traffic between different datacenters is compressed
-#          none - nothing is compressed.
-internode_compression: all
-
-# Enable or disable tcp_nodelay for inter-dc communication.
-# Disabling it will result in larger (but fewer) network packets being sent,
-# reducing overhead from the TCP protocol itself, at the cost of increasing
-# latency if you block for cross-datacenter responses.
-inter_dc_tcp_nodelay: false
-
-# Enable or disable kernel page cache preheating from contents of the key cache after compaction.
-# When enabled it would preheat only first "page" (4KB) of each row to optimize
-# for sequential access. Note: This could be harmful for fat rows, see CASSANDRA-4937
-# for further details on that topic.
-preheat_kernel_page_cache: false

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.txt b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.txt
deleted file mode 100644
index 205b18d..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# 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.
-
-The file cassandra-multicloud-snitch.jar is a snitch implementation
-that handles Cassandra datacenters in different cloud providers.
-
-The source code for cassandra-multicloud-snitch.jar is in sandbox/cassandra-multicloud-snitch.
-
-The source will be contributed to the Cassandra project; when it is available in the 
-Cassandra distro (and when we don't want to give backwards compatibility support for
-older Cassandra versions), then we can delete it from Brooklyn.
-
-The jar can be uploaded to a Cassandra Node as part of deployment, for if
-this multi-cloud snitch is desired.
-
-Under Apache conventions, binary files are not part of the source
-release. If you are using the source release, you may add this file
-by copying it from the master repository, which is accessible on the
-web at https://github.com/apache/incubator-brooklyn

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-rackdc.properties
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-rackdc.properties b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-rackdc.properties
deleted file mode 100644
index 8fc323a..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/cassandra/cassandra-rackdc.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-# See http://www.datastax.com/docs/1.1/cluster_architecture/replication
-# Note publicip/privateip added for use by custom MultiCloudSnitch
-dc=${entity.datacenterName}
-rack=${entity.rackName}
-publicip=${entity.publicIp}
-privateip=${entity.privateIp}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/couchbase/pillowfight.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/couchbase/pillowfight.yaml b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/couchbase/pillowfight.yaml
deleted file mode 100644
index d91fcc9..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/couchbase/pillowfight.yaml
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# 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.
-#
-services:
-- type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
-  name: CBC Pillowfight
-  launch.command: |
-    sudo wget -O/etc/apt/sources.list.d/couchbase.list http://packages.couchbase.com/ubuntu/couchbase-ubuntu1204.list
-    sudo wget -O- http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
-    sudo apt-get update
-    sudo apt-get install -y libcouchbase2-libevent libcouchbase-dev libcouchbase2-bin
-  provisioning.properties:
-    # CentOS requires a different launch command, see below
-    osFamily: ubuntu
-  checkRunning.command: ""
-  stop.command: ""
-    
-  brooklyn.config:
-    base_url: http://127.0.0.1:8091/
-    
-  brooklyn.initializers:
-  - type: org.apache.brooklyn.core.effector.ssh.SshCommandEffector
-    brooklyn.config:
-      name: pillow_fight
-      description: runs cbc pillowfight
-      command: |
-        cbc-pillowfight -U ${base_url}${bucket} \
-          `if [ -n "$username" ]; then echo -u $username; fi` \
-          `if [ -n "$password" ]; then echo -P $password; fi` \
-          `if [ -n "$num_cycles" ]; then echo -c $num_cycles; fi` \
-          `if [ -n "$min_size" ]; then echo -m $min_size; fi` \
-          `if [ -n "$max_size" ]; then echo -M $max_size; fi` \
-          `if [ -n "$ratio" ]; then echo -r $ratio; fi`
-      parameters:
-        base_url:
-          description: base URL (http or couchbases) and list of hosts/port to connect to, including trailing slash
-          defaultValue: $brooklyn:config("base_url")
-        bucket:
-          description: bucket to use
-          defaultValue: default
-        username:
-          description: username to authenticate to the bucket
-        password:
-          description: password to authenticate to the bucket
-        num_cycles:
-          description: number of iterations to run
-          defaultValue: 1
-        min_size:
-          description: minimum payload size
-          defaultValue: 50
-        max_size:
-          description: maximum payload size
-          defaultValue: 5120
-        ratio:
-          description: "specify SET/GET command ratio (default: 33, i.e. 33% SETs and 67% GETs)"
-          defaultValue: 33
-
-# For CentOS, use the following launch command:
-#  launch.command: |
-#    sudo wget -O/etc/yum.repos.d/couchbase.repo http://packages.couchbase.com/rpm/couchbase-centos55-x86_64.repo
-#    sudo yum check-update
-#    sudo yum install -y libcouchbase2-libevent libcouchbase-devel libcouchbase2-bin

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/couchdb/couch.ini
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/couchdb/couch.ini b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/couchdb/couch.ini
deleted file mode 100644
index f9dfc64..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/couchdb/couch.ini
+++ /dev/null
@@ -1,17 +0,0 @@
-[#ftl]
-#
-[couchdb]
-database_dir = ${driver.runDir}
-view_index_dir = ${driver.runDir}
-uri_file = ${driver.runDir}/couch.uri
-
-[httpd]
-port = ${entity.httpPort?c}
-bind_address = 0.0.0.0
-
-[ssl]
-port = ${entity.httpsPort?c}
-
-[log]
-file = ${driver.runDir}/couch.log
-level = info

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/couchdb/couch.uri
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/couchdb/couch.uri b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/couchdb/couch.uri
deleted file mode 100644
index 0997fc7..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/couchdb/couch.uri
+++ /dev/null
@@ -1,2 +0,0 @@
-[#ftl]
-http://${driver.hostname}:${entity.httpPort?c}/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/hazelcast/hazelcast-brooklyn.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/hazelcast/hazelcast-brooklyn.xml b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/hazelcast/hazelcast-brooklyn.xml
deleted file mode 100644
index 2f4a263..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/hazelcast/hazelcast-brooklyn.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-[#ftl]
-<?xml version="1.0" encoding="UTF-8"?>
-
-<hazelcast xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xsi:schemaLocation="http://www.hazelcast.com/schema/config
-                               http://www.hazelcast.com/schema/config/hazelcast-config-3.5.xsd"
-           xmlns="http://www.hazelcast.com/schema/config">
-
-    <properties>
-        <property name="hazelcast.discovery.enabled">true</property>
-    </properties>
-
-    <group>
-        <name>${entity.groupName}</name>
-        <password>${entity.groupPassword}</password>
-    </group>
-    <management-center enabled="false">http://localhost:8080/mancenter</management-center>
-    <network>
-        <port auto-increment="true" port-count="100">${entity.nodePort?c}</port>
-        <outbound-ports>
-            <!--
-            Allowed port range when connecting to other nodes.
-            0 or * means use system provided port.
-            -->
-            <ports>0</ports>
-        </outbound-ports>
-
-        <join>
-            <multicast enabled="false" />
-
-            <tcp-ip enabled="true">
-            [#list driver.hazelcastNodesList as member]
-                <member>${member}</member>
-            [/#list]
-            </tcp-ip>
-            <aws enabled="false" />
-        </join>
-
-        <ssl enabled="false"/>
-        <socket-interceptor enabled="false"/>
-
-    </network>
-    <partition-group enabled="false"/>
-
-    <map name="default">
-        <in-memory-format>BINARY</in-memory-format>
-        <backup-count>1</backup-count>
-        <async-backup-count>0</async-backup-count>
-        <time-to-live-seconds>0</time-to-live-seconds>
-        <max-idle-seconds>0</max-idle-seconds>
-        <eviction-policy>NONE</eviction-policy>
-        <max-size policy="PER_NODE">0</max-size>
-        <eviction-percentage>25</eviction-percentage>
-        <min-eviction-check-millis>100</min-eviction-check-millis>
-        <merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
-    </map>
-
-    <serialization>
-        <portable-version>0</portable-version>
-    </serialization>
-
-    <services enable-defaults="true"/>
-
-</hazelcast>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/default-mongod.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/default-mongod.conf b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/default-mongod.conf
deleted file mode 100644
index e7f02fd..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/default-mongod.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-# Default configuration for a mongod process. The use of noprealloc and smallfiles
-# mean this configuration file should not be used in a production environment.
-
-quiet = false
-
-noprealloc = true
-smallfiles = true

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/default.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/default.conf b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/default.conf
deleted file mode 100644
index c3c279f..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/default.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Default Brooklyn configuration for a MongoDB process.
-quiet = false

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/mongodb_win.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/mongodb_win.yaml b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/mongodb_win.yaml
deleted file mode 100644
index 3892eb6..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/mongodb_win.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-# 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.
-
-name: mongodb
-location:
-  jclouds:aws-ec2:
-    region: us-west-2
-    imageNameRegex: Windows_Server-2012-R2_RTM-English-64Bit-Base-.*
-    imageOwner: 801119661308
-    hardwareId: m3.medium
-    useJcloudsSshInit: false
-    templateOptions: {mapNewVolumeToDeviceName: ["/dev/sda1", 100, true]}
-services:
-- type: org.apache.brooklyn.entity.software.base.VanillaWindowsProcess
-  id: mongodb
-  brooklyn.config:
-    templates.install:
-      classpath://org/apache/brooklyn/entity/nosql/mongodb/win/install_mongodb.ps1: "C:\\install_mongodb.ps1"
-      classpath://org/apache/brooklyn/entity/nosql/mongodb/win/configure_mongodb.ps1: "C:\\configure_mongodb.ps1"
-      classpath://org/apache/brooklyn/entity/nosql/mongodb/win/launch_mongodb.ps1: "C:\\launch_mongodb.ps1"
-      classpath://org/apache/brooklyn/entity/nosql/mongodb/win/stop_mongodb.ps1: "C:\\stop_mongodb.ps1"
-      classpath://org/apache/brooklyn/entity/nosql/mongodb/win/checkrunning_mongodb.ps1: "C:\\checkrunning_mongodb.ps1"
-    install.command: powershell -command "C:\\install_mongodb.ps1"
-    customize.command: powershell -command "C:\\configure_mongodb.ps1"
-    launch.command: powershell -command "C:\\launch_mongodb.ps1"
-    stop.command: powershell -command "C:\\stop_mongodb.ps1"
-    checkRunning.command: powershell -command "C:\\checkrunning_mongodb.ps1"
-
-    mongodb.download.url: https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.0.6-signed.msi
-    mongodb.instance.name: Instance1
-  provisioning.properties:
-    required.ports: 27017

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/checkrunning_mongodb.ps1
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/checkrunning_mongodb.ps1 b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/checkrunning_mongodb.ps1
deleted file mode 100644
index da9e97c..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/checkrunning_mongodb.ps1
+++ /dev/null
@@ -1,30 +0,0 @@
-[#ftl]
-#!ps1
-#
-# 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.
-#
-
-$ErrorActionPreference = "Stop"
-
-$serviceName = "MongoDB${config['mongodb.instance.name']}"
-
-$service = Get-Service -Name $serviceName
-if ($service.Status -ne "Running"){
-    Write-Host $ServiceName " service is not running"
-    exit 1
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/configure_mongodb.ps1
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/configure_mongodb.ps1 b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/configure_mongodb.ps1
deleted file mode 100644
index d687eea..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/configure_mongodb.ps1
+++ /dev/null
@@ -1,31 +0,0 @@
-[#ftl]
-#!ps1
-#
-# 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.
-#
-
-$ErrorActionPreference = "Stop"
-
-netsh advfirewall firewall add rule name=MongoDB dir=in protocol=tcp action=allow localport=27017 remoteip=any profile=any
-
-New-Item c:\data\db -type directory -force
-New-Item c:\data\log -type directory -force
-
-set serviceName=MongoDB${config['mongodb.instance.name']}
-
-& 'C:\Program Files\MongoDB\Server\3.0\bin\mongod' '--rest' '--dbpath=C:\data\db' '--logpath=c:\data\log\service.log' '--install' '--serviceName=MongoDB${config['mongodb.instance.name']}' '--serviceDisplayName=MongoDB${config['mongodb.instance.name']}'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/install_mongodb.ps1
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/install_mongodb.ps1 b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/install_mongodb.ps1
deleted file mode 100644
index 679a3e9..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/install_mongodb.ps1
+++ /dev/null
@@ -1,32 +0,0 @@
-[#ftl]
-#!ps1
-#
-# 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.
-#
-
-$ErrorActionPreference = "Stop"
-
-$Path = "C:\InstallTemp"
-New-Item -ItemType Directory -Force -Path $Path
-
-$Url = "${config['mongodb.download.url']}"
-$Dl = [System.IO.Path]::Combine($Path, "installer.msi")
-$WebClient = New-Object System.Net.WebClient
-$WebClient.DownloadFile( $Url, $Dl )
-
-Start-Process "msiexec" -ArgumentList '/qn','/i',$Dl -RedirectStandardOutput ( [System.IO.Path]::Combine($Path, "stdout.txt") ) -RedirectStandardError ( [System.IO.Path]::Combine($Path, "stderr.txt") ) -Wait

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/launch_mongodb.ps1
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/launch_mongodb.ps1 b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/launch_mongodb.ps1
deleted file mode 100644
index 50749a7..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/launch_mongodb.ps1
+++ /dev/null
@@ -1,26 +0,0 @@
-[#ftl]
-#!ps1
-#
-# 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.
-#
-
-$ErrorActionPreference = "Stop"
-
-$serviceName = "MongoDB${config['mongodb.instance.name']}"
-
-Start-Service $serviceName

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/stop_mongodb.ps1
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/stop_mongodb.ps1 b/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/stop_mongodb.ps1
deleted file mode 100644
index 0071a5e..0000000
--- a/brooklyn-library/software/nosql/src/main/resources/org/apache/brooklyn/entity/nosql/mongodb/win/stop_mongodb.ps1
+++ /dev/null
@@ -1,27 +0,0 @@
-[#ftl]
-#!ps1
-#
-# 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.
-#
-
-$ErrorActionPreference = "Stop"
-
-$serviceName = "MongoDB${config['mongodb.instance.name']}"
-
-Stop-Service $serviceName
-


[13/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeSshDriver.java
deleted file mode 100644
index 2a9b9c5..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeSshDriver.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.hazelcast;
-
-import static java.lang.String.format;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.core.entity.Entities;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.text.Strings;
-
-import com.google.common.base.Joiner;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-
-public class HazelcastNodeSshDriver extends JavaSoftwareProcessSshDriver implements HazelcastNodeDriver {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(HazelcastNodeSshDriver.class);
-
-    public HazelcastNodeSshDriver(HazelcastNodeImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-        
-        List<String> commands = ImmutableList.<String>builder()
-            .add(BashCommands.installJavaLatestOrWarn())
-            .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-            .build();
-        
-        newScript(INSTALLING).body.append(commands).execute();
-    }
-
-    @Override
-    public void customize() {
-        if (LOG.isInfoEnabled()) {
-            LOG.info("Customizing {}", entity.getAttribute(HazelcastNode.NODE_NAME));
-        }
-        
-        ImmutableList.Builder<String> commands = new ImmutableList.Builder<String>()
-                .add("mkdir -p lib conf log")
-                .add(String.format("cp %s/%s %s/lib/", getInstallDir(), resolver.getFilename(), getRunDir()));
-
-        newScript(CUSTOMIZING)
-                .body.append(commands.build())
-                .failOnNonZeroResultCode()
-                .execute();
-        
-        copyTemplate(entity.getConfig(HazelcastNode.CONFIG_TEMPLATE_URL), Os.mergePathsUnix(getRunDir(), "conf", getConfigFileName()));
-        
-    }
-
-    @Override
-    public void launch() {
-        
-        entity.sensors().set(HazelcastNode.PID_FILE, Os.mergePathsUnix(getRunDir(), PID_FILENAME));
-        
-        String maxHeapMemorySize = getHeapMemorySize();
-        
-        if (LOG.isInfoEnabled()) {
-            LOG.info("Launching {} with heap memory of {}", entity, maxHeapMemorySize);
-        }
-        
-        // Setting initial heap size (Xms) size to match max heap size (Xms) at first
-        String initialHeapMemorySize = maxHeapMemorySize;
-        
-        ImmutableList<String> commands = ImmutableList.<String>builder()
-            .add(format("nohup java -cp ./lib/%s", resolver.getFilename()))
-            .add(format("-Xmx%s -Xms%s", maxHeapMemorySize, initialHeapMemorySize))
-            .add(format("-Dhazelcast.config=./conf/%s", getConfigFileName()))
-            .add(format("com.hazelcast.core.server.StartServer >> %s 2>&1 </dev/null &", getLogFileLocation()))
-            .build();
-        
-        newScript(MutableMap.of(USE_PID_FILE, true), LAUNCHING)
-            .updateTaskAndFailOnNonZeroResultCode()
-            .body.append(Joiner.on(" ").join(commands))
-            .execute();
-    }
-       
-    public String getConfigFileName() {
-        return entity.getConfig(HazelcastNode.CONFIG_FILE_NAME);
-    }
-    
-    public String getHeapMemorySize() {
-        return entity.getConfig(HazelcastNode.NODE_HEAP_MEMORY_SIZE);
-    }
-    
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of(USE_PID_FILE, true), CHECK_RUNNING).execute() == 0;
-    }
-    
-    @Override
-    public void stop() {
-        newScript(MutableMap.of(USE_PID_FILE, true), STOPPING).execute();
-    }
-    
-    @Override
-    public void kill() {
-        newScript(MutableMap.of(USE_PID_FILE, true), KILLING).execute();
-    }
-
-    public List<String> getHazelcastNodesList() {
-        List<String> result = Lists.newArrayList();
-
-        if (Strings.isBlank(entity.getAttribute(HazelcastNode.NODE_CLUSTER_NAME))) {
-            result.add(String.format("%s:%d", entity.getAttribute(HazelcastNode.SUBNET_ADDRESS),
-                                              entity.getAttribute(HazelcastNode.NODE_PORT)));
-        } else {
-            HazelcastCluster cluster = (HazelcastCluster) entity.getParent();
-
-            for (Entity member : cluster.getMembers()) {
-                String address = Entities.attributeSupplierWhenReady(member, HazelcastNode.SUBNET_ADDRESS).get();
-                Integer port = Entities.attributeSupplierWhenReady(member, HazelcastNode.NODE_PORT).get();
-                String addressAndPort = String.format("%s:%d", address, port);
-
-                if (LOG.isInfoEnabled()) {
-                    LOG.info("Adding {} to the members' list of {}", addressAndPort, entity.getAttribute(HazelcastNode.NODE_NAME));
-                }
-                result.add(addressAndPort);
-            }
-        }
-        return result;
-    }
-
-    @Override
-    protected String getLogFileLocation() {
-        return Os.mergePathsUnix(getRunDir(),"/log/out.log");
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/AbstractMongoDBServer.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/AbstractMongoDBServer.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/AbstractMongoDBServer.java
deleted file mode 100644
index 3475a7d..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/AbstractMongoDBServer.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.AttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.ResourcePredicates;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-public interface AbstractMongoDBServer extends SoftwareProcess, Entity, MongoDBAuthenticationMixins {
-
-    // TODO Need to properly test v2.4.x and v2.5.x support.
-    // I think the v2.5.x were dev releases.
-    // Should update mongo.config to yaml format, but no rush for that.
-    
-    @SetFromFlag("dataDirectory")
-    ConfigKey<String> DATA_DIRECTORY = ConfigKeys.newStringConfigKey(
-            "mongodb.data.directory", "Data directory to store MongoDB journals");
-
-    @SetFromFlag("mongodbConfTemplateUrl")
-    ConfigKey<String> MONGODB_CONF_TEMPLATE_URL = ConfigKeys.builder(String.class)
-            .name("mongodb.config.url")
-            .description("Template file (in freemarker format) for a MongoDB configuration file")
-            .defaultValue("classpath://org/apache/brooklyn/entity/nosql/mongodb/default.conf")
-            .constraint(ResourcePredicates.urlIsBlankOrExists())
-            .build();
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION =
-            ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "2.6.5");
-
-    // TODO: Windows support
-    // e.g. http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.2.2.tgz,
-    // http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.2.2.tgz
-    // http://downloads.mongodb.org/win32/mongodb-win32-x86_64-1.8.5.zip
-    // Note Windows download is a zip.
-    @SetFromFlag("downloadUrl")
-    AttributeSensorAndConfigKey<String, String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "http://fastdl.mongodb.org/${driver.osDir}/${driver.osTag}-${version}.tgz");
-
-    @SetFromFlag("port")
-    PortAttributeSensorAndConfigKey PORT =
-            new PortAttributeSensorAndConfigKey("mongodb.server.port", "Server port", "27017+");
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/AbstractMongoDBSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/AbstractMongoDBSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/AbstractMongoDBSshDriver.java
deleted file mode 100644
index ccbe470..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/AbstractMongoDBSshDriver.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.api.location.OsDetails;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.internal.ssh.SshTool;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Joiner;
-import com.google.common.base.Strings;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public abstract class AbstractMongoDBSshDriver extends AbstractSoftwareProcessSshDriver {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractMongoDBSshDriver.class);
-    
-    public AbstractMongoDBSshDriver(EntityLocal entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(getBaseName())));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-    
-        List<String> commands = new LinkedList<>();
-        commands.addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs));
-        commands.add(BashCommands.INSTALL_TAR);
-        commands.add("tar xzfv " + saveAs);
-
-        newScript(INSTALLING)
-                .failOnNonZeroResultCode()
-                .body.append(commands).execute();
-    }
-    
-    @Override
-    public void customize() {
-        Map<?,?> ports = ImmutableMap.of("port", getServerPort());
-        Networking.checkPortsValid(ports);
-        List<String> commands = new LinkedList<>();
-        commands.add(String.format("mkdir -p %s", getDataDirectory()));
-
-        if (MongoDBAuthenticationUtils.usesAuthentication(entity)) {
-            String destinationLocation = Os.mergePaths(getRunDir(), "mongodb-keyfile");
-            entity.sensors().set(AbstractMongoDBServer.MONGODB_KEYFILE_DESTINATION, destinationLocation);
-            String keyfileContents = entity.config().get(AbstractMongoDBServer.MONGODB_KEYFILE_CONTENTS);
-            if (Strings.isNullOrEmpty(keyfileContents)) {
-                String keyfileUrl = entity.config().get(AbstractMongoDBServer.MONGODB_KEYFILE_URL);
-                if (Strings.isNullOrEmpty(keyfileUrl)) {
-                    throw new IllegalStateException("MongoDBAuthenticationUtils.usesAuthentication returned true, but neither keyfileContents nor keyfileUrl are set");
-                }
-                copyResource(keyfileUrl, destinationLocation);
-            } else {
-                commands.add(BashCommands.pipeTextToFile(keyfileContents, destinationLocation));
-            }
-            commands.add("chmod 600 " + destinationLocation);
-        }
-
-        newScript(CUSTOMIZING)
-                .updateTaskAndFailOnNonZeroResultCode()
-                .body.append(commands).execute();
-        String templateUrl = entity.getConfig(MongoDBServer.MONGODB_CONF_TEMPLATE_URL);
-        if (!Strings.isNullOrEmpty(templateUrl)) copyTemplate(templateUrl, getConfFile());
-        if (MongoDBAuthenticationUtils.usesAuthentication(entity)) {
-            launch(getArgsBuilderWithNoAuthentication((AbstractMongoDBServer) getEntity())
-                    .add("--dbpath", getDataDirectory()));
-            newScript("create-user")
-                    .body.append(String.format("%s --port %s" +
-                            " --host localhost admin --eval \"db.createUser({user: '%s',pwd: '%s',roles: [ 'root' ]})\"",
-                    Os.mergePaths(getExpandedInstallDir(), "bin/mongo"), getServerPort(), getRootUsername(), MongoDBAuthenticationUtils.getRootPassword(entity)))
-                    .updateTaskAndFailOnNonZeroResultCode()
-                    .execute();
-            stop();
-        }
-    }
-
-    @Override
-    public boolean isRunning() {
-        try {
-            if (entity instanceof MongoDBServerImpl && !((MongoDBServerImpl)entity).clientAccessEnabled()) {
-                // No direct access via MongoDB port; only use ssh-port
-                return newScript(MutableMap.of(USE_PID_FILE, getPidFile()), CHECK_RUNNING).execute() == 0;
-            } else {
-                return MongoDBClientSupport.forServer((AbstractMongoDBServer) entity).ping();
-            }
-        } catch (Exception e) {
-            Exceptions.propagateIfFatal(e);
-            return false;
-        }
-    }
-    
-    /**
-     * Kills the server with SIGINT. Sending SIGKILL is likely to result in data corruption.
-     * @see <a href="http://docs.mongodb.org/manual/tutorial/manage-mongodb-processes/#sending-a-unix-int-or-term-signal">http://docs.mongodb.org/manual/tutorial/manage-mongodb-processes/#sending-a-unix-int-or-term-signal</a>
-     */
-    @Override
-    public void stop() {
-        // TODO: Wait for process to terminate. Currently, this will send the signal and then immediately continue with next steps, 
-        // which could involve stopping VM etc.
-        
-        // We could also use SIGTERM (15)
-        new ScriptHelper(this, "Send SIGINT to MongoDB server")
-                .body.append("MONGO_PID=$(cat " + getPidFile() + ")\n")
-                .body.append("kill -2 $MONGO_PID\n")
-                .body.append("for i in {1..10}\n" +
-                    "do\n" +
-                    "    kill -0 $MONGO_PID || exit \n" +
-                    "    sleep 1\n" +
-                    "done\n" +
-                    "echo \"mongoDB process still running after 10 seconds; continuing but may subsequently fail\"")
-                .execute();
-    }
-
-    protected String getBaseName() {
-        return getOsTag() + "-" + entity.getConfig(AbstractMongoDBServer.SUGGESTED_VERSION);
-    }
-
-    // IDE note: This is used by MongoDBServer.DOWNLOAD_URL
-    public String getOsDir() {
-        return (getLocation().getOsDetails().isMac()) ? "osx" : "linux";
-    }
-
-    public String getOsTag() {
-        OsDetails os = getLocation().getOsDetails();
-        if (os == null) {
-            // Default to generic linux
-            return "mongodb-linux-x86_64";
-        } else if (os.isMac()) {
-            // Mac is 64bit only
-            return "mongodb-osx-x86_64";
-        } else {
-            String arch = os.is64bit() ? "x86_64" : "i686";
-            return "mongodb-linux-" + arch;
-        }
-    }
-
-    public String getDataDirectory() {
-        String result = entity.getConfig(MongoDBServer.DATA_DIRECTORY);
-        if (result!=null) return result;
-        return getRunDir() + "/data";
-    }
-
-    protected String getLogFile() {
-        return getRunDir() + "/log.txt";
-    }
-
-    protected String getPidFile() {
-        return getRunDir() + "/pid";
-    }
-
-    protected Integer getServerPort() {
-        return entity.getAttribute(MongoDBServer.PORT);
-    }
-
-    protected String getConfFile() {
-        return getRunDir() + "/mongo.conf";
-    }
-
-    protected String getRootUsername() {
-        return entity.config().get(AbstractMongoDBServer.ROOT_USERNAME);
-    }
-
-    protected ImmutableList.Builder<String> getArgsBuilderWithDefaults(AbstractMongoDBServer server) {
-        ImmutableList.Builder<String> builder = getArgsBuilderWithNoAuthentication(server);
-        if (MongoDBAuthenticationUtils.usesAuthentication(entity)) {
-            builder.add("--keyFile", entity.getAttribute(AbstractMongoDBServer.MONGODB_KEYFILE_DESTINATION));
-        }
-        return builder;
-    }
-
-    protected ImmutableList.Builder<String> getArgsBuilderWithNoAuthentication(AbstractMongoDBServer server) {
-        Integer port = server.getAttribute(MongoDBServer.PORT);
-        ImmutableList.Builder<String> builder = ImmutableList.builder();
-        builder.add("--config", getConfFile());
-        builder.add("--pidfilepath", getPidFile());
-        builder.add("--logpath", getLogFile());
-        builder.add("--port", port.toString());
-        builder.add("--fork");
-        return builder;
-    }
-    
-    protected void launch(ImmutableList.Builder<String> argsBuilder) {
-        String args = Joiner.on(" ").join(argsBuilder.build());
-        String command = String.format("%s/bin/mongod %s >> out.log 2>> err.log < /dev/null", getExpandedInstallDir(), args);
-
-        newScript(LAUNCHING)
-                .setFlag(SshTool.PROP_CONNECT_TIMEOUT, Duration.TEN_SECONDS.toMilliseconds())
-                .updateTaskAndFailOnNonZeroResultCode()
-                .body.append(command).execute();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBAuthenticationMixins.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBAuthenticationMixins.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBAuthenticationMixins.java
deleted file mode 100644
index 0ad885b..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBAuthenticationMixins.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-public interface MongoDBAuthenticationMixins {
-    @SetFromFlag("mongodbKeyfileContents")
-    ConfigKey<String> MONGODB_KEYFILE_CONTENTS = ConfigKeys.newStringConfigKey(
-            "mongodb.keyfile.contents", "Contents of the keyfile used for authentication. If mongodb.keyfile.contents and mongodb.keyfile.url are both set, mongodb.keyfile.contents will take precedence");
-
-    @SetFromFlag("mongodbKeyfileUrl")
-    ConfigKey<String> MONGODB_KEYFILE_URL = ConfigKeys.newStringConfigKey(
-            "mongodb.keyfile.url", "Location of the keyfile used for authentication. If mongodb.keyfile.contents and mongodb.keyfile.url are both set, mongodb.keyfile.contents will take precedence");
-
-    @SetFromFlag("rootUsername")
-    BasicAttributeSensorAndConfigKey<String> ROOT_USERNAME =
-            new BasicAttributeSensorAndConfigKey<>(String.class, "mongodb.root.username", "Username of the initial admin user", "superuser");
-
-    @SetFromFlag("rootPassword")
-    BasicAttributeSensorAndConfigKey<String> ROOT_PASSWORD =
-            new BasicAttributeSensorAndConfigKey<>(String.class, "mongodb.root.password", "Password for the initial admin user, auto-generated if not set");
-
-    @SetFromFlag("authenticationDatabase")
-    BasicAttributeSensorAndConfigKey<String> AUTHENTICATION_DATABASE =
-            new BasicAttributeSensorAndConfigKey<>(String.class, "mongodb.authentication.database", "Database to be used to store authentication details (if used)", "admin");
-
-    AttributeSensor<String> MONGODB_KEYFILE_DESTINATION = Sensors.newStringSensor("mongodb.keyfile.destination",
-            "Destination of the keyfile used for authentication on the target server");
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBAuthenticationUtils.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBAuthenticationUtils.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBAuthenticationUtils.java
deleted file mode 100644
index 41808ae..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBAuthenticationUtils.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import org.apache.brooklyn.util.text.Strings;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.brooklyn.api.entity.Entity;
-
-
-public class MongoDBAuthenticationUtils {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBAuthenticationUtils.class);
-
-    private MongoDBAuthenticationUtils(){}
-
-    /**
-     * @return true if either the keyfile contents or keyfile url is set, false otherwise. If both are set, an IllegalStateException is thrown
-     */
-    public static boolean usesAuthentication(Entity entity) {
-        String keyfileContents = entity.config().get(MongoDBAuthenticationMixins.MONGODB_KEYFILE_CONTENTS);
-        String keyfileUrl = entity.config().get(MongoDBAuthenticationMixins.MONGODB_KEYFILE_URL);
-        return Strings.isNonBlank(keyfileContents) || Strings.isNonBlank(keyfileUrl);
-    }
-
-    public static String getRootPassword(Entity entity) {
-        String password = entity.config().get(MongoDBAuthenticationMixins.ROOT_PASSWORD);
-        if (Strings.isEmpty(password)) {
-            LOG.debug(entity + " has no password specified for " + MongoDBAuthenticationMixins.ROOT_PASSWORD.getName() + "; using a random string");
-            password = Strings.makeRandomId(16);
-            entity.sensors().set(MongoDBAuthenticationMixins.ROOT_PASSWORD, password);
-            entity.config().set(MongoDBAuthenticationMixins.ROOT_PASSWORD, password);
-        }
-        return password;
-    }
-
-    /**
-     * Configures the {@code spec} with authentication configuration from {@code source}
-     */
-    public static void setAuthenticationConfig(EntitySpec<?> spec, Entity source) {
-        if (MongoDBAuthenticationUtils.usesAuthentication(source)) {
-            spec.configure(MongoDBAuthenticationMixins.MONGODB_KEYFILE_CONTENTS, source.config().get(MongoDBAuthenticationMixins.MONGODB_KEYFILE_CONTENTS));
-            spec.configure(MongoDBAuthenticationMixins.MONGODB_KEYFILE_URL, source.config().get(MongoDBAuthenticationMixins.MONGODB_KEYFILE_URL));
-            spec.configure(MongoDBAuthenticationMixins.ROOT_USERNAME, source.config().get(MongoDBAuthenticationMixins.ROOT_USERNAME));
-            spec.configure(MongoDBAuthenticationMixins.ROOT_PASSWORD, getRootPassword(source));
-        }
-    }
-
-    /**
-     * Configures the {@code spec} with authentication configuration from {@code source}
-     */
-    public static void setAuthenticationConfig(Entity entity, Entity source) {
-        if (MongoDBAuthenticationUtils.usesAuthentication(source)) {
-            entity.config().set(MongoDBAuthenticationMixins.MONGODB_KEYFILE_CONTENTS, source.config().get(MongoDBAuthenticationMixins.MONGODB_KEYFILE_CONTENTS));
-            entity.config().set(MongoDBAuthenticationMixins.MONGODB_KEYFILE_URL, source.config().get(MongoDBAuthenticationMixins.MONGODB_KEYFILE_URL));
-            entity.config().set(MongoDBAuthenticationMixins.ROOT_USERNAME, source.config().get(MongoDBAuthenticationMixins.ROOT_USERNAME));
-            entity.config().set(MongoDBAuthenticationMixins.ROOT_PASSWORD, getRootPassword(source));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClient.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClient.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClient.java
deleted file mode 100644
index 4e124a7..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClient.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.annotation.Effector;
-import org.apache.brooklyn.core.annotation.EffectorParam;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.effector.MethodEffector;
-import org.apache.brooklyn.entity.nosql.mongodb.sharding.MongoDBShardedDeployment;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-import com.google.common.reflect.TypeToken;
-
-@ImplementedBy(MongoDBClientImpl.class)
-public interface MongoDBClient extends AbstractMongoDBServer {
-    
-    MethodEffector<Void> RUN_SCRIPT = new MethodEffector<Void>(MongoDBClient.class, "runScript");
-    
-    @SuppressWarnings("serial")
-    @SetFromFlag("startupJsScripts")
-    ConfigKey<List<String>> STARTUP_JS_SCRIPTS = ConfigKeys.newConfigKey(
-            new TypeToken<List<String>>(){}, "mongodb.client.startupJsScripts", 
-                "List of scripts defined in mongodb.client.scripts to be run on startup");
-    
-    @SuppressWarnings("serial")
-    @SetFromFlag("scripts")
-    ConfigKey<Map<String, String>> JS_SCRIPTS = ConfigKeys.newConfigKey(
-            new TypeToken<Map<String, String>>(){}, "mongodb.client.scripts", "List of javascript scripts to be copied "
-                    + "to the server. These scripts can be run using the runScript effector");
-    
-    @SetFromFlag("shardedDeployment")
-    ConfigKey<MongoDBShardedDeployment> SHARDED_DEPLOYMENT = ConfigKeys.newConfigKey(MongoDBShardedDeployment.class, 
-            "mongodb.client.shardeddeployment", "Sharded deployment that the client will use to run scripts. "
-                    + "If both SERVER and SHARDED_DEPLOYMENT are specified, SERVER will be used");
-    
-    @SetFromFlag("server")
-    ConfigKey<AbstractMongoDBServer> SERVER = ConfigKeys.newConfigKey(AbstractMongoDBServer.class, 
-            "mongodb.client.server", "MongoDBServer that the client will use to run scripts. "
-                    + "If both SERVER and SHARDED_DEPLOYMENT are specified, SERVER will be used");
-    
-    @Effector(description="Runs one of the scripts defined in mongodb.client.scripts")
-    void runScript(@EffectorParam(name="preStart", description="use this to create parameters that can be used by the script, e.g.:<p><code>var loopCount = 10</code>") String preStart,
-            @EffectorParam(name="scriptName", description="Name of the script as defined in mongodb.client.scripts") String scriptName);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientDriver.java
deleted file mode 100644
index f48f743..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientDriver.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface MongoDBClientDriver extends SoftwareProcessDriver {
-    void runScript(String preStart, String scriptName);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientImpl.java
deleted file mode 100644
index 419c09e..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-
-public class MongoDBClientImpl extends SoftwareProcessImpl implements MongoDBClient {
-    
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        sensors().set(Startable.SERVICE_UP, true);
-    }
-
-    @SuppressWarnings("rawtypes")
-    @Override
-    public Class getDriverInterface() {
-        return MongoDBClientDriver.class;
-    }
-
-    @Override
-    public void runScript(String preStart, String scriptName) {
-        ((MongoDBClientDriver)getDriver()).runScript(preStart, scriptName);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientSshDriver.java
deleted file mode 100644
index bd5e552..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientSshDriver.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.entity.nosql.mongodb.sharding.MongoDBRouter;
-import org.apache.brooklyn.entity.nosql.mongodb.sharding.MongoDBRouterCluster;
-import org.apache.brooklyn.entity.nosql.mongodb.sharding.MongoDBShardedDeployment;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.math.MathPredicates;
-
-import com.google.common.base.Preconditions;
-import com.google.common.base.Predicates;
-
-public class MongoDBClientSshDriver extends AbstractMongoDBSshDriver implements MongoDBClientDriver {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBClientSshDriver.class);
-
-    private boolean isRunning = false;
-
-    public MongoDBClientSshDriver(EntityLocal entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-    
-    @Override
-    public void customize() {
-        String command = String.format("mkdir -p %s", getUserScriptDir());
-        newScript(CUSTOMIZING)
-            .updateTaskAndFailOnNonZeroResultCode()
-            .body.append(command).execute();
-        Map<String, String> scripts = entity.getConfig(MongoDBClient.JS_SCRIPTS);
-        for (String scriptName : scripts.keySet()) {
-            copyResource(scripts.get(scriptName), getUserScriptDir() + scriptName + ".js");
-        }
-    }
-
-    @Override
-    public void launch() {
-        AbstractMongoDBServer server = getServer();
-        // The scripts are going to be run on the machine via SSH so it shouldn't matter
-        // that the accessible host and port might be different.
-        String host = server.getAttribute(AbstractMongoDBServer.HOSTNAME);
-        Integer port = server.getAttribute(AbstractMongoDBServer.PORT);
-
-        List<String> scripts = entity.getConfig(MongoDBClient.STARTUP_JS_SCRIPTS);
-        if (scripts!=null) {
-            for (String scriptName : scripts) {
-                try {
-                    LOG.debug("Running MongoDB script "+scriptName+" at "+getEntity());
-                    runScript("", scriptName, host, port);
-                } catch (Exception e) {
-                    LOG.warn("Error running MongoDB script "+scriptName+" at "+getEntity()+", throwing: "+e);
-                    isRunning = false;
-                    Exceptions.propagateIfFatal(e);
-                    throw new IllegalStateException("Error running MongoDB script "+scriptName+" at "+entity+": "+e, e);
-                }
-            }
-        }
-        isRunning = true;
-    }
-    
-    @Override
-    public boolean isRunning() {
-        // TODO better would be to get some confirmation
-        return isRunning;
-    }
-    
-    @Override
-    public void stop() {
-        try {
-            super.stop();
-        } finally {
-            isRunning = false;
-        }
-    }
-    
-    private String getUserScriptDir() {
-        return getRunDir() + "/userScripts/" ;
-    }
-    
-    public void runScript(String preStart, String scriptName) {
-        AbstractMongoDBServer server = getServer();
-        String host = server.getAttribute(AbstractMongoDBServer.HOSTNAME);
-        Integer port = server.getAttribute(AbstractMongoDBServer.PORT);
-        runScript(preStart, scriptName, host, port);
-    }
-    
-    private void runScript(String preStart, String scriptName, String host, Integer port) {
-        // TODO: escape preStart to prevent injection attack
-        String command = String.format("%s/bin/mongo %s:%s --eval \"%s\" %s/%s > out.log 2> err.log < /dev/null", getExpandedInstallDir(), 
-                host, port, preStart, getUserScriptDir(), scriptName + ".js");
-        newScript(LAUNCHING)
-            .updateTaskAndFailOnNonZeroResultCode()
-            .body.append(command).execute();
-    }
-    
-    private AbstractMongoDBServer getServer() {
-        AbstractMongoDBServer server = entity.getConfig(MongoDBClient.SERVER);
-        MongoDBShardedDeployment deployment = entity.getConfig(MongoDBClient.SHARDED_DEPLOYMENT);
-        if (server == null) {
-            Preconditions.checkNotNull(deployment, "Either server or shardedDeployment must be specified for %s", this);
-            server = DependentConfiguration.builder()
-                    .attributeWhenReady(deployment.getRouterCluster(), MongoDBRouterCluster.ANY_ROUTER)
-                    .blockingDetails("any available router")
-                    .runNow();
-            DependentConfiguration.builder()
-                    .attributeWhenReady(server, MongoDBRouter.SHARD_COUNT)
-                    .readiness(MathPredicates.<Integer>greaterThan(0))
-                    .runNow();
-        } else {
-            if (deployment != null) {
-                log.warn("Server and ShardedDeployment defined for {}; using server ({} instead of {})", 
-                        new Object[] {this, server, deployment});
-            }
-            DependentConfiguration.builder()
-                    .attributeWhenReady(server, Startable.SERVICE_UP)
-                    .readiness(Predicates.equalTo(true))
-                    .runNow();
-        }
-        return server;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientSupport.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientSupport.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientSupport.java
deleted file mode 100644
index c0ec6e7..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBClientSupport.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import java.net.UnknownHostException;
-import java.util.concurrent.Callable;
-
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.util.repeat.Repeater;
-import org.apache.brooklyn.util.time.Duration;
-import org.bson.BSONObject;
-import org.bson.BasicBSONObject;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Optional;
-import com.google.common.collect.ImmutableList;
-import com.google.common.net.HostAndPort;
-import com.mongodb.BasicDBObject;
-import com.mongodb.CommandResult;
-import com.mongodb.DB;
-import com.mongodb.DBObject;
-import com.mongodb.MongoClient;
-import com.mongodb.MongoClientOptions;
-import com.mongodb.MongoCredential;
-import com.mongodb.MongoException;
-import com.mongodb.ServerAddress;
-
-/**
- * Manages connections to standalone MongoDB servers.
- *
- * @see <a href="http://docs.mongodb.org/manual/reference/command/">MongoDB database command documentation</a>
- */
-public class MongoDBClientSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBClientSupport.class);
-    private ServerAddress address;
-
-    private boolean usesAuthentication;
-    private String username;
-    private String password;
-    private String authenticationDatabase;
-
-    private MongoClient client() {
-        return baseClient(connectionOptions);
-    }
-
-    private MongoClient fastClient() {
-        MongoClientOptions fastConnectionOptions = MongoClientOptions.builder()
-                .connectTimeout(1000 * 10)
-                .maxWaitTime(1000 * 10)
-                .serverSelectionTimeout(1000 * 10)
-                .build();
-
-        return baseClient(fastConnectionOptions);
-    }
-
-    private MongoClient baseClient(MongoClientOptions connectionOptions) {
-        if (usesAuthentication) {
-            MongoCredential credential = MongoCredential.createMongoCRCredential(username, authenticationDatabase, password.toCharArray());
-            return new MongoClient(address, ImmutableList.of(credential), connectionOptions);
-        } else {
-            return new MongoClient(address, connectionOptions);
-        }
-    }
-
-    // Set client to automatically reconnect to servers.
-    private static final MongoClientOptions connectionOptions = MongoClientOptions.builder()
-            .socketKeepAlive(true)
-            .build();
-
-    private static final BasicBSONObject EMPTY_RESPONSE = new BasicBSONObject();
-
-    public MongoDBClientSupport(ServerAddress standalone) {
-        address = standalone;
-        usesAuthentication = false;
-    }
-
-    public MongoDBClientSupport(ServerAddress standalone, String username, String password, String authenticationDatabase) {
-        // We could also use a MongoClient to access an entire replica set. See MongoClient(List<ServerAddress>).
-        address = standalone;
-        this.usesAuthentication = true;
-        this.username = username;
-        this.password = password;
-        this.authenticationDatabase = authenticationDatabase;
-    }
-
-    /**
-     * Creates a {@link MongoDBClientSupport} instance in standalone mode.
-     */
-    public static MongoDBClientSupport forServer(AbstractMongoDBServer standalone) throws UnknownHostException {
-        HostAndPort hostAndPort = BrooklynAccessUtils.getBrooklynAccessibleAddress(standalone, standalone.getAttribute(MongoDBServer.PORT));
-        ServerAddress address = new ServerAddress(hostAndPort.getHostText(), hostAndPort.getPort());
-        if (MongoDBAuthenticationUtils.usesAuthentication(standalone)) {
-            return new MongoDBClientSupport(address, standalone.sensors().get(MongoDBAuthenticationMixins.ROOT_USERNAME),
-                    standalone.sensors().get(MongoDBAuthenticationMixins.ROOT_PASSWORD), standalone.sensors().get(MongoDBAuthenticationMixins.AUTHENTICATION_DATABASE));
-        } else {
-            return new MongoDBClientSupport(address);
-        }
-    }
-
-    private ServerAddress getServerAddress() {
-        MongoClient client = client();
-        try {
-            return client.getServerAddressList().get(0);
-        } finally {
-            client.close();
-        }
-    }
-
-    private HostAndPort getServerHostAndPort() {
-        ServerAddress address = getServerAddress();
-        return HostAndPort.fromParts(address.getHost(), address.getPort());
-    }
-
-    public Optional<CommandResult> runDBCommand(String database, String command) {
-        return runDBCommand(database, new BasicDBObject(command, Boolean.TRUE));
-    }
-
-    private Optional<CommandResult> runDBCommand(String database, final DBObject command) {
-        MongoClient client = client();
-        try {
-            final DB db = client.getDB(database);
-            final CommandResult[] status = new CommandResult[1];
-
-            // The mongoDB client can occasionally fail to connect. Try up to 5 times to run the command
-            boolean commandResult = Repeater.create().backoff(Duration.ONE_SECOND, 1.5, null).limitIterationsTo(5)
-                    .until(new Callable<Boolean>() {
-                        @Override
-                        public Boolean call() throws Exception {
-                            try {
-                                status[0] = db.command(command);
-                                return true;
-                            } catch (Exception e) {
-                                LOG.warn("Command " + command + " on " + address.getHost() + " failed", e);
-                                return false;
-                            }
-                        }
-            }).run();
-
-            if (!commandResult) {
-                return Optional.absent();
-            }
-
-            if (!status[0].ok()) {
-                LOG.debug("Unexpected result of {} on {}: {}",
-                        new Object[] { command, getServerAddress(), status[0].getErrorMessage() });
-            }
-            return Optional.of(status[0]);
-        } finally {
-            client.close();
-        }
-    }
-    
-    public long getShardCount() {
-        MongoClient client = client();
-        try {
-            return client.getDB("config").getCollection("shards").getCount();
-        } finally {
-            client.close();
-        }
-    }
-
-    public BasicBSONObject getServerStatus() {
-        Optional<CommandResult> result = runDBCommand("admin", "serverStatus");
-        if (result.isPresent() && result.get().ok()) {
-            return result.get();
-        } else {
-            return EMPTY_RESPONSE;
-        }
-    }
-    
-    public boolean ping() {
-        MongoClient client = fastClient();
-        DBObject command = new BasicDBObject("ping", "1");
-        final DB db = client.getDB("admin");
-
-        try {
-            CommandResult status = db.command(command);
-            return status.ok();
-        } catch (MongoException e) {
-            LOG.warn("Pinging server {} failed with {}", address.getHost(), e);
-        } finally {
-            client.close();
-        }
-        return false;
-    }
-
-    public boolean initializeReplicaSet(String replicaSetName, Integer id) {
-        HostAndPort primary = getServerHostAndPort();
-        BasicBSONObject config = ReplicaSetConfig.builder(replicaSetName)
-                .member(primary, id)
-                .build();
-
-        BasicDBObject dbObject = new BasicDBObject("replSetInitiate", config);
-        LOG.debug("Initiating replica set with: " + dbObject);
-
-        Optional<CommandResult> result = runDBCommand("admin", dbObject);
-        if (result.isPresent() && result.get().ok() && LOG.isDebugEnabled()) {
-            LOG.debug("Completed initiating MongoDB replica set {} on entity {}", replicaSetName, this);
-        }
-        return result.isPresent() && result.get().ok();
-    }
-
-    /**
-     * Java equivalent of calling rs.conf() in the console.
-     */
-    private BSONObject getReplicaSetConfig() {
-        MongoClient client = client();
-        try {
-            return client.getDB("local").getCollection("system.replset").findOne();
-        } catch (MongoException e) {
-            LOG.error("Failed to get replica set config on "+client, e);
-            return null;
-        } finally {
-            client.close();
-        }
-    }
-
-    /**
-     * Runs <code>replSetGetStatus</code> on the admin database.
-     *
-     * @return The result of <code>replSetGetStatus</code>, or
-     *         an empty {@link BasicBSONObject} if the command threw an exception (e.g. if
-     *         the connection was reset) or if the resultant {@link CommandResult#ok} was false.
-     *
-     * @see <a href="http://docs.mongodb.org/manual/reference/replica-status/">Replica set status reference</a>
-     * @see <a href="http://docs.mongodb.org/manual/reference/command/replSetGetStatus/">replSetGetStatus documentation</a>
-     */
-    public BasicBSONObject getReplicaSetStatus() {
-        Optional<CommandResult> result = runDBCommand("admin", "replSetGetStatus");
-        if (result.isPresent() && result.get().ok()) {
-            return result.get();
-        } else {
-            return EMPTY_RESPONSE;
-        }
-    }
-
-    /**
-     * Reconfigures the replica set that this client is the primary member of to include a new member.
-     * <p/>
-     * Note that this can cause long downtime (typically 10-20s, even up to a minute).
-     *
-     * @param secondary New member of the set.
-     * @param id The id for the new set member. Must be unique within the set.
-     * @return True if successful
-     */
-    public boolean addMemberToReplicaSet(MongoDBServer secondary, Integer id) {
-        // We need to:
-        // - get the existing configuration
-        // - update its version
-        // - add the new member to its list of members
-        // - run replSetReconfig with the new configuration.
-        BSONObject existingConfig = getReplicaSetConfig();
-        if (existingConfig == null) {
-            LOG.warn("Couldn't load existing config for replica set from {}. Server {} not added.",
-                    getServerAddress(), secondary);
-            return false;
-        }
-
-        BasicBSONObject newConfig = ReplicaSetConfig.fromExistingConfig(existingConfig)
-                .primary(getServerHostAndPort())
-                .member(secondary, id)
-                .build();
-        return reconfigureReplicaSet(newConfig);
-    }
-
-    /**
-     * Reconfigures the replica set that this client is the primary member of to
-     * remove the given server.
-     * @param server The server to remove
-     * @return True if successful
-     */
-    public boolean removeMemberFromReplicaSet(MongoDBServer server) {
-        BSONObject existingConfig = getReplicaSetConfig();
-        if (existingConfig == null) {
-            LOG.warn("Couldn't load existing config for replica set from {}. Server {} not removed.",
-                    getServerAddress(), server);
-            return false;
-        }
-        BasicBSONObject newConfig = ReplicaSetConfig.fromExistingConfig(existingConfig)
-                .primary(getServerHostAndPort())
-                .remove(server)
-                .build();
-        return reconfigureReplicaSet(newConfig);
-    }
-
-    /**
-     * Runs replSetReconfig with the given BasicBSONObject. Returns true if the result's
-     * status is ok.
-     */
-    private boolean reconfigureReplicaSet(BasicBSONObject newConfig) {
-        BasicDBObject command = new BasicDBObject("replSetReconfig", newConfig);
-        LOG.debug("Reconfiguring replica set to: " + command);
-        Optional<CommandResult> result = runDBCommand("admin", command);
-        return result.isPresent() && result.get().ok();
-    }
-
-    public boolean addShardToRouter(String hostAndPort) {
-        LOG.debug("Adding shard " + hostAndPort);
-        BasicDBObject command = new BasicDBObject("addShard", hostAndPort);
-        Optional<CommandResult> result = runDBCommand("admin", command);
-        return result.isPresent() && result.get().ok();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBDriver.java
deleted file mode 100644
index e66b8e7..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBDriver.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface MongoDBDriver extends SoftwareProcessDriver {
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSet.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSet.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSet.java
deleted file mode 100644
index 6ebc17e..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSet.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.database.DatastoreMixins.HasDatastoreUrl;
-import org.apache.brooklyn.entity.group.Cluster;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-import com.google.common.reflect.TypeToken;
-
-/**
- * A replica set of {@link MongoDBServer}s, based on {@link DynamicCluster} which can be resized by a policy
- * if required.
- *
- * <p/><b>Note</b>
- * An issue with <code>mongod</code> on Mac OS X can cause unpredictable failure of servers at start-up.
- * See <a href="https://groups.google.com/forum/#!topic/mongodb-user/QRQYdIXOR2U">this mailing list post</a>
- * for more information.
- *
- * <p/>This replica set implementation has been tested on OS X 10.6 and Ubuntu 12.04.
- *
- * @see <a href="http://docs.mongodb.org/manual/replication/">http://docs.mongodb.org/manual/replication/</a>
- */
-@ImplementedBy(MongoDBReplicaSetImpl.class)
-public interface MongoDBReplicaSet extends DynamicCluster, MongoDBAuthenticationMixins, HasDatastoreUrl {
-
-    @SetFromFlag("replicaSetName")
-    ConfigKey<String> REPLICA_SET_NAME = ConfigKeys.newStringConfigKey(
-            "mongodb.replicaSet.name", "Name of the MongoDB replica set", "BrooklynCluster");
-
-    ConfigKey<Integer> INITIAL_SIZE = ConfigKeys.newConfigKeyWithDefault(Cluster.INITIAL_SIZE, 3);
-
-    AttributeSensor<MongoDBServer> PRIMARY_ENTITY = Sensors.newSensor(
-            MongoDBServer.class, "mongodb.replicaSet.primary.entity", "The entity acting as primary");
-
-    @SuppressWarnings("serial")
-    AttributeSensor<List<String>> REPLICA_SET_ENDPOINTS = Sensors.newSensor(new TypeToken<List<String>>() {}, 
-        "mongodb.replicaSet.endpoints", "Endpoints active for this replica set");
-    
-
-    /**
-     * The name of the replica set.
-     */
-    String getName();
-
-    /**
-     * @return The primary MongoDB server in the replica set.
-     */
-    MongoDBServer getPrimary();
-
-    /**
-     * @return The secondary servers in the replica set.
-     */
-    Collection<MongoDBServer> getSecondaries();
-
-    /**
-     * @return All servers in the replica set.
-     */
-    Collection<MongoDBServer> getReplicas();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSetImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSetImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSetImpl.java
deleted file mode 100644
index 1a80c3a..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/MongoDBReplicaSetImpl.java
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.mongodb;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.annotation.Nullable;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.group.AbstractMembershipTrackingPolicy;
-import org.apache.brooklyn.entity.group.DynamicClusterImpl;
-import org.apache.brooklyn.util.collections.MutableList;
-import org.apache.brooklyn.util.collections.MutableSet;
-import org.apache.brooklyn.util.text.Strings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.Sets;
-import com.google.common.base.Function;
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-/**
- * Implementation of {@link MongoDBReplicaSet}.
- *
- * Replica sets have a <i>minimum</i> of three members.
- *
- * Removal strategy is always {@link #NON_PRIMARY_REMOVAL_STRATEGY}.
- */
-public class MongoDBReplicaSetImpl extends DynamicClusterImpl implements MongoDBReplicaSet {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MongoDBReplicaSetImpl.class);
-
-    // Provides IDs for replica set members. The first member will have ID 0.
-    private final AtomicInteger nextMemberId = new AtomicInteger(0);
-
-    private MemberTrackingPolicy policy;
-    private final AtomicBoolean mustInitialise = new AtomicBoolean(true);
-
-    @SuppressWarnings("unchecked")
-    protected static final List<AttributeSensor<Long>> SENSORS_TO_SUM = Arrays.asList(
-        MongoDBServer.OPCOUNTERS_INSERTS,
-        MongoDBServer.OPCOUNTERS_QUERIES,
-        MongoDBServer.OPCOUNTERS_UPDATES,
-        MongoDBServer.OPCOUNTERS_DELETES,
-        MongoDBServer.OPCOUNTERS_GETMORE,
-        MongoDBServer.OPCOUNTERS_COMMAND,
-        MongoDBServer.NETWORK_BYTES_IN,
-        MongoDBServer.NETWORK_BYTES_OUT,
-        MongoDBServer.NETWORK_NUM_REQUESTS);
-    
-    public MongoDBReplicaSetImpl() {
-    }
-
-    /**
-     * Manages member addition and removal.
-     *
-     * It's important that this is a single thread: the concurrent addition and removal
-     * of members from the set would almost certainly have unintended side effects,
-     * like reconfigurations using outdated ReplicaSetConfig instances.
-     */
-    private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
-
-    /** true iff input is a non-null MongoDBServer with attribute REPLICA_SET_MEMBER_STATUS PRIMARY. */
-    static final Predicate<Entity> IS_PRIMARY = new Predicate<Entity>() {
-        // getPrimary relies on instanceof check
-        @Override public boolean apply(@Nullable Entity input) {
-            return input != null
-                    && input instanceof MongoDBServer
-                    && ReplicaSetMemberStatus.PRIMARY.equals(input.sensors().get(MongoDBServer.REPLICA_SET_MEMBER_STATUS));
-        }
-    };
-
-    /** true iff. input is a non-null MongoDBServer with attribute REPLICA_SET_MEMBER_STATUS SECONDARY. */
-    static final Predicate<Entity> IS_SECONDARY = new Predicate<Entity>() {
-        @Override public boolean apply(@Nullable Entity input) {
-            // getSecondaries relies on instanceof check
-            return input != null
-                    && input instanceof MongoDBServer
-                    && ReplicaSetMemberStatus.SECONDARY.equals(input.sensors().get(MongoDBServer.REPLICA_SET_MEMBER_STATUS));
-        }
-    };
-
-    /**
-     * {@link Function} for use as the cluster's removal strategy. Chooses any entity with
-     * {@link MongoDBServer#IS_PRIMARY_FOR_REPLICA_SET} true last of all.
-     */
-    private static final Function<Collection<Entity>, Entity> NON_PRIMARY_REMOVAL_STRATEGY = new Function<Collection<Entity>, Entity>() {
-        @Override
-        public Entity apply(@Nullable Collection<Entity> entities) {
-            checkArgument(entities != null && entities.size() > 0, "Expect list of MongoDBServers to have at least one entry");
-            return Iterables.tryFind(entities, Predicates.not(IS_PRIMARY)).or(Iterables.get(entities, 0));
-        }
-    };
-    
-    @Override
-    public void init() {
-        super.init();
-        enrichers().add(Enrichers.builder()
-                .aggregating(MongoDBAuthenticationMixins.ROOT_USERNAME)
-                .publishing(MongoDBAuthenticationMixins.ROOT_USERNAME)
-                .fromMembers()
-                .valueToReportIfNoSensors(null)
-                .computing(new RootUsernameReducer())
-                .build());
-    }
-
-    public static class RootUsernameReducer implements Function<Collection<String>, String>{
-        @Override
-        public String apply(Collection<String> input) {
-            // when authentication is used all members have the same value
-            return (input == null || input.isEmpty()) ? null : Iterables.getFirst(input, null);
-        };
-    }
-
-    /** @return {@link #NON_PRIMARY_REMOVAL_STRATEGY} */
-    @Override
-    public Function<Collection<Entity>, Entity> getRemovalStrategy() {
-        return NON_PRIMARY_REMOVAL_STRATEGY;
-    }
-
-    @Override
-    protected EntitySpec<?> getMemberSpec() {
-        EntitySpec<?> spec = config().get(MEMBER_SPEC);
-        if (spec == null) {
-            spec = EntitySpec.create(MongoDBServer.class);
-            config().set(MEMBER_SPEC, spec);
-        }
-        MongoDBAuthenticationUtils.setAuthenticationConfig(spec, this);
-        return spec;
-    }
-
-    /**
-     * Sets {@link MongoDBServer#REPLICA_SET}.
-     */
-    @Override
-    protected Map<?,?> getCustomChildFlags() {
-        return ImmutableMap.builder()
-                .putAll(super.getCustomChildFlags())
-                .put(MongoDBServer.REPLICA_SET, getProxy())
-                .build();
-    }
-
-    @Override
-    public String getName() {
-        // FIXME: Names must be unique if the replica sets are used in a sharded cluster
-        return config().get(REPLICA_SET_NAME) + this.getId();
-    }
-
-    @Override
-    public MongoDBServer getPrimary() {
-        return Iterables.tryFind(getReplicas(), IS_PRIMARY).orNull();
-    }
-
-    @Override
-    public Collection<MongoDBServer> getSecondaries() {
-        return FluentIterable.from(getReplicas())
-                .filter(IS_SECONDARY)
-                .toList();
-    }
-
-    @Override
-    public Collection<MongoDBServer> getReplicas() {
-        return FluentIterable.from(getMembers())
-                .transform(new Function<Entity, MongoDBServer>() {
-                    @Override public MongoDBServer apply(Entity input) {
-                        return MongoDBServer.class.cast(input);
-                    }
-                })
-                .toList();
-    }
-
-    /**
-     * Initialises the replica set with the given server as primary if {@link #mustInitialise} is true,
-     * otherwise schedules the addition of a new secondary.
-     */
-    private void serverAdded(MongoDBServer server) {
-        try {
-            LOG.debug("Server added: {}. SERVICE_UP: {}", server, server.sensors().get(MongoDBServer.SERVICE_UP));
-
-            // Set the primary if the replica set hasn't been initialised.
-            if (mustInitialise.compareAndSet(true, false)) {
-                if (LOG.isInfoEnabled())
-                    LOG.info("First server up in {} is: {}", getName(), server);
-                boolean replicaSetInitialised = server.initializeReplicaSet(getName(), nextMemberId.getAndIncrement());
-                if (replicaSetInitialised) {
-                    sensors().set(PRIMARY_ENTITY, server);
-                    sensors().set(Startable.SERVICE_UP, true);
-                } else {
-                    ServiceStateLogic.ServiceNotUpLogic.updateNotUpIndicator(this, "initialization", "replicaset failed to initialize");
-                    ServiceStateLogic.setExpectedState(this, Lifecycle.ON_FIRE);
-                }
-            } else {
-                if (LOG.isDebugEnabled())
-                    LOG.debug("Scheduling addition of member to {}: {}", getName(), server);
-                addSecondaryWhenPrimaryIsNonNull(server);
-            }
-        } catch (Exception e) {
-            ServiceStateLogic.ServiceNotUpLogic.updateNotUpIndicator((EntityLocal)server, "Failed to update replicaset", e);
-        }
-    }
-
-    /**
-     * Adds a server as a secondary in the replica set.
-     * <p/>
-     * If {@link #getPrimary} returns non-null submit the secondary to the primary's
-     * {@link MongoDBClientSupport}. Otherwise, reschedule the task to run again in three
-     * seconds time (in the hope that next time the primary will be available).
-     */
-    private void addSecondaryWhenPrimaryIsNonNull(final MongoDBServer secondary) {
-        // TODO Don't use executor, use ExecutionManager
-        executor.submit(new Runnable() {
-            @Override
-            public void run() {
-                // SERVICE_UP is not guaranteed when additional members are added to the set.
-                Boolean isAvailable = secondary.sensors().get(MongoDBServer.SERVICE_UP);
-                MongoDBServer primary = getPrimary();
-                boolean reschedule;
-                if (Boolean.TRUE.equals(isAvailable) && primary != null) {
-                    boolean added = primary.addMemberToReplicaSet(secondary, nextMemberId.incrementAndGet());
-                    if (added) {
-                        LOG.info("{} added to replica set {}", secondary, getName());
-                        reschedule = false;
-                    } else {
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("{} could not be added to replica set via {}; rescheduling", secondary, getName());
-                        }
-                        reschedule = true;
-                    }
-                } else {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("Rescheduling addition of member {} to replica set {}: service_up={}, primary={}",
-                            new Object[] {secondary, getName(), isAvailable, primary});
-                    }
-                    reschedule = true;
-                }
-                
-                if (reschedule) {
-                    // TODO Could limit number of retries
-                    executor.schedule(this, 3, TimeUnit.SECONDS);
-                }
-            }
-        });
-    }
-
-    /**
-     * Removes a server from the replica set.
-     * <p/>
-     * Submits a task that waits for the member to be down and for the replica set to have a primary
-     * member, then reconfigures the set to remove the member, to {@link #executor}. If either of the
-     * two conditions are not met then the task reschedules itself.
-     *
-     * @param member The server to be removed from the replica set.
-     */
-    private void serverRemoved(final MongoDBServer member) {
-        try {
-            if (LOG.isDebugEnabled())
-                LOG.debug("Scheduling removal of member from {}: {}", getName(), member);
-            // FIXME is there a chance of race here?
-            if (member.equals(sensors().get(PRIMARY_ENTITY)))
-                sensors().set(PRIMARY_ENTITY, null);
-            executor.submit(new Runnable() {
-                @Override
-                public void run() {
-                    // Wait until the server has been stopped before reconfiguring the set. Quoth the MongoDB doc:
-                    // for best results always shut down the mongod instance before removing it from a replica set.
-                    Boolean isAvailable = member.sensors().get(MongoDBServer.SERVICE_UP);
-                    // Wait for the replica set to elect a new primary if the set is reconfiguring itself.
-                    MongoDBServer primary = getPrimary();
-                    boolean reschedule;
-
-                    if (primary != null && !isAvailable) {
-                        boolean removed = primary.removeMemberFromReplicaSet(member);
-                        if (removed) {
-                            LOG.info("Removed {} from replica set {}", member, getName());
-                            reschedule = false;
-                        } else {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("{} could not be removed from replica set via {}; rescheduling", member, getName());
-                            }
-                            reschedule = true;
-                        }
-
-                    } else {
-                        if (LOG.isTraceEnabled()) {
-                            LOG.trace("Rescheduling removal of member {} from replica set {}: service_up={}, primary={}",
-                                    new Object[]{member, getName(), isAvailable, primary});
-                        }
-                        reschedule = true;
-                    }
-
-                    if (reschedule) {
-                        // TODO Could limit number of retries
-                        executor.schedule(this, 3, TimeUnit.SECONDS);
-                    }
-                }
-            });
-        } catch (Exception e) {
-            ServiceStateLogic.ServiceNotUpLogic.updateNotUpIndicator((EntityLocal)member, "Failed to update replicaset", e);
-        }
-    }
-
-    @Override
-    public void start(Collection<? extends Location> locations) {
-        // Promises that all the cluster's members have SERVICE_UP true on returning.
-        super.start(locations);
-        policy = policies().add(PolicySpec.create(MemberTrackingPolicy.class)
-                .displayName(getName() + " membership tracker")
-                .configure("group", this));
-
-        for (AttributeSensor<Long> sensor: SENSORS_TO_SUM)
-            enrichers().add(Enrichers.builder()
-                    .aggregating(sensor)
-                    .publishing(sensor)
-                    .fromMembers()
-                    .computingSum()
-                    .valueToReportIfNoSensors(null)
-                    .defaultValueForUnreportedSensors(null)
-                    .build());
-        
-        // FIXME would it be simpler to have a *subscription* on four or five sensors on allMembers, including SERVICE_UP
-        // (which we currently don't check), rather than an enricher, and call to an "update" method?
-        enrichers().add(Enrichers.builder()
-                .aggregating(MongoDBServer.REPLICA_SET_PRIMARY_ENDPOINT)
-                .publishing(MongoDBServer.REPLICA_SET_PRIMARY_ENDPOINT)
-                .fromMembers()
-                .valueToReportIfNoSensors(null)
-                .computing(new Function<Collection<String>, String>() {
-                        @Override
-                        public String apply(Collection<String> input) {
-                            if (input==null || input.isEmpty()) return null;
-                            Set<String> distinct = MutableSet.of();
-                            for (String endpoint: input)
-                                if (!Strings.isBlank(endpoint))
-                                    distinct.add(endpoint);
-                            if (distinct.size()>1)
-                                LOG.warn("Mongo replica set "+MongoDBReplicaSetImpl.this+" detetcted multiple masters (transitioning?): "+distinct);
-                            return input.iterator().next();
-                        }})
-                .build());
-
-        enrichers().add(Enrichers.builder()
-                .aggregating(MongoDBServer.MONGO_SERVER_ENDPOINT)
-                .publishing(REPLICA_SET_ENDPOINTS)
-                .fromMembers()
-                .valueToReportIfNoSensors(null)
-                .computing(new Function<Collection<String>, List<String>>() {
-                        @Override
-                        public List<String> apply(Collection<String> input) {
-                            Set<String> endpoints = new TreeSet<String>();
-                            for (String endpoint: input) {
-                                if (!Strings.isBlank(endpoint)) {
-                                    endpoints.add(endpoint);
-                                }
-                            }
-                            return MutableList.copyOf(endpoints);
-                        }})
-                .build());
-        
-        enrichers().add(Enrichers.builder()
-                .transforming(REPLICA_SET_ENDPOINTS)
-                .publishing(DATASTORE_URL)
-                .computing(new EndpointsToDatastoreUrlMapper(this))
-                .build());
-
-        subscriptions().subscribeToMembers(this, MongoDBServer.IS_PRIMARY_FOR_REPLICA_SET, new SensorEventListener<Boolean>() {
-            @Override public void onEvent(SensorEvent<Boolean> event) {
-                if (Boolean.TRUE == event.getValue())
-                    sensors().set(PRIMARY_ENTITY, (MongoDBServer)event.getSource());
-            }
-        });
-
-    }
-    
-    public static class EndpointsToDatastoreUrlMapper implements Function<Collection<String>, String> {
-        
-        private Entity entity;
-
-        public EndpointsToDatastoreUrlMapper(Entity entity) {
-            this.entity = entity;
-        }
-        
-        @Override
-        public String apply(Collection<String> input) {
-            String credentials = MongoDBAuthenticationUtils.usesAuthentication(entity) 
-                    ? String.format("%s:%s@", 
-                            entity.config().get(MongoDBAuthenticationMixins.ROOT_USERNAME), 
-                            entity.config().get(MongoDBAuthenticationMixins.ROOT_PASSWORD)) 
-                    : "";
-            return String.format("mongodb://%s%s", credentials, Strings.join(input, ","));
-        }
-    }
-
-    @Override
-    public void stop() {
-        // Do we want to remove the members from the replica set?
-        //  - if the set is being stopped forever it's irrelevant
-        //  - if the set might be restarted I think it just inconveniences us
-        // Terminate the executor immediately.
-        // TODO Note that after this the executor will not run if the set is restarted.
-        executor.shutdownNow();
-        super.stop();
-        sensors().set(Startable.SERVICE_UP, false);
-    }
-
-    @Override
-    public void onManagementStopped() {
-        super.onManagementStopped();
-        executor.shutdownNow();
-    }
-    
-    public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy {
-        @Override protected void onEntityChange(Entity member) {
-            // Ignored
-        }
-        @Override protected void onEntityAdded(Entity member) {
-            ((MongoDBReplicaSetImpl) entity).serverAdded((MongoDBServer) member);
-        }
-        @Override protected void onEntityRemoved(Entity member) {
-            ((MongoDBReplicaSetImpl) entity).serverRemoved((MongoDBServer) member);
-        }
-    }
-}


[44/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbyDatabaseSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbyDatabaseSshDriver.java b/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbyDatabaseSshDriver.java
deleted file mode 100644
index 05a1b46..0000000
--- a/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbyDatabaseSshDriver.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.derby;
-
-import static java.lang.String.format;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * Start a {@link DerbyDatabase} in a {@link Location} accessible over ssh.
- *
- * TODO work in progress
- */
-public class DerbyDatabaseSshDriver extends JavaSoftwareProcessSshDriver implements DerbyDatabaseDriver {
-
-    // TOD Previous comment said "JMX is configured using command line switch"; how should that be set here?
-
-    public DerbyDatabaseSshDriver(DerbyDatabase entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    public String getPidFile() { return "derby.pid"; }
-
-    @Override
-    protected String getLogFileLocation() {
-        throw new UnsupportedOperationException("Work in progress");
-    }
-
-    @Override
-    public void install() {
-        String url = format("http://www.mirrorservice.org/sites/ftp.apache.org/db/derby/db-derby-%s/db-derby-%s-lib.tar.gz", getVersion(), getVersion());
-        String saveAs = format("db-derby-%s-lib.tar.gz", getVersion());
-
-        List<String> commands = ImmutableList.<String>builder()
-                .add(BashCommands.commandToDownloadUrlAs(url, saveAs))
-                .add(BashCommands.INSTALL_TAR)
-                .add("tar xzfv " + saveAs)
-                .build();
-
-        newScript(INSTALLING)
-                .failOnNonZeroResultCode()
-                .body.append(commands).execute();
-    }
-
-    @Override
-    public void customize() {
-        newScript(CUSTOMIZING)
-                .failOnNonZeroResultCode()
-                .body.append(
-                        format("cp -R %s/derby-broker-%s/{bin,etc,lib} .", getInstallDir(), getVersion()),
-                        "make install PREFIX="+getRunDir())
-                .execute();
-    }
-    
-    @Override
-    public void launch() {
-        // TODO Should we redirect stdout/stderr: format(" >> %s/console 2>&1 </dev/null &", getRunDir())
-        newScript(MutableMap.of("usePidFile", getPidFile()), LAUNCHING)
-                .failOnNonZeroResultCode()
-                .body.append("nohup ./bin/derby &")
-                .execute();
-    }
- 
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of("usePidFile", getPidFile()), CHECK_RUNNING)
-                .execute() == 0;
-    }
-
-    /**
-     * Restarts redis with the current configuration.
-     */
-    @Override
-    public void stop() {
-        newScript(MutableMap.of("usePidFile", getPidFile()), STOPPING)
-                .execute();
-    }
-
-    @Override
-    public Map<String, String> getShellEnvironment() {
-        Map<String, String> orig = super.getShellEnvironment();
-        
-        return MutableMap.<String, String>builder()
-                .putAll(orig)
-                .put("DERBY_HOME", getRunDir())
-                .put("DERBY_WORK", getRunDir())
-                .putIfNotNull("DERBY_OPTS", orig.get("JAVA_OPTS"))
-                .build();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbySchema.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbySchema.java b/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbySchema.java
deleted file mode 100644
index 07417a5..0000000
--- a/brooklyn-library/sandbox/database/src/main/java/org/apache/brooklyn/entity/database/derby/DerbySchema.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.derby;
-
-import static java.lang.String.format;
-
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-import javax.management.ObjectName;
-
-import org.apache.brooklyn.core.entity.AbstractEntity;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensor;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.entity.database.Schema;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.feed.jmx.JmxAttributePollConfig;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-import org.apache.brooklyn.feed.jmx.JmxHelper;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-
-import com.google.common.base.Objects.ToStringHelper;
-
-public class DerbySchema extends AbstractEntity implements Schema {
-
-    // FIXME Needs reviewed and implemented properly; while fixing compilation errors
-    // I added enough for it to look mostly plausible but it's completely untested.
-    // And I have not looked up the derby docs to check that the attributes etc are valid. 
-    
-    // TODO Somehow share jmx connection with DerbyDatabase instance
-    
-    // TODO Declare effectors
-    
-    public static AttributeSensor<Integer> SCHEMA_DEPTH = new BasicAttributeSensor<Integer>(
-            Integer.class, "derby.schema.depth", "schema depth");
-    
-    public static AttributeSensor<Integer> MESSAGE_COUNT = new BasicAttributeSensor<Integer>(
-            Integer.class, "derby.schema.messageCount", "message count");
-    
-    @SetFromFlag(defaultVal="localhost")
-    String virtualHost;
-    
-    @SetFromFlag(nullable=false)
-    String name;
-
-    protected ObjectName virtualHostManager;
-    protected ObjectName exchange;
-
-    transient JmxHelper jmxHelper;
-    transient JmxFeed jmxFeed;
-    
-    public DerbySchema() {
-        super(MutableMap.of(), null);
-    }
-    public DerbySchema(Map properties) {
-        super(properties, null);
-    }
-    public DerbySchema(Entity parent) {
-        this(MutableMap.of(), parent);
-    }
-    public DerbySchema(Map properties, Entity parent) {
-        super(properties, parent);
-    }
-    
-    @Override
-    public String getName() {
-        return name;
-    }
-    
-    @Override
-    public DerbyDatabase getParent() {
-        return (DerbyDatabase) super.getParent();
-    }
-    
-    /**
-     * Return the JDBC connection URL for the schema.
-     */
-    public String getConnectionUrl() { return String.format("jdbc:derby:%s", name); }
-
-    public void init() {
-        try {
-            virtualHostManager = new ObjectName(format("org.apache.derby:type=VirtualHost.VirtualHostManager,VirtualHost=\"%s\"", virtualHost));
-            exchange = new ObjectName(format("org.apache.derby:type=VirtualHost.Exchange,VirtualHost=\"%s\",name=\"amq.direct\",ExchangeType=direct", virtualHost));
-            create();
-
-            jmxHelper = new JmxHelper((EntityLocal)getParent());
-
-            ObjectName schemaMBeanName = new ObjectName(format("org.apache.derby:type=VirtualHost.Schema,VirtualHost=\"%s\",name=\"%s\"", virtualHost, name));
-
-            jmxFeed = JmxFeed.builder()
-                    .entity(this)
-                    .helper(jmxHelper)
-                    .period(500, TimeUnit.MILLISECONDS)
-                    .pollAttribute(new JmxAttributePollConfig<Integer>(SCHEMA_DEPTH)
-                            .objectName(schemaMBeanName)
-                            .attributeName("SchemaDepth"))
-                    .pollAttribute(new JmxAttributePollConfig<Integer>(MESSAGE_COUNT)
-                            .objectName(schemaMBeanName)
-                            .attributeName("MessageCount"))
-                    .build();
-            
-        } catch (Exception e) {
-            throw Exceptions.propagate(e);
-        }
-    }
-
-    public void create() {
-        jmxHelper.operation(virtualHostManager, "createNewSchema", name, getParent().getAttribute(UsesJmx.JMX_USER), true);
-        jmxHelper.operation(exchange, "createNewBinding", name, name);
-    }
-
-    public void remove() {
-        jmxHelper.operation(exchange, "removeBinding", name, name);
-        jmxHelper.operation(virtualHostManager, "deleteSchema", name);
-    }
-
-    @Override
-    public void destroy() {
-        if (jmxFeed != null) jmxFeed.stop();
-        super.destroy();
-    }
-
-    @Override
-    protected ToStringHelper toStringHelper() {
-        return super.toStringHelper().add("name", name);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/database/src/test/java/org/apache/brooklyn/entity/database/PlaceholderTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/database/src/test/java/org/apache/brooklyn/entity/database/PlaceholderTest.java b/brooklyn-library/sandbox/database/src/test/java/org/apache/brooklyn/entity/database/PlaceholderTest.java
deleted file mode 100644
index 564249d..0000000
--- a/brooklyn-library/sandbox/database/src/test/java/org/apache/brooklyn/entity/database/PlaceholderTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database;
-
-import org.testng.annotations.Test;
-
-public class PlaceholderTest {
-    @Test
-    public void noop() {}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/pom.xml b/brooklyn-library/sandbox/extra/pom.xml
deleted file mode 100644
index a84dda4..0000000
--- a/brooklyn-library/sandbox/extra/pom.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.apache.brooklyn.sandbox</groupId>
-    <artifactId>brooklyn-sandbox-software-extra</artifactId>
-    <packaging>bundle</packaging>
-    <name>Brooklyn Extra Software Entities</name>
-    <description>
-		Brooklyn entitites for extra software processes
-	</description>
-
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-database</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-database</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeSaltImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeSaltImpl.java b/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeSaltImpl.java
deleted file mode 100644
index db505af..0000000
--- a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeSaltImpl.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.util.core.ResourceUtils;
-import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.entity.salt.SaltConfig;
-import org.apache.brooklyn.entity.salt.SaltConfigs;
-import org.apache.brooklyn.entity.salt.SaltLifecycleEffectorTasks;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.api.effector.Effector;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.effector.EffectorBody;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.entity.stock.EffectorStartableImpl;
-import org.apache.brooklyn.feed.ssh.SshFeed;
-import org.apache.brooklyn.feed.ssh.SshPollConfig;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.entity.database.postgresql.PostgreSqlNode;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-public class PostgreSqlNodeSaltImpl extends EffectorStartableImpl implements PostgreSqlNode, SoftwareProcess {
-
-    private static final Logger LOG = LoggerFactory.getLogger(PostgreSqlNodeSaltImpl.class);
-
-    public static final Effector<String> EXECUTE_SCRIPT = Effectors.effector(String.class, "executeScript")
-            .description("invokes a script")
-            .parameter(ExecuteScriptEffectorBody.SCRIPT)
-            .impl(new ExecuteScriptEffectorBody())
-            .build();
-
-    private SshFeed feed;
-
-    @Override
-    public void init() {
-        super.init();
-        new SaltPostgreSqlLifecycle().attachLifecycleEffectors(this);
-    }
-
-    public static class SaltPostgreSqlLifecycle extends SaltLifecycleEffectorTasks {
-        public SaltPostgreSqlLifecycle() {
-            usePidFile("/var/run/postgresql/*.pid");
-            useService("postgresql");
-        }
-
-        @Override
-        protected void startMinionAsync() {
-            Entities.warnOnIgnoringConfig(entity(), SaltConfig.SALT_FORMULAS);
-            Entities.warnOnIgnoringConfig(entity(), SaltConfig.SALT_RUN_LIST);
-            Entities.warnOnIgnoringConfig(entity(), SaltConfig.SALT_LAUNCH_ATTRIBUTES);
-
-            // TODO Set these as defaults, rather than replacing user's value!?
-            SaltConfigs.addToFormulas(entity(), "postgres", "https://github.com/saltstack-formulas/postgres-formula/archive/master.tar.gz");
-            SaltConfigs.addToRunList(entity(), "postgres");
-            SaltConfigs.addLaunchAttributes(entity(), ImmutableMap.<String,Object>builder()
-                    .put("port", DependentConfiguration.attributeWhenReady(entity(), PostgreSqlNode.POSTGRESQL_PORT))
-                    .put("listen_addresses", "*")
-                    .put("pg_hba.type", "host")
-                    .put("pg_hba.db", "all")
-                    .put("pg_hba.user", "all")
-                    .put("pg_hba.addr", "0.0.0.0/0")
-                    .put("pg_hba.method", "md5")
-                    .build());
-
-            super.startMinionAsync();
-        }
-
-        @Override
-        protected void postStartCustom() {
-            super.postStartCustom();
-
-            // now run the creation script
-            String creationScriptUrl = entity().getConfig(PostgreSqlNode.CREATION_SCRIPT_URL);
-            String creationScript;
-            if (creationScriptUrl != null) {
-                creationScript = new ResourceUtils(entity()).getResourceAsString(creationScriptUrl);
-            } else {
-                creationScript = entity().getConfig(PostgreSqlNode.CREATION_SCRIPT_CONTENTS);
-            }
-            entity().invoke(PostgreSqlNodeSaltImpl.EXECUTE_SCRIPT,
-                    ConfigBag.newInstance().configure(ExecuteScriptEffectorBody.SCRIPT, creationScript).getAllConfig()).getUnchecked();
-
-            // and finally connect sensors
-            ((PostgreSqlNodeSaltImpl) entity()).connectSensors();
-        }
-
-        @Override
-        protected void preStopCustom() {
-            ((PostgreSqlNodeSaltImpl) entity()).disconnectSensors();
-            super.preStopCustom();
-        }
-    }
-
-    public static class ExecuteScriptEffectorBody extends EffectorBody<String> {
-        public static final ConfigKey<String> SCRIPT = ConfigKeys.newStringConfigKey("script", "contents of script to run");
-
-        @Override
-        public String call(ConfigBag parameters) {
-            return DynamicTasks.queue(SshEffectorTasks.ssh(
-                    BashCommands.pipeTextTo(
-                            parameters.get(SCRIPT),
-                            BashCommands.sudoAsUser("postgres", "psql --file -")))
-                    .requiringExitCodeZero()).getStdout();
-        }
-    }
-
-    protected void connectSensors() {
-        sensors().set(DATASTORE_URL, String.format("postgresql://%s:%s/", getAttribute(HOSTNAME), getAttribute(POSTGRESQL_PORT)));
-
-        Location machine = Iterables.get(getLocations(), 0, null);
-
-        if (machine instanceof SshMachineLocation) {
-            feed = SshFeed.builder()
-                    .entity(this)
-                    .machine((SshMachineLocation)machine)
-                    .poll(new SshPollConfig<Boolean>(SERVICE_UP)
-                            .command("ps -ef | grep [p]ostgres")
-                            .setOnSuccess(true)
-                            .setOnFailureOrException(false))
-                    .build();
-        } else {
-            LOG.warn("Location(s) %s not an ssh-machine location, so not polling for status; setting serviceUp immediately", getLocations());
-        }
-    }
-
-    protected void disconnectSensors() {
-        if (feed != null) feed.stop();
-    }
-
-    @Override
-    public Integer getPostgreSqlPort() { return getAttribute(POSTGRESQL_PORT); }
-
-    @Override
-    public String getSharedMemory() { return getConfig(SHARED_MEMORY); }
-
-    @Override
-    public Integer getMaxConnections() { return getConfig(MAX_CONNECTIONS); }
-
-    @Override
-    public String getShortName() {
-        return "PostgreSQL";
-    }
-
-    @Override
-    public String executeScript(String commands) {
-        return Entities.invokeEffector(this, this, EXECUTE_SCRIPT,
-                ConfigBag.newInstance().configure(ExecuteScriptEffectorBody.SCRIPT, commands).getAllConfig()).getUnchecked();
-    }
-
-    @Override
-    public void populateServiceNotUpDiagnostics() {
-        // TODO no-op currently; should check ssh'able etc
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltBashCommands.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltBashCommands.java b/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltBashCommands.java
deleted file mode 100644
index 7b06a1e..0000000
--- a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltBashCommands.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.salt;
-
-import static org.apache.brooklyn.util.ssh.BashCommands.downloadToStdout;
-
-import javax.annotation.Nullable;
-
-import org.apache.commons.io.FilenameUtils;
-
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.apache.brooklyn.util.text.Strings;
-
-import com.google.common.annotations.Beta;
-import com.google.common.io.Files;
-
-/**
- * BASH commands useful for setting up SaltStack.
- */
-@Beta
-public class SaltBashCommands {
-
-    /**
-     * SaltStack formulas can be found at {@code https://github.com/saltstack-formulas} as repositories.
-     * <p>
-     * This assumes the download is an archive containing a single directory on the root which will
-     * be renamed to {@code formulaName}. if that directory already has the correct name {@code formulaName}
-     * can be null, but if taking from a GitHub tarball it will typically be of the form {@code formulaName-master/}
-     * hence the renaming.
-     */
-    // TODO support installing from classpath, and using the repository (tie in with those methods)
-    public static final String downloadAndExpandFormula(String source, @Nullable String formulaName, boolean force) {
-        String dl = downloadAndExpandFormula(source);
-        if (formulaName==null) return dl;
-        String tmpName = "tmp-"+Strings.makeValidFilename(formulaName)+"-"+Identifiers.makeRandomId(4);
-        String installCmd = BashCommands.chain("mkdir "+tmpName, "cd "+tmpName, dl,
-                BashCommands.requireTest("`ls | wc -w` -eq 1", "The archive must contain exactly one directory"),
-                "FORMULA_EXPANDED_DIR=`ls`",
-                "mv $FORMULA_EXPANDED_DIR '../"+formulaName+"'",
-                "cd ..",
-                "rm -rf "+tmpName);
-        if (!force) return BashCommands.alternatives("ls "+formulaName, installCmd);
-        else return BashCommands.alternatives("rm -rf "+formulaName, installCmd);
-    }
-
-    /**
-     * Same as {@link #downloadAndExpandFormula(String, String)} with no formula name.
-     * <p>
-     * Equivalent to the following command, but substituting the given {@code sourceUrl}.
-     * <pre>{@code
-     * curl -f -L  https://github.com/saltstack-formulas/nginx-formula/archive/master.tar.gz | tar xvz
-     * }</pre>
-     */
-    public static final String downloadAndExpandFormula(String sourceUrl) {
-        String ext = Files.getFileExtension(sourceUrl);
-        if ("tar".equalsIgnoreCase(ext))
-            return downloadToStdout(sourceUrl) + " | tar xv";
-        if ("tgz".equalsIgnoreCase(ext) || sourceUrl.toLowerCase().endsWith(".tar.gz"))
-            return downloadToStdout(sourceUrl) + " | tar xvz";
-
-        String target = FilenameUtils.getName(sourceUrl);
-        if (target==null) target = ""; else target = target.trim();
-        target += "_"+Strings.makeRandomId(4);
-
-        if ("zip".equalsIgnoreCase(ext) || "tar.gz".equalsIgnoreCase(ext))
-            return BashCommands.chain(
-                BashCommands.commandToDownloadUrlAs(sourceUrl, target),
-                "unzip "+target,
-                "rm "+target);
-
-        throw new UnsupportedOperationException("No way to expand "+sourceUrl+" (yet)");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltConfig.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltConfig.java b/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltConfig.java
deleted file mode 100644
index c67eda0..0000000
--- a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltConfig.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.salt;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.api.mgmt.TaskAdaptable;
-import org.apache.brooklyn.api.mgmt.TaskFactory;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.core.config.MapConfigKey;
-import org.apache.brooklyn.core.config.SetConfigKey;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensor;
-
-import com.google.common.annotations.Beta;
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-import com.google.common.reflect.TypeToken;
-
-/**
- * {@link ConfigKey}s used to configure Salt entities.
- *
- * @see SaltConfigs
- * @see SaltLifecycleEffectorTasks
- */
-@Beta
-public interface SaltConfig {
-
-    MapConfigKey<String> SALT_FORMULAS = new MapConfigKey<String>(String.class,
-            "salt.formulaUrls", "Map of Salt formula URLs (normally GutHub repository archives from the salt-formulas user)");
-    SetConfigKey<String> SALT_RUN_LIST = new SetConfigKey<String>(String.class,
-            "salt.runList", "Set of Salt states to install from the formula URLs");
-    MapConfigKey<Object> SALT_LAUNCH_ATTRIBUTES = new MapConfigKey<Object>(Object.class, "salt.launch.attributes", "TODO");
-
-    @SetFromFlag("master")
-    ConfigKey<SaltStackMaster> MASTER = ConfigKeys.newConfigKey(SaltStackMaster.class,
-            "salt.master.entity", "The Salt master server");
-
-    AttributeSensor<String> MINION_ID = new BasicAttributeSensor<String>(String.class,
-            "salt.minionId", "The ID for a Salt minion");
-
-    @SetFromFlag("masterless")
-    ConfigKey<Boolean> MASTERLESS_MODE = ConfigKeys.newBooleanConfigKey(
-            "salt.masterless", "Salt masterless, minion only configuration (default uses master and minion)",
-            Boolean.FALSE);
-
-    @SetFromFlag("masterConfigUrl")
-    ConfigKey<String> MASTER_CONFIGURATION_URL = ConfigKeys.newStringConfigKey(
-            "salt.master.templateUrl", "The Salt master configuration file template URL",
-            "classpath://org/apache/brooklyn/entity/salt/master");
-
-    @SetFromFlag("minionConfigUrl")
-    ConfigKey<String> MINION_CONFIGURATION_URL = ConfigKeys.newStringConfigKey(
-            "salt.minion.templateUrl", "The Salt minion configuration file template URL",
-            "classpath://org/apache/brooklyn/entity/salt/minion");
-
-    @SetFromFlag("masterlessConfigUrl")
-    ConfigKey<String> MASTERLESS_CONFIGURATION_URL = ConfigKeys.newStringConfigKey(
-            "salt.masterless.templateUrl", "The Salt minion masterless configuration file template URL",
-            "classpath://org/apache/brooklyn/entity/salt/masterless");
-
-    @SuppressWarnings({ "unchecked", "rawtypes" })
-    @SetFromFlag("minionIdFunction")
-    ConfigKey<Function<Entity, String>> MINION_ID_FUNCTION = new BasicConfigKey(Function.class,
-            "salt.minionId.function", "Function to generate the ID of a Salt minion for an entity", Functions.toStringFunction());
-
-    @SuppressWarnings("serial")
-    ConfigKey<TaskFactory<? extends TaskAdaptable<Boolean>>> IS_RUNNING_TASK = ConfigKeys.newConfigKey(
-            new TypeToken<TaskFactory<? extends TaskAdaptable<Boolean>>>() {}, 
-            "salt.driver.isRunningTask");
-
-    @SuppressWarnings("serial")
-    ConfigKey<TaskFactory<?>> STOP_TASK = ConfigKeys.newConfigKey(
-            new TypeToken<TaskFactory<?>>() {}, 
-            "salt.driver.stopTask");
-
-    /**
-     * The {@link SaltStackMaster master} entity.
-     */
-    SaltStackMaster getMaster();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltConfigs.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltConfigs.java b/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltConfigs.java
deleted file mode 100644
index 4f7d610..0000000
--- a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltConfigs.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.salt;
-
-import java.util.Map;
-
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.config.MapConfigKey.MapModifications;
-import org.apache.brooklyn.core.config.SetConfigKey.SetModifications;
-import org.apache.brooklyn.core.entity.EntityInternal;
-
-import com.google.common.annotations.Beta;
-import com.google.common.base.Preconditions;
-
-/**
- * Conveniences for configuring brooklyn Salt entities 
- *
- * @since 0.6.0
- */
-@Beta
-public class SaltConfigs {
-
-    public static void addToRunList(EntitySpec<?> entity, String...states) {
-        for (String state : states) {
-            entity.configure(SaltConfig.SALT_RUN_LIST, SetModifications.addItem(state));
-        }
-    }
-
-    public static void addToRunList(EntityInternal entity, String...states) {
-        for (String state : states) {
-            entity.config().set(SaltConfig.SALT_RUN_LIST, SetModifications.addItem(state));
-        }
-    }
-
-    public static void addToFormuals(EntitySpec<?> entity, String formulaName, String formulaUrl) {
-        entity.configure(SaltConfig.SALT_FORMULAS.subKey(formulaName), formulaUrl);
-    }
-
-    public static void addToFormulas(EntityInternal entity, String formulaName, String formulaUrl) {
-        entity.config().set(SaltConfig.SALT_FORMULAS.subKey(formulaName), formulaUrl);
-    }
-
-    @SuppressWarnings({ "unchecked", "rawtypes" })
-    public static void addLaunchAttributes(EntitySpec<?> entity, Map<? extends Object,? extends Object> attributesMap) {
-        entity.configure(SaltConfig.SALT_LAUNCH_ATTRIBUTES, MapModifications.add((Map)attributesMap));
-    }
-    
-    @SuppressWarnings({ "unchecked", "rawtypes" })
-    public static void addLaunchAttributes(EntityInternal entity, Map<? extends Object,? extends Object> attributesMap) {
-        entity.config().set(SaltConfig.SALT_LAUNCH_ATTRIBUTES, MapModifications.add((Map)attributesMap));
-    }
-    
-    /** replaces the attributes underneath the rootAttribute parameter with the given value;
-     * see {@link #addLaunchAttributesMap(EntitySpec, Map)} for richer functionality */
-    public static void setLaunchAttribute(EntitySpec<?> entity, String rootAttribute, Object value) {
-        entity.configure(SaltConfig.SALT_LAUNCH_ATTRIBUTES.subKey(rootAttribute), value);
-    }
-    
-    /** replaces the attributes underneath the rootAttribute parameter with the given value;
-     * see {@link #addLaunchAttributesMap(EntitySpec, Map)} for richer functionality */
-    public static void setLaunchAttribute(EntityInternal entity, String rootAttribute, Object value) {
-        entity.config().set(SaltConfig.SALT_LAUNCH_ATTRIBUTES.subKey(rootAttribute), value);
-    }
-
-    public static <T> T getRequiredConfig(Entity entity, ConfigKey<T> key) {
-        return Preconditions.checkNotNull(
-                Preconditions.checkNotNull(entity, "Entity must be supplied").getConfig(key), 
-                "Key "+key+" is required on "+entity);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltLifecycleEffectorTasks.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltLifecycleEffectorTasks.java b/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltLifecycleEffectorTasks.java
deleted file mode 100644
index 6f3e4f5..0000000
--- a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltLifecycleEffectorTasks.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.salt;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.location.MachineLocation;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.server.BrooklynServerConfig;
-import org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.Tasks;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.brooklyn.util.net.Urls;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-
-import com.google.common.annotations.Beta;
-import com.google.common.base.Supplier;
-
-/**
- * Creates effectors to start, restart, and stop processes using SaltStack.
- * <p>
- * Instances of this should use the {@link SaltConfig} config attributes to configure startup,
- * and invoke {@link #usePidFile(String)} or {@link #useService(String)} to determine check-running and stop behaviour.
- * Alternatively this can be subclassed and {@link #postStartCustom()} and {@link #stopProcessesAtMachine()} overridden.
- *
- * @since 0.6.0
- */
-@Beta
-public class SaltLifecycleEffectorTasks extends MachineLifecycleEffectorTasks implements SaltConfig {
-
-    private static final Logger log = LoggerFactory.getLogger(SaltLifecycleEffectorTasks.class);
-
-    protected SaltStackMaster master = null;
-    protected String pidFile, serviceName, windowsServiceName;
-
-    public SaltLifecycleEffectorTasks() {
-    }
-
-    public SaltLifecycleEffectorTasks usePidFile(String pidFile) {
-        this.pidFile = pidFile;
-        return this;
-    }
-    public SaltLifecycleEffectorTasks useService(String serviceName) {
-        this.serviceName = serviceName;
-        return this;
-    }
-    public SaltLifecycleEffectorTasks useWindowsService(String serviceName) {
-        this.windowsServiceName = serviceName;
-        return this;
-    }
-    public SaltLifecycleEffectorTasks master(SaltStackMaster master) {
-        this.master = master;
-        return this;
-    }
-
-    @Override
-    public void attachLifecycleEffectors(Entity entity) {
-        if (pidFile==null && serviceName==null && getClass().equals(SaltLifecycleEffectorTasks.class)) {
-            // warn on incorrect usage
-            log.warn("Uses of "+getClass()+" must define a PID file or a service name (or subclass and override {start,stop} methods as per javadoc) " +
-                    "in order for check-running and stop to work");
-        }
-
-        super.attachLifecycleEffectors(entity);
-    }
-
-    @Override
-    protected String startProcessesAtMachine(Supplier<MachineLocation> machineS) {
-        startMinionAsync();
-        return "salt start tasks submitted";
-    }
-
-    protected void startMinionAsync() {
-        // TODO make directories more configurable (both for ssh-drivers and for this)
-        String installDir = Urls.mergePaths(BrooklynServerConfig.getMgmtBaseDir(entity().getManagementContext()), "salt-install");
-        String runDir = Urls.mergePaths(BrooklynServerConfig.getMgmtBaseDir(entity().getManagementContext()),
-                "apps/"+entity().getApplicationId()+"/salt-entities/"+entity().getId());
-
-        Boolean masterless = entity().getConfig(SaltConfig.MASTERLESS_MODE);
-        if (masterless) {
-            DynamicTasks.queue(
-                    SaltTasks.installFormulas(installDir, SaltConfigs.getRequiredConfig(entity(), SALT_FORMULAS), false),
-                    SaltTasks.buildSaltFile(runDir,
-                            SaltConfigs.getRequiredConfig(entity(), SALT_RUN_LIST),
-                            entity().getConfig(SALT_LAUNCH_ATTRIBUTES)),
-                    SaltTasks.installSaltMinion(entity(), runDir, installDir, false),
-                    SaltTasks.runSalt(runDir));
-        } else {
-            throw new UnsupportedOperationException("Salt master mode not yet supported for minions");
-        }
-    }
-
-    @Override
-    protected void postStartCustom() {
-        boolean result = false;
-        result |= tryCheckStartPid();
-        result |= tryCheckStartService();
-        result |= tryCheckStartWindowsService();
-        if (!result) {
-            throw new IllegalStateException("The process for "+entity()+" appears not to be running (no way to check!)");
-        }
-    }
-
-    protected boolean tryCheckStartPid() {
-        if (pidFile==null) return false;
-
-        // if it's still up after 5s assume we are good (default behaviour)
-        Time.sleep(Duration.FIVE_SECONDS);
-        if (!DynamicTasks.queue(SshEffectorTasks.isPidFromFileRunning(pidFile).runAsRoot()).get()) {
-            throw new IllegalStateException("The process for "+entity()+" appears not to be running (pid file "+pidFile+")");
-        }
-
-        // and set the PID
-        entity().sensors().set(Attributes.PID,
-                Integer.parseInt(DynamicTasks.queue(SshEffectorTasks.ssh("cat "+pidFile).runAsRoot()).block().getStdout().trim()));
-        return true;
-    }
-
-    protected boolean tryCheckStartService() {
-        if (serviceName==null) return false;
-
-        // if it's still up after 5s assume we are good (default behaviour)
-        Time.sleep(Duration.FIVE_SECONDS);
-        if (!((Integer)0).equals(DynamicTasks.queue(SshEffectorTasks.ssh("/etc/init.d/"+serviceName+" status").runAsRoot()).get())) {
-            throw new IllegalStateException("The process for "+entity()+" appears not to be running (service "+serviceName+")");
-        }
-
-        return true;
-    }
-
-    protected boolean tryCheckStartWindowsService() {
-        if (windowsServiceName==null) return false;
-
-        // if it's still up after 5s assume we are good (default behaviour)
-        Time.sleep(Duration.FIVE_SECONDS);
-        if (!((Integer)0).equals(DynamicTasks.queue(SshEffectorTasks.ssh("sc query \""+serviceName+"\" | find \"RUNNING\"").runAsCommand()).get())) {
-            throw new IllegalStateException("The process for "+entity()+" appears not to be running (windowsService "+windowsServiceName+")");
-        }
-
-        return true;
-    }
-
-    @Override
-    protected String stopProcessesAtMachine() {
-        boolean result = false;
-        result |= tryStopService();
-        result |= tryStopPid();
-        if (!result) {
-            throw new IllegalStateException("The process for "+entity()+" appears could not be stopped (no impl!)");
-        }
-        return "stopped";
-    }
-
-    protected boolean tryStopService() {
-        if (serviceName==null) return false;
-        int result = DynamicTasks.queue(SshEffectorTasks.ssh("/etc/init.d/"+serviceName+" stop").runAsRoot()).get();
-        if (0==result) return true;
-        if (entity().getAttribute(Attributes.SERVICE_STATE)!=Lifecycle.RUNNING)
-            return true;
-
-        throw new IllegalStateException("The process for "+entity()+" appears could not be stopped (exit code "+result+" to service stop)");
-    }
-
-    protected boolean tryStopPid() {
-        Integer pid = entity().getAttribute(Attributes.PID);
-        if (pid==null) {
-            if (entity().getAttribute(Attributes.SERVICE_STATE)==Lifecycle.RUNNING && pidFile==null)
-                log.warn("No PID recorded for "+entity()+" when running, with PID file "+pidFile+"; skipping kill in "+Tasks.current());
-            else
-                if (log.isDebugEnabled())
-                    log.debug("No PID recorded for "+entity()+"; skipping ("+entity().getAttribute(Attributes.SERVICE_STATE)+" / "+pidFile+")");
-            return false;
-        }
-
-        // allow non-zero exit as process may have already been killed
-        DynamicTasks.queue(SshEffectorTasks.ssh(
-                "kill "+pid, "sleep 5", BashCommands.ok("kill -9 "+pid)).allowingNonZeroExitCode().runAsRoot()).block();
-
-        if (DynamicTasks.queue(SshEffectorTasks.isPidRunning(pid).runAsRoot()).get()) {
-            throw new IllegalStateException("Process for "+entity()+" in "+pid+" still running after kill");
-        }
-        entity().sensors().set(Attributes.PID, null);
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @return the Salt master entity if it exists.
-     * @see #master(SaltStackMaster)
-     * @see SaltConfig#MASTERLESS_MODE
-     */
-    @Override
-    public SaltStackMaster getMaster() {
-        return master;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMaster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMaster.java b/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMaster.java
deleted file mode 100644
index 5b4a085..0000000
--- a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMaster.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.salt;
-
-import java.util.List;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.BrooklynConfigKeys;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensor;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-
-import com.google.common.reflect.TypeToken;
-
-@ImplementedBy(SaltStackMasterImpl.class)
-@Catalog(name="SaltStack Master", description="The Salt master server")
-public interface SaltStackMaster extends SoftwareProcess {
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(BrooklynConfigKeys.SUGGESTED_VERSION, "stable");
-
-    @SetFromFlag("bootstrapUrl")
-    ConfigKey<String> BOOTSTRAP_URL = ConfigKeys.newStringConfigKey(
-            "salt.bootstrap.url", "The URL that returns the Salt boostrap commands",
-            "http://bootstrap.saltstack.org/");
-
-    @SetFromFlag("masterUser")
-    ConfigKey<String> MASTER_USER = ConfigKeys.newStringConfigKey(
-            "salt.master.user", "The user that runs the Salt master daemon process",
-            "root");
-
-    @SetFromFlag("masterConfigTemplate")
-    ConfigKey<String> MASTER_CONFIG_TEMPLATE_URL = ConfigKeys.newStringConfigKey(
-            "salt.master.config.templateUrl", "The template for the Salt master configuration (URL)",
-            "classpath://org/apache/brooklyn/entity/salt/master");
-
-    @SetFromFlag("saltPort")
-    PortAttributeSensorAndConfigKey SALT_PORT = new PortAttributeSensorAndConfigKey(
-            "salt.port", "Port used for communication between Salt master and minion processes", "4506+");
-
-    @SetFromFlag("publishPort")
-    PortAttributeSensorAndConfigKey PUBLISH_PORT = new PortAttributeSensorAndConfigKey(
-            "salt.publish.port", "Port used by the Salt master publisher", "4505+");
-
-    @SuppressWarnings("serial")
-    AttributeSensor<List<String>> MINION_IDS = new BasicAttributeSensor<List<String>>(new TypeToken<List<String>>() {},
-            "salt.minions", "List of Salt minion IDs");
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMasterDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMasterDriver.java b/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMasterDriver.java
deleted file mode 100644
index 09c4db1..0000000
--- a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMasterDriver.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.salt;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface SaltStackMasterDriver extends SoftwareProcessDriver {
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMasterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMasterImpl.java b/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMasterImpl.java
deleted file mode 100644
index 40e38c5..0000000
--- a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMasterImpl.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.salt;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.core.feed.ConfigToAttributes;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-
-public class SaltStackMasterImpl extends SoftwareProcessImpl implements SaltStackMaster {
-
-    private static final Logger log = LoggerFactory.getLogger(SaltStackMasterImpl.class);
-
-    public SaltStackMasterImpl() {
-        super();
-    }
-
-    @Override
-    public Class getDriverInterface() {
-        return SaltStackMasterDriver.class;
-    }
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-
-        // TODO what sensors should we poll?
-        ConfigToAttributes.apply(this);
-
-        connectServiceUpIsRunning();
-    }
-
-    @Override
-    protected void disconnectSensors() {
-        disconnectServiceUpIsRunning();
-
-        super.disconnectSensors();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMasterSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMasterSshDriver.java b/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMasterSshDriver.java
deleted file mode 100644
index 6010484..0000000
--- a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltStackMasterSshDriver.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.salt;
-
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-import com.google.common.collect.ImmutableMap;
-
-public class SaltStackMasterSshDriver extends JavaSoftwareProcessSshDriver implements SaltStackMasterDriver {
-
-    public SaltStackMasterSshDriver(SaltStackMasterImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public SaltStackMasterImpl getEntity() {
-        return (SaltStackMasterImpl) super.getEntity();
-    }
-
-    @Override
-    protected String getLogFileLocation() {
-        return "master.log";
-    }
-
-    private String getPidFile() {
-        return "master.pid";
-    }
-
-    @Override
-    public void install() {
-        String url = Entities.getRequiredUrlConfig(getEntity(), SaltStackMaster.BOOTSTRAP_URL);
-        copyTemplate(url, "/etc/salt/master");
-
-        // Copy the file contents to the remote machine
-//        DynamicTasks.queue(SshEffectorTasks.put("/tmp/cumulus.yaml").contents(contents)).get();
-
-        // Run Salt bootstrap task to install master
-        DynamicTasks.queue(SaltTasks.installSaltMaster(getEntity(), getRunDir(), true));
-
-
-        newScript("createInstallDir")
-                .body.append("mkdir -p "+getInstallDir())
-                .failOnNonZeroResultCode()
-                .execute();
-
-        newScript(INSTALLING).
-                failOnNonZeroResultCode().
-                body.append("").execute();
-    }
-
-    @Override
-    public void customize() {
-    }
-
-    @Override
-    public void launch() {
-        newScript(ImmutableMap.of("usePidFile", false), LAUNCHING)
-                .body.append(BashCommands.sudo("start salt-master"))
-                .execute();
-    }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(ImmutableMap.of("usePidFile", false), CHECK_RUNNING)
-                .body.append(BashCommands.sudo("status salt-master"))
-                .execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(ImmutableMap.of("usePidFile", false), STOPPING)
-                .body.append(BashCommands.sudo("stop salt-master"))
-                .execute();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltTasks.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltTasks.java b/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltTasks.java
deleted file mode 100644
index f969b44..0000000
--- a/brooklyn-library/sandbox/extra/src/main/java/org/apache/brooklyn/entity/salt/SaltTasks.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.salt;
-
-import static org.apache.brooklyn.util.ssh.BashCommands.INSTALL_CURL;
-import static org.apache.brooklyn.util.ssh.BashCommands.INSTALL_TAR;
-import static org.apache.brooklyn.util.ssh.BashCommands.INSTALL_UNZIP;
-import static org.apache.brooklyn.util.ssh.BashCommands.downloadToStdout;
-import static org.apache.brooklyn.util.ssh.BashCommands.sudo;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.mgmt.TaskFactory;
-import org.apache.brooklyn.core.effector.EffectorTasks;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.util.core.ResourceUtils;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.Tasks;
-import org.apache.brooklyn.util.core.text.TemplateProcessor;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Urls;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-import com.google.common.annotations.Beta;
-
-@Beta
-public class SaltTasks {
-
-    public static TaskFactory<?> installSaltMaster(Entity master, String saltDirectory, boolean force) {
-        // TODO check on entity whether it is salt _server_
-        String boostrapUrl = master.getConfig(SaltStackMaster.BOOTSTRAP_URL);
-        String version = master.getConfig(SaltStackMaster.SUGGESTED_VERSION);
-        String installCmd = cdAndRun(saltDirectory,
-                BashCommands.chain(
-                        INSTALL_CURL,
-                        INSTALL_TAR,
-                        INSTALL_UNZIP,
-                        "( "+downloadToStdout(boostrapUrl) + " | " + sudo("sh -s -- -M -N "+version)+" )"));
-        if (!force) installCmd = BashCommands.alternatives("which salt-master", installCmd);
-        return SshEffectorTasks.ssh(installCmd).summary("install salt master");
-    }
-
-    public static TaskFactory<?> installSaltMinion(final Entity minion, final String runDir, final String installDir, final boolean force) {
-        return Tasks.<Void>builder().displayName("install minion").body(
-                new Runnable() {
-                    public void run() {
-                        // Setup bootstrap installation command for minion
-                        String boostrapUrl = minion.getConfig(SaltStackMaster.BOOTSTRAP_URL);
-                        String installCmd = cdAndRun(runDir, BashCommands.chain(
-                                INSTALL_CURL,
-                                INSTALL_TAR,
-                                INSTALL_UNZIP,
-                                "( "+downloadToStdout(boostrapUrl) + " | " + sudo("sh")+" )"));
-                        if (!force) installCmd = BashCommands.alternatives("which salt-minion", installCmd);
-
-                        // Process the minion configuration template
-                        Boolean masterless = minion.getConfig(SaltConfig.MASTERLESS_MODE);
-                        String url = masterless ? Entities.getRequiredUrlConfig(minion, SaltConfig.MASTERLESS_CONFIGURATION_URL)
-                                                : Entities.getRequiredUrlConfig(minion, SaltConfig.MINION_CONFIGURATION_URL);
-                        Map<String, Object> config = MutableMap.<String, Object>builder()
-                                .put("entity", minion)
-                                .put("runDir", runDir)
-                                .put("installDir", installDir)
-                                .put("formulas", minion.getConfig(SaltConfig.SALT_FORMULAS))
-                                .build();
-                        String contents = TemplateProcessor.processTemplateContents(new ResourceUtils(minion).getResourceAsString(url), config);
-
-                        // Copy the file contents to the remote machine and install/start salt-minion
-                        DynamicTasks.queue(
-                                SshEffectorTasks.ssh(installCmd),
-                                SshEffectorTasks.put("/tmp/minion")
-                                        .contents(contents)
-                                        .createDirectory(),
-                                SshEffectorTasks.ssh(sudo("mv /tmp/minion /etc/salt/minion")), // TODO clunky
-                                SshEffectorTasks.ssh(sudo("restart salt-minion"))
-                            );
-                    }
-                }).buildFactory();
-    }
-
-    public static TaskFactory<?> installFormulas(final String installDir, final Map<String,String> formulasAndUrls, final boolean force) {
-        return Tasks.<Void>builder().displayName("install formulas").body(
-                new Runnable() {
-                    public void run() {
-                        Entity e = EffectorTasks.findEntity();
-                        if (formulasAndUrls==null)
-                            throw new IllegalStateException("No formulas defined to install at "+e);
-                        for (String formula: formulasAndUrls.keySet())
-                            DynamicTasks.queue(installFormula(installDir, formula, formulasAndUrls.get(formula), force));
-                    }
-                }).buildFactory();
-    }
-
-    public static TaskFactory<?> installFormula(String installDir, String formula, String url, boolean force) {
-        return SshEffectorTasks.ssh(cdAndRun(installDir, SaltBashCommands.downloadAndExpandFormula(url, formula, force)))
-                .summary("install formula "+formula)
-                .requiringExitCodeZero();
-    }
-
-    protected static String cdAndRun(String targetDirectory, String command) {
-        return BashCommands.chain(
-                "mkdir -p "+targetDirectory,
-                "cd "+targetDirectory,
-                command);
-    }
-
-    public static TaskFactory<?> buildSaltFile(String runDir, Iterable<? extends String> runList, Map<String, Object> attributes) {
-        StringBuilder top =  new StringBuilder()
-                .append("base:\n")
-                .append("    '*':\n");
-        for (String run : runList) {
-            top.append("      - " + run + "\n");
-        }
-
-        return SshEffectorTasks.put(Urls.mergePaths(runDir, "base", "top.sls"))
-                .contents(top.toString())
-                .summary("build salt top file")
-                .createDirectory();
-    }
-
-    public static TaskFactory<?> runSalt(String runDir) {
-        return SshEffectorTasks.ssh(cdAndRun(runDir, BashCommands.sudo("salt-call state.highstate")))
-                .summary("run salt install")
-                .requiringExitCodeZero();
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/resources/org/apache/brooklyn/entity/salt/master
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/resources/org/apache/brooklyn/entity/salt/master b/brooklyn-library/sandbox/extra/src/main/resources/org/apache/brooklyn/entity/salt/master
deleted file mode 100644
index 72d7eb9..0000000
--- a/brooklyn-library/sandbox/extra/src/main/resources/org/apache/brooklyn/entity/salt/master
+++ /dev/null
@@ -1,65 +0,0 @@
-[#ftl]
-#
-# 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.
-#
-# /etc/salt/master
-##
-
-#interface: 0.0.0.0
-#ipv6: False
-#publish_port: ${entity.publishPort,c} # 4505
-
-#user: root
-#max_open_files: 100000
-#worker_threads: 5
-ret_port: ${entity.saltPort,c} # 4506
-
-root_dir: /
-pidfile: ${driver.pidFile}
-pki_dir: ${runDir}/pki
-cachedir: ${runDir}/cache
-log_file: ${driver.logFileLocation}
-key_logfile: ${runDir}/key.log
-
-#verify_env: True
-#keep_jobs: 24
-
-#timeout: 5
-#loop_interval: 60
-
-output: nested
-color: False
-log_level: info
-log_level_logfile: debug # Debugging
-
-#job_cache: True
-#minion_data_cache: True
-
-#open_mode: False
-#auto_accept: False
-#autosign_file: autosign.conf
-#permissive_pki_access: False
-
-fileserver_backend:
-  - git
-
-gitfs_remotes:
-  - git://github.com/saltstack/salt-states.git
-  - git://github.com/saltstack-formulas/postgres-formula.git
-  - ${entity.remoteUrl}
-  # TODO iterate through formula URLs

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/resources/org/apache/brooklyn/entity/salt/masterless
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/resources/org/apache/brooklyn/entity/salt/masterless b/brooklyn-library/sandbox/extra/src/main/resources/org/apache/brooklyn/entity/salt/masterless
deleted file mode 100644
index ba41c6e..0000000
--- a/brooklyn-library/sandbox/extra/src/main/resources/org/apache/brooklyn/entity/salt/masterless
+++ /dev/null
@@ -1,53 +0,0 @@
-[#ftl]
-##
-#
-# 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.
-#
-# SaltStack Masterless Minion Configuration
-#
-# /etc/salt/minion
-##
-
-# Minion configuration
-id: ${entity.id}
-user: root
-backup_mode: minion
-
-# Directory settings
-root_dir: /
-pidfile: ${runDir}/salt-minion.pid
-pki_dir: ${runDir}/pki
-cachedir: ${runDir}/cache
-log_file: ${runDir}/minion.log
-key_logfile: ${runDir}/key.log
-
-file_client: local
-file_roots:
-  base:
-    - ${runDir}/base
-[#list formulas?keys as formulaName]
-    - ${installDir}/${formulaName}
-[/#list]
-
-#verify_env: True
-#cache_jobs: True # Debugging
-
-output: nested
-color: False
-log_level: info
-log_level_logfile: debug # Debugging

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/main/resources/org/apache/brooklyn/entity/salt/minion
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/main/resources/org/apache/brooklyn/entity/salt/minion b/brooklyn-library/sandbox/extra/src/main/resources/org/apache/brooklyn/entity/salt/minion
deleted file mode 100644
index cff42c7..0000000
--- a/brooklyn-library/sandbox/extra/src/main/resources/org/apache/brooklyn/entity/salt/minion
+++ /dev/null
@@ -1,52 +0,0 @@
-[#ftl]
-##
-# 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.
-#
-# SaltStack Minion Configuration
-#
-# /etc/salt/minion
-##
-
-# The salt master server
-master: ${entity.master.hostname}
-ipv6: False
-retry_dns: 30
-master_port: ${entity.master.saltPort,c} # 4506
-acceptance_wait_time: 30
-acceptance_wait_time_max: 300
-
-# Minion configuration
-id: ${entity.id}
-user: root
-backup_mode: minion
-
-# Directory settings
-root_dir: /
-pidfile: ${runDir}/salt-minion.pid
-pki_dir: ${runDir}/pki
-cachedir: ${runDir}/cache
-log_file: ${runDir}/minion.log
-key_logfile: ${runDir}/key.log
-
-#verify_env: True
-#cache_jobs: True # Debugging
-
-output: nested
-color: False
-log_level: info
-log_level_logfile: debug # Debugging

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSaltLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSaltLiveTest.java b/brooklyn-library/sandbox/extra/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSaltLiveTest.java
deleted file mode 100644
index 8dfaaeb..0000000
--- a/brooklyn-library/sandbox/extra/src/test/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSaltLiveTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.postgresql;
-
-import java.util.Random;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.PortRange;
-import org.apache.brooklyn.core.effector.EffectorTasks;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper;
-import org.apache.brooklyn.entity.database.postgresql.PostgreSqlNodeSaltImpl;
-import org.apache.brooklyn.entity.salt.SaltConfig;
-import org.apache.brooklyn.entity.salt.SaltLiveTestSupport;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.entity.database.postgresql.PostgreSqlIntegrationTest;
-import org.apache.brooklyn.entity.database.postgresql.PostgreSqlNode;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * Tests Salt installation of {@link PostgreSqlNode} entity.
- */
-public class PostgreSqlSaltLiveTest extends SaltLiveTestSupport {
-
-    private static final Logger log = LoggerFactory.getLogger(PostgreSqlSaltLiveTest.class);
-
-    private PostgreSqlNode psql;
-
-    @Override
-    @AfterMethod(alwaysRun=true)
-    public void tearDown() throws Exception {
-        try {
-            if (psql != null) psql.stop();
-        } finally {
-            super.tearDown();
-        }
-    }
-
-    @Test(groups="Live")
-    public void testPostgresStartsAndStops() throws Exception {
-        psql = app.createAndManageChild(EntitySpec.create(PostgreSqlNode.class, PostgreSqlNodeSaltImpl.class)
-                .configure(SaltConfig.MASTERLESS_MODE, true));
-
-        app.start(ImmutableList.of(targetLocation));
-
-        Entities.submit(psql, SshEffectorTasks.ssh("ps aux | grep [p]ostgres").requiringExitCodeZero());
-        SshMachineLocation targetMachine = EffectorTasks.getSshMachine(psql);
-
-        psql.stop();
-
-        try {
-            // if host is still contactable ensure postgres is not running
-            ProcessTaskWrapper<Integer> t = Entities.submit(app, SshEffectorTasks.ssh("ps aux | grep [p]ostgres").machine(targetMachine).allowingNonZeroExitCode());
-            t.getTask().blockUntilEnded(Duration.TEN_SECONDS);
-            if (!t.isDone()) {
-                Assert.fail("Task not finished yet: "+t.getTask());
-            }
-            Assert.assertNotEquals(t.get(), (Integer)0, "Task ended with code "+t.get()+"; output: "+t.getStdout() );
-        } catch (Exception e) {
-            // host has been killed, that is fine
-            log.info("Machine "+targetMachine+" destroyed on stop (expected - "+e+")");
-        }
-    }
-
-    @Test(groups="Live")
-    public void testPostgresScriptAndAccess() throws Exception {
-        SaltLiveTestSupport.createLocation(mgmt);
-        PortRange randomPort = PortRanges.fromString(""+(5420+new Random().nextInt(10))+"+");
-        psql = app.createAndManageChild(EntitySpec.create(PostgreSqlNode.class, PostgreSqlNodeSaltImpl.class)
-                .configure(SaltConfig.MASTERLESS_MODE, true)
-                .configure(PostgreSqlNode.CREATION_SCRIPT_CONTENTS, PostgreSqlIntegrationTest.CREATION_SCRIPT)
-                .configure(PostgreSqlNode.POSTGRESQL_PORT, randomPort));
-
-        app.start(ImmutableList.of(targetLocation));
-
-        String url = psql.getAttribute(PostgreSqlNode.DATASTORE_URL);
-        log.info("Trying to connect to "+psql+" at "+url);
-        Assert.assertNotNull(url);
-        Assert.assertTrue(url.contains("542"));
-
-        new VogellaExampleAccess("org.postgresql.Driver", url).readModifyAndRevertDataBase();
-    }
-
-}
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/test/java/org/apache/brooklyn/entity/salt/SaltConfigsTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/test/java/org/apache/brooklyn/entity/salt/SaltConfigsTest.java b/brooklyn-library/sandbox/extra/src/test/java/org/apache/brooklyn/entity/salt/SaltConfigsTest.java
deleted file mode 100644
index 0bbbbcd..0000000
--- a/brooklyn-library/sandbox/extra/src/test/java/org/apache/brooklyn/entity/salt/SaltConfigsTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.salt;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.brooklyn.entity.salt.SaltConfig;
-import org.apache.brooklyn.entity.salt.SaltConfigs;
-import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-
-public class SaltConfigsTest {
-
-    private TestApplication app = null;
-
-    @AfterMethod(alwaysRun=true)
-    public void tearDown() {
-        if (app!=null) Entities.destroyAll(app.getManagementContext());
-        app = null;
-    }
-
-    @Test
-    public void testAddToRunList() {
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-        SaltConfigs.addToRunList(app, "a", "b");
-        Set<? extends String> runs = app.getConfig(SaltConfig.SALT_RUN_LIST);
-        Assert.assertEquals(runs, ImmutableSet.of("a", "b"));
-    }
-
-    @Test
-    public void testAddToFormulas() {
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-        SaltConfigs.addToFormulas(app, "k1", "v1");
-        SaltConfigs.addToFormulas(app, "k2", "v2");
-        Map<String, String> formulas = app.getConfig(SaltConfig.SALT_FORMULAS);
-        Assert.assertEquals(formulas, ImmutableMap.of("k1", "v1", "k2", "v2"));
-    }
-
-    @Test
-    public void testAddLaunchAttributes() {
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-        SaltConfigs.addLaunchAttributes(app, ImmutableMap.of("k1", "v1"));
-        Map<String, Object> attribs = app.getConfig(SaltConfig.SALT_LAUNCH_ATTRIBUTES);
-        Assert.assertEquals(attribs, ImmutableMap.of("k1", "v1"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/extra/src/test/java/org/apache/brooklyn/entity/salt/SaltLiveTestSupport.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/extra/src/test/java/org/apache/brooklyn/entity/salt/SaltLiveTestSupport.java b/brooklyn-library/sandbox/extra/src/test/java/org/apache/brooklyn/entity/salt/SaltLiveTestSupport.java
deleted file mode 100644
index 13f1b34..0000000
--- a/brooklyn-library/sandbox/extra/src/test/java/org/apache/brooklyn/entity/salt/SaltLiveTestSupport.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.salt;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeMethod;
-
-import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.location.MachineProvisioningLocation;
-import org.apache.brooklyn.api.mgmt.ManagementContext;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-
-public class SaltLiveTestSupport extends BrooklynAppLiveTestSupport {
-
-    private static final Logger log = LoggerFactory.getLogger(SaltLiveTestSupport.class);
-
-    protected MachineProvisioningLocation<? extends SshMachineLocation> targetLocation;
-
-    @Override
-    @BeforeMethod(alwaysRun=true)
-    public void setUp() throws Exception {
-        super.setUp();
-
-        targetLocation = createLocation();
-    }
-
-    protected MachineProvisioningLocation<? extends SshMachineLocation> createLocation() {
-        return createLocation(mgmt);
-    }
-
-    /**
-     * Convenience for setting up a pre-built or fixed IP machine.
-     * <p>
-     * Useful if you are unable to set up Salt on localhost,
-     * and for ensuring tests against Salt always use the same
-     * configured location.
-     */
-    @SuppressWarnings("unchecked")
-    public static MachineProvisioningLocation<? extends SshMachineLocation> createLocation(ManagementContext mgmt) {
-        Location bestLocation = mgmt.getLocationRegistry().resolveIfPossible("named:SaltTests");
-        if (bestLocation==null) {
-            log.info("using AWS for salt tests because named:SaltTests does not exist");
-            bestLocation = mgmt.getLocationRegistry().resolveIfPossible("jclouds:aws-ec2:us-east-1");
-        }
-        if (bestLocation==null) {
-            throw new IllegalStateException("Need a location called named:SaltTests or AWS configured for these tests");
-        }
-        return (MachineProvisioningLocation<? extends SshMachineLocation>)bestLocation;
-    }
-}


[31/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.svg
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.svg b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.svg
deleted file mode 100644
index a9f8469..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/dist/fonts/fontawesome-webfont.svg
+++ /dev/null
@@ -1,504 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata></metadata>
-<defs>
-<font id="fontawesomeregular" horiz-adv-x="1536" >
-<font-face units-per-em="1792" ascent="1536" descent="-256" />
-<missing-glyph horiz-adv-x="448" />
-<glyph unicode=" "  horiz-adv-x="448" />
-<glyph unicode="&#x09;" horiz-adv-x="448" />
-<glyph unicode="&#xa0;" horiz-adv-x="448" />
-<glyph unicode="&#xa8;" horiz-adv-x="1792" />
-<glyph unicode="&#xa9;" horiz-adv-x="1792" />
-<glyph unicode="&#xae;" horiz-adv-x="1792" />
-<glyph unicode="&#xb4;" horiz-adv-x="1792" />
-<glyph unicode="&#xc6;" horiz-adv-x="1792" />
-<glyph unicode="&#xd8;" horiz-adv-x="1792" />
-<glyph unicode="&#x2000;" horiz-adv-x="768" />
-<glyph unicode="&#x2001;" horiz-adv-x="1537" />
-<glyph unicode="&#x2002;" horiz-adv-x="768" />
-<glyph unicode="&#x2003;" horiz-adv-x="1537" />
-<glyph unicode="&#x2004;" horiz-adv-x="512" />
-<glyph unicode="&#x2005;" horiz-adv-x="384" />
-<glyph unicode="&#x2006;" horiz-adv-x="256" />
-<glyph unicode="&#x2007;" horiz-adv-x="256" />
-<glyph unicode="&#x2008;" horiz-adv-x="192" />
-<glyph unicode="&#x2009;" horiz-adv-x="307" />
-<glyph unicode="&#x200a;" horiz-adv-x="85" />
-<glyph unicode="&#x202f;" horiz-adv-x="307" />
-<glyph unicode="&#x205f;" horiz-adv-x="384" />
-<glyph unicode="&#x2122;" horiz-adv-x="1792" />
-<glyph unicode="&#x221e;" horiz-adv-x="1792" />
-<glyph unicode="&#x2260;" horiz-adv-x="1792" />
-<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
-<glyph unicode="&#xf000;" horiz-adv-x="1792" d="M93 1350q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78z" />
-<glyph unicode="&#xf001;" d="M0 -64q0 50 34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5 q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89z" />
-<glyph unicode="&#xf002;" horiz-adv-x="1664" d="M0 704q0 143 55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5z M256 704q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5z" />
-<glyph unicode="&#xf003;" horiz-adv-x="1792" d="M0 32v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113zM128 32q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5 t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768zM128 1120q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317 q54 43 100.5 115.5t46.5 131.5v11v13.5t-0.5 13t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5z" />
-<glyph unicode="&#xf004;" horiz-adv-x="1792" d="M0 940q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138z " />
-<glyph unicode="&#xf005;" horiz-adv-x="1664" d="M0 889q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 l-364 354q-25 27 -25 48z" />
-<glyph unicode="&#xf006;" horiz-adv-x="1664" d="M0 889q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354 q-25 27 -25 48zM221 829l306 -297l-73 -421l378 199l377 -199l-72 421l306 297l-422 62l-189 382l-189 -382z" />
-<glyph unicode="&#xf007;" horiz-adv-x="1408" d="M0 131q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5q0 -120 -73 -189.5t-194 -69.5 h-874q-121 0 -194 69.5t-73 189.5zM320 1024q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5z" />
-<glyph unicode="&#xf008;" horiz-adv-x="1920" d="M0 -96v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113zM128 64v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45zM128 320q0 -26 19 -45t45 -19h128 q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128zM128 704q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128zM128 1088q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v128q0 26 -19 45t-45 19 h-128q-26 0 -45 -19t-19 -45v-128zM512 -64q0 -26 19 -45t45 -19h768q26 0 45 19t19 45v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512zM512 704q0 -26 19 -45t45 -19h768q26 0 45 19t19 45v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512zM1536 64 v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45zM1536 320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19
  -45v-128zM1536 704q0 -26 19 -45t45 -19h128q26 0 45 19t19 45 v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128zM1536 1088q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128z" />
-<glyph unicode="&#xf009;" horiz-adv-x="1664" d="M0 128v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90zM0 896v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90zM896 128v384q0 52 38 90t90 38h512q52 0 90 -38 t38 -90v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90zM896 896v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90z" />
-<glyph unicode="&#xf00a;" horiz-adv-x="1792" d="M0 96v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM0 608v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM0 1120v192q0 40 28 68t68 28h320q40 0 68 -28 t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM640 96v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM640 608v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320 q-40 0 -68 28t-28 68zM640 1120v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM1280 96v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM1280 608v192 q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM1280 1120v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68z" />
-<glyph unicode="&#xf00b;" horiz-adv-x="1792" d="M0 96v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM0 608v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM0 1120v192q0 40 28 68t68 28h320q40 0 68 -28 t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM640 96v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68zM640 608v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68zM640 1120v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68z" />
-<glyph unicode="&#xf00c;" horiz-adv-x="1792" d="M121 608q0 40 28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68t-28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68z" />
-<glyph unicode="&#xf00d;" horiz-adv-x="1408" d="M110 214q0 40 28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68t-28 -68l-294 -294l294 -294q28 -28 28 -68t-28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294 q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68z" />
-<glyph unicode="&#xf00e;" horiz-adv-x="1664" d="M0 704q0 143 55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90t-37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5z M256 704q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5zM384 672v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224q13 0 22.5 -9.5t9.5 -22.5v-64 q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5z" />
-<glyph unicode="&#xf010;" horiz-adv-x="1664" d="M0 704q0 143 55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90t-37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5z M256 704q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5zM384 672v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5z" />
-<glyph unicode="&#xf011;" d="M0 640q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181 q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298zM640 768v640q0 52 38 90t90 38t90 -38t38 -90v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90z" />
-<glyph unicode="&#xf012;" horiz-adv-x="1792" d="M0 -96v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23zM384 -96v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23zM768 -96v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-576 q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23zM1152 -96v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23zM1536 -96v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23z" />
-<glyph unicode="&#xf013;" d="M0 531v222q0 12 8 23t19 13l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10 q129 -119 165 -170q7 -8 7 -22q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108 q-44 -23 -91 -38q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5z M512 640q0 -106 75 -181t181 -75t181 75t75 181t-75 181t-181 75t-181 -75t-75 -181z" />
-<glyph unicode="&#xf014;" horiz-adv-x="1408" d="M0 1056v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23zM256 76q0 -22 7 -40.5 t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5v948h-896v-948zM384 224v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM640 224v576q0 14 9 23t23 9h64 q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23zM896 224v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23z" />
-<glyph unicode="&#xf015;" horiz-adv-x="1664" d="M26 636.5q1 13.5 11 21.5l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5zM256 64 v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf016;" d="M0 -160v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48l312 -312q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68zM128 -128h1280v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536zM1024 1024h376q-10 29 -22 41l-313 313q-12 12 -41 22 v-376z" />
-<glyph unicode="&#xf017;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73 t-198 -198t-73 -273zM512 544v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23z" />
-<glyph unicode="&#xf018;" horiz-adv-x="1920" d="M50 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256 q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73zM809 540q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4z" />
-<glyph unicode="&#xf019;" horiz-adv-x="1664" d="M0 96v320q0 40 28 68t68 28h465l135 -136q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68zM325 985q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39q17 -41 -14 -70 l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70zM1152 192q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45zM1408 192q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45z" />
-<glyph unicode="&#xf01a;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73 t-198 -198t-73 -273zM418 620q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35z" />
-<glyph unicode="&#xf01b;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73 t-198 -198t-73 -273zM416 672q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23z" />
-<glyph unicode="&#xf01c;" d="M0 64v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552q25 -61 25 -123v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45zM197 576h316l95 -192h320l95 192h316q-1 3 -2.5 8t-2.5 8l-212 496h-708l-212 -496q-1 -2 -2.5 -8 t-2.5 -8z" />
-<glyph unicode="&#xf01d;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73 t-198 -198t-73 -273zM512 320v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55t-32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56z" />
-<glyph unicode="&#xf01e;" d="M0 640q0 156 61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5 t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q14 0 25 -9l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298z" />
-<glyph unicode="&#xf021;" d="M0 0v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129 q-19 -19 -45 -19t-45 19t-19 45zM18 800v7q65 268 270 434.5t480 166.5q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179 q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5z" />
-<glyph unicode="&#xf022;" horiz-adv-x="1792" d="M0 160v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113zM128 160q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832z M256 288v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5zM256 544v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5z M256 800v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5zM512 288v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5z M512 544v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5zM512 800v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5v-64q0 -
 13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5z " />
-<glyph unicode="&#xf023;" horiz-adv-x="1152" d="M0 96v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68zM320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192z" />
-<glyph unicode="&#xf024;" horiz-adv-x="1792" d="M64 1280q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110zM320 320v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19 q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf025;" horiz-adv-x="1664" d="M0 650q0 151 67 291t179 242.5t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32 q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32 q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314z" />
-<glyph unicode="&#xf026;" horiz-adv-x="768" d="M0 448v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf027;" horiz-adv-x="1152" d="M0 448v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45zM908 464q0 21 12 35.5t29 25t34 23t29 35.5t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5 q15 0 25 -5q70 -27 112.5 -93t42.5 -142t-42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5z" />
-<glyph unicode="&#xf028;" horiz-adv-x="1664" d="M0 448v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45zM908 464q0 21 12 35.5t29 25t34 23t29 35.5t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5 q15 0 25 -5q70 -27 112.5 -93t42.5 -142t-42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5zM1008 228q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5 q140 -59 225 -188.5t85 -282.5t-85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45zM1109 -7q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19 q13 0 26 -5q211 -91 338 -283.5t127 -422.5t-127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf029;" horiz-adv-x="1408" d="M0 0v640h640v-640h-640zM0 768v640h640v-640h-640zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM256 256v128h128v-128h-128zM256 1024v128h128v-128h-128zM768 0v640h384v-128h128v128h128v-384h-384v128h-128v-384h-128zM768 768v640h640v-640h-640z M896 896h384v384h-384v-384zM1024 0v128h128v-128h-128zM1024 1024v128h128v-128h-128zM1280 0v128h128v-128h-128z" />
-<glyph unicode="&#xf02a;" horiz-adv-x="1792" d="M0 0v1408h63v-1408h-63zM94 1v1407h32v-1407h-32zM189 1v1407h31v-1407h-31zM346 1v1407h31v-1407h-31zM472 1v1407h62v-1407h-62zM629 1v1407h31v-1407h-31zM692 1v1407h31v-1407h-31zM755 1v1407h31v-1407h-31zM880 1v1407h63v-1407h-63zM1037 1v1407h63v-1407h-63z M1163 1v1407h63v-1407h-63zM1289 1v1407h63v-1407h-63zM1383 1v1407h63v-1407h-63zM1541 1v1407h94v-1407h-94zM1666 1v1407h32v-1407h-32zM1729 0v1408h63v-1408h-63z" />
-<glyph unicode="&#xf02b;" d="M0 864v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117zM192 1088q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5z" />
-<glyph unicode="&#xf02c;" horiz-adv-x="1920" d="M0 864v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117zM192 1088q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5zM704 1408h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5z" />
-<glyph unicode="&#xf02d;" horiz-adv-x="1664" d="M10 184q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23 t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57 q38 -15 59 -43q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5zM575 1056 q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" />
-<glyph unicode="&#xf02e;" horiz-adv-x="1280" d="M0 7v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62z" />
-<glyph unicode="&#xf02f;" horiz-adv-x="1664" d="M0 160v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v160h-224 q-13 0 -22.5 9.5t-9.5 22.5zM384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1408 576q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45z" />
-<glyph unicode="&#xf030;" horiz-adv-x="1920" d="M0 128v896q0 106 75 181t181 75h224l51 136q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181zM512 576q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5 t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5zM672 576q0 119 84.5 203.5t203.5 84.5t203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5z" />
-<glyph unicode="&#xf031;" horiz-adv-x="1664" d="M0 -128l2 79q23 7 56 12.5t57 10.5t49.5 14.5t44.5 29t31 50.5l237 616l280 724h75h53q8 -14 11 -21l205 -480q33 -78 106 -257.5t114 -274.5q15 -34 58 -144.5t72 -168.5q20 -45 35 -57q19 -15 88 -29.5t84 -20.5q6 -38 6 -57q0 -4 -0.5 -13t-0.5 -13q-63 0 -190 8 t-191 8q-76 0 -215 -7t-178 -8q0 43 4 78l131 28q1 0 12.5 2.5t15.5 3.5t14.5 4.5t15 6.5t11 8t9 11t2.5 14q0 16 -31 96.5t-72 177.5t-42 100l-450 2q-26 -58 -76.5 -195.5t-50.5 -162.5q0 -22 14 -37.5t43.5 -24.5t48.5 -13.5t57 -8.5t41 -4q1 -19 1 -58q0 -9 -2 -27 q-58 0 -174.5 10t-174.5 10q-8 0 -26.5 -4t-21.5 -4q-80 -14 -188 -14zM555 527q33 0 136.5 -2t160.5 -2q19 0 57 2q-87 253 -184 452z" />
-<glyph unicode="&#xf032;" horiz-adv-x="1408" d="M0 -128l2 94q15 4 85 16t106 27q7 12 12.5 27t8.5 33.5t5.5 32.5t3 37.5t0.5 34v35.5v30q0 982 -22 1025q-4 8 -22 14.5t-44.5 11t-49.5 7t-48.5 4.5t-30.5 3l-4 83q98 2 340 11.5t373 9.5q23 0 68.5 -0.5t67.5 -0.5q70 0 136.5 -13t128.5 -42t108 -71t74 -104.5 t28 -137.5q0 -52 -16.5 -95.5t-39 -72t-64.5 -57.5t-73 -45t-84 -40q154 -35 256.5 -134t102.5 -248q0 -100 -35 -179.5t-93.5 -130.5t-138 -85.5t-163.5 -48.5t-176 -14q-44 0 -132 3t-132 3q-106 0 -307 -11t-231 -12zM533 1292q0 -50 4 -151t4 -152q0 -27 -0.5 -80 t-0.5 -79q0 -46 1 -69q42 -7 109 -7q82 0 143 13t110 44.5t74.5 89.5t25.5 142q0 70 -29 122.5t-79 82t-108 43.5t-124 14q-50 0 -130 -13zM538.5 165q0.5 -37 4.5 -83.5t12 -66.5q74 -32 140 -32q376 0 376 335q0 114 -41 180q-27 44 -61.5 74t-67.5 46.5t-80.5 25 t-84 10.5t-94.5 2q-73 0 -101 -10q0 -53 -0.5 -159t-0.5 -158q0 -8 -1 -67.5t-0.5 -96.5z" />
-<glyph unicode="&#xf033;" horiz-adv-x="1024" d="M0 -126l17 85q6 2 81.5 21.5t111.5 37.5q28 35 41 101q1 7 62 289t114 543.5t52 296.5v25q-24 13 -54.5 18.5t-69.5 8t-58 5.5l19 103q33 -2 120 -6.5t149.5 -7t120.5 -2.5q48 0 98.5 2.5t121 7t98.5 6.5q-5 -39 -19 -89q-30 -10 -101.5 -28.5t-108.5 -33.5 q-8 -19 -14 -42.5t-9 -40t-7.5 -45.5t-6.5 -42q-27 -148 -87.5 -419.5t-77.5 -355.5q-2 -9 -13 -58t-20 -90t-16 -83.5t-6 -57.5l1 -18q17 -4 185 -31q-3 -44 -16 -99q-11 0 -32.5 -1.5t-32.5 -1.5q-29 0 -87 10t-86 10q-138 2 -206 2q-51 0 -143 -9t-121 -11z" />
-<glyph unicode="&#xf034;" horiz-adv-x="1792" d="M0 1023v383l81 1l54 -27q12 -5 211 -5q44 0 132 2t132 2q36 0 107.5 -0.5t107.5 -0.5h293q6 0 21 -0.5t20.5 0t16 3t17.5 9t15 17.5l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 48t-14.5 73.5t-7.5 35.5 q-6 8 -12 12.5t-15.5 6t-13 2.5t-18 0.5t-16.5 -0.5q-17 0 -66.5 0.5t-74.5 0.5t-64 -2t-71 -6q-9 -81 -8 -136q0 -94 2 -388t2 -455q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9 t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27q19 42 19 383q0 101 -3 303t-3 303v117q0 2 0.5 15.5t0.5 25t-1 25.5t-3 24t-5 14q-11 12 -162 12q-33 0 -93 -12t-80 -26q-19 -13 -34 -72.5t-31.5 -111t-42.5 -53.5q-42 26 -56 44zM1414 109.5q9 18.5 42 18.5h80v1024 h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80q33 0 42 -18.5t-11 -44.5l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5z" />
-<glyph unicode="&#xf035;" d="M0 1023v383l81 1l54 -27q12 -5 211 -5q44 0 132 2t132 2q70 0 246.5 1t304.5 0.5t247 -4.5q33 -1 56 31l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 47.5t-15 73.5t-7 36q-10 13 -27 19q-5 2 -66 2q-30 0 -93 1 t-103 1t-94 -2t-96 -7q-9 -81 -8 -136l1 -152v52q0 -55 1 -154t1.5 -180t0.5 -153q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29 t78 27q7 16 11.5 74t6 145.5t1.5 155t-0.5 153.5t-0.5 89q0 7 -2.5 21.5t-2.5 22.5q0 7 0.5 44t1 73t0 76.5t-3 67.5t-6.5 32q-11 12 -162 12q-41 0 -163 -13.5t-138 -24.5q-19 -12 -34 -71.5t-31.5 -111.5t-42.5 -54q-42 26 -56 44zM5 -64q0 28 26 49q4 3 36 30t59.5 49 t57.5 41.5t42 19.5q13 0 20.5 -10.5t10 -28.5t2.5 -33.5t-1.5 -33t-1.5 -19.5h1024q0 2 -1.5 19.5t-1.5 33t2.5 33.5t10 28.5t20.5 10.5q12 0 42 -19.5t57.5 -41.5t59.5 -49t36 -30q26 -21 26 -49t-26 -49q-4 -3 -36 -30t-59.5 -49t-5
 7.5 -41.5t-42 -19.5q-13 0 -20.5 10.5 t-10 28.5t-2.5 33.5t1.5 33t1.5 19.5h-1024q0 -2 1.5 -19.5t1.5 -33t-2.5 -33.5t-10 -28.5t-20.5 -10.5q-12 0 -42 19.5t-57.5 41.5t-59.5 49t-36 30q-26 21 -26 49z" />
-<glyph unicode="&#xf036;" horiz-adv-x="1792" d="M0 64v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45zM0 448v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45zM0 832v128q0 26 19 45t45 19h1536 q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1536q-26 0 -45 19t-19 45zM0 1216v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf037;" horiz-adv-x="1792" d="M0 64v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45zM128 832v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45zM384 448v128q0 26 19 45t45 19h896 q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45zM512 1216v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf038;" horiz-adv-x="1792" d="M0 64v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45zM128 832v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1536q-26 0 -45 19t-19 45zM384 448v128q0 26 19 45t45 19h1280 q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45zM512 1216v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf039;" horiz-adv-x="1792" d="M0 64v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45zM0 448v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45zM0 832v128q0 26 19 45t45 19h1664 q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45zM0 1216v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf03a;" horiz-adv-x="1792" d="M0 32v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5zM0 416v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5 t-9.5 22.5zM0 800v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5zM0 1184v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192 q-13 0 -22.5 9.5t-9.5 22.5zM384 32v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5zM384 416v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5 t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5zM384 800v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5zM384 1184v192q0 13 9.5 22.5t22.5 9.5h1344q13 0
  22.5 -9.5t9.5 -22.5v-192 q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5z" />
-<glyph unicode="&#xf03b;" horiz-adv-x="1792" d="M0 32v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5zM0 1184v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5 t-9.5 22.5zM32 704q0 14 9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23zM640 416v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088 q-13 0 -22.5 9.5t-9.5 22.5zM640 800v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5z" />
-<glyph unicode="&#xf03c;" horiz-adv-x="1792" d="M0 32v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5zM0 416v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23t-9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5z M0 1184v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5zM640 416v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5 t-9.5 22.5zM640 800v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5z" />
-<glyph unicode="&#xf03d;" horiz-adv-x="1792" d="M0 288v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5q39 -17 39 -59v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5 t-84.5 203.5z" />
-<glyph unicode="&#xf03e;" horiz-adv-x="1920" d="M0 32v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113zM128 32q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216z M256 128v192l320 320l160 -160l512 512l416 -416v-448h-1408zM256 960q0 80 56 136t136 56t136 -56t56 -136t-56 -136t-136 -56t-136 56t-56 136z" />
-<glyph unicode="&#xf040;" d="M0 -128v416l832 832l416 -416l-832 -832h-416zM128 128h128v-128h107l91 91l-235 235l-91 -91v-107zM298 384q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17zM896 1184l166 165q36 38 90 38q53 0 91 -38l235 -234 q37 -39 37 -91q0 -53 -37 -90l-166 -166z" />
-<glyph unicode="&#xf041;" horiz-adv-x="1024" d="M0 896q0 212 150 362t362 150t362 -150t150 -362q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179zM256 896q0 -106 75 -181t181 -75t181 75t75 181t-75 181t-181 75t-181 -75t-75 -181z" />
-<glyph unicode="&#xf042;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73v1088q-148 0 -273 -73t-198 -198t-73 -273z" />
-<glyph unicode="&#xf043;" horiz-adv-x="1024" d="M0 512q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275q0 -212 -150 -362t-362 -150t-362 150t-150 362zM256 384q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5 t37.5 90.5q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69z" />
-<glyph unicode="&#xf044;" horiz-adv-x="1792" d="M0 288v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29v-190 q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5zM640 256v288l672 672l288 -288l-672 -672h-288zM736 448h96v-96h56l116 116l-152 152l-116 -116v-56zM944 688q16 -16 33 1l350 350q17 17 1 33t-33 -1l-350 -350q-17 -17 -1 -33zM1376 1280l92 92 q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68l-92 -92z" />
-<glyph unicode="&#xf045;" horiz-adv-x="1664" d="M0 288v832q0 119 84.5 203.5t203.5 84.5h255q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29v-259 q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5zM256 704q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45l-384 -384 q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5t-38.5 114t-17.5 122z" />
-<glyph unicode="&#xf046;" horiz-adv-x="1664" d="M0 288v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3 q20 -8 20 -29v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5zM257 768q0 33 24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110q24 -24 24 -57t-24 -57l-814 -814q-24 -24 -57 -24t-57 24l-430 430 q-24 24 -24 57z" />
-<glyph unicode="&#xf047;" horiz-adv-x="1792" d="M0 640q0 26 19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45t-19 -45l-256 -256 q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45z" />
-<glyph unicode="&#xf048;" horiz-adv-x="1024" d="M0 -64v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf049;" horiz-adv-x="1792" d="M0 -64v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710q19 19 32 13t13 -32v-710q4 11 13 19l710 710q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45 t-45 -19h-128q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf04a;" horiz-adv-x="1664" d="M122 640q0 26 19 45l710 710q19 19 32 13t13 -32v-710q5 11 13 19l710 710q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-8 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45z" />
-<glyph unicode="&#xf04b;" horiz-adv-x="1408" d="M0 -96v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31l-1328 -738q-23 -13 -39.5 -3t-16.5 36z" />
-<glyph unicode="&#xf04c;" d="M0 -64v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45zM896 -64v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf04d;" d="M0 -64v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf04e;" horiz-adv-x="1664" d="M0 -96v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19l-710 -710q-19 -19 -32 -13t-13 32z" />
-<glyph unicode="&#xf050;" horiz-adv-x="1792" d="M0 -96v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710q-19 -19 -32 -13t-13 32v710 q-5 -10 -13 -19l-710 -710q-19 -19 -32 -13t-13 32z" />
-<glyph unicode="&#xf051;" horiz-adv-x="1024" d="M0 -96v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710q-19 -19 -32 -13t-13 32z" />
-<glyph unicode="&#xf052;" horiz-adv-x="1538" d="M1 64v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45zM1 525q-6 13 13 32l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13z" />
-<glyph unicode="&#xf053;" horiz-adv-x="1280" d="M154 704q0 26 19 45l742 742q19 19 45 19t45 -19l166 -166q19 -19 19 -45t-19 -45l-531 -531l531 -531q19 -19 19 -45t-19 -45l-166 -166q-19 -19 -45 -19t-45 19l-742 742q-19 19 -19 45z" />
-<glyph unicode="&#xf054;" horiz-adv-x="1280" d="M90 128q0 26 19 45l531 531l-531 531q-19 19 -19 45t19 45l166 166q19 19 45 19t45 -19l742 -742q19 -19 19 -45t-19 -45l-742 -742q-19 -19 -45 -19t-45 19l-166 166q-19 19 -19 45z" />
-<glyph unicode="&#xf055;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM320 576q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19 t19 45v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128z" />
-<glyph unicode="&#xf056;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM320 576q0 -26 19 -45t45 -19h768q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19 t-19 -45v-128z" />
-<glyph unicode="&#xf057;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM387 414q0 -27 19 -46l90 -90q19 -19 46 -19q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19 l90 90q19 19 19 46q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45z" />
-<glyph unicode="&#xf058;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM252 621q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45q0 28 -18 46l-91 90 q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46z" />
-<glyph unicode="&#xf059;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM417 939q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26 t37.5 -59q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213zM640 160q0 -14 9 -23t23 -9 h192q14 0 23 9t9 23v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192z" />
-<glyph unicode="&#xf05a;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM512 160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320 q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160zM640 1056q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160z" />
-<glyph unicode="&#xf05b;" d="M0 576v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143 q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45zM339 512q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5h-109q-26 0 -45 19 t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109z" />
-<glyph unicode="&#xf05c;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73 t-198 -198t-73 -273zM429 480q0 13 10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23l-137 -137l137 -137q10 -10 10 -23t-10 -23l-146 -146q-10 -10 -23 -10t-23 10l-137 137 l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23z" />
-<glyph unicode="&#xf05d;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73 t-198 -198t-73 -273zM346 640q0 26 19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45z" />
-<glyph unicode="&#xf05e;" d="M0 643q0 157 61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5t-61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61t-245 164t-163.5 246t-61 300zM224 643q0 -162 89 -299l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199 t-73 -274zM471 185q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5q0 161 -87 295z" />
-<glyph unicode="&#xf060;" d="M64 576q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5t32.5 -90.5v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90 z" />
-<glyph unicode="&#xf061;" d="M0 512v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5z" />
-<glyph unicode="&#xf062;" horiz-adv-x="1664" d="M53 565q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651q37 -39 37 -91q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75 q-38 38 -38 90z" />
-<glyph unicode="&#xf063;" horiz-adv-x="1664" d="M53 704q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90z" />
-<glyph unicode="&#xf064;" horiz-adv-x="1792" d="M0 416q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45t-19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123 q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22t-13.5 30t-10.5 24q-127 285 -127 451z" />
-<glyph unicode="&#xf065;" d="M0 -64v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23t-10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45zM781 800q0 13 10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448 q26 0 45 -19t19 -45v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23z" />
-<glyph unicode="&#xf066;" d="M13 32q0 13 10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23zM768 704v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10 t23 -10l114 -114q10 -10 10 -23t-10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf067;" horiz-adv-x="1408" d="M0 608v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68z" />
-<glyph unicode="&#xf068;" horiz-adv-x="1408" d="M0 608v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68z" />
-<glyph unicode="&#xf069;" horiz-adv-x="1664" d="M122.5 408.5q13.5 51.5 59.5 77.5l266 154l-266 154q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5 l-266 -154l266 -154q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5z" />
-<glyph unicode="&#xf06a;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM624 1126l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5l18 621q0 12 -10 18 q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18zM640 161q0 -13 10 -23t23 -10h192q13 0 22 9.5t9 23.5v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190z" />
-<glyph unicode="&#xf06b;" d="M0 544v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23v-320q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68 t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23zM376 1120q0 -40 28 -68t68 -28h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68zM608 180q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5v56v468v192h-320v-192v-468v-56zM870 1024h194q40 0 68 28 t28 68t-28 68t-68 28q-43 0 -69 -31z" />
-<glyph unicode="&#xf06c;" horiz-adv-x="1792" d="M0 121q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96 q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-30 0 -51 11t-31 24t-27 42q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5zM384 448q0 -26 19 -45t45 -19q24 0 45 19 q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45t-19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45z" />
-<glyph unicode="&#xf06d;" horiz-adv-x="1408" d="M0 -160q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64zM256 640q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100 t113.5 -122.5t72.5 -150.5t27.5 -184q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184z" />
-<glyph unicode="&#xf06e;" horiz-adv-x="1792" d="M0 576q0 34 20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69t-20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69zM128 576q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5q-152 236 -381 353 q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353zM592 704q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34t-14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5z" />
-<glyph unicode="&#xf070;" horiz-adv-x="1792" d="M0 576q0 38 20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5q16 -10 16 -27q0 -7 -1 -9q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87 q-143 65 -263.5 173t-208.5 245q-20 31 -20 69zM128 576q167 -258 427 -375l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353zM592 704q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34t-14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5zM896 0l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69t-20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95zM1056 286l280 502q8 -45 8 -84q0 -139 -79 -253.5t-209 -164.5z" />
-<glyph unicode="&#xf071;" horiz-adv-x="1792" d="M16 61l768 1408q17 31 47 49t65 18t65 -18t47 -49l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126zM752 992l17 -457q0 -10 10 -16.5t24 -6.5h185q14 0 23.5 6.5t10.5 16.5l18 459q0 12 -10 19q-13 11 -24 11h-220 q-11 0 -24 -11q-10 -7 -10 -21zM768 161q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190z" />
-<glyph unicode="&#xf072;" horiz-adv-x="1408" d="M0 477q-1 13 9 25l96 97q9 9 23 9q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16 l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23z" />
-<glyph unicode="&#xf073;" horiz-adv-x="1664" d="M0 -128v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90zM128 -128h288v288h-288v-288zM128 224 h288v320h-288v-320zM128 608h288v288h-288v-288zM384 1088q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288zM480 -128h320v288h-320v-288zM480 224h320v320h-320v-320zM480 608h320v288h-320 v-288zM864 -128h320v288h-320v-288zM864 224h320v320h-320v-320zM864 608h320v288h-320v-288zM1152 1088q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288zM1248 -128h288v288h-288v-288z M1248 224h288v320h-288v-320zM1248 608h288v288h-288v-288z" />
-<glyph unicode="&#xf074;" horiz-adv-x="1792" d="M0 160v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23t-9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192 h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23zM0 1056v192q0 14 9 23t23 9h224q250 0 410 -225q-60 -92 -137 -273q-22 45 -37 72.5 t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23zM743 353q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23t-9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192 q-32 0 -85 -0.5t-81 -1t-73 1t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5z" />
-<glyph unicode="&#xf075;" horiz-adv-x="1792" d="M0 640q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5t-120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5 t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281z" />
-<glyph unicode="&#xf076;" d="M0 576v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5 t-98.5 362zM0 960v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45zM1024 960v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf077;" horiz-adv-x="1792" d="M90 250.5q0 26.5 19 45.5l742 741q19 19 45 19t45 -19l742 -741q19 -19 19 -45.5t-19 -45.5l-166 -165q-19 -19 -45 -19t-45 19l-531 531l-531 -531q-19 -19 -45 -19t-45 19l-166 165q-19 19 -19 45.5z" />
-<glyph unicode="&#xf078;" horiz-adv-x="1792" d="M90 773.5q0 26.5 19 45.5l166 165q19 19 45 19t45 -19l531 -531l531 531q19 19 45 19t45 -19l166 -165q19 -19 19 -45.5t-19 -45.5l-742 -741q-19 -19 -45 -19t-45 19l-742 741q-19 19 -19 45.5z" />
-<glyph unicode="&#xf079;" horiz-adv-x="1920" d="M0 704q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -11 7 -21q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45z M640 1120q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20z " />
-<glyph unicode="&#xf07a;" horiz-adv-x="1664" d="M0 1216q0 26 19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45v-512q0 -24 -16 -42.5t-41 -21.5l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024 q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45zM384 0q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5zM1280 0q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5t-37.5 -90.5 t-90.5 -37.5t-90.5 37.5t-37.5 90.5z" />
-<glyph unicode="&#xf07b;" horiz-adv-x="1664" d="M0 224v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158z" />
-<glyph unicode="&#xf07c;" horiz-adv-x="1920" d="M0 224v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5t-0.5 12.5zM73 56q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43 q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43z" />
-<glyph unicode="&#xf07d;" horiz-adv-x="768" d="M64 64q0 26 19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45z" />
-<glyph unicode="&#xf07e;" horiz-adv-x="1792" d="M0 640q0 26 19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45z" />
-<glyph unicode="&#xf080;" horiz-adv-x="1920" d="M0 32v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113zM128 32q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216z M256 128v384h256v-384h-256zM640 128v896h256v-896h-256zM1024 128v640h256v-640h-256zM1408 128v1024h256v-1024h-256z" />
-<glyph unicode="&#xf081;" d="M0 160v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5zM256 286q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109 q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4q21 -63 74.5 -104 t121.5 -42q-116 -90 -261 -90q-26 0 -50 3z" />
-<glyph unicode="&#xf082;" d="M0 160v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-192v608h203l30 224h-233v143q0 54 28 83t96 29l132 1v207q-96 9 -180 9q-136 0 -218 -80.5t-82 -225.5v-166h-224v-224h224v-608h-544 q-119 0 -203.5 84.5t-84.5 203.5z" />
-<glyph unicode="&#xf083;" horiz-adv-x="1792" d="M0 0v1280q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5zM128 0h1536v128h-1536v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM256 1216h384v128h-384v-128zM512 574 q0 -159 112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5zM640 574q0 106 75 181t181 75t181 -75t75 -181t-75 -181t-181 -75t-181 75t-75 181zM736 576q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9 t9 23t-9 23t-23 9q-66 0 -113 -47t-47 -113z" />
-<glyph unicode="&#xf084;" horiz-adv-x="1792" d="M0 752q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41q0 -17 -49 -66t-66 -49 q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5zM192 768q0 -80 56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56 t56 136t-56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136z" />
-<glyph unicode="&#xf085;" horiz-adv-x="1920" d="M0 549v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8 q144 -133 144 -160q0 -9 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 -23q10 -2 17 -10.5t7 -19.5v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -10 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90 q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5zM384 640q0 -106 75 -181t181 -75 t181 75t75 181t-75 181t-181 75t-181 -75t-75 -181zM1152 58v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 
 -25 -51 -138q17 -23 30 -52q149 -15 149 -31 v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31zM1152 1082v140q0 16 149 31q13 29 30 52 q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71 q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31zM1408 128q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5q0 52 -38 90t-90 38t-90 -38t-38 -90zM1408 1152q0 -53 37.5 -90.5 t90.5 -37.5t90.5 37.5t37.5 90.5q0 52 -38 90t-90 38t-90 -38t-38 -90z" />
-<glyph unicode="&#xf086;" horiz-adv-x="1792" d="M0 768q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257t-94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25 t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224zM616 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5 t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132z" />
-<glyph unicode="&#xf087;" d="M0 128v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43 q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5zM128 192q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45zM384 128h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5 t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85 t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640z" />
-<glyph unicode="&#xf088;" d="M0 512v640q0 53 37.5 90.5t90.5 37.5h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -74 49 -163q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186 q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5zM128 1088q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45zM384 512h32q16 0 35.5 -9 t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 32 18 69t-17.5 73.5 t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640z" />
-<glyph unicode="&#xf089;" horiz-adv-x="896" d="M0 889q0 37 56 46l502 73l225 455q19 41 49 41v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48z" />
-<glyph unicode="&#xf08a;" horiz-adv-x="1792" d="M0 940q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138z M128 940q0 -168 187 -355l581 -560l580 559q188 188 188 356q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5 t-21.5 -143z" />
-<glyph unicode="&#xf08b;" horiz-adv-x="1664" d="M0 288v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5q0 -4 1 -20t0.5 -26.5t-3 -23.5 t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5zM384 448v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45t-19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf08c;" d="M0 160v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5zM223 1030q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86z M237 122h231v694h-231v-694zM595 122h231v388q0 38 7 56q15 35 45 59.5t74 24.5q116 0 116 -157v-371h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694z" />
-<glyph unicode="&#xf08d;" horiz-adv-x="1152" d="M0 320q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19 t-19 45zM416 672q0 -14 9 -23t23 -9t23 9t9 23v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448z" />
-<glyph unicode="&#xf08e;" horiz-adv-x="1792" d="M0 288v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832 q-119 0 -203.5 84.5t-84.5 203.5zM685 576q0 13 10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23z" />
-<glyph unicode="&#xf090;" d="M0 448v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45t-19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45zM894.5 78.5q0.5 10.5 3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113 t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5q0 4 -1 20t-0.5 26.5z" />
-<glyph unicode="&#xf091;" horiz-adv-x="1664" d="M0 928v128q0 40 28 68t68 28h288v96q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91t97.5 -37q75 0 133.5 -45.5 t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143zM128 928q0 -78 94.5 -162t235.5 -113q-74 162 -74 371 h-256v-96zM1206 653q141 29 235.5 113t94.5 162v96h-256q0 -209 -74 -371z" />
-<glyph unicode="&#xf092;" d="M0 160v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-224q-16 0 -24.5 1t-19.5 5t-16 14.5t-5 27.5v239q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204 q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52 t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -103t0.5 -68q0 -22 -11 -33.5t-22 -13t-33 -1.5h-224q-119 0 -203.5 84.5t-84.5 203.5zM271 315q3 5 13 2 q10 -5 7 -12q-5 -7 -13 -2q-10 5 -7 12zM304 290q6 6 16 -3q9 -11 2 -16q-6 -7 -16 3q-9 11 -2 16zM335 233q-9 13 0 18q9 7 17 -6q9 -12 0 -19q-8 -6 -17 7zM370 206q8 9 20 -3q12 -11 4 -19q-8 -9 -20 3q-13 11 -4 19zM419 168q4 11 19 7q
 16 -5 13 -16q-4 -12 -19 -6 q-17 4 -13 15zM481 154q0 11 16 11q17 2 17 -11q0 -11 -16 -11q-17 -2 -17 11zM540 158q-2 12 14 15q16 2 18 -9q2 -10 -14 -14t-18 8z" />
-<glyph unicode="&#xf093;" horiz-adv-x="1664" d="M0 -32v320q0 40 28 68t68 28h427q21 -56 70.5 -92t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68zM325 936q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69q-17 -40 -59 -40 h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40zM1152 64q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45zM1408 64q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45z" />
-<glyph unicode="&#xf094;" d="M0 433q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -10 1 -18.5t3 -17t4 -13.5t6.5 -16t6.5 -17q16 -40 25 -118.5t9 -136.5q0 -165 -70 -327.5 t-196 -288t-281 -180.5q-124 -44 -326 -44q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5zM128 434q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5 q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24 q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5z" />
-<glyph unicode="&#xf095;" horiz-adv-x="1408" d="M0 1069q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235 t235 -174q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5 t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5z" />
-<glyph unicode="&#xf096;" horiz-adv-x="1408" d="M0 288v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5zM128 288q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47h-832q-66 0 -113 -47 t-47 -113v-832z" />
-<glyph unicode="&#xf097;" horiz-adv-x="1280" d="M0 7v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62zM128 38l423 406l89 85l89 -85l423 -406 v1242h-1024v-1242z" />
-<glyph unicode="&#xf098;" d="M0 160v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5zM256 905q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5t320.5 -216.5 q6 -2 30 -11t33 -12.5t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101q0 11 -2 16q-3 8 -38.5 29.5t-88.5 49.5l-53 29q-5 3 -19 13t-25 15t-21 5q-18 0 -47 -32.5t-57 -65.5t-44 -33q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170.5 126.5 t-126.5 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5t-3.5 16.5q0 13 20.5 33.5t45 38.5t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5z" />
-<glyph unicode="&#xf099;" horiz-adv-x="1664" d="M44 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5 q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145z" />
-<glyph unicode="&#xf09a;" horiz-adv-x="1024" d="M95 631v296h255v218q0 186 104 288.5t277 102.5q147 0 228 -12v-264h-157q-86 0 -116 -36t-30 -108v-189h293l-39 -296h-254v-759h-306v759h-255z" />
-<glyph unicode="&#xf09b;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -39.5 7t-12.5 30v211q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44 l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3 q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -89t0.5 -54q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5z" />
-<glyph unicode="&#xf09c;" horiz-adv-x="1664" d="M0 96v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68z" />
-<glyph unicode="&#xf09d;" horiz-adv-x="1920" d="M0 32v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113zM128 32q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v608h-1664v-608zM128 1024h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600 q-13 0 -22.5 -9.5t-9.5 -22.5v-224zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" />
-<glyph unicode="&#xf09e;" horiz-adv-x="1408" d="M0 192q0 80 56 136t136 56t136 -56t56 -136t-56 -136t-136 -56t-136 56t-56 136zM0 697v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5t259 -181.5q114 -113 181.5 -259t80.5 -306q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5 t-391.5 184.5q-25 2 -41.5 20t-16.5 43zM0 1201v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294q187 -186 294 -425.5t120 -501.5q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102 q-25 1 -42.5 19.5t-17.5 43.5z" />
-<glyph unicode="&#xf0a0;" d="M0 160v320q0 25 16 75l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113zM128 160q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5v320q0 13 -9.5 22.5t-22.5 9.5h-1216 q-13 0 -22.5 -9.5t-9.5 -22.5v-320zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM880 320q0 33 23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5t-23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5zM1136 320q0 33 23.5 56.5t56.5 23.5 t56.5 -23.5t23.5 -56.5t-23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5z" />
-<glyph unicode="&#xf0a1;" horiz-adv-x="1792" d="M0 672v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50 t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113zM768 633q377 -42 768 -341v954q-394 -302 -768 -343v-270z" />
-<glyph unicode="&#xf0a2;" horiz-adv-x="1664" d="M0 128q190 161 287 397.5t97 498.5q0 165 96 262t264 117q-8 18 -8 37q0 40 28 68t68 28t68 -28t28 -68q0 -19 -8 -37q168 -20 264 -117t96 -262q0 -262 97 -498.5t287 -397.5q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38 t-38 90zM183 128h1298q-164 181 -246.5 411.5t-82.5 484.5q0 256 -320 256t-320 -256q0 -254 -82.5 -484.5t-246.5 -411.5zM656 0q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16t-16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16z" />
-<glyph unicode="&#xf0a3;" d="M2 435q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70l-53 -186l188 -48 q40 -10 52 -51q10 -42 -20 -70l-138 -135l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53 q-41 -12 -70 19q-31 29 -19 70l53 186l-188 48q-40 10 -52 51z" />
-<glyph unicode="&#xf0a4;" horiz-adv-x="1792" d="M0 128v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179q0 -105 -75.5 -181 t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5zM128 192q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45zM384 128h32q72 0 167 -32 t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139 q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106q-69 -57 -140 -57h-32v-640z" />
-<glyph unicode="&#xf0a5;" horiz-adv-x="1792" d="M0 769q0 103 76 179t180 76h374q-22 60 -22 128q0 122 81.5 189t206.5 67q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5v-640 q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181zM128 768q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119 q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-2 3 -3.5 4.5t-4 4.5t-4.5 5q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5 t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576q-50 0 -89 -38.5t-39 -89.5zM1536 192q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45z" />
-<glyph unicode="&#xf0a6;" d="M0 640q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5t-90.5 -37.5h-640 q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5zM128 640q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140 v-32h640v32q0 72 32 167t64 193.5t32 179.5q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576q-20 0 -48.5 15t-55 33t-68 33t-84.5 15 q-67 0 -97.5 -44.5t-30.5 -115.5zM1152 -64q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45z" />
-<glyph unicode="&#xf0a7;" d="M0 640q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317q0 -142 -77.5 -230t-217.5 -87 l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5zM128 640q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33t55 33t48.5 15v-576q0 -50 38.5 -89 t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112 q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5zM1152 1344q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45z" />
-<glyph unicode="&#xf0a8;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM251 640q0 -27 18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502 q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45z" />
-<glyph unicode="&#xf0a9;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM256 576q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18 l362 362l91 91q18 18 18 45t-18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128z" />
-<glyph unicode="&#xf0aa;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM252 641q0 -27 18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19 t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45t-18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45z" />
-<glyph unicode="&#xf0ab;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM252 639q0 -27 18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45t-18 45l-91 91 q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45z" />
-<glyph unicode="&#xf0ac;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM226 979q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18 q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13 q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-15 25 -17 29q-3 5 -5.5 15.5t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10t17 -20q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5 t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.
 5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13 q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25 t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5 t0 14t-1.5 12.5l-1 8v18l-1 8q-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q7 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4 q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5q15 10 -7 16q-17 5 -43 -12q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.
 5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8 q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 10.5t-9.5 10.5q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5 q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26 q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17t10.5 17q9 6 14 5.5t14.5 -5.5t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-5 7 -8 9q-12 4 -27 -5 q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -
 4.5t-6 -4q-3 -4 0 -14t-2 -14 q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5 q-16 0 -22 -1q-146 -80 -235 -222zM877 26q0 -6 2 -16q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7 t-10 1.5t-11.5 -7q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 

<TRUNCATED>

[14/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGateway.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGateway.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGateway.java
deleted file mode 100644
index 9576549..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGateway.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchbase;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-@ImplementedBy(CouchbaseSyncGatewayImpl.class)
-public interface CouchbaseSyncGateway extends SoftwareProcess {
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION,
-            "1.0-beta3.1");
-
-    @SetFromFlag("downloadUrl")
-    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "http://packages.couchbase.com/releases/couchbase-sync-gateway/1.0-beta/couchbase-sync-gateway-community_${version}_${driver.osTag}");
-    
-    @SetFromFlag("couchbaseServer")
-    ConfigKey<Entity> COUCHBASE_SERVER = ConfigKeys.newConfigKey(Entity.class, "couchbaseSyncGateway.couchbaseNode", 
-            "Couchbase server node or cluster the sync gateway connects to");
-
-    @SetFromFlag("serverPool")
-    ConfigKey<String> COUCHBASE_SERVER_POOL = ConfigKeys.newStringConfigKey("couchbaseSyncGateway.serverPool", 
-            "Couchbase Server pool name in which to find buckets", "default");
-    
-    @SetFromFlag("couchbaseServerBucket")
-    ConfigKey<String> COUCHBASE_SERVER_BUCKET = ConfigKeys.newStringConfigKey("couchbaseSyncGateway.serverBucket", 
-            "Name of the Couchbase bucket to use", "sync_gateway");
-
-    @SetFromFlag("pretty")
-    ConfigKey<Boolean> PRETTY = ConfigKeys.newBooleanConfigKey("couchbaseSyncGateway.pretty", 
-            "Pretty-print JSON responses. This is useful for debugging, but reduces performance.", false);
-
-    @SetFromFlag("verbose")
-    ConfigKey<Boolean> VERBOSE = ConfigKeys.newBooleanConfigKey("couchbaseSyncGateway.verbose", 
-            "Logs more information about requests.", false);
-
-    AttributeSensor<String> COUCHBASE_SERVER_WEB_URL = Sensors.newStringSensor("couchbaseSyncGateway.serverWebUrl", 
-            "The Url and web port of the couchbase server to connect to");
-    
-    AttributeSensor<String> MANAGEMENT_URL = Sensors.newStringSensor("coucbaseSyncGateway.managementUrl", 
-            "Management URL for Couchbase Sycn Gateway");
-
-    PortAttributeSensorAndConfigKey SYNC_REST_API_PORT = new PortAttributeSensorAndConfigKey("couchbaseSyncGateway.syncRestPort", 
-            "Port the Sync REST API listens on", "4984");
-    
-    PortAttributeSensorAndConfigKey ADMIN_REST_API_PORT = new PortAttributeSensorAndConfigKey("couchbaseSyncGateway.adminRestPort", 
-            "Port the Admin REST API listens on", "4985");
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayDriver.java
deleted file mode 100644
index 1b29e9f..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayDriver.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchbase;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface CouchbaseSyncGatewayDriver extends SoftwareProcessDriver {
-
-    public String getOsTag();
-    
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayImpl.java
deleted file mode 100644
index 0b42c76..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayImpl.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchbase;
-
-import org.apache.brooklyn.core.config.render.RendererHints;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.http.HttpFeed;
-import org.apache.brooklyn.feed.http.HttpPollConfig;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-
-import com.google.common.base.Functions;
-import com.google.common.net.HostAndPort;
-
-public class CouchbaseSyncGatewayImpl extends SoftwareProcessImpl implements CouchbaseSyncGateway {
-
-    private HttpFeed httpFeed;
-
-    @Override
-    public Class<CouchbaseSyncGatewayDriver> getDriverInterface() {
-        return CouchbaseSyncGatewayDriver.class;
-    }
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        connectServiceUpIsRunning();
-    }
-
-    @Override
-    protected void connectServiceUpIsRunning() {
-        HostAndPort hp = BrooklynAccessUtils.getBrooklynAccessibleAddress(this,
-                getAttribute(CouchbaseSyncGateway.ADMIN_REST_API_PORT));
-
-        String managementUri = String.format("http://%s:%s",
-                hp.getHostText(), hp.getPort());
-
-        sensors().set(MANAGEMENT_URL, managementUri);
-
-        httpFeed = HttpFeed.builder()
-                .entity(this)
-                .period(200)
-                .baseUri(managementUri)
-                .poll(new HttpPollConfig<Boolean>(SERVICE_UP)
-                        .onSuccess(HttpValueFunctions.responseCodeEquals(200))
-                        .onFailureOrException(Functions.constant(false)))
-                .build();
-    }
-
-    @Override
-    protected void disconnectSensors() {
-        super.disconnectSensors();
-        disconnectServiceUpIsRunning();
-    }
-
-    @Override
-    protected void disconnectServiceUpIsRunning() {
-        if (httpFeed != null) {
-            httpFeed.stop();
-        }
-    }
-    
-    static {
-        RendererHints.register(MANAGEMENT_URL, RendererHints.namedActionWithUrl());
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java
deleted file mode 100644
index 8a5a25e..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchbase;
-
-import static java.lang.String.format;
-import static org.apache.brooklyn.util.ssh.BashCommands.INSTALL_CURL;
-import static org.apache.brooklyn.util.ssh.BashCommands.alternatives;
-import static org.apache.brooklyn.util.ssh.BashCommands.chainGroup;
-import static org.apache.brooklyn.util.ssh.BashCommands.sudo;
-
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.api.entity.drivers.downloads.DownloadResolver;
-import org.apache.brooklyn.api.location.OsDetails;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.EntityPredicates;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-
-import com.google.common.base.Optional;
-import com.google.common.base.Predicates;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-public class CouchbaseSyncGatewaySshDriver extends AbstractSoftwareProcessSshDriver implements CouchbaseSyncGatewayDriver {
-    public CouchbaseSyncGatewaySshDriver(EntityLocal entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public void stop() {
-
-    }
-
-    @Override
-    public void install() {
-        //reference http://docs.couchbase.com/sync-gateway/#getting-started-with-sync-gateway
-        DownloadResolver resolver = Entities.newDownloader(this);
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        OsDetails osDetails = getMachine().getMachineDetails().getOsDetails();
-
-        log.info("Installing couchbase-sync-gateway version: {}", getVersion());
-        if (osDetails.isLinux()) {
-            List<String> commands = installLinux(urls, saveAs);
-            newScript(INSTALLING)
-                    .body.append(commands).execute();
-        }
-    }
-
-    @Override
-    public void customize() {
-
-    }
-
-    @Override
-    public void launch() {
-        Entity cbNode = entity.getConfig(CouchbaseSyncGateway.COUCHBASE_SERVER);
-        Entities.waitForServiceUp(cbNode, Duration.ONE_HOUR);
-        DependentConfiguration.waitInTaskForAttributeReady(cbNode, CouchbaseCluster.IS_CLUSTER_INITIALIZED, Predicates.equalTo(true));
-        // Even once the bucket has published its API URL, it can still take a couple of seconds for it to become available
-        Time.sleep(10 * 1000);
-        if (cbNode instanceof CouchbaseCluster) {
-            // in_cluster now applies even to a node in a cluster of size 1
-            Optional<Entity> cbClusterNode = Iterables.tryFind(cbNode.getAttribute(CouchbaseCluster.GROUP_MEMBERS),
-                Predicates.and(Predicates.instanceOf(CouchbaseNode.class), EntityPredicates.attributeEqualTo(CouchbaseNode.IS_IN_CLUSTER, Boolean.TRUE)));
-            
-            if (!cbClusterNode.isPresent()) {
-                throw new IllegalArgumentException(format("The cluster %s does not contain any suitable Couchbase nodes to connect to..", cbNode.getId()));
-            }
-            
-            cbNode = cbClusterNode.get();
-        }
-        String hostname = cbNode.getAttribute(CouchbaseNode.HOSTNAME);
-        String webPort = cbNode.getAttribute(CouchbaseNode.COUCHBASE_WEB_ADMIN_PORT).toString();
-
-
-        String username = cbNode.getConfig(CouchbaseNode.COUCHBASE_ADMIN_USERNAME);
-        String password = cbNode.getConfig(CouchbaseNode.COUCHBASE_ADMIN_PASSWORD);
-
-        String bucketName = entity.getConfig(CouchbaseSyncGateway.COUCHBASE_SERVER_BUCKET);
-        String pool = entity.getConfig(CouchbaseSyncGateway.COUCHBASE_SERVER_POOL);
-        String pretty = entity.getConfig(CouchbaseSyncGateway.PRETTY) ? "-pretty" : "";
-        String verbose = entity.getConfig(CouchbaseSyncGateway.VERBOSE) ? "-verbose" : "";
-
-        String adminRestApiPort = entity.getConfig(CouchbaseSyncGateway.ADMIN_REST_API_PORT).iterator().next().toString();
-        String syncRestApiPort = entity.getConfig(CouchbaseSyncGateway.SYNC_REST_API_PORT).iterator().next().toString();
-
-        String serverWebAdminUrl = format("http://%s:%s@%s:%s", username, password, hostname, webPort);
-        String options = format("-url %s -bucket %s -adminInterface 0.0.0.0:%s -interface 0.0.0.0:%s -pool %s %s %s",
-                serverWebAdminUrl, bucketName, adminRestApiPort, syncRestApiPort, pool, pretty, verbose);
-
-        newScript(ImmutableMap.of("usePidFile", true), LAUNCHING)
-                .body.append(format("/opt/couchbase-sync-gateway/bin/sync_gateway %s ", options) + "> out.log 2> err.log < /dev/null &")
-                .failOnNonZeroResultCode()
-                .execute();
-    }
-    
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of("usePidFile", true), CHECK_RUNNING).execute() == 0;
-    }
-    
-    @Override
-    public void kill() {
-        newScript(MutableMap.of("usePidFile", true), KILLING).execute();
-    }
-
-    private List<String> installLinux(List<String> urls, String saveAs) {
-
-        String apt = chainGroup(
-                "which apt-get",
-                sudo("apt-get update"),
-                sudo(format("dpkg -i %s", saveAs)));
-
-        String yum = chainGroup(
-                "which yum",
-                sudo(format("rpm --install %s", saveAs)));
-
-        return ImmutableList.<String>builder()
-                .add(INSTALL_CURL)
-                .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-                .add(alternatives(apt, yum))
-                .build();
-    }
-
-    @Override
-    public String getOsTag() {
-        OsDetails os = getLocation().getOsDetails();
-        if (os == null) {
-            // Default to generic linux
-            return "x86_64.rpm";
-        } else {
-            //FIXME should be a better way to check for OS name and version
-            String osName = os.getName().toLowerCase();
-            String fileExtension = osName.contains("deb") || osName.contains("ubuntu") ? ".deb" : ".rpm";
-            String arch = os.is64bit() ? "x86_64" : "x86";
-            return arch + fileExtension;
-        }
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBCluster.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBCluster.java
deleted file mode 100644
index c341945..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBCluster.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchdb;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * A cluster of {@link CouchDBNode}s based on {@link DynamicCluster} which can be resized by a policy if required.
- *
- * TODO add sensors with aggregated CouchDB statistics from cluster
- */
-@ImplementedBy(CouchDBClusterImpl.class)
-public interface CouchDBCluster extends DynamicCluster {
-
-    @SetFromFlag("clusterName")
-    BasicAttributeSensorAndConfigKey<String> CLUSTER_NAME = new BasicAttributeSensorAndConfigKey<String>(String.class, "couchdb.cluster.name", "Name of the CouchDB cluster", "BrooklynCluster");
-
-    AttributeSensor<String> HOSTNAME = Sensors.newStringSensor("couchdb.cluster.hostname", "Hostname to connect to cluster with");
-
-    AttributeSensor<Integer> HTTP_PORT = Sensors.newIntegerSensor("couchdb.cluster.http.port", "CouchDB HTTP port to connect to cluster with");
-
-    /**
-     * The name of the cluster.
-     */
-    String getClusterName();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBClusterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBClusterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBClusterImpl.java
deleted file mode 100644
index 84f64f2..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBClusterImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchdb;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.entity.group.DynamicClusterImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Implementation of {@link CouchDBCluster}.
- */
-public class CouchDBClusterImpl extends DynamicClusterImpl implements CouchDBCluster {
-
-    @SuppressWarnings("unused")
-    private static final Logger log = LoggerFactory.getLogger(CouchDBClusterImpl.class);
-
-    public CouchDBClusterImpl() {
-    }
-
-    /**
-     * Sets the default {@link #MEMBER_SPEC} to describe the CouchDB nodes.
-     */
-    @Override
-    protected EntitySpec<?> getMemberSpec() {
-        return getConfig(MEMBER_SPEC, EntitySpec.create(CouchDBNode.class));
-    }
-
-    @Override
-    public String getClusterName() {
-        return getAttribute(CLUSTER_NAME);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNode.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNode.java
deleted file mode 100644
index fa9506a..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNode.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchdb;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.entity.webapp.WebAppService;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a CouchDB node in a {@link CouchDBCluster}.
- */
-@Catalog(name="CouchDB Node",
-        description="Apache CouchDB is a database that uses JSON for documents, JavaScript for MapReduce queries, " +
-                "and regular HTTP for an API",
-        iconUrl="classpath:///couchdb-logo.png")
-@ImplementedBy(CouchDBNodeImpl.class)
-public interface CouchDBNode extends SoftwareProcess, WebAppService {
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "1.2.1");
-
-    @SetFromFlag("erlangVersion")
-    ConfigKey<String> ERLANG_VERSION = ConfigKeys.newStringConfigKey("erlang.version", "Erlang runtime version", "R15B");
-
-    @SetFromFlag("clusterName")
-    BasicAttributeSensorAndConfigKey<String> CLUSTER_NAME = CouchDBCluster.CLUSTER_NAME;
-
-    @SetFromFlag("couchdbConfigTemplateUrl")
-    BasicAttributeSensorAndConfigKey<String> COUCHDB_CONFIG_TEMPLATE_URL = new BasicAttributeSensorAndConfigKey<String>(
-            String.class, "couchdb.config.templateUrl", "Template file (in freemarker format) for the couchdb config file", 
-            "classpath://org/apache/brooklyn/entity/nosql/couchdb/couch.ini");
-
-    @SetFromFlag("couchdbUriTemplateUrl")
-    BasicAttributeSensorAndConfigKey<String> COUCHDB_URI_TEMPLATE_URL = new BasicAttributeSensorAndConfigKey<String>(
-            String.class, "couchdb.uri.templateUrl", "Template file (in freemarker format) for the couchdb URI file", 
-            "classpath://org/apache/brooklyn/entity/nosql/couchdb/couch.uri");
-
-    @SetFromFlag("couchdbConfigFileName")
-    BasicAttributeSensorAndConfigKey<String> COUCHDB_CONFIG_FILE_NAME = new BasicAttributeSensorAndConfigKey<String>(
-            String.class, "couchdb.config.fileName", "Name for the copied config file", "local.ini");
-
-    Integer getHttpPort();
-
-    Integer getHttpsPort();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeDriver.java
deleted file mode 100644
index 59a04b9..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeDriver.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchdb;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface CouchDBNodeDriver extends SoftwareProcessDriver {
-
-    Integer getHttpPort();
-
-    Integer getHttpsPort();
-
-    String getClusterName();
-
-    String getCouchDBConfigTemplateUrl();
-
-    String getCouchDBUriTemplateUrl();
-
-    String getCouchDBConfigFileName();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeImpl.java
deleted file mode 100644
index 933e818..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeImpl.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchdb;
-
-import java.util.concurrent.TimeUnit;
-
-import javax.annotation.Nullable;
-
-import org.apache.brooklyn.core.entity.EntityFunctions;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.entity.webapp.JavaWebAppSoftwareProcessImpl;
-import org.apache.brooklyn.entity.webapp.WebAppServiceMethods;
-import org.apache.brooklyn.feed.http.HttpFeed;
-import org.apache.brooklyn.feed.http.HttpPollConfig;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.util.core.flags.TypeCoercions;
-import org.apache.brooklyn.util.guava.Functionals;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-
-/**
- * Implementation of {@link CouchDBNode}.
- */
-public class CouchDBNodeImpl extends SoftwareProcessImpl implements CouchDBNode {
-
-    private static final Logger log = LoggerFactory.getLogger(CouchDBNodeImpl.class);
-
-    public CouchDBNodeImpl() {
-    }
-
-    public Integer getHttpPort() { return getAttribute(CouchDBNode.HTTP_PORT); }
-    public Integer getHttpsPort() { return getAttribute(CouchDBNode.HTTPS_PORT); }
-    public String getClusterName() { return getAttribute(CouchDBNode.CLUSTER_NAME); }
-
-    @Override
-    public Class<CouchDBNodeDriver> getDriverInterface() {
-        return CouchDBNodeDriver.class;
-    }
-
-    private volatile HttpFeed httpFeed;
-
-    @Override 
-    protected void connectSensors() {
-        super.connectSensors();
-
-        connectServiceUpIsRunning();
-
-        boolean retrieveUsageMetrics = getConfig(RETRIEVE_USAGE_METRICS);
-        
-        httpFeed = HttpFeed.builder()
-                .entity(this)
-                .period(500, TimeUnit.MILLISECONDS)
-                .baseUri(String.format("http://%s:%d/_stats", getAttribute(HOSTNAME), getHttpPort()))
-                .poll(new HttpPollConfig<Integer>(REQUEST_COUNT)
-                        .onSuccess(HttpValueFunctions.jsonContents(new String[] { "httpd", "requests", "count" }, Integer.class))
-                        .onFailureOrException(EntityFunctions.attribute(this, REQUEST_COUNT))
-                        .enabled(retrieveUsageMetrics))
-                .poll(new HttpPollConfig<Integer>(ERROR_COUNT)
-                        .onSuccess(HttpValueFunctions.jsonContents(new String[] { "httpd_status_codes", "404", "count" }, Integer.class))
-                        .onFailureOrException(Functions.constant(-1))
-                        .enabled(retrieveUsageMetrics))
-                .poll(new HttpPollConfig<Integer>(TOTAL_PROCESSING_TIME)
-                        .onSuccess(HttpValueFunctions.jsonContents(new String[] { "couchdb", "request_time", "count" }, Integer.class))
-                        .onFailureOrException(Functions.constant(-1))
-                        .enabled(retrieveUsageMetrics))
-                .poll(new HttpPollConfig<Integer>(MAX_PROCESSING_TIME)
-                        .onSuccess(Functionals.chain(HttpValueFunctions.jsonContents(new String[] { "couchdb", "request_time", "max" }, Double.class), TypeCoercions.function(Integer.class)))
-                        .onFailureOrException(Functions.constant(-1))
-                        .enabled(retrieveUsageMetrics))
-                .build();
-
-        WebAppServiceMethods.connectWebAppServerPolicies(this);
-    }
-
-    @Override
-    public void disconnectSensors() {
-        super.disconnectSensors();
-        if (httpFeed != null) httpFeed.stop();
-        disconnectServiceUpIsRunning();
-    }
-
-    /** @see JavaWebAppSoftwareProcessImpl#postStop() */
-    @Override
-    protected void postStop() {
-        super.postStop();
-        // zero our workrate derived workrates.
-        sensors().set(REQUESTS_PER_SECOND_LAST, 0D);
-        sensors().set(REQUESTS_PER_SECOND_IN_WINDOW, 0D);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeSshDriver.java
deleted file mode 100644
index 60c1f84..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeSshDriver.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchdb;
-
-import static org.apache.brooklyn.util.ssh.BashCommands.*;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.os.Os;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Sets;
-
-/**
- * Start a {@link CouchDBNode} in a {@link Location} accessible over ssh.
- */
-public class CouchDBNodeSshDriver extends AbstractSoftwareProcessSshDriver implements CouchDBNodeDriver {
-
-    private static final Logger log = LoggerFactory.getLogger(CouchDBNodeSshDriver.class);
-
-    public CouchDBNodeSshDriver(CouchDBNodeImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-
-        entity.sensors().set(Attributes.LOG_FILE_LOCATION, getLogFileLocation());
-    }
-
-    public String getLogFileLocation() { return Os.mergePathsUnix(getRunDir(), "couchdb.log"); }
-
-    @Override
-    public Integer getHttpPort() { return entity.getAttribute(CouchDBNode.HTTP_PORT); }
-
-    @Override
-    public Integer getHttpsPort() { return entity.getAttribute(CouchDBNode.HTTPS_PORT); }
-
-    @Override
-    public String getClusterName() { return entity.getAttribute(CouchDBNode.CLUSTER_NAME); }
-
-    @Override
-    public String getCouchDBConfigTemplateUrl() { return entity.getAttribute(CouchDBNode.COUCHDB_CONFIG_TEMPLATE_URL); }
-
-    @Override
-    public String getCouchDBUriTemplateUrl() { return entity.getAttribute(CouchDBNode.COUCHDB_URI_TEMPLATE_URL); }
-
-    @Override
-    public String getCouchDBConfigFileName() { return entity.getAttribute(CouchDBNode.COUCHDB_CONFIG_FILE_NAME); }
-
-    public String getErlangVersion() { return entity.getConfig(CouchDBNode.ERLANG_VERSION); }
-
-    @Override
-    public void install() {
-        log.info("Installing {}", entity);
-        List<String> commands = ImmutableList.<String>builder()
-                .add(ifExecutableElse0("zypper", chainGroup( // SLES 11 not supported, would require building from source
-                        ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/devel:/languages:/erlang/openSUSE_11.4 erlang_suse_11")),
-                        ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/devel:/languages:/erlang/openSUSE_12.3 erlang_suse_12")),
-                        ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/devel:/languages:/erlang/openSUSE_13.1 erlang_suse_13")),
-                        ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/server:/database/openSUSE_11.4 db_suse_11")),
-                        ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/server:/database/openSUSE_12.3 db_suse_12")),
-                        ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/server:/database/openSUSE_13.1 db_suse_13")))))
-                .add(installPackage( // NOTE only 'port' states the version of Erlang used, maybe remove this constraint?
-                        ImmutableMap.of(
-                                "apt", "erlang-nox erlang-dev",
-                                "port", "erlang@"+getErlangVersion()+"+ssl"),
-                        "erlang"))
-                .add(installPackage("couchdb"))
-                .add(ifExecutableElse0("service", sudo("service couchdb stop")))
-                .build();
-
-        newScript(INSTALLING)
-                .body.append(commands)
-                .execute();
-    }
-
-    @Override
-    public Set<Integer> getPortsUsed() {
-        Set<Integer> result = Sets.newLinkedHashSet(super.getPortsUsed());
-        result.addAll(getPortMap().values());
-        return result;
-    }
-
-    private Map<String, Integer> getPortMap() {
-        return ImmutableMap.<String, Integer>builder()
-                .put("httpPort", getHttpPort())
-                .build();
-    }
-
-    @Override
-    public void customize() {
-        log.info("Customizing {} (Cluster {})", entity, getClusterName());
-        Networking.checkPortsValid(getPortMap());
-
-        newScript(CUSTOMIZING).execute();
-
-        // Copy the configuration files across
-        String destinationConfigFile = Os.mergePathsUnix(getRunDir(), getCouchDBConfigFileName());
-        copyTemplate(getCouchDBConfigTemplateUrl(), destinationConfigFile);
-        String destinationUriFile = Os.mergePathsUnix(getRunDir(), "couch.uri");
-        copyTemplate(getCouchDBUriTemplateUrl(), destinationUriFile);
-    }
-
-    @Override
-    public void launch() {
-        log.info("Launching  {}", entity);
-        newScript(MutableMap.of(USE_PID_FILE, false), LAUNCHING)
-                .body.append(sudo(String.format("nohup couchdb -p %s -a %s -o couchdb-console.log -e couchdb-error.log -b &", getPidFile(), Os.mergePathsUnix(getRunDir(), getCouchDBConfigFileName()))))
-                .execute();
-    }
-
-    public String getPidFile() { return Os.mergePathsUnix(getRunDir(), "couchdb.pid"); }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of(USE_PID_FILE, false), CHECK_RUNNING)
-                .body.append(sudo(String.format("couchdb -p %s -s", getPidFile())))
-                .execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(MutableMap.of(USE_PID_FILE, false), STOPPING)
-                .body.append(sudo(String.format("couchdb -p %s -k", getPidFile())))
-                .failOnNonZeroResultCode()
-                .execute();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchCluster.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchCluster.java
deleted file mode 100644
index e0fbc7e..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchCluster.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.elasticsearch;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * A cluster of {@link ElasticSearchNode}s based on {@link DynamicCluster} which can be resized by a policy if required.
- */
-@Catalog(name="Elastic Search Cluster", description="Elasticsearch is an open-source search server based on Lucene. "
-        + "It provides a distributed, multitenant-capable full-text search engine with a RESTful web interface and "
-        + "schema-free JSON documents.")
-@ImplementedBy(ElasticSearchClusterImpl.class)
-public interface ElasticSearchCluster extends DynamicCluster {
-    @SetFromFlag("clusterName")
-    BasicAttributeSensorAndConfigKey<String> CLUSTER_NAME = new BasicAttributeSensorAndConfigKey<String>(String.class, 
-            "elasticsearch.cluster.name", "Name of the ElasticSearch cluster", "BrooklynCluster");
-    
-    String getClusterName();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchClusterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchClusterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchClusterImpl.java
deleted file mode 100644
index 58c6c23..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchClusterImpl.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.elasticsearch;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.entity.group.DynamicClusterImpl;
-
-public class ElasticSearchClusterImpl extends DynamicClusterImpl implements ElasticSearchCluster {
-    
-    private AtomicInteger nextMemberId = new AtomicInteger(0);
-
-    @Override
-    protected EntitySpec<?> getMemberSpec() {
-        EntitySpec<?> spec = EntitySpec.create(getConfig(MEMBER_SPEC, EntitySpec.create(ElasticSearchNode.class)));
-        
-        spec.configure(ElasticSearchNode.CLUSTER_NAME, getConfig(ElasticSearchClusterImpl.CLUSTER_NAME))
-            .configure(ElasticSearchNode.NODE_NAME, "elasticsearch-" + nextMemberId.incrementAndGet());
-        
-        return spec;
-    }
-    
-    @Override
-    public String getClusterName() {
-        return getConfig(CLUSTER_NAME);
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNode.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNode.java
deleted file mode 100644
index 1687bf1..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNode.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.elasticsearch;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.entity.webapp.WebAppServiceConstants;
-import org.apache.brooklyn.entity.database.DatastoreMixins;
-import org.apache.brooklyn.util.core.ResourcePredicates;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents an ElasticSearch node
- */
-@Catalog(name="Elastic Search Node", description="Elasticsearch is an open-source search server based on Lucene. "
-        + "It provides a distributed, multitenant-capable full-text search engine with a RESTful web interface and "
-        + "schema-free JSON documents.")
-@ImplementedBy(ElasticSearchNodeImpl.class)
-public interface ElasticSearchNode extends SoftwareProcess, DatastoreMixins.HasDatastoreUrl {
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "1.2.1");
-
-    @SetFromFlag("downloadUrl")
-    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-${version}.tar.gz");
-
-    @SetFromFlag("dataDir")
-    ConfigKey<String> DATA_DIR = ConfigKeys.newStringConfigKey("elasticsearch.node.data.dir", "Directory for writing data files", null);
-
-    @SetFromFlag("logDir")
-    ConfigKey<String> LOG_DIR = ConfigKeys.newStringConfigKey("elasticsearch.node.log.dir", "Directory for writing log files", null);
-
-    @SetFromFlag("configFileUrl")
-    ConfigKey<String> TEMPLATE_CONFIGURATION_URL = ConfigKeys.builder(String.class)
-            .name("elasticsearch.node.template.configuration.url")
-            .description("URL where the elasticsearch configuration file (in freemarker format) can be found")
-            .defaultValue(null)
-            .constraint(ResourcePredicates.urlIsBlankOrExists())
-            .build();
-
-    @SetFromFlag("multicastEnabled")
-    ConfigKey<Boolean> MULTICAST_ENABLED = ConfigKeys.newBooleanConfigKey("elasticsearch.node.multicast.enabled", 
-            "Indicates whether zen discovery multicast should be enabled for a node", null);
-
-    @SetFromFlag("multicastEnabled")
-    ConfigKey<Boolean> UNICAST_ENABLED = ConfigKeys.newBooleanConfigKey("elasticsearch.node.UNicast.enabled", 
-            "Indicates whether zen discovery unicast should be enabled for a node", null);
-    
-    @SetFromFlag("httpPort")
-    PortAttributeSensorAndConfigKey HTTP_PORT = new PortAttributeSensorAndConfigKey(WebAppServiceConstants.HTTP_PORT, PortRanges.fromString("9200+"));
-
-    @SetFromFlag("nodeName")
-    StringAttributeSensorAndConfigKey NODE_NAME = new StringAttributeSensorAndConfigKey("elasticsearch.node.name", 
-            "Node name (or randomly selected if not set", null);
-
-    @SetFromFlag("clusterName")
-    StringAttributeSensorAndConfigKey CLUSTER_NAME = new StringAttributeSensorAndConfigKey("elasticsearch.node.cluster.name", 
-            "Cluster name (or elasticsearch selected if not set", null);
-
-    AttributeSensor<String> NODE_ID = Sensors.newStringSensor("elasticsearch.node.id");
-    AttributeSensor<Integer> DOCUMENT_COUNT = Sensors.newIntegerSensor("elasticsearch.node.docs.count");
-    AttributeSensor<Integer> STORE_BYTES = Sensors.newIntegerSensor("elasticsearch.node.store.bytes");
-    AttributeSensor<Integer> GET_TOTAL = Sensors.newIntegerSensor("elasticsearch.node.get.total");
-    AttributeSensor<Integer> GET_TIME_IN_MILLIS = Sensors.newIntegerSensor("elasticsearch.node.get.time.in.millis");
-    AttributeSensor<Integer> SEARCH_QUERY_TOTAL = Sensors.newIntegerSensor("elasticsearch.node.search.query.total");
-    AttributeSensor<Integer> SEARCH_QUERY_TIME_IN_MILLIS = Sensors.newIntegerSensor("elasticsearch.node.search.query.time.in.millis");
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeDriver.java
deleted file mode 100644
index 82640cd..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeDriver.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.elasticsearch;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface ElasticSearchNodeDriver extends SoftwareProcessDriver {
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
deleted file mode 100644
index c707ee6..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.elasticsearch;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.http.HttpFeed;
-import org.apache.brooklyn.feed.http.HttpPollConfig;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.feed.http.JsonFunctions;
-import org.apache.brooklyn.util.http.HttpToolResponse;
-import org.apache.brooklyn.util.guava.Functionals;
-import org.apache.brooklyn.util.guava.Maybe;
-import org.apache.brooklyn.util.guava.MaybeFunctions;
-import org.apache.brooklyn.util.guava.TypeTokens;
-
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-import com.google.common.net.HostAndPort;
-import com.google.gson.JsonElement;
-
-public class ElasticSearchNodeImpl extends SoftwareProcessImpl implements ElasticSearchNode {
-    
-    protected static final Function<Maybe<JsonElement>, Maybe<JsonElement>> GET_FIRST_NODE_FROM_NODES = new Function<Maybe<JsonElement>, Maybe<JsonElement>>() {
-        @Override public Maybe<JsonElement> apply(Maybe<JsonElement> input) {
-            if (input.isAbsent()) {
-                return input;
-            }
-            return Maybe.fromNullable(input.get().getAsJsonObject().entrySet().iterator().next().getValue());
-        }
-    };
-    
-    protected static final Function<HttpToolResponse, Maybe<JsonElement>> GET_FIRST_NODE = Functionals.chain(HttpValueFunctions.jsonContents(), 
-            MaybeFunctions.<JsonElement>wrap(), JsonFunctions.walkM("nodes"), GET_FIRST_NODE_FROM_NODES);
-    
-    
-    HttpFeed httpFeed;
-
-    @Override
-    public Class<ElasticSearchNodeDriver> getDriverInterface() {
-        return ElasticSearchNodeDriver.class;
-    }
-    
-    protected static final <T> HttpPollConfig<T> getSensorFromNodeStat(AttributeSensor<T> sensor, String... jsonPath) {
-        return new HttpPollConfig<T>(sensor)
-            .onSuccess(Functionals.chain(GET_FIRST_NODE, JsonFunctions.walkM(jsonPath), JsonFunctions.castM(TypeTokens.getRawRawType(sensor.getTypeToken()), null)))
-            .onFailureOrException(Functions.<T>constant(null));
-    }
-    
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        Integer rawPort = getAttribute(HTTP_PORT);
-        checkNotNull(rawPort, "HTTP_PORT sensors not set for %s; is an acceptable port available?", this);
-        HostAndPort hp = BrooklynAccessUtils.getBrooklynAccessibleAddress(this, rawPort);
-        Function<Maybe<JsonElement>, String> getNodeId = new Function<Maybe<JsonElement>, String>() {
-            @Override public String apply(Maybe<JsonElement> input) {
-                if (input.isAbsent()) {
-                    return null;
-                }
-                return input.get().getAsJsonObject().entrySet().iterator().next().getKey();
-            }
-        };
-        httpFeed = HttpFeed.builder()
-            .entity(this)
-            .period(1000)
-            .baseUri(String.format("http://%s:%s/_nodes/_local/stats", hp.getHostText(), hp.getPort()))
-            .poll(new HttpPollConfig<Boolean>(SERVICE_UP)
-                .onSuccess(HttpValueFunctions.responseCodeEquals(200))
-                .onFailureOrException(Functions.constant(false)))
-            .poll(new HttpPollConfig<String>(NODE_ID)
-                .onSuccess(Functionals.chain(HttpValueFunctions.jsonContents(), MaybeFunctions.<JsonElement>wrap(), JsonFunctions.walkM("nodes"), getNodeId))
-                .onFailureOrException(Functions.constant("")))
-            .poll(getSensorFromNodeStat(NODE_NAME, "name"))
-            .poll(getSensorFromNodeStat(DOCUMENT_COUNT, "indices", "docs", "count"))
-            .poll(getSensorFromNodeStat(STORE_BYTES, "indices", "store", "size_in_bytes"))
-            .poll(getSensorFromNodeStat(GET_TOTAL, "indices", "get", "total"))
-            .poll(getSensorFromNodeStat(GET_TIME_IN_MILLIS, "indices", "get", "time_in_millis"))
-            .poll(getSensorFromNodeStat(SEARCH_QUERY_TOTAL, "indices", "search", "query_total"))
-            .poll(getSensorFromNodeStat(SEARCH_QUERY_TIME_IN_MILLIS, "indices", "search", "query_time_in_millis"))
-            .poll(new HttpPollConfig<String>(CLUSTER_NAME)
-                .onSuccess(HttpValueFunctions.jsonContents("cluster_name", String.class)))
-            .build();
-    }
-    
-    @Override
-    protected void disconnectSensors() {
-        if (httpFeed != null) {
-            httpFeed.stop();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeSshDriver.java
deleted file mode 100644
index 6e35e8b..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeSshDriver.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.elasticsearch;
-
-import static java.lang.String.format;
-
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Urls;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-import com.google.common.collect.ImmutableList;
-
-public class ElasticSearchNodeSshDriver extends AbstractSoftwareProcessSshDriver implements ElasticSearchNodeDriver {
-
-    public ElasticSearchNodeSshDriver(EntityLocal entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("elasticsearch-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-        
-        List<String> commands = ImmutableList.<String>builder()
-            .add(BashCommands.installJavaLatestOrWarn())
-            .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-            .add(String.format("tar zxvf %s", saveAs))
-            .build();
-        
-        newScript(INSTALLING).body.append(commands).execute();
-    }
-
-    @Override
-    public void customize() {
-        newScript(CUSTOMIZING).execute();  //create the directory
-        
-        String configFileUrl = entity.getConfig(ElasticSearchNode.TEMPLATE_CONFIGURATION_URL);
-        
-        if (configFileUrl == null) {
-            return;
-        }
-
-        String configScriptContents = processTemplate(configFileUrl);
-        Reader configContents = new StringReader(configScriptContents);
-
-        getMachine().copyTo(configContents, Urls.mergePaths(getRunDir(), getConfigFile()));
-    }
-
-    @Override
-    public void launch() {
-        String pidFile = getRunDir() + "/" + AbstractSoftwareProcessSshDriver.PID_FILENAME;
-        entity.sensors().set(ElasticSearchNode.PID_FILE, pidFile);
-        StringBuilder commandBuilder = new StringBuilder()
-            .append(String.format("%s/bin/elasticsearch -d -p %s", getExpandedInstallDir(), pidFile));
-        if (entity.getConfig(ElasticSearchNode.TEMPLATE_CONFIGURATION_URL) != null) {
-            commandBuilder.append(" -Des.config=" + Os.mergePaths(getRunDir(), getConfigFile()));
-        }
-        appendConfigIfPresent(commandBuilder, "es.path.data", ElasticSearchNode.DATA_DIR, Os.mergePaths(getRunDir(), "data"));
-        appendConfigIfPresent(commandBuilder, "es.path.logs", ElasticSearchNode.LOG_DIR, Os.mergePaths(getRunDir(), "logs"));
-        appendConfigIfPresent(commandBuilder, "es.node.name", ElasticSearchNode.NODE_NAME.getConfigKey());
-        appendConfigIfPresent(commandBuilder, "es.cluster.name", ElasticSearchNode.CLUSTER_NAME.getConfigKey());
-        appendConfigIfPresent(commandBuilder, "es.discovery.zen.ping.multicast.enabled", ElasticSearchNode.MULTICAST_ENABLED);
-        appendConfigIfPresent(commandBuilder, "es.discovery.zen.ping.unicast.enabled", ElasticSearchNode.UNICAST_ENABLED);
-        commandBuilder.append(" > out.log 2> err.log < /dev/null");
-        newScript(MutableMap.of("usePidFile", false), LAUNCHING)
-            .updateTaskAndFailOnNonZeroResultCode()
-            .body.append(commandBuilder.toString())
-            .execute();
-    }
-    
-    private void appendConfigIfPresent(StringBuilder builder, String parameter, ConfigKey<?> configKey) {
-        appendConfigIfPresent(builder, parameter, configKey, null);
-    }
-    
-    private void appendConfigIfPresent(StringBuilder builder, String parameter, ConfigKey<?> configKey, String defaultValue) {
-        String config = null;
-        if (entity.getConfig(configKey) != null) {
-            config = String.valueOf(entity.getConfig(configKey));
-        }
-        if (config == null && defaultValue != null) {
-            config = defaultValue;
-        }
-        if (config != null) {
-            builder.append(String.format(" -D%s=%s", parameter, config));
-        }
-    }
-    
-    public String getConfigFile() {
-        return "elasticsearch.yaml";
-    }
-    
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of("usePidFile", true), CHECK_RUNNING).execute() == 0;
-    }
-    
-    @Override
-    public void stop() {
-        newScript(MutableMap.of("usePidFile", true), STOPPING).execute();
-    }
-    
-    @Override
-    public void kill() {
-        newScript(MutableMap.of("usePidFile", true), KILLING).execute();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastCluster.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastCluster.java
deleted file mode 100644
index 3962fd1..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastCluster.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.hazelcast;
-
-import java.util.List;
-
-import com.google.common.reflect.TypeToken;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-
-/**
- * A cluster of {@link HazelcastNode}s based on {@link DynamicCluster}.
- */
-@Catalog(name="Hazelcast Cluster", description="Hazelcast is a clustering and highly scalable data distribution platform for Java.")
-
-@ImplementedBy(HazelcastClusterImpl.class)
-public interface HazelcastCluster extends DynamicCluster {
-
-    @SetFromFlag("clusterName")
-    BasicAttributeSensorAndConfigKey<String> CLUSTER_NAME = new BasicAttributeSensorAndConfigKey<String>(String.class, 
-            "hazelcast.cluster.name", "Name of the Hazelcast cluster", "HazelcastCluster");
-    
-    @SetFromFlag("clusterPassword")
-    ConfigKey<String> CLUSTER_PASSWORD =
-            ConfigKeys.newStringConfigKey("hazelcast.cluster.password", "Hazelcast cluster password.");
-    
-    @SuppressWarnings("serial")
-    AttributeSensor<List<String>> PUBLIC_CLUSTER_NODES = Sensors.newSensor(new TypeToken<List<String>>() {},
-        "hazelcast.cluster.public.nodes", "List of public addresses of all nodes in the cluster");
-    
-    String getClusterName();
-    
-    String getClusterPassword();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterImpl.java
deleted file mode 100644
index 854c0a3..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastClusterImpl.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.hazelcast;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.Lists;
-import org.apache.brooklyn.api.entity.Entity;
-
-import org.apache.brooklyn.entity.group.AbstractMembershipTrackingPolicy;
-import org.apache.brooklyn.entity.group.DynamicClusterImpl;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityInternal;
-import org.apache.brooklyn.util.text.Strings;
-
-public class HazelcastClusterImpl extends DynamicClusterImpl implements HazelcastCluster {
-    private static final Logger LOG = LoggerFactory.getLogger(HazelcastClusterImpl.class);
-    
-    private static final AtomicInteger nextMemberId = new AtomicInteger(0);
-    
-    @Override
-    protected EntitySpec<?> getMemberSpec() {
-        EntitySpec<?> spec = EntitySpec.create(config().get(HazelcastCluster.MEMBER_SPEC));
-        
-        spec.configure(HazelcastNode.NODE_CLUSTER_NAME, config().get(HazelcastCluster.CLUSTER_NAME));
-        spec.configure(HazelcastNode.GROUP_NAME, config().get(HazelcastCluster.CLUSTER_NAME));
-        
-        if (LOG.isInfoEnabled()) {
-            LOG.info("Cluster name : {} : used as a group name", getConfig(HazelcastNode.GROUP_NAME));
-        }
-        
-        spec.configure(HazelcastNode.GROUP_PASSWORD, getClusterPassword());
-        
-        return spec;
-    }
-  
-    @Override
-    public void init() {
-        super.init();
-
-        String clusterPassword = getClusterPassword();
-        
-        if (Strings.isBlank(clusterPassword)) {
-            if (LOG.isInfoEnabled()) {
-                LOG.info(this + " cluster password not provided for " + CLUSTER_PASSWORD.getName() + " : generating random password");
-            }
-            config().set(CLUSTER_PASSWORD, Strings.makeRandomId(12));
-        }
-        
-        policies().add(PolicySpec.create(MemberTrackingPolicy.class)
-                .displayName("Hazelcast members tracker")
-                .configure("group", this));
-    }
-    
-    public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy {
-        @Override
-        protected void onEntityChange(Entity member) {
-        }
-
-        @Override
-        protected void onEntityAdded(Entity member) {
-            if (member.getAttribute(HazelcastNode.NODE_NAME) == null) {
-                ((EntityInternal) member).sensors().set(HazelcastNode.NODE_NAME, "hazelcast-" + nextMemberId.incrementAndGet());
-                if (LOG.isInfoEnabled()) {
-                    LOG.info("Node {} added to the cluster", member);
-                }
-            }
-        }
-
-        @Override
-        protected void onEntityRemoved(Entity member) {
-        }
-    };
-    
-    @Override
-    public String getClusterName() {
-        return getConfig(CLUSTER_NAME);
-    }
-
-    @Override
-    public String getClusterPassword() {
-        return getConfig(CLUSTER_PASSWORD);
-    }
-
-    @Override
-    protected void initEnrichers() {
-        super.initEnrichers();
-        
-    }
-    
-    @Override
-    public void start(Collection<? extends Location> locations) {
-        super.start(locations);
-        
-        List<String> clusterNodes = Lists.newArrayList();
-        for (Entity member : getMembers()) {
-            clusterNodes.add(member.getAttribute(Attributes.ADDRESS));
-        }
-        sensors().set(PUBLIC_CLUSTER_NODES, clusterNodes);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNode.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNode.java
deleted file mode 100644
index 768179c..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNode.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.hazelcast;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.entity.java.UsesJava;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.util.javalang.JavaClassNames;
-
-/**
- * An {@link brooklyn.entity.Entity} that represents an Hazelcast node
- */
-@Catalog(name="Hazelcast Node", description="Hazelcast is a clustering and highly scalable data distribution platform for Java.")
-
-@ImplementedBy(HazelcastNodeImpl.class)
-public interface HazelcastNode extends SoftwareProcess, UsesJava, UsesJmx {
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "3.5.4");
-    
-    @SetFromFlag("downloadUrl")
-    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "https://repo1.maven.org/maven2/com/hazelcast/hazelcast/${version}/hazelcast-${version}.jar");
-    
-    @SetFromFlag("configTemplateUrl")
-    ConfigKey<String> CONFIG_TEMPLATE_URL = ConfigKeys.newStringConfigKey(
-            "hazelcast.node.config.templateUrl", "Template file (in freemarker format) for the Hazelcat config file", 
-            JavaClassNames.resolveClasspathUrl(HazelcastNode.class, "hazelcast-brooklyn.xml"));
-    
-    @SetFromFlag("configFileName")
-    ConfigKey<String> CONFIG_FILE_NAME = ConfigKeys.newStringConfigKey(
-            "hazelcast.node.config.fileName", "Name of the Hazelcast config file", "hazelcast.xml");
-    
-    @SetFromFlag("nodeName")
-    StringAttributeSensorAndConfigKey NODE_NAME = new StringAttributeSensorAndConfigKey("hazelcast.node.name", 
-            "Node name (or randomly selected if not set", null);
-
-    @SetFromFlag("nodeHeapMemorySize")
-    ConfigKey<String> NODE_HEAP_MEMORY_SIZE = ConfigKeys.newStringConfigKey(
-            "hazelcast.node.heap.memory.size", "Node's heap memory size (-Xmx and -Xms) in megabytes. Default: 256m", "256m");
-    
-    @SetFromFlag("nodePort")
-    PortAttributeSensorAndConfigKey NODE_PORT = new PortAttributeSensorAndConfigKey("hazelcast.node.port", "Hazelcast communication port", PortRanges.fromString("5701+"));
-
-    @SetFromFlag("nodeClusterName")
-    BasicAttributeSensorAndConfigKey<String> NODE_CLUSTER_NAME = new BasicAttributeSensorAndConfigKey<String>(String.class, 
-            "hazelcast.node.cluster.name", "Name of the Hazelcast cluster which node is part of", "");
-
-    /**
-     * Specifies the group name in the configuration file. Each Hazelcast cluster has a separate group.
-     */ 
-    @SetFromFlag("groupName")
-    ConfigKey<String> GROUP_NAME = ConfigKeys.newStringConfigKey("hazelcast.group.name", 
-            "Group name", "brooklyn");
-  
-    @SetFromFlag("groupPassword")
-    ConfigKey<String> GROUP_PASSWORD = ConfigKeys.newStringConfigKey("hazelcast.group.password", 
-            "Group password", "brooklyn");
-    
-    String getNodeName();
-    
-    Integer getNodePort();
-    
-    String getGroupName();
-    
-    String getGroupPassword();
-    
-    String getHostname();
-    
-    String getHostAddress();
-
-    String getPrivateIpAddress();
-
-    String getListenAddress();
-    
-    String getHeapMemorySize();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeDriver.java
deleted file mode 100644
index 8cf1e0c..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeDriver.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.hazelcast;
-
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
-
-public interface HazelcastNodeDriver extends SoftwareProcessDriver {
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeImpl.java
deleted file mode 100644
index 6d13b74..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/hazelcast/HazelcastNodeImpl.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.hazelcast;
-
-import java.net.URI;
-import java.util.concurrent.TimeUnit;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.http.HttpFeed;
-import org.apache.brooklyn.feed.http.HttpPollConfig;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.util.text.Strings;
-
-import com.google.common.base.Functions;
-import com.google.common.net.HostAndPort;
-
-public class HazelcastNodeImpl extends SoftwareProcessImpl implements HazelcastNode {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(HazelcastNodeImpl.class);
-    
-    HttpFeed httpFeed;
-
-    @Override
-    public Class<HazelcastNodeDriver> getDriverInterface() {
-        return HazelcastNodeDriver.class;
-    }
-    
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Connecting sensors for node: {} ", getAttribute(Attributes.HOSTNAME));
-        }
-        
-        HostAndPort hp = BrooklynAccessUtils.getBrooklynAccessibleAddress(this, getNodePort());
-
-        String nodeUri = String.format("http://%s:%d/hazelcast/rest/cluster", hp.getHostText(), hp.getPort());
-        sensors().set(Attributes.MAIN_URI, URI.create(nodeUri));
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Node {} is using {} as a main URI", this, nodeUri);
-        }
-        
-        httpFeed = HttpFeed.builder()
-                .entity(this)
-                .period(3000, TimeUnit.MILLISECONDS)
-                .baseUri(nodeUri)
-                .poll(new HttpPollConfig<Boolean>(SERVICE_UP)
-                        .onSuccess(HttpValueFunctions.responseCodeEquals(200))
-                        .onFailureOrException(Functions.constant(false)))
-                .build();
-    }
-    
-    @Override
-    protected void disconnectSensors() {
-        if (httpFeed != null) {
-            httpFeed.stop();
-        }
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Disconnecting sensors for node: {} ", getAttribute(Attributes.HOSTNAME));
-        }
-        
-        super.disconnectSensors();
-        disconnectServiceUpIsRunning();
-    }
-
-
-    @Override
-    public String getGroupName() {
-        return getConfig(HazelcastNode.GROUP_NAME);
-    }
-
-    @Override
-    public String getGroupPassword() {
-        return getConfig(HazelcastNode.GROUP_PASSWORD);
-    }
-
-    @Override
-    public String getNodeName() {
-        return getAttribute(HazelcastNode.NODE_NAME);
-    }
-
-    @Override
-    public Integer getNodePort() {
-        return getAttribute(HazelcastNode.NODE_PORT);
-    }
-
-    @Override
-    public String getHostname() { 
-        return getAttribute(HOSTNAME); 
-    }
-    
-    @Override
-    public String getHostAddress() { 
-        return getAttribute(ADDRESS); 
-    }
-    
-    @Override
-    public String getPrivateIpAddress() {
-        return getAttribute(SUBNET_ADDRESS);
-    }
-    
-    @Override
-    public String getListenAddress() {
-        String listenAddress = getPrivateIpAddress();
-        
-        if (Strings.isBlank(listenAddress)) {
-            listenAddress = getAttribute(ADDRESS);
-        }
-        
-        if (LOG.isInfoEnabled()) {
-            LOG.info("Node {} is listening on {}", this, listenAddress);
-        }
-
-        return listenAddress;
-    }
-
-
-    @Override
-    public String getHeapMemorySize() {
-        return getConfig(HazelcastNode.NODE_HEAP_MEMORY_SIZE);
-    }
-
-}


[23/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQDriver.java
deleted file mode 100644
index 768efa6..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQDriver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-
-public interface ActiveMQDriver extends JavaSoftwareProcessDriver {
-
-    String getBrokerName();
-
-    Integer getOpenWirePort();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQQueue.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQQueue.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQQueue.java
deleted file mode 100644
index 550724b..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQQueue.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.entity.messaging.Queue;
-
-@ImplementedBy(ActiveMQQueueImpl.class)
-public interface ActiveMQQueue extends ActiveMQDestination, Queue {
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQQueueImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQQueueImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQQueueImpl.java
deleted file mode 100644
index f696c02..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQQueueImpl.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import org.apache.brooklyn.feed.jmx.JmxAttributePollConfig;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ActiveMQQueueImpl extends ActiveMQDestinationImpl implements ActiveMQQueue {
-    public static final Logger log = LoggerFactory.getLogger(ActiveMQQueue.class);
-
-    public ActiveMQQueueImpl() {
-    }
-
-    @Override
-    public void onManagementStarting() {
-        super.onManagementStarting();
-        sensors().set(QUEUE_NAME, getName());
-    }
-
-    public String getQueueName() {
-        return getName();
-    }
-    
-    public void create() {
-        log.debug("{} adding queue {} to broker {}", new Object[] {this, getName(), jmxHelper.getAttribute(brokerMBeanName, "BrokerName")});
-        
-        jmxHelper.operation(brokerMBeanName, "addQueue", getName());
-        
-        connectSensors();
-    }
-
-    public void delete() {
-        jmxHelper.operation(brokerMBeanName, "removeQueue", getName());
-        disconnectSensors();
-    }
-
-    @Override
-    protected void connectSensors() {
-        String queue = String.format("org.apache.activemq:type=Broker,brokerName=%s,destinationType=Queue,destinationName=%s", getBrokerName(), getName());
-        
-        jmxFeed = JmxFeed.builder()
-                .entity(this)
-                .helper(jmxHelper)
-                .pollAttribute(new JmxAttributePollConfig<Integer>(QUEUE_DEPTH_MESSAGES)
-                        .objectName(queue)
-                        .attributeName("QueueSize"))
-                .build();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQSpecs.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQSpecs.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQSpecs.java
deleted file mode 100644
index 34a3b1d..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQSpecs.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-
-public class ActiveMQSpecs {
-
-    public static EntitySpec<ActiveMQBroker> brokerSpec() {
-        return EntitySpec.create(ActiveMQBroker.class);
-    }
-    
-    public static EntitySpec<ActiveMQBroker> brokerSpecChef() {
-        return EntitySpec.create(ActiveMQBroker.class);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQSshDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQSshDriver.java
deleted file mode 100644
index 65b67b6..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQSshDriver.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import static java.lang.String.format;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-import com.google.common.collect.ImmutableMap;
-
-public class ActiveMQSshDriver extends JavaSoftwareProcessSshDriver implements ActiveMQDriver {
-
-    public ActiveMQSshDriver(ActiveMQBrokerImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    protected String getLogFileLocation() { 
-        return Os.mergePathsUnix(getRunDir(), "data/activemq.log");
-    }
-
-    @Override
-    public String getBrokerName() { 
-        return entity.getAttribute(ActiveMQBroker.BROKER_NAME);
-    }
-
-    @Override
-    public Integer getOpenWirePort() { 
-        return entity.getAttribute(ActiveMQBroker.OPEN_WIRE_PORT);
-    }
-
-    public String getMirrorUrl() {
-        return entity.getConfig(ActiveMQBroker.MIRROR_URL);
-    }
-
-    protected String getTemplateConfigurationUrl() {
-        return entity.getAttribute(ActiveMQBroker.TEMPLATE_CONFIGURATION_URL);
-    }
-
-    public String getPidFile() {
-        return "data/activemq.pid";
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("apache-activemq-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = new LinkedList<String>();
-        commands.addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs));
-        commands.add(BashCommands.INSTALL_TAR);
-        commands.add("tar xzfv "+saveAs);
-
-        newScript(INSTALLING)
-                .body.append(commands)
-                .execute();
-    }
-
-    @Override
-    public void customize() {
-        Networking.checkPortsValid(ImmutableMap.of("jmxPort", getJmxPort(), "openWirePort", getOpenWirePort()));
-        newScript(CUSTOMIZING)
-                .body.append(
-                        format("cp -R %s/{bin,conf,data,lib,webapps} .", getExpandedInstallDir()),
-                        // Required in version 5.5.1 (at least), but not in version 5.7.0
-                        "sed -i.bk 's/\\[-z \"$JAVA_HOME\"]/\\[ -z \"$JAVA_HOME\" ]/g' bin/activemq",
-                        // Stop it writing to dev null on start
-                        "sed -i.bk \"s/\\(ACTIVEMQ_HOME..bin.run.jar.*\\)>.dev.null/\\1/\" bin/activemq",
-                        // Required if launching multiple AMQ's, prevent jetty port conflicts
-                        "sed -i.bk 's/8161/"+getEntity().getAttribute(ActiveMQBroker.AMQ_JETTY_PORT)+"/g' conf/jetty.xml"
-                        // TODO disable persistence (this should be a flag -- but it seems to have no effect, despite ):
-                        // "sed -i.bk 's/broker /broker persistent=\"false\" /g' conf/activemq.xml",
-                    )
-                .execute();
-
-        // Copy the configuration file across
-        String destinationConfigFile = Os.mergePathsUnix(getRunDir(), "conf/activemq.xml");
-        copyTemplate(getTemplateConfigurationUrl(), destinationConfigFile);
-    }
-
-    @Override
-    public void launch() {
-        // Using nohup, as recommended at http://activemq.apache.org/run-broker.html
-        newScript(ImmutableMap.of(USE_PID_FILE, false), LAUNCHING)
-                .body.append("nohup ./bin/activemq start > ./data/activemq-extra.log 2>&1 &")
-                .execute();
-    }
-    
-    @Override
-    public boolean isRunning() {
-        return newScript(ImmutableMap.of(USE_PID_FILE, getPidFile()), CHECK_RUNNING).execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(ImmutableMap.of(USE_PID_FILE, getPidFile()), STOPPING).execute();
-    }
-
-    @Override
-    public void kill() {
-        newScript(ImmutableMap.of(USE_PID_FILE, getPidFile()), KILLING).execute();
-    }
-
-    @Override
-    public Map<String, String> getShellEnvironment() {
-        return MutableMap.<String,String>builder()
-                .putAll(super.getShellEnvironment())
-                .put("ACTIVEMQ_HOME", getRunDir())
-                .put("ACTIVEMQ_PIDFILE", getPidFile())
-                .renameKey("JAVA_OPTS", "ACTIVEMQ_OPTS")
-                .build();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQTopic.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQTopic.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQTopic.java
deleted file mode 100644
index d81c562..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQTopic.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.entity.messaging.Topic;
-
-@ImplementedBy(ActiveMQTopicImpl.class)
-public interface ActiveMQTopic extends ActiveMQDestination, Topic {
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQTopicImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQTopicImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQTopicImpl.java
deleted file mode 100644
index 365b7b7..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/activemq/ActiveMQTopicImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.activemq;
-
-
-public class ActiveMQTopicImpl extends ActiveMQDestinationImpl implements ActiveMQTopic {
-    public ActiveMQTopicImpl() {
-    }
-
-    @Override
-    public void onManagementStarting() {
-        super.onManagementStarting();
-        sensors().set(TOPIC_NAME, getName());
-    }
-
-    @Override
-    public void create() {
-        jmxHelper.operation(brokerMBeanName, "addTopic", getName());
-        connectSensors();
-    }
-
-    public void delete() {
-        jmxHelper.operation(brokerMBeanName, "removeTopic", getName());
-        disconnectSensors();
-    }
-
-    public void connectSensors() {
-        //TODO add sensors for topics
-    }
-
-    public String getTopicName() {
-        return getName();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/amqp/AmqpExchange.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/amqp/AmqpExchange.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/amqp/AmqpExchange.java
deleted file mode 100644
index 0d3171c..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/amqp/AmqpExchange.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.amqp;
-
-import org.apache.brooklyn.api.sensor.Sensor;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * An interface that describes an AMQP exchange.
- */
-public interface AmqpExchange {
-
-    /* AMQP standard exchange names. */
-    
-    String DIRECT = "amq.direct";
-    String TOPIC = "amq.topic";
-
-    /** The AMQP exchange name {@link Sensor}. */
-    @SetFromFlag("exchange")
-    BasicAttributeSensorAndConfigKey<String> EXCHANGE_NAME = new BasicAttributeSensorAndConfigKey<String>(
-            String.class, "amqp.exchange.name", "AMQP exchange name");
-
-    /**
-     * Return the AMQP exchange name.
-     */
-    public String getExchangeName();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/amqp/AmqpServer.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/amqp/AmqpServer.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/amqp/AmqpServer.java
deleted file mode 100644
index 80b49ee..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/amqp/AmqpServer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.amqp;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-
-/**
- * Marker interface identifying AMQP servers.
- */
-public interface AmqpServer extends Entity {
-    
-    /* AMQP protocol version strings. */
-
-    String AMQP_0_8 = "0-8";
-    String AMQP_0_9 = "0-9";
-    String AMQP_0_9_1 = "0-9-1";
-    String AMQP_0_10 = "0-10";
-    String AMQP_1_0 = "1-0";
-
-    PortAttributeSensorAndConfigKey AMQP_PORT = Attributes.AMQP_PORT;
-
-    BasicAttributeSensorAndConfigKey<String> VIRTUAL_HOST_NAME = new BasicAttributeSensorAndConfigKey<String>(
-            String.class, "amqp.virtualHost", "AMQP virtual host name", "localhost");
-
-    BasicAttributeSensorAndConfigKey<String> AMQP_VERSION = new BasicAttributeSensorAndConfigKey<String>(
-            String.class, "amqp.version", "AMQP protocol version");
-
-    String getVirtualHost();
-
-    String getAmqpVersion();
-
-    Integer getAmqpPort();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSBroker.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSBroker.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSBroker.java
deleted file mode 100644
index 34d03f7..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSBroker.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.jms;
-
-import java.util.Collection;
-import java.util.Map;
-
-import org.apache.brooklyn.entity.messaging.MessageBroker;
-import org.apache.brooklyn.entity.messaging.Queue;
-import org.apache.brooklyn.entity.messaging.Topic;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-
-import com.google.common.annotations.VisibleForTesting;
-
-public interface JMSBroker<Q extends JMSDestination & Queue, T extends JMSDestination & Topic> extends SoftwareProcess, MessageBroker {
-    
-    @VisibleForTesting
-    public Collection<String> getQueueNames();
-    
-    @VisibleForTesting
-    public Collection<String> getTopicNames();
-
-    @VisibleForTesting
-    public Map<String, Q> getQueues();
-    
-    @VisibleForTesting
-    public Map<String, T> getTopics();
-    
-    /** TODO make this an effector */
-    public void addQueue(String name);
-    
-    public void addQueue(String name, Map properties);
-
-    public Q createQueue(Map properties);
-
-    /** TODO make this an effector */
-    public void addTopic(String name);
-    
-    public void addTopic(String name, Map properties);
-
-    public T createTopic(Map properties);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSBrokerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSBrokerImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSBrokerImpl.java
deleted file mode 100644
index 90f954b..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSBrokerImpl.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.jms;
-
-import static org.apache.brooklyn.util.JavaGroovyEquivalents.groovyTruth;
-
-import java.util.Collection;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.entity.messaging.Queue;
-import org.apache.brooklyn.entity.messaging.Topic;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-public abstract class JMSBrokerImpl<Q extends JMSDestination & Queue, T extends JMSDestination & Topic> extends SoftwareProcessImpl implements JMSBroker<Q,T> {
-    private static final Logger log = LoggerFactory.getLogger(JMSBroker.class);
-    
-    Collection<String> queueNames;
-    Collection<String> topicNames;
-    Map<String, Q> queues = Maps.newLinkedHashMap();
-    Map<String, T> topics = Maps.newLinkedHashMap();
-
-    public JMSBrokerImpl() {
-    }
-
-    @Override
-    public JMSBrokerImpl configure(Map properties) {
-        if (queueNames==null) queueNames = Lists.newArrayList();
-        if (groovyTruth(properties.get("queue"))) queueNames.add((String) properties.remove("queue"));
-        if (groovyTruth(properties.get("queues"))) queueNames.addAll((Collection<String>) properties.remove("queues"));
-
-        if (topicNames==null) topicNames = Lists.newArrayList();
-        if (groovyTruth(properties.get("topic"))) topicNames.add((String) properties.remove("topic"));
-        if (groovyTruth(properties.get("topics"))) topicNames.addAll((Collection<String>) properties.remove("topics"));
-        
-        return (JMSBrokerImpl) super.configure(properties);
-    }
-
-    @Override
-    public Collection<String> getQueueNames() {
-        return queueNames;
-    }
-    
-    @Override
-    public Collection<String> getTopicNames() {
-        return topicNames;
-    }
-
-    @Override
-    public Map<String, Q> getQueues() {
-        return queues;
-    }
-    
-    @Override
-    public Map<String, T> getTopics() {
-        return topics;
-    }
-    
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        setBrokerUrl();
-    }
-
-    // should be called after sensor-polling is activated etc
-    @Override
-    protected void postStart() {
-        super.postStart();
-        // stupid to do this here, but there appears to be a race where sometimes the
-        // broker throws a BrokerStopped exception, even though the sensor indicates it is up
-        Time.sleep(Duration.FIVE_SECONDS);
-        for (String name : queueNames) {
-            addQueue(name);
-        }
-        for (String name : topicNames) {
-            addTopic(name);
-        }
-    }
-    
-    @Override
-    public abstract void setBrokerUrl();
-
-    @Override
-    public void preStop() {
-        // If can't delete queues, continue trying to stop.
-        // (e.g. in CI have seen activemq "BrokerStoppedException" thrown in queue.destroy()). 
-        try {
-            for (JMSDestination queue : queues.values()) {
-                queue.destroy();
-            }
-        } catch (Exception e) {
-            log.warn("Error deleting queues from broker "+this+"; continuing with stop...", e);
-        }
-        
-        try {
-            for (JMSDestination topic : topics.values()) {
-                topic.destroy();
-            }
-        } catch (Exception e) {
-            log.warn("Error deleting topics from broker "+this+"; continuing with stop...", e);
-        }
-        
-        super.preStop();
-    }
-    
-    @Override
-    public void addQueue(String name) {
-        addQueue(name, MutableMap.of());
-    }
-    
-    public void checkStartingOrRunning() {
-        Lifecycle state = getAttribute(SERVICE_STATE_ACTUAL);
-        if (getAttribute(SERVICE_STATE_ACTUAL) == Lifecycle.RUNNING) return;
-        if (getAttribute(SERVICE_STATE_ACTUAL) == Lifecycle.STARTING) return;
-        // TODO this check may be redundant or even inappropriate
-        throw new IllegalStateException("Cannot run against "+this+" in state "+state);
-    }
-
-    @Override
-    public void addQueue(String name, Map properties) {
-        checkStartingOrRunning();
-        properties.put("name", name);
-        queues.put(name, createQueue(properties));
-    }
-
-    @Override
-    public abstract Q createQueue(Map properties);
-
-    @Override
-    public void addTopic(String name) {
-        addTopic(name, MutableMap.of());
-    }
-    
-    @Override
-    public void addTopic(String name, Map properties) {
-        checkStartingOrRunning();
-        properties.put("name", name);
-        topics.put(name, createTopic(properties));
-    }
-
-    @Override
-    public abstract T createTopic(Map properties);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSDestination.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSDestination.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSDestination.java
deleted file mode 100644
index 5591d66..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSDestination.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.jms;
-
-import org.apache.brooklyn.api.entity.Entity;
-
-public interface JMSDestination extends Entity {
-    public String getName();
-    
-    public void delete();
-
-    public void destroy();
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSDestinationImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSDestinationImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSDestinationImpl.java
deleted file mode 100644
index 7fc8ee6..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSDestinationImpl.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.jms;
-
-import org.apache.brooklyn.core.entity.AbstractEntity;
-
-import com.google.common.base.Preconditions;
-
-public abstract class JMSDestinationImpl extends AbstractEntity implements JMSDestination {
-    public JMSDestinationImpl() {
-    }
-
-    @Override
-    public void onManagementStarting() {
-        super.onManagementStarting();
-        Preconditions.checkNotNull(getName(), "Name must be specified");
-    }
-
-    @Override
-    public String getName() {
-        return getDisplayName();
-    }
-    
-    protected abstract void connectSensors();
-
-    protected abstract void disconnectSensors();
-
-    public abstract void delete();
-
-    public void destroy() {
-        disconnectSensors();
-        delete();
-        super.destroy();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/AbstractfKafkaSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/AbstractfKafkaSshDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/AbstractfKafkaSshDriver.java
deleted file mode 100644
index 2e6ec43..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/AbstractfKafkaSshDriver.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import static java.lang.String.format;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-public abstract class AbstractfKafkaSshDriver extends JavaSoftwareProcessSshDriver {
-
-    @SuppressWarnings("unused")
-    private static final Logger log = LoggerFactory.getLogger(KafkaZooKeeperSshDriver.class);
-
-    public AbstractfKafkaSshDriver(EntityLocal entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    protected abstract Map<String, Integer> getPortMap();
-
-    protected abstract ConfigKey<String> getConfigTemplateKey();
-
-    protected abstract String getConfigFileName();
-
-    protected abstract String getLaunchScriptName();
-
-    protected abstract String getTopicsScriptName();
-
-    protected abstract String getProcessIdentifier();
-
-    @Override
-    protected String getLogFileLocation() { return Os.mergePaths(getRunDir(), "console.out"); }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("kafka_%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = new LinkedList<String>();
-        commands.addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs));
-        commands.add(BashCommands.INSTALL_TAR);
-        commands.add("tar xzfv "+saveAs);
-        commands.add("cd "+getExpandedInstallDir());
-
-        newScript(INSTALLING)
-                .body.append(commands)
-                .execute();
-    }
-
-    @Override
-    public void customize() {
-        Networking.checkPortsValid(getPortMap());
-
-        newScript(CUSTOMIZING)
-                .failOnNonZeroResultCode()
-                .body.append(format("cp -R %s/* %s", getExpandedInstallDir(), getRunDir()))
-                .execute();
-
-        String config = entity.getConfig(getConfigTemplateKey());
-        copyTemplate(config, getConfigFileName());
-    }
-
-    @Override
-    public void launch() {
-        newScript(MutableMap.of(USE_PID_FILE, getPidFile()), LAUNCHING)
-                .failOnNonZeroResultCode()
-                .body.append(String.format("nohup ./bin/%s ./%s > console.out 2>&1 &", getLaunchScriptName(), getConfigFileName()))
-                .execute();
-    }
-
-    public String getPidFile() { return Os.mergePathsUnix(getRunDir(), "kafka.pid"); }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of(USE_PID_FILE, getPidFile()), CHECK_RUNNING).execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(MutableMap.of(USE_PID_FILE, false), STOPPING)
-                .body.append(String.format("ps ax | grep %s | awk '{print $1}' | xargs kill", getProcessIdentifier()))
-                .body.append(String.format("ps ax | grep %s | awk '{print $1}' | xargs kill -9", getProcessIdentifier()))
-                .execute();
-    }
-
-    /**
-     * Use RMI agent to provide JMX.
-     */
-    @Override
-    public Map<String, String> getShellEnvironment() {
-        return MutableMap.<String, String>builder()
-                .putAll(super.getShellEnvironment())
-                .renameKey("JAVA_OPTS", "KAFKA_JMX_OPTS")
-                .build();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/Kafka.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/Kafka.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/Kafka.java
deleted file mode 100644
index 6a2322c..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/Kafka.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-/**
- * Shared Kafka broker and zookeeper properties.
- */
-public interface Kafka {
-
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "2.9.2-0.8.2.1");
-
-    @SetFromFlag("downloadUrl")
-    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            Attributes.DOWNLOAD_URL, "http://apache.cbox.biz/kafka/0.8.2.1/kafka_${version}.tgz");
-
-    // TODO: Upgrade to version 0.8.0, which will require refactoring of the sensors to reflect the changes to the JMX beans
-//    @SetFromFlag("downloadUrl")
-//    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-//            Attributes.DOWNLOAD_URL, "http://mirror.catn.com/pub/apache/kafka/${version}/kafka-${version}-src.tgz");
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBroker.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBroker.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBroker.java
deleted file mode 100644
index 1b54cdf..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBroker.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.messaging.MessageBroker;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperNode;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.time.Duration;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single Kafka broker instance.
- */
-@ImplementedBy(KafkaBrokerImpl.class)
-public interface KafkaBroker extends SoftwareProcess, MessageBroker, UsesJmx, Kafka {
-
-    @SetFromFlag("startTimeout")
-    ConfigKey<Duration> START_TIMEOUT = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.START_TIMEOUT, Duration.FIVE_MINUTES);
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = Kafka.SUGGESTED_VERSION;
-
-    @SetFromFlag("kafkaPort")
-    PortAttributeSensorAndConfigKey KAFKA_PORT = new PortAttributeSensorAndConfigKey("kafka.port", "Kafka port", "9092+");
-
-    /** Location of the configuration file template to be copied to the server.*/
-    @SetFromFlag("kafkaServerConfig")
-    ConfigKey<String> KAFKA_BROKER_CONFIG_TEMPLATE = new BasicConfigKey<String>(String.class,
-            "kafka.broker.configTemplate", "Kafka broker configuration template (in freemarker format)",
-            "classpath://org/apache/brooklyn/entity/messaging/kafka/server.properties");
-
-    @SetFromFlag("zookeeper")
-    ConfigKey<ZooKeeperNode> ZOOKEEPER = new BasicConfigKey<ZooKeeperNode>(ZooKeeperNode.class, "kafka.broker.zookeeper", "Kafka zookeeper entity");
-
-    PortAttributeSensorAndConfigKey INTERNAL_JMX_PORT = new PortAttributeSensorAndConfigKey(
-            "internal.jmx.direct.port", "JMX internal port (started by Kafka broker, if using UsesJmx.JMX_AGENT_MODE is not null)", PortRanges.fromString("9999+"));
-
-    AttributeSensor<Integer> BROKER_ID = Sensors.newIntegerSensor("kafka.broker.id", "Kafka unique broker ID");
-
-    AttributeSensor<Long> FETCH_REQUEST_COUNT = Sensors.newLongSensor("kafka.broker.fetch.total", "Fetch request count");
-    AttributeSensor<Long> TOTAL_FETCH_TIME = Sensors.newLongSensor("kafka.broker.fetch.time.total", "Total fetch request processing time (millis)");
-    AttributeSensor<Double> MAX_FETCH_TIME = Sensors.newDoubleSensor("kafka.broker.fetch.time.max", "Max fetch request processing time (millis)");
-
-    AttributeSensor<Long> PRODUCE_REQUEST_COUNT = Sensors.newLongSensor("kafka.broker.produce.total", "Produce request count");
-    AttributeSensor<Long> TOTAL_PRODUCE_TIME = Sensors.newLongSensor("kafka.broker.produce.time.total", "Total produce request processing time (millis)");
-    AttributeSensor<Double> MAX_PRODUCE_TIME = Sensors.newDoubleSensor("kafka.broker.produce.time.max", "Max produce request processing time (millis)");
-
-    AttributeSensor<Long> BYTES_RECEIVED = Sensors.newLongSensor("kafka.broker.bytes.received", "Total bytes received");
-    AttributeSensor<Long> BYTES_SENT = Sensors.newLongSensor("kafka.broker.bytes.sent", "Total bytes sent");
-    
-    Integer getKafkaPort();
-
-    Integer getBrokerId();
-
-    ZooKeeperNode getZookeeper();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBrokerDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBrokerDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBrokerDriver.java
deleted file mode 100644
index fe2a396..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBrokerDriver.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-
-public interface KafkaBrokerDriver extends JavaSoftwareProcessDriver {
-
-    Integer getKafkaPort();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBrokerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBrokerImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBrokerImpl.java
deleted file mode 100644
index 8804202..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBrokerImpl.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import java.util.concurrent.TimeUnit;
-
-import javax.management.ObjectName;
-
-import org.apache.brooklyn.entity.messaging.MessageBroker;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperNode;
-import org.apache.brooklyn.feed.jmx.JmxAttributePollConfig;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-import org.apache.brooklyn.feed.jmx.JmxHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Functions;
-import com.google.common.base.Objects.ToStringHelper;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single Kafka broker instance.
- */
-public class KafkaBrokerImpl extends SoftwareProcessImpl implements MessageBroker, KafkaBroker {
-
-    @SuppressWarnings("unused")
-    private static final Logger log = LoggerFactory.getLogger(KafkaBrokerImpl.class);
-    private static final ObjectName SOCKET_SERVER_STATS_MBEAN = JmxHelper.createObjectName("kafka:type=kafka.SocketServerStats");
-
-    private volatile JmxFeed jmxFeed;
-
-    public KafkaBrokerImpl() {
-        super();
-    }
-
-    @Override
-    public void init() {
-        super.init();
-        sensors().set(BROKER_ID, Math.abs(hashCode())); // Must be positive for partitioning to work
-    }
-
-    @Override
-    public Integer getKafkaPort() { return getAttribute(KAFKA_PORT); }
-
-    @Override
-    public Integer getBrokerId() { return getAttribute(BROKER_ID); }
-
-    @Override
-    public ZooKeeperNode getZookeeper() { return getConfig(ZOOKEEPER); }
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return KafkaBrokerDriver.class;
-    }
-
-    @Override
-    public void waitForServiceUp(long duration, TimeUnit units) {
-        super.waitForServiceUp(duration, units);
-
-        if (((KafkaBrokerDriver)getDriver()).isJmxEnabled()) {
-            // Wait for the MBean to exist
-            JmxHelper helper = new JmxHelper(this);
-            try {
-                helper.assertMBeanExistsEventually(SOCKET_SERVER_STATS_MBEAN, units.toMillis(duration));
-            } finally {
-                helper.terminate();
-            }
-        }
-    }
-
-    @Override
-    protected void connectSensors() {
-        connectServiceUpIsRunning();
-        boolean retrieveUsageMetrics = getConfig(RETRIEVE_USAGE_METRICS);
-        
-        if (((KafkaBrokerDriver)getDriver()).isJmxEnabled()) {
-            jmxFeed = JmxFeed.builder()
-                .entity(this)
-                .period(500, TimeUnit.MILLISECONDS)
-                .pollAttribute(new JmxAttributePollConfig<Long>(FETCH_REQUEST_COUNT)
-                        .objectName(SOCKET_SERVER_STATS_MBEAN)
-                        .attributeName("NumFetchRequests")
-                        .onException(Functions.constant(-1l))
-                        .enabled(retrieveUsageMetrics))
-                .pollAttribute(new JmxAttributePollConfig<Long>(TOTAL_FETCH_TIME)
-                        .objectName(SOCKET_SERVER_STATS_MBEAN)
-                        .attributeName("TotalFetchRequestMs")
-                        .onException(Functions.constant(-1l))
-                        .enabled(retrieveUsageMetrics))
-                .pollAttribute(new JmxAttributePollConfig<Double>(MAX_FETCH_TIME)
-                        .objectName(SOCKET_SERVER_STATS_MBEAN)
-                        .attributeName("MaxFetchRequestMs")
-                        .onException(Functions.constant(-1.0d))
-                        .enabled(retrieveUsageMetrics))
-                .pollAttribute(new JmxAttributePollConfig<Long>(PRODUCE_REQUEST_COUNT)
-                        .objectName(SOCKET_SERVER_STATS_MBEAN)
-                        .attributeName("NumProduceRequests")
-                        .onException(Functions.constant(-1l))
-                        .enabled(retrieveUsageMetrics))
-                .pollAttribute(new JmxAttributePollConfig<Long>(TOTAL_PRODUCE_TIME)
-                        .objectName(SOCKET_SERVER_STATS_MBEAN)
-                        .attributeName("TotalProduceRequestMs")
-                        .onException(Functions.constant(-1l))
-                        .enabled(retrieveUsageMetrics))
-                .pollAttribute(new JmxAttributePollConfig<Double>(MAX_PRODUCE_TIME)
-                        .objectName(SOCKET_SERVER_STATS_MBEAN)
-                        .attributeName("MaxProduceRequestMs")
-                        .onException(Functions.constant(-1.0d))
-                        .enabled(retrieveUsageMetrics))
-                .pollAttribute(new JmxAttributePollConfig<Long>(BYTES_RECEIVED)
-                        .objectName(SOCKET_SERVER_STATS_MBEAN)
-                        .attributeName("TotalBytesRead")
-                        .onException(Functions.constant(-1l))
-                        .enabled(retrieveUsageMetrics))
-                .pollAttribute(new JmxAttributePollConfig<Long>(BYTES_SENT)
-                        .objectName(SOCKET_SERVER_STATS_MBEAN)
-                        .attributeName("TotalBytesWritten")
-                        .onException(Functions.constant(-1l))
-                        .enabled(retrieveUsageMetrics))
-                .build();
-        }
-
-        setBrokerUrl();
-    }
-
-    @Override
-    public void disconnectSensors() {
-        super.disconnectSensors();
-        disconnectServiceUpIsRunning();
-        if (jmxFeed != null) jmxFeed.stop();
-    }
-
-    @Override
-    protected ToStringHelper toStringHelper() {
-        return super.toStringHelper()
-                .add("kafkaPort", getKafkaPort());
-    }
-
-    /** Use the {@link #getZookeeper() zookeeper} details if available, otherwise use our own host and port. */
-    @Override
-    public void setBrokerUrl() {
-        ZooKeeperNode zookeeper = getZookeeper();
-        if (zookeeper != null) {
-            sensors().set(BROKER_URL, String.format("zookeeper://%s:%d", zookeeper.getAttribute(HOSTNAME), zookeeper.getZookeeperPort()));
-        } else {
-            sensors().set(BROKER_URL, String.format("kafka://%s:%d", getAttribute(HOSTNAME), getKafkaPort()));
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBrokerSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBrokerSshDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBrokerSshDriver.java
deleted file mode 100644
index 3b6ffd3..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaBrokerSshDriver.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.java.UsesJmx.JmxAgentModes;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-
-public class KafkaBrokerSshDriver extends AbstractfKafkaSshDriver implements KafkaBrokerDriver {
-
-    private static final Logger LOG = LoggerFactory.getLogger(KafkaBrokerSshDriver.class);
-
-    public KafkaBrokerSshDriver(KafkaBrokerImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    protected Map<String, Integer> getPortMap() {
-        return MutableMap.of("kafkaPort", getKafkaPort());
-    }
-
-    @Override
-    protected ConfigKey<String> getConfigTemplateKey() {
-        return KafkaBroker.KAFKA_BROKER_CONFIG_TEMPLATE;
-    }
-
-    @Override
-    protected String getConfigFileName() {
-        return "server.properties";
-    }
-
-    @Override
-    protected String getLaunchScriptName() {
-        return "kafka-server-start.sh";
-    }
-
-    @Override
-    public String getTopicsScriptName() {
-        return "kafka-topics.sh";
-    }
-
-    @Override
-    protected String getProcessIdentifier() {
-        return "kafka\\.Kafka";
-    }
-
-    @Override
-    public Integer getKafkaPort() {
-        return getEntity().getAttribute(KafkaBroker.KAFKA_PORT);
-    }
-
-    @Override
-    public Map<String, String> getShellEnvironment() {
-        JmxAgentModes jmxAgentMode = getEntity().getConfig(KafkaBroker.JMX_AGENT_MODE);
-        String jmxPort;
-        if (jmxAgentMode == JmxAgentModes.NONE) {
-            // seems odd to pass RMI port here, as it gets assigned to com.sun.mgmt.jmx.port in kafka-run-class.sh
-            // but RMI server/registry port works, whereas JMX port does not
-            jmxPort = String.valueOf(entity.getAttribute(UsesJmx.JMX_PORT));
-        } else {
-            /*
-             * See ./bin/kafka-server-start.sh  and ./bin/kafka-run-class.sh
-             * Really hard to turn off jmxremote on kafka! And can't use default because
-             * uses 9999, which means could only run one kafka broker per server.
-             */
-            jmxPort = String.valueOf(entity.getAttribute(KafkaBroker.INTERNAL_JMX_PORT));
-        }
-
-        return MutableMap.<String, String> builder()
-                .putAll(super.getShellEnvironment())
-                .put("JMX_PORT", jmxPort)
-                .build();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaCluster.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaCluster.java
deleted file mode 100644
index fba4e1c..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaCluster.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.entity.Group;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.BrooklynConfigKeys;
-import org.apache.brooklyn.core.entity.trait.Resizable;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensor;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.group.Cluster;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperNode;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.time.Duration;
-
-/**
- * Provides Kafka cluster functionality through a group of {@link KafkaBroker brokers} controlled
- * by a single {@link KafkaZookeeper zookeeper} entity.
- * <p>
- * You can customise the Kafka zookeeper and brokers by supplying {@link EntitySpec entity specifications}
- * to be used when creating them. An existing {@link Zookeeper} entity may also be provided instead of the
- * Kafka zookeeper.
- * <p>
- * The contents of this entity are:
- * <ul>
- * <li>a {@link org.apache.brooklyn.entity.group.DynamicCluster} of {@link KafkaBroker}s
- * <li>a {@link KafkaZookeeper} or {@link Zookeeper}
- * <li>a {@link org.apache.brooklyn.api.policy.Policy} to resize the broker cluster
- * </ul>
- * The {@link Group group} and {@link Resizable} interface methods are delegated to the broker cluster, so calling
- * {@link Resizable#resize(Integer) resize} will change the number of brokers.
- */
-@SuppressWarnings({ "unchecked", "rawtypes" })
-@Catalog(name="Kafka", description="Apache Kafka is a distributed publish-subscribe messaging system", iconUrl="classpath://org/apache/brooklyn/entity/messaging/kafka/kafka-google-doorway.jpg")
-@ImplementedBy(KafkaClusterImpl.class)
-public interface KafkaCluster extends Entity, Startable, Resizable, Group  {
-
-    @SetFromFlag("startTimeout")
-    ConfigKey<Duration> START_TIMEOUT = BrooklynConfigKeys.START_TIMEOUT;
-
-    @SetFromFlag("initialSize")
-    ConfigKey<Integer> INITIAL_SIZE = ConfigKeys.newConfigKeyWithDefault(Cluster.INITIAL_SIZE, 1);
-
-    /** Zookeeper for the cluster. If null a default be will created. */
-    @SetFromFlag("zookeeper")
-    BasicAttributeSensorAndConfigKey<ZooKeeperNode> ZOOKEEPER = new BasicAttributeSensorAndConfigKey<ZooKeeperNode>(
-            ZooKeeperNode.class, "kafka.cluster.zookeeper", "The zookeeper for the cluster; if null a default be will created");
-
-    /** Spec for creating the default Kafka zookeeper entity. */
-    @SetFromFlag("zookeeperSpec")
-    BasicAttributeSensorAndConfigKey<EntitySpec<KafkaZooKeeper>> ZOOKEEPER_SPEC = new BasicAttributeSensorAndConfigKey(
-            EntitySpec.class, "kafka.cluster.zookeeperSpec", "Spec for creating the kafka zookeeper");
-
-    /** Spec for Kafka broker entities to be created. */
-    @SetFromFlag("brokerSpec")
-    BasicAttributeSensorAndConfigKey<EntitySpec<KafkaBroker>> BROKER_SPEC = new BasicAttributeSensorAndConfigKey(
-            EntitySpec.class, "kafka.cluster.brokerSpec", "Spec for Kafka broker entiites to be created");
-
-    /** Underlying Kafka broker cluster. */
-    AttributeSensor<DynamicCluster> CLUSTER = new BasicAttributeSensor<DynamicCluster>(
-            DynamicCluster.class, "kafka.cluster.brokerCluster", "Underlying Kafka broker cluster");
-
-    ZooKeeperNode getZooKeeper();
-
-    DynamicCluster getCluster();
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaClusterImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaClusterImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaClusterImpl.java
deleted file mode 100644
index a95adf9..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaClusterImpl.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.AbstractEntity;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.feed.ConfigToAttributes;
-import org.apache.brooklyn.core.location.Locations;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperNode;
-import org.apache.brooklyn.util.collections.MutableList;
-import org.apache.brooklyn.util.exceptions.CompoundRuntimeException;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-
-/**
- * Implementation of a Kafka cluster containing a {@link KafkaZookeeper} node and a group of {@link KafkaBroker}s.
- */
-public class KafkaClusterImpl extends AbstractEntity implements KafkaCluster {
-
-    public static final Logger log = LoggerFactory.getLogger(KafkaClusterImpl.class);
-
-    public KafkaClusterImpl() {
-    }
-
-    @Override
-    public void init() {
-        super.init();
-        
-        sensors().set(SERVICE_UP, false);
-        ConfigToAttributes.apply(this, BROKER_SPEC);
-        ConfigToAttributes.apply(this, ZOOKEEPER);
-        ConfigToAttributes.apply(this, ZOOKEEPER_SPEC);
-
-        log.debug("creating zookeeper child for {}", this);
-        ZooKeeperNode zookeeper = getAttribute(ZOOKEEPER);
-        if (zookeeper == null) {
-            EntitySpec<KafkaZooKeeper> zookeeperSpec = getAttribute(ZOOKEEPER_SPEC);
-            if (zookeeperSpec == null) {
-                log.debug("creating zookeeper using default spec for {}", this);
-                zookeeperSpec = EntitySpec.create(KafkaZooKeeper.class);
-                sensors().set(ZOOKEEPER_SPEC, zookeeperSpec);
-            } else {
-                log.debug("creating zookeeper using custom spec for {}", this);
-            }
-            zookeeper = addChild(zookeeperSpec);
-            sensors().set(ZOOKEEPER, zookeeper);
-        }
-
-        log.debug("creating cluster child for {}", this);
-        EntitySpec<KafkaBroker> brokerSpec = getAttribute(BROKER_SPEC);
-        if (brokerSpec == null) {
-            log.debug("creating default broker spec for {}", this);
-            brokerSpec = EntitySpec.create(KafkaBroker.class);
-            sensors().set(BROKER_SPEC, brokerSpec);
-        }
-        // Relies on initialSize being inherited by DynamicCluster, because key id is identical
-        // We add the zookeeper configuration to the KafkaBroker specification here
-        DynamicCluster cluster = addChild(EntitySpec.create(DynamicCluster.class)
-                .configure("memberSpec", EntitySpec.create(brokerSpec).configure(KafkaBroker.ZOOKEEPER, zookeeper)));
-        sensors().set(CLUSTER, cluster);
-        
-        connectSensors();
-    }
-
-    @Override
-    public ZooKeeperNode getZooKeeper() {
-        return getAttribute(ZOOKEEPER);
-    }
-
-    @Override
-    public DynamicCluster getCluster() {
-        return getAttribute(CLUSTER);
-    }
-
-    @Override
-    public void start(Collection<? extends Location> locations) {
-        if (isLegacyConstruction()) {
-            // TODO should no longer be needed?
-            init();
-        }
-
-        locations = MutableList.copyOf(Locations.getLocationsCheckingAncestors(locations, this));
-
-        Iterables.getOnlyElement(locations); // Assert just one
-        // set it; here we don't allow changing locations
-        addLocations(locations);
-
-        List<Entity> childrenToStart = MutableList.<Entity>of(getCluster());
-        // Set the KafkaZookeeper entity as child of cluster, if it does not already have a parent
-        if (getZooKeeper().getParent() == null) {
-            addChild(getZooKeeper());
-        } // And only start zookeeper if we are parent
-        if (Objects.equal(this, getZooKeeper().getParent())) childrenToStart.add(getZooKeeper());
-        Entities.invokeEffector(this, childrenToStart, Startable.START, ImmutableMap.of("locations", locations)).getUnchecked();
-    }
-
-    @Override
-    public void stop() {
-        List<Exception> errors = Lists.newArrayList();
-        if (getZooKeeper() != null && Objects.equal(this, getZooKeeper().getParent())) {
-            try {
-                getZooKeeper().stop();
-            } catch (Exception e) {
-                errors.add(e);
-            }
-        }
-        if (getCurrentSize() > 0) {
-            try {
-                getCluster().stop();
-            } catch (Exception e) {
-                errors.add(e);
-            }
-        }
-
-        clearLocations();
-        sensors().set(SERVICE_UP, false);
-
-        if (errors.size() != 0) {
-            throw new CompoundRuntimeException("Error stopping Kafka cluster", errors);
-        }
-    }
-
-    @Override
-    public void restart() {
-        // TODO prod the entities themselves to restart, instead?
-        Collection<Location> locations = Lists.newArrayList(getLocations());
-
-        stop();
-        start(locations);
-    }
-
-    void connectSensors() {
-        enrichers().add(Enrichers.builder()
-                .propagatingAllBut(SERVICE_UP)
-                .from(getCluster())
-                .build());
-        enrichers().add(Enrichers.builder()
-                .propagating(SERVICE_UP)
-                .from(getZooKeeper())
-                .build());
-    }
-
-    /*
-     * All Group and Resizable interface methods are delegated to the broker cluster.
-     */
-
-    /** {@inheritDoc} */
-    @Override
-    public Collection<Entity> getMembers() { return getCluster().getMembers(); }
-
-    /** {@inheritDoc} */
-    @Override
-    public boolean hasMember(Entity member) { return getCluster().hasMember(member); }
-
-    /** {@inheritDoc} */
-    @Override
-    public boolean addMember(Entity member) { return getCluster().addMember(member); }
-
-    /** {@inheritDoc} */
-    @Override
-    public boolean removeMember(Entity member) { return getCluster().removeMember(member); }
-
-    /** {@inheritDoc} */
-    @Override
-    public Integer getCurrentSize() { return getCluster().getCurrentSize(); }
-
-    /** {@inheritDoc} */
-    @Override
-    public Integer resize(Integer desiredSize) { return getCluster().resize(desiredSize); }
-
-    @Override
-    public <T extends Entity> T addMemberChild(EntitySpec<T> spec) { return getCluster().addMemberChild(spec); }
-
-    @Override
-    public <T extends Entity> T addMemberChild(T child) { return getCluster().addMemberChild(child); }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeper.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeper.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeper.java
deleted file mode 100644
index 5aee6d2..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeper.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.annotation.Effector;
-import org.apache.brooklyn.core.annotation.EffectorParam;
-import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.entity.zookeeper.ZooKeeperNode;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.time.Duration;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single Kafka zookeeper instance.
- */
-@ImplementedBy(KafkaZooKeeperImpl.class)
-public interface KafkaZooKeeper extends ZooKeeperNode, Kafka {
-
-    @SetFromFlag("startTimeout")
-    ConfigKey<Duration> START_TIMEOUT = SoftwareProcess.START_TIMEOUT;
-
-    /** The Kafka version, not the Zookeeper version. */
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = Kafka.SUGGESTED_VERSION;
-    
-    /** The Kafka version, not the Zookeeper version. */
-    @SetFromFlag("downloadUrl")
-    BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = Kafka.DOWNLOAD_URL;
-
-    /** Location of the kafka configuration file template to be copied to the server. */
-    @SetFromFlag("kafkaZookeeperConfig")
-    ConfigKey<String> KAFKA_ZOOKEEPER_CONFIG_TEMPLATE = new BasicConfigKey<String>(String.class,
-            "kafka.zookeeper.configTemplate", "Kafka zookeeper configuration template (in freemarker format)",
-            "classpath://org/apache/brooklyn/entity/messaging/kafka/zookeeper.properties");
-
-    @Effector(description = "Create a topic with a single partition and only one replica")
-    void createTopic(@EffectorParam(name = "topic") String topic);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeperDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeperDriver.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeperDriver.java
deleted file mode 100644
index c1b7ad7..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeperDriver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-
-public interface KafkaZooKeeperDriver extends JavaSoftwareProcessDriver {
-
-    Integer getZookeeperPort();
-
-    void createTopic(String topic);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeperImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeperImpl.java b/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeperImpl.java
deleted file mode 100644
index 4f919e5..0000000
--- a/brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeperImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.messaging.kafka;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.core.annotation.EffectorParam;
-import org.apache.brooklyn.entity.zookeeper.AbstractZooKeeperImpl;
-
-/**
- * An {@link org.apache.brooklyn.api.entity.Entity} that represents a single Kafka zookeeper instance.
- */
-public class KafkaZooKeeperImpl extends AbstractZooKeeperImpl implements KafkaZooKeeper {
-
-    @SuppressWarnings("unused")
-    private static final Logger log = LoggerFactory.getLogger(KafkaZooKeeperImpl.class);
-
-    public KafkaZooKeeperImpl() {
-    }
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return KafkaZooKeeperDriver.class;
-    }
-
-    @Override
-    public void createTopic(String topic) {
-        ((KafkaZooKeeperDriver)getDriver()).createTopic(topic);
-    }
-}


[16/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeImpl.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeImpl.java
deleted file mode 100644
index 43bf4b2..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeImpl.java
+++ /dev/null
@@ -1,606 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.math.BigInteger;
-import java.net.Socket;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
-
-import javax.annotation.Nullable;
-import javax.management.ObjectName;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.location.MachineLocation;
-import org.apache.brooklyn.api.location.MachineProvisioningLocation;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.effector.EffectorBody;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.location.Machines;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.java.JavaAppUtils;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.feed.function.FunctionFeed;
-import org.apache.brooklyn.feed.function.FunctionPollConfig;
-import org.apache.brooklyn.feed.jmx.JmxAttributePollConfig;
-import org.apache.brooklyn.feed.jmx.JmxFeed;
-import org.apache.brooklyn.feed.jmx.JmxHelper;
-import org.apache.brooklyn.feed.jmx.JmxOperationPollConfig;
-import org.apache.brooklyn.policy.enricher.RollingTimeWindowMeanEnricher;
-import org.apache.brooklyn.policy.enricher.TimeWeightedDeltaEnricher;
-import org.apache.brooklyn.util.collections.MutableSet;
-import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.apache.brooklyn.util.core.text.TemplateProcessor;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.guava.Functionals;
-import org.apache.brooklyn.util.guava.Maybe;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-import com.google.common.base.Joiner;
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-import com.google.common.base.Splitter;
-import com.google.common.base.Throwables;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
-import com.google.common.net.HostAndPort;
-
-/**
- * Implementation of {@link CassandraNode}.
- */
-public class CassandraNodeImpl extends SoftwareProcessImpl implements CassandraNode {
-
-    private static final Logger log = LoggerFactory.getLogger(CassandraNodeImpl.class);
-
-    private final AtomicReference<Boolean> detectedCloudSensors = new AtomicReference<Boolean>(false);
-    
-    public CassandraNodeImpl() {
-    }
-    
-    @Override
-    public void init() {
-        super.init();
-        
-        // TODO PERSISTENCE WORKAROUND kept anonymous class in case referenced in persisted state
-        new EffectorBody<String>() {
-            @Override
-            public String call(ConfigBag parameters) {
-                return executeScript((String)parameters.getStringKey("commands"));
-            }
-        };
-        
-        getMutableEntityType().addEffector(EXECUTE_SCRIPT, new ExecuteScriptEffectorBody(this));
-        
-        Entities.checkRequiredUrl(this, getCassandraConfigTemplateUrl());
-        Entities.getRequiredUrlConfig(this, CASSANDRA_RACKDC_CONFIG_TEMPLATE_URL);
-        
-        connectEnrichers();
-    }
-    
-    private static class ExecuteScriptEffectorBody extends EffectorBody<String> {
-        private final CassandraNode entity;
-        
-        public ExecuteScriptEffectorBody(CassandraNode entity) {
-            this.entity = entity;
-        }
-        @Override
-        public String call(ConfigBag parameters) {
-            return entity.executeScript((String)parameters.getStringKey("commands"));
-        }
-    }
-    
-    /**
-     * Some clouds (e.g. Rackspace) give us VMs that have two nics: one for private and one for public.
-     * If the private IP is used then it doesn't work, even for a cluster purely internal to Rackspace!
-     * 
-     * TODO Ugly. Need to understand more and find a better fix. Perhaps in Cassandra itself if necessary.
-     * Also need to investigate further:
-     *  - does it still fail if BroadcastAddress is set to private IP?
-     *  - is `openIptables` opening it up for both interfaces?
-     *  - for aws->rackspace comms between nodes (thus using the public IP), will it be listening on an accessible port?
-     *  - ideally do a check, open a server on one port on the machine, see if it is contactable on the public address;
-     *    and set that as a flag on the cloud
-     */
-    protected void setCloudPreferredSensorNames() {
-        if (detectedCloudSensors.get()) return;
-        synchronized (detectedCloudSensors) {
-            if (detectedCloudSensors.get()) return;
-
-            MachineProvisioningLocation<?> loc = getProvisioningLocation();
-            if (loc != null) {
-                try {
-                    Method method = loc.getClass().getMethod("getProvider");
-                    method.setAccessible(true);
-                    String provider = (String) method.invoke(loc);
-                    String result = "(nothing special)";
-                    if (provider!=null) {
-                        if (provider.contains("rackspace") || provider.contains("cloudservers") || provider.contains("softlayer")) {
-                            /* These clouds have 2 NICs and it has to be consistent, so use public IP here to allow external access;
-                             * (TODO internal access could be configured to improve performance / lower cost, 
-                             * if we know all nodes are visible to each other) */
-                            if (getConfig(LISTEN_ADDRESS_SENSOR)==null)
-                                config().set(LISTEN_ADDRESS_SENSOR, CassandraNode.ADDRESS.getName());
-                            if (getConfig(BROADCAST_ADDRESS_SENSOR)==null)
-                                config().set(BROADCAST_ADDRESS_SENSOR, CassandraNode.ADDRESS.getName());
-                            result = "public IP for both listen and broadcast";
-                        } else if (provider.contains("google-compute")) {
-                            /* Google nodes cannot reach themselves/each-other on the public IP,
-                             * and there is no hostname, so use private IP here */
-                            if (getConfig(LISTEN_ADDRESS_SENSOR)==null)
-                                config().set(LISTEN_ADDRESS_SENSOR, CassandraNode.SUBNET_HOSTNAME.getName());
-                            if (getConfig(BROADCAST_ADDRESS_SENSOR)==null)
-                                config().set(BROADCAST_ADDRESS_SENSOR, CassandraNode.SUBNET_HOSTNAME.getName());
-                            result = "private IP for both listen and broadcast";
-                        }
-                    }
-                    log.debug("Cassandra NICs inferred {} for {}; using location {}, based on provider {}", new Object[] {result, this, loc, provider});
-                } catch (Exception e) {
-                    log.debug("Cassandra NICs auto-detection failed for {} in location {}: {}", new Object[] {this, loc, e});
-                }
-            }
-            detectedCloudSensors.set(true);
-        }
-    }
-    
-    @Override
-    protected void preStart() {
-        super.preStart();
-        setCloudPreferredSensorNames();
-    }
-    
-    // Used for freemarker
-    public String getMajorMinorVersion() {
-        String version = getConfig(CassandraNode.SUGGESTED_VERSION);
-        if (Strings.isBlank(version)) return "";
-        List<String> versionParts = ImmutableList.copyOf(Splitter.on(".").split(version));
-        return versionParts.get(0) + (versionParts.size() > 1 ? "."+versionParts.get(1) : "");
-    }
-    
-    public String getCassandraConfigTemplateUrl() {
-        String templatedUrl = getConfig(CassandraNode.CASSANDRA_CONFIG_TEMPLATE_URL);
-        return TemplateProcessor.processTemplateContents(templatedUrl, this, ImmutableMap.<String, Object>of());
-    }
-
-    @Override public Integer getGossipPort() { return getAttribute(CassandraNode.GOSSIP_PORT); }
-    @Override public Integer getSslGossipPort() { return getAttribute(CassandraNode.SSL_GOSSIP_PORT); }
-    @Override public Integer getThriftPort() { return getAttribute(CassandraNode.THRIFT_PORT); }
-    @Override public Integer getNativeTransportPort() { return getAttribute(CassandraNode.NATIVE_TRANSPORT_PORT); }
-    @Override public String getClusterName() { return getAttribute(CassandraNode.CLUSTER_NAME); }
-    
-    @Override public int getNumTokensPerNode() {
-        return getConfig(CassandraNode.NUM_TOKENS_PER_NODE);
-    }
-
-    @Override public Set<BigInteger> getTokens() {
-        // Prefer an already-set attribute over the config.
-        // Prefer TOKENS over TOKEN.
-        Set<BigInteger> tokens = getAttribute(CassandraNode.TOKENS);
-        if (tokens == null) {
-            tokens = getConfig(CassandraNode.TOKENS);
-        }
-        return tokens;
-    }
-    
-    @Override public String getTokensAsString() {
-        // TODO check what is required when replacing failed node.
-        // with vnodes in Cassandra 2.x, don't bother supplying token
-        Set<BigInteger> tokens = getTokens();
-        if (tokens == null) return "";
-        return Joiner.on(",").join(tokens);
-    }
-    
-    @Override public String getListenAddress() {
-        String sensorName = getConfig(LISTEN_ADDRESS_SENSOR);
-        if (Strings.isNonBlank(sensorName))
-            return Entities.submit(this, DependentConfiguration.attributeWhenReady(this, Sensors.newStringSensor(sensorName))).getUnchecked();
-        
-        String subnetAddress = getAttribute(CassandraNode.SUBNET_ADDRESS);
-        return Strings.isNonBlank(subnetAddress) ? subnetAddress : getAttribute(CassandraNode.ADDRESS);
-    }
-    
-    @Override public String getBroadcastAddress() {
-        String sensorName = getConfig(BROADCAST_ADDRESS_SENSOR);
-        if (Strings.isNonBlank(sensorName))
-            return Entities.submit(this, DependentConfiguration.attributeWhenReady(this, Sensors.newStringSensor(sensorName))).getUnchecked();
-        
-        String snitchName = getConfig(CassandraNode.ENDPOINT_SNITCH_NAME);
-        if (snitchName.equals("Ec2MultiRegionSnitch") || snitchName.contains("MultiCloudSnitch")) {
-            // http://www.datastax.com/documentation/cassandra/2.0/mobile/cassandra/architecture/architectureSnitchEC2MultiRegion_c.html
-            // describes that the listen_address is set to the private IP, and the broadcast_address is set to the public IP.
-            return getAttribute(CassandraNode.ADDRESS);
-        } else if (!getDriver().isClustered()) {
-            return getListenAddress();
-        } else {
-            // In other situations, prefer the hostname, so other regions can see it
-            // *Unless* hostname resolves at the target to a local-only interface which is different to ADDRESS
-            // (workaround for issue deploying to localhost)
-            String hostname = getAttribute(CassandraNode.HOSTNAME);
-            try {
-                String resolvedAddress = getDriver().getResolvedAddress(hostname);
-                if (resolvedAddress==null) {
-                    log.debug("Cassandra using broadcast address "+getListenAddress()+" for "+this+" because hostname "+hostname+" could not be resolved at remote machine");
-                    return getListenAddress();
-                }
-                if (resolvedAddress.equals("127.0.0.1")) {
-                    log.debug("Cassandra using broadcast address "+getListenAddress()+" for "+this+" because hostname "+hostname+" resolves to 127.0.0.1");
-                    return getListenAddress();                    
-                }
-                return hostname;
-            } catch (Exception e) {
-                Exceptions.propagateIfFatal(e);
-                log.warn("Error resolving hostname "+hostname+" for "+this+": "+e, e);
-                return hostname;
-            }
-        }
-    }
-    /** not always the private IP, if public IP has been insisted on for broadcast, e.g. setting up a rack topology */
-    // have not confirmed this does the right thing in all clouds ... only used for rack topology however
-    public String getPrivateIp() {
-        String sensorName = getConfig(BROADCAST_ADDRESS_SENSOR);
-        if (Strings.isNonBlank(sensorName)) {
-            return getAttribute(Sensors.newStringSensor(sensorName));
-        } else {
-            String subnetAddress = getAttribute(CassandraNode.SUBNET_ADDRESS);
-            return Strings.isNonBlank(subnetAddress) ? subnetAddress : getAttribute(CassandraNode.ADDRESS);
-        }
-    }
-    public String getPublicIp() {
-        // may need to be something else in google
-        return getAttribute(CassandraNode.ADDRESS);
-    }
-
-    @Override public String getRpcAddress() {
-        String sensorName = getConfig(RPC_ADDRESS_SENSOR);
-        if (Strings.isNonBlank(sensorName))
-            return Entities.submit(this, DependentConfiguration.attributeWhenReady(this, Sensors.newStringSensor(sensorName))).getUnchecked();
-        return "0.0.0.0";
-    }
-    
-    @Override public String getSeeds() { 
-        Set<Entity> seeds = getConfig(CassandraNode.INITIAL_SEEDS);
-        if (seeds==null) {
-            log.warn("No seeds available when requested for "+this, new Throwable("source of no Cassandra seeds when requested"));
-            return null;
-        }
-        String snitchName = getConfig(CassandraNode.ENDPOINT_SNITCH_NAME);
-        MutableSet<String> seedsHostnames = MutableSet.of();
-        for (Entity entity : seeds) {
-            // tried removing ourselves if there are other nodes, but that is a BAD idea!
-            // blows up with a "java.lang.RuntimeException: No other nodes seen!"
-            
-            if (snitchName.equals("Ec2MultiRegionSnitch") || snitchName.contains("MultiCloudSnitch")) {
-                // http://www.datastax.com/documentation/cassandra/2.0/mobile/cassandra/architecture/architectureSnitchEC2MultiRegion_c.html
-                // says the seeds should be public IPs.
-                seedsHostnames.add(entity.getAttribute(CassandraNode.ADDRESS));
-            } else {
-                String sensorName = getConfig(BROADCAST_ADDRESS_SENSOR);
-                if (Strings.isNonBlank(sensorName)) {
-                    seedsHostnames.add(entity.getAttribute(Sensors.newStringSensor(sensorName)));
-                } else {
-                    Maybe<String> optionalSeedHostname = Machines.findSubnetOrPublicHostname(entity);
-                    if (optionalSeedHostname.isPresent()) {
-                        String seedHostname = optionalSeedHostname.get();
-                        seedsHostnames.add(seedHostname);
-                    } else {
-                        log.warn("In node {}, seed hostname missing for {}; not including in seeds list", this, entity);
-                    }
-                }
-            }
-        }
-        
-        String result = Strings.join(seedsHostnames, ",");
-        log.info("Seeds for {}: {}", this, result);
-        return result;
-    }
-
-    // referenced by cassandra-rackdc.properties, read by some of the cassandra snitches
-    public String getDatacenterName() {
-        String name = getAttribute(CassandraNode.DATACENTER_NAME);
-        if (name == null) {
-            MachineLocation machine = getMachineOrNull();
-            MachineProvisioningLocation<?> provisioningLocation = getProvisioningLocation();
-            if (machine != null) {
-                name = machine.getConfig(CloudLocationConfig.CLOUD_REGION_ID);
-            }
-            if (name == null && provisioningLocation != null) {
-                name = provisioningLocation.getConfig(CloudLocationConfig.CLOUD_REGION_ID);
-            }
-            if (name == null) {
-                name = "UNKNOWN_DATACENTER";
-            }
-            sensors().set((AttributeSensor<String>)DATACENTER_NAME, name);
-        }
-        return name;
-    }
-
-    public String getRackName() {
-        String name = getAttribute(CassandraNode.RACK_NAME);
-        if (name == null) {
-            MachineLocation machine = getMachineOrNull();
-            MachineProvisioningLocation<?> provisioningLocation = getProvisioningLocation();
-            if (machine != null) {
-                name = machine.getConfig(CloudLocationConfig.CLOUD_AVAILABILITY_ZONE_ID);
-            }
-            if (name == null && provisioningLocation != null) {
-                name = provisioningLocation.getConfig(CloudLocationConfig.CLOUD_AVAILABILITY_ZONE_ID);
-            }
-            if (name == null) {
-                name = "UNKNOWN_RACK";
-            }
-            sensors().set((AttributeSensor<String>)RACK_NAME, name);
-        }
-        return name;
-    }
-
-    @Override
-    public Class<? extends CassandraNodeDriver> getDriverInterface() {
-        return CassandraNodeDriver.class;
-    }
-    
-    @Override
-    public CassandraNodeDriver getDriver() {
-        return (CassandraNodeDriver) super.getDriver();
-    }
-
-    private volatile JmxFeed jmxFeed;
-    private volatile FunctionFeed functionFeed;
-    private JmxFeed jmxMxBeanFeed;
-    private JmxHelper jmxHelper;
-    private ObjectName storageServiceMBean = JmxHelper.createObjectName("org.apache.cassandra.db:type=StorageService");
-    private ObjectName readStageMBean = JmxHelper.createObjectName("org.apache.cassandra.request:type=ReadStage");
-    private ObjectName mutationStageMBean = JmxHelper.createObjectName("org.apache.cassandra.request:type=MutationStage");
-    private ObjectName snitchMBean = JmxHelper.createObjectName("org.apache.cassandra.db:type=EndpointSnitchInfo");
-
-    
-    @SuppressWarnings({ "unchecked", "rawtypes" })
-    @Override
-    protected void connectSensors() {
-        // "cassandra" isn't really a protocol, but okay for now
-        sensors().set(DATASTORE_URL, "cassandra://"+getAttribute(HOSTNAME)+":"+getAttribute(THRIFT_PORT));
-        
-        super.connectSensors();
-
-        jmxHelper = new JmxHelper(this);
-        boolean retrieveUsageMetrics = getConfig(RETRIEVE_USAGE_METRICS);
-        
-        if (getDriver().isJmxEnabled()) {
-            jmxFeed = JmxFeed.builder()
-                    .entity(this)
-                    .period(3000, TimeUnit.MILLISECONDS)
-                    .helper(jmxHelper)
-                    .pollAttribute(new JmxAttributePollConfig<Boolean>(SERVICE_UP_JMX)
-                            .objectName(storageServiceMBean)
-                            .attributeName("Initialized")
-                            .onSuccess(Functions.forPredicate(Predicates.notNull()))
-                            .onException(Functions.constant(false))
-                            .suppressDuplicates(true))
-                    .pollAttribute(new JmxAttributePollConfig<Set<BigInteger>>(TOKENS)
-                            .objectName(storageServiceMBean)
-                            .attributeName("TokenToEndpointMap")
-                            .onSuccess(new Function<Object, Set<BigInteger>>() {
-                                @Override
-                                public Set<BigInteger> apply(@Nullable Object arg) {
-                                    Map input = (Map)arg;
-                                    if (input == null || input.isEmpty()) return null;
-                                    // FIXME does not work on aws-ec2, uses RFC1918 address
-                                    Predicate<String> self = Predicates.in(ImmutableList.of(getAttribute(HOSTNAME), getAttribute(ADDRESS), getAttribute(SUBNET_ADDRESS), getAttribute(SUBNET_HOSTNAME)));
-                                    Set<String> tokens = Maps.filterValues(input, self).keySet();
-                                    Set<BigInteger> result = Sets.newLinkedHashSet();
-                                    for (String token : tokens) {
-                                        result.add(new BigInteger(token));
-                                    }
-                                    return result;
-                                }})
-                            .onException(Functions.<Set<BigInteger>>constant(null))
-                            .suppressDuplicates(true))
-                    .pollOperation(new JmxOperationPollConfig<String>(DATACENTER_NAME)
-                            .period(60, TimeUnit.SECONDS)
-                            .objectName(snitchMBean)
-                            .operationName("getDatacenter")
-                            .operationParams(ImmutableList.of(getBroadcastAddress()))
-                            .onException(Functions.<String>constant(null))
-                            .suppressDuplicates(true))
-                    .pollOperation(new JmxOperationPollConfig<String>(RACK_NAME)
-                            .period(60, TimeUnit.SECONDS)
-                            .objectName(snitchMBean)
-                            .operationName("getRack")
-                            .operationParams(ImmutableList.of(getBroadcastAddress()))
-                            .onException(Functions.<String>constant(null))
-                            .suppressDuplicates(true))
-                    .pollAttribute(new JmxAttributePollConfig<Integer>(PEERS)
-                            .objectName(storageServiceMBean)
-                            .attributeName("TokenToEndpointMap")
-                            .onSuccess(new Function<Object, Integer>() {
-                                @Override
-                                public Integer apply(@Nullable Object arg) {
-                                    Map input = (Map)arg;
-                                    if (input == null || input.isEmpty()) return 0;
-                                    return input.size();
-                                }
-                            })
-                            .onException(Functions.constant(-1)))
-                    .pollAttribute(new JmxAttributePollConfig<Integer>(LIVE_NODE_COUNT)
-                            .objectName(storageServiceMBean)
-                            .attributeName("LiveNodes")
-                            .onSuccess(new Function<Object, Integer>() {
-                                @Override
-                                public Integer apply(@Nullable Object arg) {
-                                    List input = (List)arg;
-                                    if (input == null || input.isEmpty()) return 0;
-                                    return input.size();
-                                }
-                            })
-                            .onException(Functions.constant(-1)))
-                    .pollAttribute(new JmxAttributePollConfig<Integer>(READ_ACTIVE)
-                            .objectName(readStageMBean)
-                            .attributeName("ActiveCount")
-                            .onException(Functions.constant((Integer)null))
-                            .enabled(retrieveUsageMetrics))
-                    .pollAttribute(new JmxAttributePollConfig<Long>(READ_PENDING)
-                            .objectName(readStageMBean)
-                            .attributeName("PendingTasks")
-                            .onException(Functions.constant((Long)null))
-                            .enabled(retrieveUsageMetrics))
-                    .pollAttribute(new JmxAttributePollConfig<Long>(READ_COMPLETED)
-                            .objectName(readStageMBean)
-                            .attributeName("CompletedTasks")
-                            .onException(Functions.constant((Long)null))
-                            .enabled(retrieveUsageMetrics))
-                    .pollAttribute(new JmxAttributePollConfig<Integer>(WRITE_ACTIVE)
-                            .objectName(mutationStageMBean)
-                            .attributeName("ActiveCount")
-                            .onException(Functions.constant((Integer)null))
-                            .enabled(retrieveUsageMetrics))
-                    .pollAttribute(new JmxAttributePollConfig<Long>(WRITE_PENDING)
-                            .objectName(mutationStageMBean)
-                            .attributeName("PendingTasks")
-                            .onException(Functions.constant((Long)null))
-                            .enabled(retrieveUsageMetrics))
-                    .pollAttribute(new JmxAttributePollConfig<Long>(WRITE_COMPLETED)
-                            .objectName(mutationStageMBean)
-                            .attributeName("CompletedTasks")
-                            .onException(Functions.constant((Long)null))
-                            .enabled(retrieveUsageMetrics))
-                    .build();
-            
-            jmxMxBeanFeed = JavaAppUtils.connectMXBeanSensors(this);
-        }
-        
-        if (Boolean.TRUE.equals(getConfig(USE_THRIFT_MONITORING))) {
-            functionFeed = FunctionFeed.builder()
-                    .entity(this)
-                    .period(3000, TimeUnit.MILLISECONDS)
-                    .poll(new FunctionPollConfig<Long, Long>(THRIFT_PORT_LATENCY)
-                            .onException(Functions.constant(-1L))
-                            .callable(new ThriftLatencyChecker(CassandraNodeImpl.this))
-                            .enabled(retrieveUsageMetrics))
-                    .build();
-        }
-        
-        connectServiceUpIsRunning();
-    }
-    
-    protected void connectEnrichers() {
-        connectEnrichers(Duration.TEN_SECONDS);
-    }
-    
-    protected void connectEnrichers(Duration windowPeriod) {
-        JavaAppUtils.connectJavaAppServerPolicies(this);
-
-        enrichers().add(TimeWeightedDeltaEnricher.<Long>getPerSecondDeltaEnricher(this, READ_COMPLETED, READS_PER_SECOND_LAST));
-        enrichers().add(TimeWeightedDeltaEnricher.<Long>getPerSecondDeltaEnricher(this, WRITE_COMPLETED, WRITES_PER_SECOND_LAST));
-        
-        if (windowPeriod!=null) {
-            enrichers().add(new RollingTimeWindowMeanEnricher<Long>(this, THRIFT_PORT_LATENCY, 
-                    THRIFT_PORT_LATENCY_IN_WINDOW, windowPeriod));
-            enrichers().add(new RollingTimeWindowMeanEnricher<Double>(this, READS_PER_SECOND_LAST, 
-                    READS_PER_SECOND_IN_WINDOW, windowPeriod));
-            enrichers().add(new RollingTimeWindowMeanEnricher<Double>(this, WRITES_PER_SECOND_LAST, 
-                    WRITES_PER_SECOND_IN_WINDOW, windowPeriod));
-        }
-        
-        // service-up checks
-        if (Boolean.TRUE.equals(getConfig(USE_THRIFT_MONITORING))) {
-            enrichers().add(Enrichers.builder().updatingMap(Attributes.SERVICE_NOT_UP_INDICATORS)
-                    .from(THRIFT_PORT_LATENCY)
-                    .computing(Functionals.ifEquals(-1L).value("Thrift latency polling failed") )
-                    .build());
-        }
-        
-        if (Boolean.TRUE.equals(getConfig(UsesJmx.USE_JMX))) {
-            enrichers().add(Enrichers.builder().updatingMap(Attributes.SERVICE_NOT_UP_INDICATORS)
-                    .from(SERVICE_UP_JMX)
-                    .computing(Functionals.ifEquals(false).value("JMX reports not up") )
-                    .build());
-        }
-    }
-    
-    @Override
-    public void disconnectSensors() {
-        super.disconnectSensors();
-        
-        disconnectServiceUpIsRunning();
-        if (jmxFeed != null) jmxFeed.stop();
-        if (jmxMxBeanFeed != null) jmxMxBeanFeed.stop();
-        if (jmxHelper != null) jmxHelper.terminate();
-        if (functionFeed != null) functionFeed.stop();
-    }
-
-    @Override
-    public void setToken(String token) {
-        try {
-            if (!jmxHelper.isConnected()) jmxHelper.connect();;
-            jmxHelper.operation(storageServiceMBean, "move", token);
-            log.info("Moved server {} to token {}", getId(), token);
-        } catch (IOException ioe) {
-            Throwables.propagate(ioe);
-        }
-    }
-    
-    @Override
-    public String executeScript(String commands) {
-        return getDriver().executeScriptAsync(commands).block().getStdout();
-    }
-    
-    private static class ThriftLatencyChecker implements Callable<Long> {
-        private final CassandraNode entity;
-        
-        public ThriftLatencyChecker(CassandraNode entity) {
-            this.entity = entity;
-        }
-        public Long call() {
-            Integer privatePort = entity.getThriftPort();
-            if (privatePort == null) return -1L;
-            
-            HostAndPort hp = BrooklynAccessUtils.getBrooklynAccessibleAddress(entity, privatePort);
-
-            try {
-                long start = System.currentTimeMillis();
-                Socket s = new Socket(hp.getHostText(), hp.getPort());
-                s.close();
-                long latency = System.currentTimeMillis() - start;
-                return latency;
-            } catch (Exception e) {
-                Exceptions.propagateIfFatal(e);
-                if (log.isDebugEnabled())
-                    log.debug("Cassandra thrift port poll failure: "+e);
-                return -1L;
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeSshDriver.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeSshDriver.java
deleted file mode 100644
index d3230f9..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraNodeSshDriver.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.mgmt.TaskWrapper;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.location.Machines;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-
-import org.apache.brooklyn.entity.database.DatastoreMixins;
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.collections.MutableSet;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.task.Tasks;
-import org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper;
-import org.apache.brooklyn.util.core.text.TemplateProcessor;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.guava.Maybe;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.stream.Streams;
-import org.apache.brooklyn.util.text.Identifiers;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.time.Time;
-
-/**
- * Start a {@link CassandraNode} in a {@link Location} accessible over ssh.
- */
-public class CassandraNodeSshDriver extends JavaSoftwareProcessSshDriver implements CassandraNodeDriver {
-
-    private static final Logger log = LoggerFactory.getLogger(CassandraNodeSshDriver.class);
-
-    protected Maybe<String> resolvedAddressCache = Maybe.absent();
-
-    public CassandraNodeSshDriver(CassandraNodeImpl entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    protected String getLogFileLocation() { return Os.mergePathsUnix(getRunDir(),"cassandra.log"); }
-
-    @Override
-    public Integer getGossipPort() { return entity.getAttribute(CassandraNode.GOSSIP_PORT); }
-
-    @Override
-    public Integer getSslGossipPort() { return entity.getAttribute(CassandraNode.SSL_GOSSIP_PORT); }
-
-    @Override
-    public Integer getThriftPort() { return entity.getAttribute(CassandraNode.THRIFT_PORT); }
-
-    @Override
-    public Integer getNativeTransportPort() { return entity.getAttribute(CassandraNode.NATIVE_TRANSPORT_PORT); }
-
-    @Override
-    public String getClusterName() { return entity.getAttribute(CassandraNode.CLUSTER_NAME); }
-
-    @Override
-    public String getCassandraConfigTemplateUrl() {
-        String templatedUrl = entity.getConfig(CassandraNode.CASSANDRA_CONFIG_TEMPLATE_URL);
-        return TemplateProcessor.processTemplateContents(templatedUrl, this, ImmutableMap.<String, Object>of());
-    }
-
-    @Override
-    public String getCassandraConfigFileName() { return entity.getConfig(CassandraNode.CASSANDRA_CONFIG_FILE_NAME); }
-
-    public String getEndpointSnitchName() { return entity.getConfig(CassandraNode.ENDPOINT_SNITCH_NAME); }
-
-    public String getCassandraRackdcConfigTemplateUrl() { return entity.getConfig(CassandraNode.CASSANDRA_RACKDC_CONFIG_TEMPLATE_URL); }
-
-    public String getCassandraRackdcConfigFileName() { return entity.getConfig(CassandraNode.CASSANDRA_RACKDC_CONFIG_FILE_NAME); }
-
-    public String getMirrorUrl() { return entity.getConfig(CassandraNode.MIRROR_URL); }
-
-    protected String getDefaultUnpackedDirectoryName() {
-        return "apache-cassandra-"+getVersion();
-    }
-
-    protected boolean isV2() {
-        String version = getVersion();
-        return version.startsWith("2.");
-    }
-
-    @Override
-    public boolean installJava() {
-        if (isV2()) {
-            return checkForAndInstallJava("1.8");
-        } else {
-            return super.installJava();
-        }
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(getDefaultUnpackedDirectoryName())));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = ImmutableList.<String>builder()
-                .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-                .add(BashCommands.INSTALL_TAR)
-                .add("tar xzfv " + saveAs)
-                .build();
-
-        newScript(INSTALLING)
-                .body.append(commands)
-                .execute();
-    }
-
-    @Override
-    public Set<Integer> getPortsUsed() {
-        return ImmutableSet.<Integer>builder()
-                .addAll(super.getPortsUsed())
-                .addAll(getPortMap().values())
-                .build();
-    }
-
-    protected Map<String, Integer> getPortMap() {
-        return ImmutableMap.<String, Integer>builder()
-                .put("jmxPort", entity.getAttribute(UsesJmx.JMX_PORT))
-                .put("rmiPort", entity.getAttribute(UsesJmx.RMI_REGISTRY_PORT))
-                .put("gossipPort", getGossipPort())
-                .put("sslGossipPort", getSslGossipPort())
-                .put("thriftPort", getThriftPort())
-                .build();
-    }
-
-    @Override
-    public void customize() {
-        log.debug("Customizing {} (Cluster {})", entity, getClusterName());
-        Networking.checkPortsValid(getPortMap());
-
-        customizeInitialSeeds();
-
-        String logFileEscaped = getLogFileLocation().replace("/", "\\/"); // escape slashes
-
-        ImmutableList.Builder<String> commands = new ImmutableList.Builder<String>()
-                .add(String.format("cp -R %s/{bin,conf,lib,interface,pylib,tools} .", getExpandedInstallDir()))
-                .add("mkdir -p data")
-                .add("mkdir -p brooklyn_commands")
-                .add(String.format("sed -i.bk 's/log4j.appender.R.File=.*/log4j.appender.R.File=%s/g' %s/conf/log4j-server.properties", logFileEscaped, getRunDir()))
-                .add(String.format("sed -i.bk '/JMX_PORT/d' %s/conf/cassandra-env.sh", getRunDir()))
-                // Script sets 180k on Linux which gives Java error:  The stack size specified is too small, Specify at least 228k
-                .add(String.format("sed -i.bk 's/-Xss180k/-Xss280k/g' %s/conf/cassandra-env.sh", getRunDir()));
-
-        newScript(CUSTOMIZING)
-                .body.append(commands.build())
-                .failOnNonZeroResultCode()
-                .execute();
-
-        // Copy the cassandra.yaml configuration file across
-        String destinationConfigFile = Os.mergePathsUnix(getRunDir(), "conf", getCassandraConfigFileName());
-        copyTemplate(getCassandraConfigTemplateUrl(), destinationConfigFile);
-
-        // Copy the cassandra-rackdc.properties configuration file across
-        String rackdcDestinationFile = Os.mergePathsUnix(getRunDir(), "conf", getCassandraRackdcConfigFileName());
-        copyTemplate(getCassandraRackdcConfigTemplateUrl(), rackdcDestinationFile);
-
-        customizeCopySnitch();
-    }
-
-    protected void customizeCopySnitch() {
-        // Copy the custom snitch jar file across
-        String customSnitchJarUrl = entity.getConfig(CassandraNode.CUSTOM_SNITCH_JAR_URL);
-        if (Strings.isNonBlank(customSnitchJarUrl)) {
-            int lastSlashIndex = customSnitchJarUrl.lastIndexOf("/");
-            String customSnitchJarName = (lastSlashIndex > 0) ? customSnitchJarUrl.substring(lastSlashIndex+1) : "customBrooklynSnitch.jar";
-            String jarDestinationFile = Os.mergePathsUnix(getRunDir(), "lib", customSnitchJarName);
-            InputStream customSnitchJarStream = checkNotNull(resource.getResourceFromUrl(customSnitchJarUrl), "%s could not be loaded", customSnitchJarUrl);
-            try {
-                getMachine().copyTo(customSnitchJarStream, jarDestinationFile);
-            } finally {
-                Streams.closeQuietly(customSnitchJarStream);
-            }
-        }
-    }
-
-    protected void customizeInitialSeeds() {
-        if (entity.getConfig(CassandraNode.INITIAL_SEEDS)==null) {
-            if (isClustered()) {
-                entity.config().set(CassandraNode.INITIAL_SEEDS,
-                    DependentConfiguration.attributeWhenReady(entity.getParent(), CassandraDatacenter.CURRENT_SEEDS));
-            } else {
-                entity.config().set(CassandraNode.INITIAL_SEEDS, MutableSet.<Entity>of(entity));
-            }
-        }
-    }
-
-    @Override
-    public boolean isClustered() {
-        return entity.getParent() instanceof CassandraDatacenter;
-    }
-
-    @Override
-    public void launch() {
-        String subnetHostname = Machines.findSubnetOrPublicHostname(entity).get();
-        Set<Entity> seeds = getEntity().getConfig(CassandraNode.INITIAL_SEEDS);
-        List<Entity> ancestors = getCassandraAncestors();
-        log.info("Launching " + entity + ": " +
-                "cluster "+getClusterName()+", " +
-                "hostname (public) " + getEntity().getAttribute(Attributes.HOSTNAME) + ", " +
-                "hostname (subnet) " + subnetHostname + ", " +
-                "seeds "+((CassandraNode)entity).getSeeds()+" (from "+seeds+")");
-
-        boolean isFirst = seeds.iterator().next().equals(entity);
-        if (isClustered() && !isFirst && CassandraDatacenter.WAIT_FOR_FIRST) {
-            // wait for the first node
-            long firstStartTime = Entities.submit(entity, DependentConfiguration.attributeWhenReady(
-                ancestors.get(ancestors.size()-1), CassandraDatacenter.FIRST_NODE_STARTED_TIME_UTC)).getUnchecked();
-            // optionally force a delay before starting subsequent nodes; see comment at CassandraCluster.DELAY_AFTER_FIRST
-            Duration toWait = Duration.millis(firstStartTime + CassandraDatacenter.DELAY_AFTER_FIRST.toMilliseconds() -  System.currentTimeMillis());
-            if (toWait.toMilliseconds()>0) {
-                log.info("Launching " + entity + ": delaying launch of non-first node by "+toWait+" to prevent schema disagreements");
-                Tasks.setBlockingDetails("Pausing to ensure first node has time to start");
-                Time.sleep(toWait);
-                Tasks.resetBlockingDetails();
-            }
-        }
-
-        List<Entity> queuedStart = null;
-        if (CassandraDatacenter.DELAY_BETWEEN_STARTS!=null && !ancestors.isEmpty()) {
-            Entity root = ancestors.get(ancestors.size()-1);
-            // TODO currently use the class as a semaphore; messy, and obviously will not federate;
-            // should develop a brooklyn framework semaphore (similar to that done on SshMachineLocation)
-            // and use it - note however the synch block is very very short so relatively safe at least
-            synchronized (CassandraNode.class) {
-                queuedStart = root.getAttribute(CassandraDatacenter.QUEUED_START_NODES);
-                if (queuedStart==null) {
-                    queuedStart = new ArrayList<Entity>();
-                    ((EntityLocal)root).sensors().set(CassandraDatacenter.QUEUED_START_NODES, queuedStart);
-                }
-                queuedStart.add(getEntity());
-                ((EntityLocal)root).sensors().set(CassandraDatacenter.QUEUED_START_NODES, queuedStart);
-            }
-            do {
-                // get it again in case it is backed by something external
-                queuedStart = root.getAttribute(CassandraDatacenter.QUEUED_START_NODES);
-                if (queuedStart.get(0).equals(getEntity())) break;
-                synchronized (queuedStart) {
-                    try {
-                        queuedStart.wait(1000);
-                    } catch (InterruptedException e) {
-                        Exceptions.propagate(e);
-                    }
-                }
-            } while (true);
-
-            // TODO should look at last start time... but instead we always wait
-            CassandraDatacenter.DELAY_BETWEEN_STARTS.countdownTimer().waitForExpiryUnchecked();
-        }
-
-        try {
-            // Relies on `bin/cassandra -p <pidfile>`, rather than us writing pid file ourselves.
-            newScript(MutableMap.of(USE_PID_FILE, false), LAUNCHING)
-                    .body.append(
-                            // log the date to attempt to debug occasional http://wiki.apache.org/cassandra/FAQ#schema_disagreement
-                            // (can be caused by machines out of synch time-wise; but in our case it seems to be caused by other things!)
-                            "echo date on cassandra server `hostname` when launching is `date`",
-                            launchEssentialCommand(),
-                            "echo after essential command")
-                    .execute();
-            if (!isClustered()) {
-                InputStream creationScript = DatastoreMixins.getDatabaseCreationScript(entity);
-                if (creationScript!=null) {
-                    Tasks.setBlockingDetails("Pausing to ensure Cassandra (singleton) has started before running creation script");
-                    Time.sleep(Duration.seconds(20));
-                    Tasks.resetBlockingDetails();
-                    executeScriptAsync(Streams.readFullyString(creationScript));
-                }
-            }
-            if (isClustered() && isFirst) {
-                for (Entity ancestor: getCassandraAncestors()) {
-                    ((EntityLocal)ancestor).sensors().set(CassandraDatacenter.FIRST_NODE_STARTED_TIME_UTC, System.currentTimeMillis());
-                }
-            }
-        } finally {
-            if (queuedStart!=null) {
-                Entity head = queuedStart.remove(0);
-                checkArgument(head.equals(getEntity()), "first queued node was "+head+" but we are "+getEntity());
-                synchronized (queuedStart) {
-                    queuedStart.notifyAll();
-                }
-            }
-        }
-    }
-
-    /** returns cassandra-related ancestors (datacenter, fabric), with datacenter first and fabric last */
-    protected List<Entity> getCassandraAncestors() {
-        List<Entity> result = new ArrayList<Entity>();
-        Entity ancestor = getEntity().getParent();
-        while (ancestor!=null) {
-            if (ancestor instanceof CassandraDatacenter || ancestor instanceof CassandraFabric)
-                result.add(ancestor);
-            ancestor = ancestor.getParent();
-        }
-        return result;
-    }
-
-    protected String launchEssentialCommand() {
-        if (isV2()) {
-            return String.format("./bin/cassandra -p %s > ./cassandra-console.log 2>&1", getPidFile());
-        } else {
-            // TODO Could probably get rid of the nohup here, as script does equivalent itself
-            // with `exec ... <&- &`
-            return String.format("nohup ./bin/cassandra -p %s > ./cassandra-console.log 2>&1 &", getPidFile());
-        }
-    }
-
-    public String getPidFile() { return Os.mergePathsUnix(getRunDir(), "cassandra.pid"); }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of(USE_PID_FILE, getPidFile()), CHECK_RUNNING).execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(MutableMap.of(USE_PID_FILE, getPidFile()), STOPPING).execute();
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    protected Map<String,String> getCustomJavaSystemProperties() {
-        return MutableMap.<String, String>builder()
-                .putAll(super.getCustomJavaSystemProperties())
-                .put("cassandra.config", getCassandraConfigFileName())
-                .build();
-    }
-
-    @Override
-    public Map<String, String> getShellEnvironment() {
-        return MutableMap.<String, String>builder()
-                .putAll(super.getShellEnvironment())
-                .put("CASSANDRA_HOME", getRunDir())
-                .put("CASSANDRA_CONF", Os.mergePathsUnix(getRunDir(), "conf"))
-                .renameKey("JAVA_OPTS", "JVM_OPTS")
-                .build();
-    }
-
-    @Override
-    public ProcessTaskWrapper<Integer> executeScriptAsync(String commands) {
-        String fileToRun = Os.mergePathsUnix("brooklyn_commands", "cassandra-commands-"+Identifiers.makeRandomId(8));
-        TaskWrapper<Void> task = SshEffectorTasks.put(Os.mergePathsUnix(getRunDir(), fileToRun))
-                .machine(getMachine())
-                .contents(commands)
-                .summary("copying cassandra script to execute "+fileToRun)
-                .newTask();
-        DynamicTasks.queueIfPossible(task).orSubmitAndBlock(getEntity()).andWaitForSuccess();
-        return executeScriptFromInstalledFileAsync(fileToRun);
-    }
-
-    public ProcessTaskWrapper<Integer> executeScriptFromInstalledFileAsync(String fileToRun) {
-        ProcessTaskWrapper<Integer> task = SshEffectorTasks.ssh(
-                        "cd "+getRunDir(),
-                        scriptInvocationCommand(getThriftPort(), fileToRun))
-                .machine(getMachine())
-                .summary("executing cassandra script "+fileToRun)
-                .newTask();
-        DynamicTasks.queueIfPossible(task).orSubmitAndBlock(getEntity());
-        return task;
-    }
-
-    protected String scriptInvocationCommand(Integer optionalThriftPort, String fileToRun) {
-        return "bin/cassandra-cli " +
-                (optionalThriftPort != null ? "--port " + optionalThriftPort : "") +
-                " --file "+fileToRun;
-    }
-
-    @Override
-    public String getResolvedAddress(String hostname) {
-        return resolvedAddressCache.or(BrooklynAccessUtils.resolvedAddressSupplier(getEntity(), getMachine(), hostname));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/TokenGenerator.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/TokenGenerator.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/TokenGenerator.java
deleted file mode 100644
index 6401c03..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/TokenGenerator.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import java.math.BigInteger;
-import java.util.Set;
-
-public interface TokenGenerator {
-
-    BigInteger max();
-    BigInteger min();
-    BigInteger range();
-
-    void setOrigin(BigInteger shift);
-    
-    BigInteger newToken();
-    
-    BigInteger getTokenForReplacementNode(BigInteger oldToken);
-    
-    Set<BigInteger> getTokensForReplacementNode(Set<BigInteger> oldTokens);
-    
-    /**
-     * Indicates that we are starting a new cluster of the given number of nodes,
-     * so expect that number of consecutive calls to {@link #newToken()}.
-     * 
-     * @param numNewNodes
-     */
-    void growingCluster(int numNewNodes);
-
-    void shrinkingCluster(Set<BigInteger> nodesToRemove);
-    
-    void refresh(Set<BigInteger> currentNodes);
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/TokenGenerators.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/TokenGenerators.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/TokenGenerators.java
deleted file mode 100644
index f29a813..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/TokenGenerators.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.cassandra;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.io.Serializable;
-import java.math.BigInteger;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.brooklyn.util.collections.MutableList;
-
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-
-public class TokenGenerators {
-
-    /**
-     * Sub-classes are recommended to call {@link #checkRangeValid()} at construction time.
-     */
-    public static abstract class AbstractTokenGenerator implements TokenGenerator, Serializable {
-        
-        private static final long serialVersionUID = -1884526356161711176L;
-        
-        public static final BigInteger TWO = BigInteger.valueOf(2);
-        
-        public abstract BigInteger max();
-        public abstract BigInteger min();
-        public abstract BigInteger range();
-
-        private final Set<BigInteger> currentTokens = Sets.newTreeSet();
-        private final List<BigInteger> nextTokens = Lists.newArrayList();
-        private BigInteger origin = BigInteger.ZERO;
-        
-        protected void checkRangeValid() {
-            Preconditions.checkState(range().equals(max().subtract(min()).add(BigInteger.ONE)), 
-                    "min=%s; max=%s; range=%s", min(), max(), range());
-        }
-        
-        @Override
-        public void setOrigin(BigInteger shift) {
-            this.origin = Preconditions.checkNotNull(shift, "shift");
-        }
-        
-        /**
-         * Unless we're explicitly starting a new cluster or resizing by a pre-defined number of nodes, then
-         * let Cassandra decide (i.e. return null).
-         */
-        @Override
-        public synchronized BigInteger newToken() {
-            BigInteger result = (nextTokens.isEmpty()) ? null : nextTokens.remove(0);
-            if (result != null) currentTokens.add(result);
-            return result;
-        }
-
-        @Override
-        public synchronized BigInteger getTokenForReplacementNode(BigInteger oldToken) {
-            checkNotNull(oldToken, "oldToken");
-            return normalize(oldToken.subtract(BigInteger.ONE));
-        }
-
-        @Override
-        public synchronized Set<BigInteger> getTokensForReplacementNode(Set<BigInteger> oldTokens) {
-            checkNotNull(oldTokens, "oldToken");
-            Set<BigInteger> result = Sets.newLinkedHashSet();
-            for (BigInteger oldToken : oldTokens) {
-                result.add(getTokenForReplacementNode(oldToken));
-            }
-            return result;
-        }
-        
-        @Override
-        public synchronized void growingCluster(int numNewNodes) {
-            if (currentTokens.isEmpty() && nextTokens.isEmpty()) {
-                nextTokens.addAll(generateEquidistantTokens(numNewNodes));
-            } else {
-                // simple strategy which iteratively finds best midpoint
-                for (int i=0; i<numNewNodes; i++) {
-                    nextTokens.add(generateBestNextToken());
-                }
-            }
-        }
-
-        @Override
-        public synchronized void shrinkingCluster(Set<BigInteger> nodesToRemove) {
-            currentTokens.remove(nodesToRemove);
-        }
-
-        @Override
-        public synchronized void refresh(Set<BigInteger> currentNodes) {
-            currentTokens.clear();
-            currentTokens.addAll(currentNodes);
-        }
-
-        private List<BigInteger> generateEquidistantTokens(int numTokens) {
-            List<BigInteger> result = Lists.newArrayList();
-            for (int i = 0; i < numTokens; i++) {
-                BigInteger token = range().multiply(BigInteger.valueOf(i)).divide(BigInteger.valueOf(numTokens)).add(min());
-                token = normalize(token.add(origin));
-                result.add(token);
-            }
-            return result;
-        }
-        
-        private BigInteger normalize(BigInteger input) {
-            while (input.compareTo(min()) < 0)
-                input = input.add(range());
-            while (input.compareTo(max()) > 0)
-                input = input.subtract(range());
-            return input;
-        }
-        
-        private BigInteger generateBestNextToken() {
-            List<BigInteger> allTokens = MutableList.<BigInteger>of().appendAll(currentTokens).appendAll(nextTokens);
-            Collections.sort(allTokens);
-            Iterator<BigInteger> ti = allTokens.iterator();
-            
-            BigInteger thisValue = ti.next();
-            BigInteger prevValue = allTokens.get(allTokens.size()-1).subtract(range());
-            
-            BigInteger bestNewTokenSoFar = normalize(prevValue.add(thisValue).divide(TWO));
-            BigInteger biggestRangeSizeSoFar = thisValue.subtract(prevValue);
-            
-            while (ti.hasNext()) {
-                prevValue = thisValue;
-                thisValue = ti.next();
-                
-                BigInteger rangeHere = thisValue.subtract(prevValue);
-                if (rangeHere.compareTo(biggestRangeSizeSoFar) > 0) {
-                    bestNewTokenSoFar = prevValue.add(thisValue).divide(TWO);
-                    biggestRangeSizeSoFar = rangeHere;
-                }
-            }
-            return bestNewTokenSoFar;
-        }
-
-    }
-
-    public static class PosNeg63TokenGenerator extends AbstractTokenGenerator {
-        private static final long serialVersionUID = 7327403957176106754L;
-        
-        public static final BigInteger MIN_TOKEN = TWO.pow(63).negate();
-        public static final BigInteger MAX_TOKEN = TWO.pow(63).subtract(BigInteger.ONE);
-        public static final BigInteger RANGE = TWO.pow(64);
-
-        public PosNeg63TokenGenerator() {
-            checkRangeValid();
-        }
-
-        @Override public BigInteger max() { return MAX_TOKEN; }
-        @Override public BigInteger min() { return MIN_TOKEN; }
-        @Override public BigInteger range() { return RANGE; }
-    }
-    
-    /** token generator used by cassandra pre v1.2 */
-    public static class NonNeg127TokenGenerator extends AbstractTokenGenerator {
-        private static final long serialVersionUID = 1357426905711548198L;
-        
-        public static final BigInteger MIN_TOKEN = BigInteger.ZERO;
-        public static final BigInteger MAX_TOKEN = TWO.pow(127).subtract(BigInteger.ONE);
-        public static final BigInteger RANGE = TWO.pow(127);
-
-        public NonNeg127TokenGenerator() {
-            checkRangeValid();
-        }
-        
-        @Override public BigInteger max() { return MAX_TOKEN; }
-        @Override public BigInteger min() { return MIN_TOKEN; }
-        @Override public BigInteger range() { return RANGE; }
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseCluster.java b/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseCluster.java
deleted file mode 100644
index dfff6a4..0000000
--- a/brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseCluster.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.couchbase;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.time.Duration;
-
-import com.google.common.reflect.TypeToken;
-
-@Catalog(name="CouchBase Cluster", description="Couchbase is an open source, distributed (shared-nothing architecture) "
-        + "NoSQL document-oriented database that is optimized for interactive applications.")
-@ImplementedBy(CouchbaseClusterImpl.class)
-public interface CouchbaseCluster extends DynamicCluster {
-
-    AttributeSensor<Integer> ACTUAL_CLUSTER_SIZE = Sensors.newIntegerSensor("coucbase.cluster.actualClusterSize", "returns the actual number of nodes in the cluster");
-
-    @SuppressWarnings("serial")
-    AttributeSensor<Set<Entity>> COUCHBASE_CLUSTER_UP_NODES = Sensors.newSensor(new TypeToken<Set<Entity>>() {
-    }, "couchbase.cluster.clusterEntities", "the set of service up nodes");
-
-    @SuppressWarnings("serial")
-    AttributeSensor<List<String>> COUCHBASE_CLUSTER_BUCKETS = Sensors.newSensor(new TypeToken<List<String>>() {
-    }, "couchbase.cluster.buckets", "Names of all the buckets the couchbase cluster");
-
-    AttributeSensor<Entity> COUCHBASE_PRIMARY_NODE = Sensors.newSensor(Entity.class, "couchbase.cluster.primaryNode", "The primary couchbase node to query and issue add-server and rebalance on");
-
-    AttributeSensor<Boolean> IS_CLUSTER_INITIALIZED = Sensors.newBooleanSensor("couchbase.cluster.isClusterInitialized", "flag to emit if the couchbase cluster was intialized");
-
-    @SetFromFlag("clusterName")
-    ConfigKey<String> CLUSTER_NAME = ConfigKeys.newStringConfigKey("couchbase.cluster.name", "Optional name for this cluster");
-
-    @SetFromFlag("intialQuorumSize")
-    ConfigKey<Integer> INITIAL_QUORUM_SIZE = ConfigKeys.newIntegerConfigKey("couchbase.cluster.intialQuorumSize", "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)",
-            -1);
-
-    @SetFromFlag("delayBeforeAdvertisingCluster")
-    ConfigKey<Duration> DELAY_BEFORE_ADVERTISING_CLUSTER = ConfigKeys.newConfigKey(Duration.class, "couchbase.cluster.delayBeforeAdvertisingCluster", "Delay after cluster is started before checking and advertising its availability", Duration.TEN_SECONDS);
-
-    // TODO not sure if this is needed; previously waited 3m (SERVICE_UP_TIME_OUT) but that seems absurdly long
-    @SetFromFlag("postStartStabilizationDelay")
-    ConfigKey<Duration> NODES_STARTED_STABILIZATION_DELAY = ConfigKeys.newConfigKey(Duration.class, "couchbase.cluster.postStartStabilizationDelay", "Delay after nodes have been started before treating it as a cluster", Duration.TEN_SECONDS);
-    
-    @SetFromFlag("adminUsername")
-    ConfigKey<String> COUCHBASE_ADMIN_USERNAME = CouchbaseNode.COUCHBASE_ADMIN_USERNAME;
-
-    @SetFromFlag("adminPassword")
-    ConfigKey<String> COUCHBASE_ADMIN_PASSWORD = CouchbaseNode.COUCHBASE_ADMIN_PASSWORD;
-
-    @SuppressWarnings("serial")
-    AttributeSensor<List<String>> COUCHBASE_CLUSTER_UP_NODE_ADDRESSES = Sensors.newSensor(new TypeToken<List<String>>() {},
-            "couchbase.cluster.node.addresses", "List of host:port of all active nodes in the cluster (http admin port, and public hostname/IP)");
-    AttributeSensor<String> COUCHBASE_CLUSTER_CONNECTION_URL = Sensors.newStringSensor(
-            "couchbase.cluster.connection.url", "Couchbase-style URL to connect to the cluster (e.g. http://127.0.0.1:8091/ or couchbase://10.0.0.1,10.0.0.2/)");
-    
-    // Interesting stats
-    AttributeSensor<Double> OPS_PER_NODE = Sensors.newDoubleSensor("couchbase.stats.cluster.per.node.ops", 
-            "Average across cluster for pools/nodes/<current node>/interestingStats/ops");
-    AttributeSensor<Double> EP_BG_FETCHED_PER_NODE = Sensors.newDoubleSensor("couchbase.stats.cluster.per.node.ep.bg.fetched", 
-            "Average across cluster for pools/nodes/<current node>/interestingStats/ep_bg_fetched");
-    AttributeSensor<Double> CURR_ITEMS_PER_NODE = Sensors.newDoubleSensor("couchbase.stats.cluster.per.node.curr.items", 
-            "Average across cluster for pools/nodes/<current node>/interestingStats/curr_items");
-    AttributeSensor<Double> VB_REPLICA_CURR_ITEMS_PER_NODE = Sensors.newDoubleSensor("couchbase.stats.cluster.per.node.vb.replica.curr.items", 
-            "Average across cluster for pools/nodes/<current node>/interestingStats/vb_replica_curr_items");
-    AttributeSensor<Double> GET_HITS_PER_NODE = Sensors.newDoubleSensor("couchbase.stats.cluster.per.node.get.hits", 
-            "Average across cluster for pools/nodes/<current node>/interestingStats/get_hits");
-    AttributeSensor<Double> CMD_GET_PER_NODE = Sensors.newDoubleSensor("couchbase.stats.cluster.per.node.cmd.get", 
-            "Average across cluster for pools/nodes/<current node>/interestingStats/cmd_get");
-    AttributeSensor<Double> CURR_ITEMS_TOT_PER_NODE = Sensors.newDoubleSensor("couchbase.stats.cluster.per.node.curr.items.tot", 
-            "Average across cluster for pools/nodes/<current node>/interestingStats/curr_items_tot");
-    // Although these are Double (after aggregation), they need to be coerced to Long for ByteSizeStrings rendering
-    AttributeSensor<Long> COUCH_DOCS_DATA_SIZE_PER_NODE = Sensors.newLongSensor("couchbase.stats.cluster.per.node.couch.docs.data.size", 
-            "Average across cluster for pools/nodes/<current node>/interestingStats/couch_docs_data_size");
-    AttributeSensor<Long> MEM_USED_PER_NODE = Sensors.newLongSensor("couchbase.stats.cluster.per.node.mem.used", 
-            "Average across cluster for pools/nodes/<current node>/interestingStats/mem_used");
-    AttributeSensor<Long> COUCH_VIEWS_ACTUAL_DISK_SIZE_PER_NODE = Sensors.newLongSensor("couchbase.stats.cluster.per.node.couch.views.actual.disk.size", 
-            "Average across cluster for pools/nodes/<current node>/interestingStats/couch_views_actual_disk_size");
-    AttributeSensor<Long> COUCH_DOCS_ACTUAL_DISK_SIZE_PER_NODE = Sensors.newLongSensor("couchbase.stats.cluster.per.node.couch.docs.actual.disk.size", 
-            "Average across cluster for pools/nodes/<current node>/interestingStats/couch_docs_actual_disk_size");
-    AttributeSensor<Long> COUCH_VIEWS_DATA_SIZE_PER_NODE = Sensors.newLongSensor("couchbase.stats.cluster.per.node.couch.views.data.size", 
-            "Average across cluster for pools/nodes/<current node>/interestingStats/couch_views_data_size");
-    
-    AttributeSensor<Boolean> BUCKET_CREATION_IN_PROGRESS = Sensors.newBooleanSensor("couchbase.cluster.bucketCreationInProgress", "Indicates that a bucket is currently being created, and" +
-            "further bucket creation should be deferred");
-
-    /**
-     * createBuckets is a list of all the buckets to be created on the couchbase cluster
-     * the buckets will be created on the primary node of the cluster
-     * each map entry for a bucket should contain the following parameters:
-     * - <"bucket",(String) name of the bucket (default: default)>
-     * - <"bucket-type",(String) name of bucket type (default: couchbase)>
-     * - <"bucket-port",(Integer) the bucket port to connect to (default: 11222)>
-     * - <"bucket-ramsize",(Integer) ram size allowed for bucket (default: 200)>
-     * - <"bucket-replica",(Integer) number of replicas for the bucket (default: 1)>
-     */
-    @SuppressWarnings("serial")
-    @SetFromFlag("createBuckets")
-    ConfigKey<List<Map<String, Object>>> CREATE_BUCKETS = ConfigKeys.newConfigKey(new TypeToken<List<Map<String, Object>>>() {}, 
-            "couchbase.cluster.createBuckets", "a list of all dedicated port buckets to be created on the couchbase cluster");
-    
-    @SuppressWarnings("serial")
-    @SetFromFlag("replication")
-    ConfigKey<List<Map<String,Object>>> REPLICATION = ConfigKeys.newConfigKey(new TypeToken<List<Map<String,Object>>>() {}, 
-            "couchbase.cluster.replicationConfiguration", "List of replication rules to configure, each rule including target (id of another cluster) and mode (unidirectional or bidirectional)");
-
-    int getQuorumSize();
-}


[39/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular.js
deleted file mode 100644
index 50a0512..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/angular.js
+++ /dev/null
@@ -1,21778 +0,0 @@
-/**
- * @license AngularJS v1.2.19
- * (c) 2010-2014 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, document, undefined) {'use strict';
-
-/**
- * @description
- *
- * This object provides a utility for producing rich Error messages within
- * Angular. It can be called as follows:
- *
- * var exampleMinErr = minErr('example');
- * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
- *
- * The above creates an instance of minErr in the example namespace. The
- * resulting error will have a namespaced error code of example.one.  The
- * resulting error will replace {0} with the value of foo, and {1} with the
- * value of bar. The object is not restricted in the number of arguments it can
- * take.
- *
- * If fewer arguments are specified than necessary for interpolation, the extra
- * interpolation markers will be preserved in the final string.
- *
- * Since data will be parsed statically during a build step, some restrictions
- * are applied with respect to how minErr instances are created and called.
- * Instances should have names of the form namespaceMinErr for a minErr created
- * using minErr('namespace') . Error codes, namespaces and template strings
- * should all be static strings, not variables or general expressions.
- *
- * @param {string} module The namespace to use for the new minErr instance.
- * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance
- */
-
-function minErr(module) {
-  return function () {
-    var code = arguments[0],
-      prefix = '[' + (module ? module + ':' : '') + code + '] ',
-      template = arguments[1],
-      templateArgs = arguments,
-      stringify = function (obj) {
-        if (typeof obj === 'function') {
-          return obj.toString().replace(/ \{[\s\S]*$/, '');
-        } else if (typeof obj === 'undefined') {
-          return 'undefined';
-        } else if (typeof obj !== 'string') {
-          return JSON.stringify(obj);
-        }
-        return obj;
-      },
-      message, i;
-
-    message = prefix + template.replace(/\{\d+\}/g, function (match) {
-      var index = +match.slice(1, -1), arg;
-
-      if (index + 2 < templateArgs.length) {
-        arg = templateArgs[index + 2];
-        if (typeof arg === 'function') {
-          return arg.toString().replace(/ ?\{[\s\S]*$/, '');
-        } else if (typeof arg === 'undefined') {
-          return 'undefined';
-        } else if (typeof arg !== 'string') {
-          return toJson(arg);
-        }
-        return arg;
-      }
-      return match;
-    });
-
-    message = message + '\nhttp://errors.angularjs.org/1.2.19/' +
-      (module ? module + '/' : '') + code;
-    for (i = 2; i < arguments.length; i++) {
-      message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
-        encodeURIComponent(stringify(arguments[i]));
-    }
-
-    return new Error(message);
-  };
-}
-
-/* We need to tell jshint what variables are being exported */
-/* global
-    -angular,
-    -msie,
-    -jqLite,
-    -jQuery,
-    -slice,
-    -push,
-    -toString,
-    -ngMinErr,
-    -angularModule,
-    -nodeName_,
-    -uid,
-    -VALIDITY_STATE_PROPERTY,
-
-    -lowercase,
-    -uppercase,
-    -manualLowercase,
-    -manualUppercase,
-    -nodeName_,
-    -isArrayLike,
-    -forEach,
-    -sortedKeys,
-    -forEachSorted,
-    -reverseParams,
-    -nextUid,
-    -setHashKey,
-    -extend,
-    -int,
-    -inherit,
-    -noop,
-    -identity,
-    -valueFn,
-    -isUndefined,
-    -isDefined,
-    -isObject,
-    -isString,
-    -isNumber,
-    -isDate,
-    -isArray,
-    -isFunction,
-    -isRegExp,
-    -isWindow,
-    -isScope,
-    -isFile,
-    -isBlob,
-    -isBoolean,
-    -trim,
-    -isElement,
-    -makeMap,
-    -map,
-    -size,
-    -includes,
-    -indexOf,
-    -arrayRemove,
-    -isLeafNode,
-    -copy,
-    -shallowCopy,
-    -equals,
-    -csp,
-    -concat,
-    -sliceArgs,
-    -bind,
-    -toJsonReplacer,
-    -toJson,
-    -fromJson,
-    -toBoolean,
-    -startingTag,
-    -tryDecodeURIComponent,
-    -parseKeyValue,
-    -toKeyValue,
-    -encodeUriSegment,
-    -encodeUriQuery,
-    -angularInit,
-    -bootstrap,
-    -snake_case,
-    -bindJQuery,
-    -assertArg,
-    -assertArgFn,
-    -assertNotHasOwnProperty,
-    -getter,
-    -getBlockElements,
-    -hasOwnProperty,
-
-*/
-
-////////////////////////////////////
-
-/**
- * @ngdoc module
- * @name ng
- * @module ng
- * @description
- *
- * # ng (core module)
- * The ng module is loaded by default when an AngularJS application is started. The module itself
- * contains the essential components for an AngularJS application to function. The table below
- * lists a high level breakdown of each of the services/factories, filters, directives and testing
- * components available within this core module.
- *
- * <div doc-module-components="ng"></div>
- */
-
-// The name of a form control's ValidityState property.
-// This is used so that it's possible for internal tests to create mock ValidityStates.
-var VALIDITY_STATE_PROPERTY = 'validity';
-
-/**
- * @ngdoc function
- * @name angular.lowercase
- * @module ng
- * @kind function
- *
- * @description Converts the specified string to lowercase.
- * @param {string} string String to be converted to lowercase.
- * @returns {string} Lowercased string.
- */
-var lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-/**
- * @ngdoc function
- * @name angular.uppercase
- * @module ng
- * @kind function
- *
- * @description Converts the specified string to uppercase.
- * @param {string} string String to be converted to uppercase.
- * @returns {string} Uppercased string.
- */
-var uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};
-
-
-var manualLowercase = function(s) {
-  /* jshint bitwise: false */
-  return isString(s)
-      ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})
-      : s;
-};
-var manualUppercase = function(s) {
-  /* jshint bitwise: false */
-  return isString(s)
-      ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})
-      : s;
-};
-
-
-// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish
-// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods
-// with correct but slower alternatives.
-if ('i' !== 'I'.toLowerCase()) {
-  lowercase = manualLowercase;
-  uppercase = manualUppercase;
-}
-
-
-var /** holds major version number for IE or NaN for real browsers */
-    msie,
-    jqLite,           // delay binding since jQuery could be loaded after us.
-    jQuery,           // delay binding
-    slice             = [].slice,
-    push              = [].push,
-    toString          = Object.prototype.toString,
-    ngMinErr          = minErr('ng'),
-
-    /** @name angular */
-    angular           = window.angular || (window.angular = {}),
-    angularModule,
-    nodeName_,
-    uid               = ['0', '0', '0'];
-
-/**
- * IE 11 changed the format of the UserAgent string.
- * See http://msdn.microsoft.com/en-us/library/ms537503.aspx
- */
-msie = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);
-if (isNaN(msie)) {
-  msie = int((/trident\/.*; rv:(\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);
-}
-
-
-/**
- * @private
- * @param {*} obj
- * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,
- *                   String ...)
- */
-function isArrayLike(obj) {
-  if (obj == null || isWindow(obj)) {
-    return false;
-  }
-
-  var length = obj.length;
-
-  if (obj.nodeType === 1 && length) {
-    return true;
-  }
-
-  return isString(obj) || isArray(obj) || length === 0 ||
-         typeof length === 'number' && length > 0 && (length - 1) in obj;
-}
-
-/**
- * @ngdoc function
- * @name angular.forEach
- * @module ng
- * @kind function
- *
- * @description
- * Invokes the `iterator` function once for each item in `obj` collection, which can be either an
- * object or an array. The `iterator` function is invoked with `iterator(value, key)`, where `value`
- * is the value of an object property or an array element and `key` is the object property key or
- * array element index. Specifying a `context` for the function is optional.
- *
- * It is worth noting that `.forEach` does not iterate over inherited properties because it filters
- * using the `hasOwnProperty` method.
- *
-   ```js
-     var values = {name: 'misko', gender: 'male'};
-     var log = [];
-     angular.forEach(values, function(value, key) {
-       this.push(key + ': ' + value);
-     }, log);
-     expect(log).toEqual(['name: misko', 'gender: male']);
-   ```
- *
- * @param {Object|Array} obj Object to iterate over.
- * @param {Function} iterator Iterator function.
- * @param {Object=} context Object to become context (`this`) for the iterator function.
- * @returns {Object|Array} Reference to `obj`.
- */
-function forEach(obj, iterator, context) {
-  var key;
-  if (obj) {
-    if (isFunction(obj)) {
-      for (key in obj) {
-        // Need to check if hasOwnProperty exists,
-        // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function
-        if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {
-          iterator.call(context, obj[key], key);
-        }
-      }
-    } else if (obj.forEach && obj.forEach !== forEach) {
-      obj.forEach(iterator, context);
-    } else if (isArrayLike(obj)) {
-      for (key = 0; key < obj.length; key++)
-        iterator.call(context, obj[key], key);
-    } else {
-      for (key in obj) {
-        if (obj.hasOwnProperty(key)) {
-          iterator.call(context, obj[key], key);
-        }
-      }
-    }
-  }
-  return obj;
-}
-
-function sortedKeys(obj) {
-  var keys = [];
-  for (var key in obj) {
-    if (obj.hasOwnProperty(key)) {
-      keys.push(key);
-    }
-  }
-  return keys.sort();
-}
-
-function forEachSorted(obj, iterator, context) {
-  var keys = sortedKeys(obj);
-  for ( var i = 0; i < keys.length; i++) {
-    iterator.call(context, obj[keys[i]], keys[i]);
-  }
-  return keys;
-}
-
-
-/**
- * when using forEach the params are value, key, but it is often useful to have key, value.
- * @param {function(string, *)} iteratorFn
- * @returns {function(*, string)}
- */
-function reverseParams(iteratorFn) {
-  return function(value, key) { iteratorFn(key, value); };
-}
-
-/**
- * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric
- * characters such as '012ABC'. The reason why we are not using simply a number counter is that
- * the number string gets longer over time, and it can also overflow, where as the nextId
- * will grow much slower, it is a string, and it will never overflow.
- *
- * @returns {string} an unique alpha-numeric string
- */
-function nextUid() {
-  var index = uid.length;
-  var digit;
-
-  while(index) {
-    index--;
-    digit = uid[index].charCodeAt(0);
-    if (digit == 57 /*'9'*/) {
-      uid[index] = 'A';
-      return uid.join('');
-    }
-    if (digit == 90  /*'Z'*/) {
-      uid[index] = '0';
-    } else {
-      uid[index] = String.fromCharCode(digit + 1);
-      return uid.join('');
-    }
-  }
-  uid.unshift('0');
-  return uid.join('');
-}
-
-
-/**
- * Set or clear the hashkey for an object.
- * @param obj object
- * @param h the hashkey (!truthy to delete the hashkey)
- */
-function setHashKey(obj, h) {
-  if (h) {
-    obj.$$hashKey = h;
-  }
-  else {
-    delete obj.$$hashKey;
-  }
-}
-
-/**
- * @ngdoc function
- * @name angular.extend
- * @module ng
- * @kind function
- *
- * @description
- * Extends the destination object `dst` by copying all of the properties from the `src` object(s)
- * to `dst`. You can specify multiple `src` objects.
- *
- * @param {Object} dst Destination object.
- * @param {...Object} src Source object(s).
- * @returns {Object} Reference to `dst`.
- */
-function extend(dst) {
-  var h = dst.$$hashKey;
-  forEach(arguments, function(obj) {
-    if (obj !== dst) {
-      forEach(obj, function(value, key) {
-        dst[key] = value;
-      });
-    }
-  });
-
-  setHashKey(dst,h);
-  return dst;
-}
-
-function int(str) {
-  return parseInt(str, 10);
-}
-
-
-function inherit(parent, extra) {
-  return extend(new (extend(function() {}, {prototype:parent}))(), extra);
-}
-
-/**
- * @ngdoc function
- * @name angular.noop
- * @module ng
- * @kind function
- *
- * @description
- * A function that performs no operations. This function can be useful when writing code in the
- * functional style.
-   ```js
-     function foo(callback) {
-       var result = calculateResult();
-       (callback || angular.noop)(result);
-     }
-   ```
- */
-function noop() {}
-noop.$inject = [];
-
-
-/**
- * @ngdoc function
- * @name angular.identity
- * @module ng
- * @kind function
- *
- * @description
- * A function that returns its first argument. This function is useful when writing code in the
- * functional style.
- *
-   ```js
-     function transformer(transformationFn, value) {
-       return (transformationFn || angular.identity)(value);
-     };
-   ```
- */
-function identity($) {return $;}
-identity.$inject = [];
-
-
-function valueFn(value) {return function() {return value;};}
-
-/**
- * @ngdoc function
- * @name angular.isUndefined
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is undefined.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is undefined.
- */
-function isUndefined(value){return typeof value === 'undefined';}
-
-
-/**
- * @ngdoc function
- * @name angular.isDefined
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is defined.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is defined.
- */
-function isDefined(value){return typeof value !== 'undefined';}
-
-
-/**
- * @ngdoc function
- * @name angular.isObject
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
- * considered to be objects. Note that JavaScript arrays are objects.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is an `Object` but not `null`.
- */
-function isObject(value){return value != null && typeof value === 'object';}
-
-
-/**
- * @ngdoc function
- * @name angular.isString
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `String`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `String`.
- */
-function isString(value){return typeof value === 'string';}
-
-
-/**
- * @ngdoc function
- * @name angular.isNumber
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `Number`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Number`.
- */
-function isNumber(value){return typeof value === 'number';}
-
-
-/**
- * @ngdoc function
- * @name angular.isDate
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a value is a date.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Date`.
- */
-function isDate(value) {
-  return toString.call(value) === '[object Date]';
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isArray
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is an `Array`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is an `Array`.
- */
-var isArray = (function() {
-  if (!isFunction(Array.isArray)) {
-    return function(value) {
-      return toString.call(value) === '[object Array]';
-    };
-  }
-  return Array.isArray;
-})();
-
-/**
- * @ngdoc function
- * @name angular.isFunction
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `Function`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Function`.
- */
-function isFunction(value){return typeof value === 'function';}
-
-
-/**
- * Determines if a value is a regular expression object.
- *
- * @private
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `RegExp`.
- */
-function isRegExp(value) {
-  return toString.call(value) === '[object RegExp]';
-}
-
-
-/**
- * Checks if `obj` is a window object.
- *
- * @private
- * @param {*} obj Object to check
- * @returns {boolean} True if `obj` is a window obj.
- */
-function isWindow(obj) {
-  return obj && obj.document && obj.location && obj.alert && obj.setInterval;
-}
-
-
-function isScope(obj) {
-  return obj && obj.$evalAsync && obj.$watch;
-}
-
-
-function isFile(obj) {
-  return toString.call(obj) === '[object File]';
-}
-
-
-function isBlob(obj) {
-  return toString.call(obj) === '[object Blob]';
-}
-
-
-function isBoolean(value) {
-  return typeof value === 'boolean';
-}
-
-
-var trim = (function() {
-  // native trim is way faster: http://jsperf.com/angular-trim-test
-  // but IE doesn't have it... :-(
-  // TODO: we should move this into IE/ES5 polyfill
-  if (!String.prototype.trim) {
-    return function(value) {
-      return isString(value) ? value.replace(/^\s\s*/, '').replace(/\s\s*$/, '') : value;
-    };
-  }
-  return function(value) {
-    return isString(value) ? value.trim() : value;
-  };
-})();
-
-
-/**
- * @ngdoc function
- * @name angular.isElement
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a DOM element (or wrapped jQuery element).
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
- */
-function isElement(node) {
-  return !!(node &&
-    (node.nodeName  // we are a direct element
-    || (node.prop && node.attr && node.find)));  // we have an on and find method part of jQuery API
-}
-
-/**
- * @param str 'key1,key2,...'
- * @returns {object} in the form of {key1:true, key2:true, ...}
- */
-function makeMap(str) {
-  var obj = {}, items = str.split(","), i;
-  for ( i = 0; i < items.length; i++ )
-    obj[ items[i] ] = true;
-  return obj;
-}
-
-
-if (msie < 9) {
-  nodeName_ = function(element) {
-    element = element.nodeName ? element : element[0];
-    return (element.scopeName && element.scopeName != 'HTML')
-      ? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName;
-  };
-} else {
-  nodeName_ = function(element) {
-    return element.nodeName ? element.nodeName : element[0].nodeName;
-  };
-}
-
-
-function map(obj, iterator, context) {
-  var results = [];
-  forEach(obj, function(value, index, list) {
-    results.push(iterator.call(context, value, index, list));
-  });
-  return results;
-}
-
-
-/**
- * @description
- * Determines the number of elements in an array, the number of properties an object has, or
- * the length of a string.
- *
- * Note: This function is used to augment the Object type in Angular expressions. See
- * {@link angular.Object} for more information about Angular arrays.
- *
- * @param {Object|Array|string} obj Object, array, or string to inspect.
- * @param {boolean} [ownPropsOnly=false] Count only "own" properties in an object
- * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.
- */
-function size(obj, ownPropsOnly) {
-  var count = 0, key;
-
-  if (isArray(obj) || isString(obj)) {
-    return obj.length;
-  } else if (isObject(obj)) {
-    for (key in obj)
-      if (!ownPropsOnly || obj.hasOwnProperty(key))
-        count++;
-  }
-
-  return count;
-}
-
-
-function includes(array, obj) {
-  return indexOf(array, obj) != -1;
-}
-
-function indexOf(array, obj) {
-  if (array.indexOf) return array.indexOf(obj);
-
-  for (var i = 0; i < array.length; i++) {
-    if (obj === array[i]) return i;
-  }
-  return -1;
-}
-
-function arrayRemove(array, value) {
-  var index = indexOf(array, value);
-  if (index >=0)
-    array.splice(index, 1);
-  return value;
-}
-
-function isLeafNode (node) {
-  if (node) {
-    switch (node.nodeName) {
-    case "OPTION":
-    case "PRE":
-    case "TITLE":
-      return true;
-    }
-  }
-  return false;
-}
-
-/**
- * @ngdoc function
- * @name angular.copy
- * @module ng
- * @kind function
- *
- * @description
- * Creates a deep copy of `source`, which should be an object or an array.
- *
- * * If no destination is supplied, a copy of the object or array is created.
- * * If a destination is provided, all of its elements (for array) or properties (for objects)
- *   are deleted and then all elements/properties from the source are copied to it.
- * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.
- * * If `source` is identical to 'destination' an exception will be thrown.
- *
- * @param {*} source The source that will be used to make a copy.
- *                   Can be any type, including primitives, `null`, and `undefined`.
- * @param {(Object|Array)=} destination Destination into which the source is copied. If
- *     provided, must be of the same type as `source`.
- * @returns {*} The copy or updated `destination`, if `destination` was specified.
- *
- * @example
- <example>
- <file name="index.html">
- <div ng-controller="Controller">
- <form novalidate class="simple-form">
- Name: <input type="text" ng-model="user.name" /><br />
- E-mail: <input type="email" ng-model="user.email" /><br />
- Gender: <input type="radio" ng-model="user.gender" value="male" />male
- <input type="radio" ng-model="user.gender" value="female" />female<br />
- <button ng-click="reset()">RESET</button>
- <button ng-click="update(user)">SAVE</button>
- </form>
- <pre>form = {{user | json}}</pre>
- <pre>master = {{master | json}}</pre>
- </div>
-
- <script>
- function Controller($scope) {
-    $scope.master= {};
-
-    $scope.update = function(user) {
-      // Example with 1 argument
-      $scope.master= angular.copy(user);
-    };
-
-    $scope.reset = function() {
-      // Example with 2 arguments
-      angular.copy($scope.master, $scope.user);
-    };
-
-    $scope.reset();
-  }
- </script>
- </file>
- </example>
- */
-function copy(source, destination, stackSource, stackDest) {
-  if (isWindow(source) || isScope(source)) {
-    throw ngMinErr('cpws',
-      "Can't copy! Making copies of Window or Scope instances is not supported.");
-  }
-
-  if (!destination) {
-    destination = source;
-    if (source) {
-      if (isArray(source)) {
-        destination = copy(source, [], stackSource, stackDest);
-      } else if (isDate(source)) {
-        destination = new Date(source.getTime());
-      } else if (isRegExp(source)) {
-        destination = new RegExp(source.source);
-      } else if (isObject(source)) {
-        destination = copy(source, {}, stackSource, stackDest);
-      }
-    }
-  } else {
-    if (source === destination) throw ngMinErr('cpi',
-      "Can't copy! Source and destination are identical.");
-
-    stackSource = stackSource || [];
-    stackDest = stackDest || [];
-
-    if (isObject(source)) {
-      var index = indexOf(stackSource, source);
-      if (index !== -1) return stackDest[index];
-
-      stackSource.push(source);
-      stackDest.push(destination);
-    }
-
-    var result;
-    if (isArray(source)) {
-      destination.length = 0;
-      for ( var i = 0; i < source.length; i++) {
-        result = copy(source[i], null, stackSource, stackDest);
-        if (isObject(source[i])) {
-          stackSource.push(source[i]);
-          stackDest.push(result);
-        }
-        destination.push(result);
-      }
-    } else {
-      var h = destination.$$hashKey;
-      forEach(destination, function(value, key) {
-        delete destination[key];
-      });
-      for ( var key in source) {
-        result = copy(source[key], null, stackSource, stackDest);
-        if (isObject(source[key])) {
-          stackSource.push(source[key]);
-          stackDest.push(result);
-        }
-        destination[key] = result;
-      }
-      setHashKey(destination,h);
-    }
-
-  }
-  return destination;
-}
-
-/**
- * Creates a shallow copy of an object, an array or a primitive
- */
-function shallowCopy(src, dst) {
-  if (isArray(src)) {
-    dst = dst || [];
-
-    for ( var i = 0; i < src.length; i++) {
-      dst[i] = src[i];
-    }
-  } else if (isObject(src)) {
-    dst = dst || {};
-
-    for (var key in src) {
-      if (hasOwnProperty.call(src, key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
-        dst[key] = src[key];
-      }
-    }
-  }
-
-  return dst || src;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.equals
- * @module ng
- * @kind function
- *
- * @description
- * Determines if two objects or two values are equivalent. Supports value types, regular
- * expressions, arrays and objects.
- *
- * Two objects or values are considered equivalent if at least one of the following is true:
- *
- * * Both objects or values pass `===` comparison.
- * * Both objects or values are of the same type and all of their properties are equal by
- *   comparing them with `angular.equals`.
- * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)
- * * Both values represent the same regular expression (In JavaScript,
- *   /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual
- *   representation matches).
- *
- * During a property comparison, properties of `function` type and properties with names
- * that begin with `$` are ignored.
- *
- * Scope and DOMWindow objects are being compared only by identify (`===`).
- *
- * @param {*} o1 Object or value to compare.
- * @param {*} o2 Object or value to compare.
- * @returns {boolean} True if arguments are equal.
- */
-function equals(o1, o2) {
-  if (o1 === o2) return true;
-  if (o1 === null || o2 === null) return false;
-  if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
-  var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
-  if (t1 == t2) {
-    if (t1 == 'object') {
-      if (isArray(o1)) {
-        if (!isArray(o2)) return false;
-        if ((length = o1.length) == o2.length) {
-          for(key=0; key<length; key++) {
-            if (!equals(o1[key], o2[key])) return false;
-          }
-          return true;
-        }
-      } else if (isDate(o1)) {
-        return isDate(o2) && o1.getTime() == o2.getTime();
-      } else if (isRegExp(o1) && isRegExp(o2)) {
-        return o1.toString() == o2.toString();
-      } else {
-        if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) || isArray(o2)) return false;
-        keySet = {};
-        for(key in o1) {
-          if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
-          if (!equals(o1[key], o2[key])) return false;
-          keySet[key] = true;
-        }
-        for(key in o2) {
-          if (!keySet.hasOwnProperty(key) &&
-              key.charAt(0) !== '$' &&
-              o2[key] !== undefined &&
-              !isFunction(o2[key])) return false;
-        }
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
-
-function csp() {
-  return (document.securityPolicy && document.securityPolicy.isActive) ||
-      (document.querySelector &&
-      !!(document.querySelector('[ng-csp]') || document.querySelector('[data-ng-csp]')));
-}
-
-
-function concat(array1, array2, index) {
-  return array1.concat(slice.call(array2, index));
-}
-
-function sliceArgs(args, startIndex) {
-  return slice.call(args, startIndex || 0);
-}
-
-
-/* jshint -W101 */
-/**
- * @ngdoc function
- * @name angular.bind
- * @module ng
- * @kind function
- *
- * @description
- * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
- * `fn`). You can supply optional `args` that are prebound to the function. This feature is also
- * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as
- * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).
- *
- * @param {Object} self Context which `fn` should be evaluated in.
- * @param {function()} fn Function to be bound.
- * @param {...*} args Optional arguments to be prebound to the `fn` function call.
- * @returns {function()} Function that wraps the `fn` with all the specified bindings.
- */
-/* jshint +W101 */
-function bind(self, fn) {
-  var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
-  if (isFunction(fn) && !(fn instanceof RegExp)) {
-    return curryArgs.length
-      ? function() {
-          return arguments.length
-            ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))
-            : fn.apply(self, curryArgs);
-        }
-      : function() {
-          return arguments.length
-            ? fn.apply(self, arguments)
-            : fn.call(self);
-        };
-  } else {
-    // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
-    return fn;
-  }
-}
-
-
-function toJsonReplacer(key, value) {
-  var val = value;
-
-  if (typeof key === 'string' && key.charAt(0) === '$') {
-    val = undefined;
-  } else if (isWindow(value)) {
-    val = '$WINDOW';
-  } else if (value &&  document === value) {
-    val = '$DOCUMENT';
-  } else if (isScope(value)) {
-    val = '$SCOPE';
-  }
-
-  return val;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.toJson
- * @module ng
- * @kind function
- *
- * @description
- * Serializes input into a JSON-formatted string. Properties with leading $ characters will be
- * stripped since angular uses this notation internally.
- *
- * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.
- * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.
- * @returns {string|undefined} JSON-ified string representing `obj`.
- */
-function toJson(obj, pretty) {
-  if (typeof obj === 'undefined') return undefined;
-  return JSON.stringify(obj, toJsonReplacer, pretty ? '  ' : null);
-}
-
-
-/**
- * @ngdoc function
- * @name angular.fromJson
- * @module ng
- * @kind function
- *
- * @description
- * Deserializes a JSON string.
- *
- * @param {string} json JSON string to deserialize.
- * @returns {Object|Array|string|number} Deserialized thingy.
- */
-function fromJson(json) {
-  return isString(json)
-      ? JSON.parse(json)
-      : json;
-}
-
-
-function toBoolean(value) {
-  if (typeof value === 'function') {
-    value = true;
-  } else if (value && value.length !== 0) {
-    var v = lowercase("" + value);
-    value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');
-  } else {
-    value = false;
-  }
-  return value;
-}
-
-/**
- * @returns {string} Returns the string representation of the element.
- */
-function startingTag(element) {
-  element = jqLite(element).clone();
-  try {
-    // turns out IE does not let you set .html() on elements which
-    // are not allowed to have children. So we just ignore it.
-    element.empty();
-  } catch(e) {}
-  // As Per DOM Standards
-  var TEXT_NODE = 3;
-  var elemHtml = jqLite('<div>').append(element).html();
-  try {
-    return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :
-        elemHtml.
-          match(/^(<[^>]+>)/)[1].
-          replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
-  } catch(e) {
-    return lowercase(elemHtml);
-  }
-
-}
-
-
-/////////////////////////////////////////////////
-
-/**
- * Tries to decode the URI component without throwing an exception.
- *
- * @private
- * @param str value potential URI component to check.
- * @returns {boolean} True if `value` can be decoded
- * with the decodeURIComponent function.
- */
-function tryDecodeURIComponent(value) {
-  try {
-    return decodeURIComponent(value);
-  } catch(e) {
-    // Ignore any invalid uri component
-  }
-}
-
-
-/**
- * Parses an escaped url query string into key-value pairs.
- * @returns {Object.<string,boolean|Array>}
- */
-function parseKeyValue(/**string*/keyValue) {
-  var obj = {}, key_value, key;
-  forEach((keyValue || "").split('&'), function(keyValue) {
-    if ( keyValue ) {
-      key_value = keyValue.split('=');
-      key = tryDecodeURIComponent(key_value[0]);
-      if ( isDefined(key) ) {
-        var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;
-        if (!obj[key]) {
-          obj[key] = val;
-        } else if(isArray(obj[key])) {
-          obj[key].push(val);
-        } else {
-          obj[key] = [obj[key],val];
-        }
-      }
-    }
-  });
-  return obj;
-}
-
-function toKeyValue(obj) {
-  var parts = [];
-  forEach(obj, function(value, key) {
-    if (isArray(value)) {
-      forEach(value, function(arrayValue) {
-        parts.push(encodeUriQuery(key, true) +
-                   (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
-      });
-    } else {
-    parts.push(encodeUriQuery(key, true) +
-               (value === true ? '' : '=' + encodeUriQuery(value, true)));
-    }
-  });
-  return parts.length ? parts.join('&') : '';
-}
-
-
-/**
- * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
- * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
- * segments:
- *    segment       = *pchar
- *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
- *    pct-encoded   = "%" HEXDIG HEXDIG
- *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
- *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
- *                     / "*" / "+" / "," / ";" / "="
- */
-function encodeUriSegment(val) {
-  return encodeUriQuery(val, true).
-             replace(/%26/gi, '&').
-             replace(/%3D/gi, '=').
-             replace(/%2B/gi, '+');
-}
-
-
-/**
- * This method is intended for encoding *key* or *value* parts of query component. We need a custom
- * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
- * encoded per http://tools.ietf.org/html/rfc3986:
- *    query       = *( pchar / "/" / "?" )
- *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
- *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
- *    pct-encoded   = "%" HEXDIG HEXDIG
- *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
- *                     / "*" / "+" / "," / ";" / "="
- */
-function encodeUriQuery(val, pctEncodeSpaces) {
-  return encodeURIComponent(val).
-             replace(/%40/gi, '@').
-             replace(/%3A/gi, ':').
-             replace(/%24/g, '$').
-             replace(/%2C/gi, ',').
-             replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
-}
-
-
-/**
- * @ngdoc directive
- * @name ngApp
- * @module ng
- *
- * @element ANY
- * @param {angular.Module} ngApp an optional application
- *   {@link angular.module module} name to load.
- *
- * @description
- *
- * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive
- * designates the **root element** of the application and is typically placed near the root element
- * of the page - e.g. on the `<body>` or `<html>` tags.
- *
- * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`
- * found in the document will be used to define the root element to auto-bootstrap as an
- * application. To run multiple applications in an HTML document you must manually bootstrap them using
- * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.
- *
- * You can specify an **AngularJS module** to be used as the root module for the application.  This
- * module will be loaded into the {@link auto.$injector} when the application is bootstrapped and
- * should contain the application code needed or have dependencies on other modules that will
- * contain the code. See {@link angular.module} for more information.
- *
- * In the example below if the `ngApp` directive were not placed on the `html` element then the
- * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`
- * would not be resolved to `3`.
- *
- * `ngApp` is the easiest, and most common, way to bootstrap an application.
- *
- <example module="ngAppDemo">
-   <file name="index.html">
-   <div ng-controller="ngAppDemoController">
-     I can add: {{a}} + {{b}} =  {{ a+b }}
-   </div>
-   </file>
-   <file name="script.js">
-   angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {
-     $scope.a = 1;
-     $scope.b = 2;
-   });
-   </file>
- </example>
- *
- */
-function angularInit(element, bootstrap) {
-  var elements = [element],
-      appElement,
-      module,
-      names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],
-      NG_APP_CLASS_REGEXP = /\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;
-
-  function append(element) {
-    element && elements.push(element);
-  }
-
-  forEach(names, function(name) {
-    names[name] = true;
-    append(document.getElementById(name));
-    name = name.replace(':', '\\:');
-    if (element.querySelectorAll) {
-      forEach(element.querySelectorAll('.' + name), append);
-      forEach(element.querySelectorAll('.' + name + '\\:'), append);
-      forEach(element.querySelectorAll('[' + name + ']'), append);
-    }
-  });
-
-  forEach(elements, function(element) {
-    if (!appElement) {
-      var className = ' ' + element.className + ' ';
-      var match = NG_APP_CLASS_REGEXP.exec(className);
-      if (match) {
-        appElement = element;
-        module = (match[2] || '').replace(/\s+/g, ',');
-      } else {
-        forEach(element.attributes, function(attr) {
-          if (!appElement && names[attr.name]) {
-            appElement = element;
-            module = attr.value;
-          }
-        });
-      }
-    }
-  });
-  if (appElement) {
-    bootstrap(appElement, module ? [module] : []);
-  }
-}
-
-/**
- * @ngdoc function
- * @name angular.bootstrap
- * @module ng
- * @description
- * Use this function to manually start up angular application.
- *
- * See: {@link guide/bootstrap Bootstrap}
- *
- * Note that ngScenario-based end-to-end tests cannot use this function to bootstrap manually.
- * They must use {@link ng.directive:ngApp ngApp}.
- *
- * Angular will detect if it has been loaded into the browser more than once and only allow the
- * first loaded script to be bootstrapped and will report a warning to the browser console for
- * each of the subsequent scripts. This prevents strange results in applications, where otherwise
- * multiple instances of Angular try to work on the DOM.
- *
- * <example name="multi-bootstrap" module="multi-bootstrap">
- * <file name="index.html">
- * <script src="../../../angular.js"></script>
- * <div ng-controller="BrokenTable">
- *   <table>
- *   <tr>
- *     <th ng-repeat="heading in headings">{{heading}}</th>
- *   </tr>
- *   <tr ng-repeat="filling in fillings">
- *     <td ng-repeat="fill in filling">{{fill}}</td>
- *   </tr>
- * </table>
- * </div>
- * </file>
- * <file name="controller.js">
- * var app = angular.module('multi-bootstrap', [])
- *
- * .controller('BrokenTable', function($scope) {
- *     $scope.headings = ['One', 'Two', 'Three'];
- *     $scope.fillings = [[1, 2, 3], ['A', 'B', 'C'], [7, 8, 9]];
- * });
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should only insert one table cell for each item in $scope.fillings', function() {
- *  expect(element.all(by.css('td')).count())
- *      .toBe(9);
- * });
- * </file>
- * </example>
- *
- * @param {DOMElement} element DOM element which is the root of angular application.
- * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
- *     Each item in the array should be the name of a predefined module or a (DI annotated)
- *     function that will be invoked by the injector as a run block.
- *     See: {@link angular.module modules}
- * @returns {auto.$injector} Returns the newly created injector for this app.
- */
-function bootstrap(element, modules) {
-  var doBootstrap = function() {
-    element = jqLite(element);
-
-    if (element.injector()) {
-      var tag = (element[0] === document) ? 'document' : startingTag(element);
-      throw ngMinErr('btstrpd', "App Already Bootstrapped with this Element '{0}'", tag);
-    }
-
-    modules = modules || [];
-    modules.unshift(['$provide', function($provide) {
-      $provide.value('$rootElement', element);
-    }]);
-    modules.unshift('ng');
-    var injector = createInjector(modules);
-    injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', '$animate',
-       function(scope, element, compile, injector, animate) {
-        scope.$apply(function() {
-          element.data('$injector', injector);
-          compile(element)(scope);
-        });
-      }]
-    );
-    return injector;
-  };
-
-  var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;
-
-  if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {
-    return doBootstrap();
-  }
-
-  window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');
-  angular.resumeBootstrap = function(extraModules) {
-    forEach(extraModules, function(module) {
-      modules.push(module);
-    });
-    doBootstrap();
-  };
-}
-
-var SNAKE_CASE_REGEXP = /[A-Z]/g;
-function snake_case(name, separator) {
-  separator = separator || '_';
-  return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
-    return (pos ? separator : '') + letter.toLowerCase();
-  });
-}
-
-function bindJQuery() {
-  // bind to jQuery if present;
-  jQuery = window.jQuery;
-  // Use jQuery if it exists with proper functionality, otherwise default to us.
-  // Angular 1.2+ requires jQuery 1.7.1+ for on()/off() support.
-  if (jQuery && jQuery.fn.on) {
-    jqLite = jQuery;
-    extend(jQuery.fn, {
-      scope: JQLitePrototype.scope,
-      isolateScope: JQLitePrototype.isolateScope,
-      controller: JQLitePrototype.controller,
-      injector: JQLitePrototype.injector,
-      inheritedData: JQLitePrototype.inheritedData
-    });
-    // Method signature:
-    //     jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments)
-    jqLitePatchJQueryRemove('remove', true, true, false);
-    jqLitePatchJQueryRemove('empty', false, false, false);
-    jqLitePatchJQueryRemove('html', false, false, true);
-  } else {
-    jqLite = JQLite;
-  }
-  angular.element = jqLite;
-}
-
-/**
- * throw error if the argument is falsy.
- */
-function assertArg(arg, name, reason) {
-  if (!arg) {
-    throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
-  }
-  return arg;
-}
-
-function assertArgFn(arg, name, acceptArrayAnnotation) {
-  if (acceptArrayAnnotation && isArray(arg)) {
-      arg = arg[arg.length - 1];
-  }
-
-  assertArg(isFunction(arg), name, 'not a function, got ' +
-      (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
-  return arg;
-}
-
-/**
- * throw error if the name given is hasOwnProperty
- * @param  {String} name    the name to test
- * @param  {String} context the context in which the name is used, such as module or directive
- */
-function assertNotHasOwnProperty(name, context) {
-  if (name === 'hasOwnProperty') {
-    throw ngMinErr('badname', "hasOwnProperty is not a valid {0} name", context);
-  }
-}
-
-/**
- * Return the value accessible from the object by path. Any undefined traversals are ignored
- * @param {Object} obj starting object
- * @param {String} path path to traverse
- * @param {boolean} [bindFnToScope=true]
- * @returns {Object} value as accessible by path
- */
-//TODO(misko): this function needs to be removed
-function getter(obj, path, bindFnToScope) {
-  if (!path) return obj;
-  var keys = path.split('.');
-  var key;
-  var lastInstance = obj;
-  var len = keys.length;
-
-  for (var i = 0; i < len; i++) {
-    key = keys[i];
-    if (obj) {
-      obj = (lastInstance = obj)[key];
-    }
-  }
-  if (!bindFnToScope && isFunction(obj)) {
-    return bind(lastInstance, obj);
-  }
-  return obj;
-}
-
-/**
- * Return the DOM siblings between the first and last node in the given array.
- * @param {Array} array like object
- * @returns {DOMElement} object containing the elements
- */
-function getBlockElements(nodes) {
-  var startNode = nodes[0],
-      endNode = nodes[nodes.length - 1];
-  if (startNode === endNode) {
-    return jqLite(startNode);
-  }
-
-  var element = startNode;
-  var elements = [element];
-
-  do {
-    element = element.nextSibling;
-    if (!element) break;
-    elements.push(element);
-  } while (element !== endNode);
-
-  return jqLite(elements);
-}
-
-/**
- * @ngdoc type
- * @name angular.Module
- * @module ng
- * @description
- *
- * Interface for configuring angular {@link angular.module modules}.
- */
-
-function setupModuleLoader(window) {
-
-  var $injectorMinErr = minErr('$injector');
-  var ngMinErr = minErr('ng');
-
-  function ensure(obj, name, factory) {
-    return obj[name] || (obj[name] = factory());
-  }
-
-  var angular = ensure(window, 'angular', Object);
-
-  // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap
-  angular.$$minErr = angular.$$minErr || minErr;
-
-  return ensure(angular, 'module', function() {
-    /** @type {Object.<string, angular.Module>} */
-    var modules = {};
-
-    /**
-     * @ngdoc function
-     * @name angular.module
-     * @module ng
-     * @description
-     *
-     * The `angular.module` is a global place for creating, registering and retrieving Angular
-     * modules.
-     * All modules (angular core or 3rd party) that should be available to an application must be
-     * registered using this mechanism.
-     *
-     * When passed two or more arguments, a new module is created.  If passed only one argument, an
-     * existing module (the name passed as the first argument to `module`) is retrieved.
-     *
-     *
-     * # Module
-     *
-     * A module is a collection of services, directives, controllers, filters, and configuration information.
-     * `angular.module` is used to configure the {@link auto.$injector $injector}.
-     *
-     * ```js
-     * // Create a new module
-     * var myModule = angular.module('myModule', []);
-     *
-     * // register a new service
-     * myModule.value('appName', 'MyCoolApp');
-     *
-     * // configure existing services inside initialization blocks.
-     * myModule.config(['$locationProvider', function($locationProvider) {
-     *   // Configure existing providers
-     *   $locationProvider.hashPrefix('!');
-     * }]);
-     * ```
-     *
-     * Then you can create an injector and load your modules like this:
-     *
-     * ```js
-     * var injector = angular.injector(['ng', 'myModule'])
-     * ```
-     *
-     * However it's more likely that you'll just use
-     * {@link ng.directive:ngApp ngApp} or
-     * {@link angular.bootstrap} to simplify this process for you.
-     *
-     * @param {!string} name The name of the module to create or retrieve.
-     * @param {!Array.<string>=} requires If specified then new module is being created. If
-     *        unspecified then the module is being retrieved for further configuration.
-     * @param {Function=} configFn Optional configuration function for the module. Same as
-     *        {@link angular.Module#config Module#config()}.
-     * @returns {module} new module with the {@link angular.Module} api.
-     */
-    return function module(name, requires, configFn) {
-      var assertNotHasOwnProperty = function(name, context) {
-        if (name === 'hasOwnProperty') {
-          throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
-        }
-      };
-
-      assertNotHasOwnProperty(name, 'module');
-      if (requires && modules.hasOwnProperty(name)) {
-        modules[name] = null;
-      }
-      return ensure(modules, name, function() {
-        if (!requires) {
-          throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " +
-             "the module name or forgot to load it. If registering a module ensure that you " +
-             "specify the dependencies as the second argument.", name);
-        }
-
-        /** @type {!Array.<Array.<*>>} */
-        var invokeQueue = [];
-
-        /** @type {!Array.<Function>} */
-        var runBlocks = [];
-
-        var config = invokeLater('$injector', 'invoke');
-
-        /** @type {angular.Module} */
-        var moduleInstance = {
-          // Private state
-          _invokeQueue: invokeQueue,
-          _runBlocks: runBlocks,
-
-          /**
-           * @ngdoc property
-           * @name angular.Module#requires
-           * @module ng
-           * @returns {Array.<string>} List of module names which must be loaded before this module.
-           * @description
-           * Holds the list of modules which the injector will load before the current module is
-           * loaded.
-           */
-          requires: requires,
-
-          /**
-           * @ngdoc property
-           * @name angular.Module#name
-           * @module ng
-           * @returns {string} Name of the module.
-           * @description
-           */
-          name: name,
-
-
-          /**
-           * @ngdoc method
-           * @name angular.Module#provider
-           * @module ng
-           * @param {string} name service name
-           * @param {Function} providerType Construction function for creating new instance of the
-           *                                service.
-           * @description
-           * See {@link auto.$provide#provider $provide.provider()}.
-           */
-          provider: invokeLater('$provide', 'provider'),
-
-          /**
-           * @ngdoc method
-           * @name angular.Module#factory
-           * @module ng
-           * @param {string} name service name
-           * @param {Function} providerFunction Function for creating new instance of the service.
-           * @description
-           * See {@link auto.$provide#factory $provide.factory()}.
-           */
-          factory: invokeLater('$provide', 'factory'),
-
-          /**
-           * @ngdoc method
-           * @name angular.Module#service
-           * @module ng
-           * @param {string} name service name
-           * @param {Function} constructor A constructor function that will be instantiated.
-           * @description
-           * See {@link auto.$provide#service $provide.service()}.
-           */
-          service: invokeLater('$provide', 'service'),
-
-          /**
-           * @ngdoc method
-           * @name angular.Module#value
-           * @module ng
-           * @param {string} name service name
-           * @param {*} object Service instance object.
-           * @description
-           * See {@link auto.$provide#value $provide.value()}.
-           */
-          value: invokeLater('$provide', 'value'),
-
-          /**
-           * @ngdoc method
-           * @name angular.Module#constant
-           * @module ng
-           * @param {string} name constant name
-           * @param {*} object Constant value.
-           * @description
-           * Because the constant are fixed, they get applied before other provide methods.
-           * See {@link auto.$provide#constant $provide.constant()}.
-           */
-          constant: invokeLater('$provide', 'constant', 'unshift'),
-
-          /**
-           * @ngdoc method
-           * @name angular.Module#animation
-           * @module ng
-           * @param {string} name animation name
-           * @param {Function} animationFactory Factory function for creating new instance of an
-           *                                    animation.
-           * @description
-           *
-           * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.
-           *
-           *
-           * Defines an animation hook that can be later used with
-           * {@link ngAnimate.$animate $animate} service and directives that use this service.
-           *
-           * ```js
-           * module.animation('.animation-name', function($inject1, $inject2) {
-           *   return {
-           *     eventName : function(element, done) {
-           *       //code to run the animation
-           *       //once complete, then run done()
-           *       return function cancellationFunction(element) {
-           *         //code to cancel the animation
-           *       }
-           *     }
-           *   }
-           * })
-           * ```
-           *
-           * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and
-           * {@link ngAnimate ngAnimate module} for more information.
-           */
-          animation: invokeLater('$animateProvider', 'register'),
-
-          /**
-           * @ngdoc method
-           * @name angular.Module#filter
-           * @module ng
-           * @param {string} name Filter name.
-           * @param {Function} filterFactory Factory function for creating new instance of filter.
-           * @description
-           * See {@link ng.$filterProvider#register $filterProvider.register()}.
-           */
-          filter: invokeLater('$filterProvider', 'register'),
-
-          /**
-           * @ngdoc method
-           * @name angular.Module#controller
-           * @module ng
-           * @param {string|Object} name Controller name, or an object map of controllers where the
-           *    keys are the names and the values are the constructors.
-           * @param {Function} constructor Controller constructor function.
-           * @description
-           * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
-           */
-          controller: invokeLater('$controllerProvider', 'register'),
-
-          /**
-           * @ngdoc method
-           * @name angular.Module#directive
-           * @module ng
-           * @param {string|Object} name Directive name, or an object map of directives where the
-           *    keys are the names and the values are the factories.
-           * @param {Function} directiveFactory Factory function for creating new instance of
-           * directives.
-           * @description
-           * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
-           */
-          directive: invokeLater('$compileProvider', 'directive'),
-
-          /**
-           * @ngdoc method
-           * @name angular.Module#config
-           * @module ng
-           * @param {Function} configFn Execute this function on module load. Useful for service
-           *    configuration.
-           * @description
-           * Use this method to register work which needs to be performed on module loading.
-           * For more about how to configure services, see
-           * {@link providers#providers_provider-recipe Provider Recipe}.
-           */
-          config: config,
-
-          /**
-           * @ngdoc method
-           * @name angular.Module#run
-           * @module ng
-           * @param {Function} initializationFn Execute this function after injector creation.
-           *    Useful for application initialization.
-           * @description
-           * Use this method to register work which should be performed when the injector is done
-           * loading all modules.
-           */
-          run: function(block) {
-            runBlocks.push(block);
-            return this;
-          }
-        };
-
-        if (configFn) {
-          config(configFn);
-        }
-
-        return  moduleInstance;
-
-        /**
-         * @param {string} provider
-         * @param {string} method
-         * @param {String=} insertMethod
-         * @returns {angular.Module}
-         */
-        function invokeLater(provider, method, insertMethod) {
-          return function() {
-            invokeQueue[insertMethod || 'push']([provider, method, arguments]);
-            return moduleInstance;
-          };
-        }
-      });
-    };
-  });
-
-}
-
-/* global
-    angularModule: true,
-    version: true,
-
-    $LocaleProvider,
-    $CompileProvider,
-
-    htmlAnchorDirective,
-    inputDirective,
-    inputDirective,
-    formDirective,
-    scriptDirective,
-    selectDirective,
-    styleDirective,
-    optionDirective,
-    ngBindDirective,
-    ngBindHtmlDirective,
-    ngBindTemplateDirective,
-    ngClassDirective,
-    ngClassEvenDirective,
-    ngClassOddDirective,
-    ngCspDirective,
-    ngCloakDirective,
-    ngControllerDirective,
-    ngFormDirective,
-    ngHideDirective,
-    ngIfDirective,
-    ngIncludeDirective,
-    ngIncludeFillContentDirective,
-    ngInitDirective,
-    ngNonBindableDirective,
-    ngPluralizeDirective,
-    ngRepeatDirective,
-    ngShowDirective,
-    ngStyleDirective,
-    ngSwitchDirective,
-    ngSwitchWhenDirective,
-    ngSwitchDefaultDirective,
-    ngOptionsDirective,
-    ngTranscludeDirective,
-    ngModelDirective,
-    ngListDirective,
-    ngChangeDirective,
-    requiredDirective,
-    requiredDirective,
-    ngValueDirective,
-    ngAttributeAliasDirectives,
-    ngEventDirectives,
-
-    $AnchorScrollProvider,
-    $AnimateProvider,
-    $BrowserProvider,
-    $CacheFactoryProvider,
-    $ControllerProvider,
-    $DocumentProvider,
-    $ExceptionHandlerProvider,
-    $FilterProvider,
-    $InterpolateProvider,
-    $IntervalProvider,
-    $HttpProvider,
-    $HttpBackendProvider,
-    $LocationProvider,
-    $LogProvider,
-    $ParseProvider,
-    $RootScopeProvider,
-    $QProvider,
-    $$SanitizeUriProvider,
-    $SceProvider,
-    $SceDelegateProvider,
-    $SnifferProvider,
-    $TemplateCacheProvider,
-    $TimeoutProvider,
-    $$RAFProvider,
-    $$AsyncCallbackProvider,
-    $WindowProvider
-*/
-
-
-/**
- * @ngdoc object
- * @name angular.version
- * @module ng
- * @description
- * An object that contains information about the current AngularJS version. This object has the
- * following properties:
- *
- * - `full` – `{string}` – Full version string, such as "0.9.18".
- * - `major` – `{number}` – Major version number, such as "0".
- * - `minor` – `{number}` – Minor version number, such as "9".
- * - `dot` – `{number}` – Dot version number, such as "18".
- * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
- */
-var version = {
-  full: '1.2.19',    // all of these placeholder strings will be replaced by grunt's
-  major: 1,    // package task
-  minor: 2,
-  dot: 19,
-  codeName: 'precognitive-flashbacks'
-};
-
-
-function publishExternalAPI(angular){
-  extend(angular, {
-    'bootstrap': bootstrap,
-    'copy': copy,
-    'extend': extend,
-    'equals': equals,
-    'element': jqLite,
-    'forEach': forEach,
-    'injector': createInjector,
-    'noop':noop,
-    'bind':bind,
-    'toJson': toJson,
-    'fromJson': fromJson,
-    'identity':identity,
-    'isUndefined': isUndefined,
-    'isDefined': isDefined,
-    'isString': isString,
-    'isFunction': isFunction,
-    'isObject': isObject,
-    'isNumber': isNumber,
-    'isElement': isElement,
-    'isArray': isArray,
-    'version': version,
-    'isDate': isDate,
-    'lowercase': lowercase,
-    'uppercase': uppercase,
-    'callbacks': {counter: 0},
-    '$$minErr': minErr,
-    '$$csp': csp
-  });
-
-  angularModule = setupModuleLoader(window);
-  try {
-    angularModule('ngLocale');
-  } catch (e) {
-    angularModule('ngLocale', []).provider('$locale', $LocaleProvider);
-  }
-
-  angularModule('ng', ['ngLocale'], ['$provide',
-    function ngModule($provide) {
-      // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.
-      $provide.provider({
-        $$sanitizeUri: $$SanitizeUriProvider
-      });
-      $provide.provider('$compile', $CompileProvider).
-        directive({
-            a: htmlAnchorDirective,
-            input: inputDirective,
-            textarea: inputDirective,
-            form: formDirective,
-            script: scriptDirective,
-            select: selectDirective,
-            style: styleDirective,
-            option: optionDirective,
-            ngBind: ngBindDirective,
-            ngBindHtml: ngBindHtmlDirective,
-            ngBindTemplate: ngBindTemplateDirective,
-            ngClass: ngClassDirective,
-            ngClassEven: ngClassEvenDirective,
-            ngClassOdd: ngClassOddDirective,
-            ngCloak: ngCloakDirective,
-            ngController: ngControllerDirective,
-            ngForm: ngFormDirective,
-            ngHide: ngHideDirective,
-            ngIf: ngIfDirective,
-            ngInclude: ngIncludeDirective,
-            ngInit: ngInitDirective,
-            ngNonBindable: ngNonBindableDirective,
-            ngPluralize: ngPluralizeDirective,
-            ngRepeat: ngRepeatDirective,
-            ngShow: ngShowDirective,
-            ngStyle: ngStyleDirective,
-            ngSwitch: ngSwitchDirective,
-            ngSwitchWhen: ngSwitchWhenDirective,
-            ngSwitchDefault: ngSwitchDefaultDirective,
-            ngOptions: ngOptionsDirective,
-            ngTransclude: ngTranscludeDirective,
-            ngModel: ngModelDirective,
-            ngList: ngListDirective,
-            ngChange: ngChangeDirective,
-            required: requiredDirective,
-            ngRequired: requiredDirective,
-            ngValue: ngValueDirective
-        }).
-        directive({
-          ngInclude: ngIncludeFillContentDirective
-        }).
-        directive(ngAttributeAliasDirectives).
-        directive(ngEventDirectives);
-      $provide.provider({
-        $anchorScroll: $AnchorScrollProvider,
-        $animate: $AnimateProvider,
-        $browser: $BrowserProvider,
-        $cacheFactory: $CacheFactoryProvider,
-        $controller: $ControllerProvider,
-        $document: $DocumentProvider,
-        $exceptionHandler: $ExceptionHandlerProvider,
-        $filter: $FilterProvider,
-        $interpolate: $InterpolateProvider,
-        $interval: $IntervalProvider,
-        $http: $HttpProvider,
-        $httpBackend: $HttpBackendProvider,
-        $location: $LocationProvider,
-        $log: $LogProvider,
-        $parse: $ParseProvider,
-        $rootScope: $RootScopeProvider,
-        $q: $QProvider,
-        $sce: $SceProvider,
-        $sceDelegate: $SceDelegateProvider,
-        $sniffer: $SnifferProvider,
-        $templateCache: $TemplateCacheProvider,
-        $timeout: $TimeoutProvider,
-        $window: $WindowProvider,
-        $$rAF: $$RAFProvider,
-        $$asyncCallback : $$AsyncCallbackProvider
-      });
-    }
-  ]);
-}
-
-/* global
-
-  -JQLitePrototype,
-  -addEventListenerFn,
-  -removeEventListenerFn,
-  -BOOLEAN_ATTR
-*/
-
-//////////////////////////////////
-//JQLite
-//////////////////////////////////
-
-/**
- * @ngdoc function
- * @name angular.element
- * @module ng
- * @kind function
- *
- * @description
- * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.
- *
- * If jQuery is available, `angular.element` is an alias for the
- * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`
- * delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite."
- *
- * <div class="alert alert-success">jqLite is a tiny, API-compatible subset of jQuery that allows
- * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most
- * commonly needed functionality with the goal of having a very small footprint.</div>
- *
- * To use jQuery, simply load it before `DOMContentLoaded` event fired.
- *
- * <div class="alert">**Note:** all element references in Angular are always wrapped with jQuery or
- * jqLite; they are never raw DOM references.</div>
- *
- * ## Angular's jqLite
- * jqLite provides only the following jQuery methods:
- *
- * - [`addClass()`](http://api.jquery.com/addClass/)
- * - [`after()`](http://api.jquery.com/after/)
- * - [`append()`](http://api.jquery.com/append/)
- * - [`attr()`](http://api.jquery.com/attr/)
- * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData
- * - [`children()`](http://api.jquery.com/children/) - Does not support selectors
- * - [`clone()`](http://api.jquery.com/clone/)
- * - [`contents()`](http://api.jquery.com/contents/)
- * - [`css()`](http://api.jquery.com/css/)
- * - [`data()`](http://api.jquery.com/data/)
- * - [`empty()`](http://api.jquery.com/empty/)
- * - [`eq()`](http://api.jquery.com/eq/)
- * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name
- * - [`hasClass()`](http://api.jquery.com/hasClass/)
- * - [`html()`](http://api.jquery.com/html/)
- * - [`next()`](http://api.jquery.com/next/) - Does not support selectors
- * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData
- * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors
- * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors
- * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors
- * - [`prepend()`](http://api.jquery.com/prepend/)
- * - [`prop()`](http://api.jquery.com/prop/)
- * - [`ready()`](http://api.jquery.com/ready/)
- * - [`remove()`](http://api.jquery.com/remove/)
- * - [`removeAttr()`](http://api.jquery.com/removeAttr/)
- * - [`removeClass()`](http://api.jquery.com/removeClass/)
- * - [`removeData()`](http://api.jquery.com/removeData/)
- * - [`replaceWith()`](http://api.jquery.com/replaceWith/)
- * - [`text()`](http://api.jquery.com/text/)
- * - [`toggleClass()`](http://api.jquery.com/toggleClass/)
- * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.
- * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces
- * - [`val()`](http://api.jquery.com/val/)
- * - [`wrap()`](http://api.jquery.com/wrap/)
- *
- * ## jQuery/jqLite Extras
- * Angular also provides the following additional methods and events to both jQuery and jqLite:
- *
- * ### Events
- * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event
- *    on all DOM nodes being removed.  This can be used to clean up any 3rd party bindings to the DOM
- *    element before it is removed.
- *
- * ### Methods
- * - `controller(name)` - retrieves the controller of the current element or its parent. By default
- *   retrieves controller associated with the `ngController` directive. If `name` is provided as
- *   camelCase directive name, then the controller for this directive will be retrieved (e.g.
- *   `'ngModel'`).
- * - `injector()` - retrieves the injector of the current element or its parent.
- * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current
- *   element or its parent.
- * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the
- *   current element. This getter should be used only on elements that contain a directive which starts a new isolate
- *   scope. Calling `scope()` on this element always returns the original non-isolate scope.
- * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top
- *   parent element is reached.
- *
- * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.
- * @returns {Object} jQuery object.
- */
-
-JQLite.expando = 'ng339';
-
-var jqCache = JQLite.cache = {},
-    jqId = 1,
-    addEventListenerFn = (window.document.addEventListener
-      ? function(element, type, fn) {element.addEventListener(type, fn, false);}
-      : function(element, type, fn) {element.attachEvent('on' + type, fn);}),
-    removeEventListenerFn = (window.document.removeEventListener
-      ? function(element, type, fn) {element.removeEventListener(type, fn, false); }
-      : function(element, type, fn) {element.detachEvent('on' + type, fn); });
-
-/*
- * !!! This is an undocumented "private" function !!!
- */
-var jqData = JQLite._data = function(node) {
-  //jQuery always returns an object on cache miss
-  return this.cache[node[this.expando]] || {};
-};
-
-function jqNextId() { return ++jqId; }
-
-
-var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
-var MOZ_HACK_REGEXP = /^moz([A-Z])/;
-var jqLiteMinErr = minErr('jqLite');
-
-/**
- * Converts snake_case to camelCase.
- * Also there is special case for Moz prefix starting with upper case letter.
- * @param name Name to normalize
- */
-function camelCase(name) {
-  return name.
-    replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
-      return offset ? letter.toUpperCase() : letter;
-    }).
-    replace(MOZ_HACK_REGEXP, 'Moz$1');
-}
-
-/////////////////////////////////////////////
-// jQuery mutation patch
-//
-// In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a
-// $destroy event on all DOM nodes being removed.
-//
-/////////////////////////////////////////////
-
-function jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments) {
-  var originalJqFn = jQuery.fn[name];
-  originalJqFn = originalJqFn.$original || originalJqFn;
-  removePatch.$original = originalJqFn;
-  jQuery.fn[name] = removePatch;
-
-  function removePatch(param) {
-    // jshint -W040
-    var list = filterElems && param ? [this.filter(param)] : [this],
-        fireEvent = dispatchThis,
-        set, setIndex, setLength,
-        element, childIndex, childLength, children;
-
-    if (!getterIfNoArguments || param != null) {
-      while(list.length) {
-        set = list.shift();
-        for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {
-          element = jqLite(set[setIndex]);
-          if (fireEvent) {
-            element.triggerHandler('$destroy');
-          } else {
-            fireEvent = !fireEvent;
-          }
-          for(childIndex = 0, childLength = (children = element.children()).length;
-              childIndex < childLength;
-              childIndex++) {
-            list.push(jQuery(children[childIndex]));
-          }
-        }
-      }
-    }
-    return originalJqFn.apply(this, arguments);
-  }
-}
-
-var SINGLE_TAG_REGEXP = /^<(\w+)\s*\/?>(?:<\/\1>|)$/;
-var HTML_REGEXP = /<|&#?\w+;/;
-var TAG_NAME_REGEXP = /<([\w:]+)/;
-var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;
-
-var wrapMap = {
-  'option': [1, '<select multiple="multiple">', '</select>'],
-
-  'thead': [1, '<table>', '</table>'],
-  'col': [2, '<table><colgroup>', '</colgroup></table>'],
-  'tr': [2, '<table><tbody>', '</tbody></table>'],
-  'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],
-  '_default': [0, "", ""]
-};
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-function jqLiteIsTextNode(html) {
-  return !HTML_REGEXP.test(html);
-}
-
-function jqLiteBuildFragment(html, context) {
-  var elem, tmp, tag, wrap,
-      fragment = context.createDocumentFragment(),
-      nodes = [], i, j, jj;
-
-  if (jqLiteIsTextNode(html)) {
-    // Convert non-html into a text node
-    nodes.push(context.createTextNode(html));
-  } else {
-    tmp = fragment.appendChild(context.createElement('div'));
-    // Convert html into DOM nodes
-    tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
-    wrap = wrapMap[tag] || wrapMap._default;
-    tmp.innerHTML = '<div>&#160;</div>' +
-      wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1></$2>") + wrap[2];
-    tmp.removeChild(tmp.firstChild);
-
-    // Descend through wrappers to the right content
-    i = wrap[0];
-    while (i--) {
-      tmp = tmp.lastChild;
-    }
-
-    for (j=0, jj=tmp.childNodes.length; j<jj; ++j) nodes.push(tmp.childNodes[j]);
-
-    tmp = fragment.firstChild;
-    tmp.textContent = "";
-  }
-
-  // Remove wrapper from fragment
-  fragment.textContent = "";
-  fragment.innerHTML = ""; // Clear inner HTML
-  return nodes;
-}
-
-function jqLiteParseHTML(html, context) {
-  context = context || document;
-  var parsed;
-
-  if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {
-    return [context.createElement(parsed[1])];
-  }
-
-  return jqLiteBuildFragment(html, context);
-}
-
-/////////////////////////////////////////////
-function JQLite(element) {
-  if (element instanceof JQLite) {
-    return element;
-  }
-  if (isString(element)) {
-    element = trim(element);
-  }
-  if (!(this instanceof JQLite)) {
-    if (isString(element) && element.charAt(0) != '<') {
-      throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');
-    }
-    return new JQLite(element);
-  }
-
-  if (isString(element)) {
-    jqLiteAddNodes(this, jqLiteParseHTML(element));
-    var fragment = jqLite(document.createDocumentFragment());
-    fragment.append(this);
-  } else {
-    jqLiteAddNodes(this, element);
-  }
-}
-
-function jqLiteClone(element) {
-  return element.cloneNode(true);
-}
-
-function jqLiteDealoc(element){
-  jqLiteRemoveData(element);
-  for ( var i = 0, children = element.childNodes || []; i < children.length; i++) {
-    jqLiteDealoc(children[i]);
-  }
-}
-
-function jqLiteOff(element, type, fn, unsupported) {
-  if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');
-
-  var events = jqLiteExpandoStore(element, 'events'),
-      handle = jqLiteExpandoStore(element, 'handle');
-
-  if (!handle) return; //no listeners registered
-
-  if (isUndefined(type)) {
-    forEach(events, function(eventHandler, type) {
-      removeEventListenerFn(element, type, eventHandler);
-      delete events[type];
-    });
-  } else {
-    forEach(type.split(' '), function(type) {
-      if (isUndefined(fn)) {
-        removeEventListenerFn(element, type, events[type]);
-        delete events[type];
-      } else {
-        arrayRemove(events[type] || [], fn);
-      }
-    });
-  }
-}
-
-function jqLiteRemoveData(element, name) {
-  var expandoId = element.ng339,
-      expandoStore = jqCache[expandoId];
-
-  if (expandoStore) {
-    if (name) {
-      delete jqCache[expandoId].data[name];
-      return;
-    }
-
-    if (expandoStore.handle) {
-      expandoStore.events.$destroy && expandoStore.handle({}, '$destroy');
-      jqLiteOff(element);
-    }
-    delete jqCache[expandoId];
-    element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it
-  }
-}
-
-function jqLiteExpandoStore(element, key, value) {
-  var expandoId = element.ng339,
-      expandoStore = jqCache[expandoId || -1];
-
-  if (isDefined(value)) {
-    if (!expandoStore) {
-      element.ng339 = expandoId = jqNextId();
-      expandoStore = jqCache[expandoId] = {};
-    }
-    expandoStore[key] = value;
-  } else {
-    return expandoStore && expandoStore[key];
-  }
-}
-
-function jqLiteData(element, key, value) {
-  var data = jqLiteExpandoStore(element, 'data'),
-      isSetter = isDefined(value),
-      keyDefined = !isSetter && isDefined(key),
-      isSimpleGetter = keyDefined && !isObject(key);
-
-  if (!data && !isSimpleGetter) {
-    jqLiteExpandoStore(element, 'data', data = {});
-  }
-
-  if (isSetter) {
-    data[key] = value;
-  } else {
-    if (keyDefined) {
-      if (isSimpleGetter) {
-        // don't create data in this case.
-        return data && data[key];
-      } else {
-        extend(data, key);
-      }
-    } else {
-      return data;
-    }
-  }
-}
-
-function jqLiteHasClass(element, selector) {
-  if (!element.getAttribute) return false;
-  return ((" " + (element.getAttribute('class') || '') + " ").replace(/[\n\t]/g, " ").
-      indexOf( " " + selector + " " ) > -1);
-}
-
-function jqLiteRemoveClass(element, cssClasses) {
-  if (cssClasses && element.setAttribute) {
-    forEach(cssClasses.split(' '), function(cssClass) {
-      element.setAttribute('class', trim(
-          (" " + (element.getAttribute('class') || '') + " ")
-          .replace(/[\n\t]/g, " ")
-          .replace(" " + trim(cssClass) + " ", " "))
-      );
-    });
-  }
-}
-
-function jqLiteAddClass(element, cssClasses) {
-  if (cssClasses && element.setAttribute) {
-    var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')
-                            .replace(/[\n\t]/g, " ");
-
-    forEach(cssClasses.split(' '), function(cssClass) {
-      cssClass = trim(cssClass);
-      if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {
-        existingClasses += cssClass + ' ';
-      }
-    });
-
-    element.setAttribute('class', trim(existingClasses));
-  }
-}
-
-function jqLiteAddNodes(root, elements) {
-  if (elements) {
-    elements = (!elements.nodeName && isDefined(elements.length) && !isWindow(elements))
-      ? elements
-      : [ elements ];
-    for(var i=0; i < elements.length; i++) {
-      root.push(elements[i]);
-    }
-  }
-}
-
-function jqLiteController(element, name) {
-  return jqLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');
-}
-
-function jqLiteInheritedData(element, name, value) {
-  element = jqLite(element);
-
-  // if element is the document object work with the html element instead
-  // this makes $(document).scope() possible
-  if(element[0].nodeType == 9) {
-    element = element.find('html');
-  }
-  var names = isArray(name) ? name : [name];
-
-  while (element.length) {
-    var node = element[0];
-    for (var i = 0, ii = names.length; i < ii; i++) {
-      if ((value = element.data(names[i])) !== undefined) return value;
-    }
-
-    // If dealing with a document fragment node with a host element, and no parent, use the host
-    // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
-    // to lookup parent controllers.
-    element = jqLite(node.parentNode || (node.nodeType === 11 && node.host));
-  }
-}
-
-function jqLiteEmpty(element) {
-  for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {
-    jqLiteDealoc(childNodes[i]);
-  }
-  while (element.firstChild) {
-    element.removeChild(element.firstChild);
-  }
-}
-
-//////////////////////////////////////////
-// Functions which are declared directly.
-//////////////////////////////////////////
-var JQLitePrototype = JQLite.prototype = {
-  ready: function(fn) {
-    var fired = false;
-
-    function trigger() {
-      if (fired) return;
-      fired = true;
-      fn();
-    }
-
-    // check if document already is loaded
-    if (document.readyState === 'complete'){
-      setTimeout(trigger);
-    } else {
-      this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9
-      // we can not use jqLite since we are not done loading and jQuery could be loaded later.
-      // jshint -W064
-      JQLite(window).on('load', trigger); // fallback to window.onload for others
-      // jshint +W064
-    }
-  },
-  toString: function() {
-    var value = [];
-    forEach(this, function(e){ value.push('' + e);});
-    return '[' + value.join(', ') + ']';
-  },
-
-  eq: function(index) {
-      return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);
-  },
-
-  length: 0,
-  push: push,
-  sort: [].sort,
-  splice: [].splice
-};
-
-//////////////////////////////////////////
-// Functions iterating getter/setters.
-// these functions return self on setter and
-// value on get.
-//////////////////////////////////////////
-var BOOLEAN_ATTR = {};
-forEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {
-  BOOLEAN_ATTR[lowercase(value)] = value;
-});
-var BOOLEAN_ELEMENTS = {};
-forEach('input,select,option,textarea,button,form,details'.split(','), function(value) {
-  BOOLEAN_ELEMENTS[uppercase(value)] = true;
-});
-
-function getBooleanAttrName(element, name) {
-  // check dom last since we will most likely fail on name
-  var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];
-
-  // booleanAttr is here twice to minimize DOM access
-  return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;
-}
-
-forEach({
-  data: jqLiteData,
-  inheritedData: jqLiteInheritedData,
-
-  scope: function(element) {
-    // Can't use jqLiteData here directly so we stay compatible with jQuery!
-    return jqLite(element).data('$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);
-  },
-
-  isolateScope: function(element) {
-    // Can't use jqLiteData here directly so we stay compatible with jQuery!
-    return jqLite(element).data('$isolateScope') || jqLite(element).data('$isolateScopeNoTemplate');
-  },
-
-  controller: jqLiteController,
-
-  injector: function(element) {
-    return jqLiteInheritedData(element, '$injector');
-  },
-
-  removeAttr: function(element,name) {
-    element.removeAttribute(name);
-  },
-
-  hasClass: jqLiteHasClass,
-
-  css: function(element, name, value) {
-    name = camelCase(name);
-
-    if (isDefined(value)) {
-      element.style[name] = value;
-    } else {
-      var val;
-
-      if (msie <= 8) {
-        // this is some IE specific weirdness that jQuery 1.6.4 does not sure why
-        val = element.currentStyle && element.currentStyle[name];
-        if (val === '') val = 'auto';
-      }
-
-      val = val || element.style[name];
-
-      if (msie <= 8) {
-        // jquery weirdness :-/
-        val = (val === '') ? undefined : val;
-      }
-
-      return  val;
-    }
-  },
-
-  attr: function(element, name, value){
-    var lowercasedName = lowercase(name);
-    if (BOOLEAN_ATTR[lowercasedName]) {
-      if (isDefined(value)) {
-        if (!!value) {
-          element[name] = true;
-          element.setAttribute(name, lowercasedName);
-        } else {
-          element[name] = false;
-          element.removeAttribute(lowercasedName);
-        }
-      } else {
-        return (element[name] ||
-                 (element.attributes.getNamedItem(name)|| noop).specified)
-               ? lowercasedName
-               : undefined;
-      }
-    } else if (isDefined(value)) {
-      element.setAttribute(name, value);
-    } else if (element.getAttribute) {
-      // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code
-      // some elements (e.g. Document) don't have get attribute, so return undefined
-      var ret = element.getAttribute(name, 2);
-      // normalize non-existing attributes to undefined (as jQuery)
-      return ret === null ? undefined : ret;
-    }
-  },
-
-  prop: function(element, name, value) {
-    if (isDefined(value)) {
-      element[name] = value;
-    } else {
-      return element[name];
-    }
-  },
-
-  text: (function() {
-    var NODE_TYPE_TEXT_PROPERTY = [];
-    if (msie < 9) {
-      NODE_TYPE_TEXT_PROPERTY[1] = 'innerText';    /** Element **/
-      NODE_TYPE_TEXT_PROPERTY[3] = 'nodeValue';    /** Text **/
-    } else {
-      NODE_TYPE_TEXT_PROPERTY[1] =                 /** Element **/
-      NODE_TYPE_TEXT_PROPERTY[3] = 'textContent';  /** Text **/
-    }
-    getText.$dv = '';
-    return getText;
-
-    function getText(element, value) {
-      var textProp = NODE_TYPE_TEXT_PROPERTY[element.nodeType];
-      if (isUndefined(value)) {
-        return textProp ? element[textProp] : '';
-      }
-      element[textProp] = value;
-    }
-  })(),
-
-  val: function(element, value) {
-    if (isUndefined(value)) {
-      if (nodeName_(element) === 'SELECT' && element.multiple) {
-        var result = [];
-        forEach(element.options, function (option) {
-          if (option.selected) {
-            result.push(option.value || option.text);
-          }
-        });
-        return result.length === 0 ? null : result;
-      }
-      return element.value;
-    }
-    element.value = value;
-  },
-
-  html: function(element, value) {
-    if (isUndefined(value)) {
-      return element.innerHTML;
-    }
-    for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {
-      jqLiteDealoc(childNodes[i]);
-    }
-    element.innerHTML = value;
-  },
-
-  empty: jqLiteEmpty
-}, function(fn, name){
-  /**
-   * Properties: writes return selection, reads return first value
-   */
-  JQLite.prototype[name] = function(arg1, arg2) {
-    var i, key;
-    var nodeCount = this.length;
-
-    // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it
-    // in a way that survives minification.
-    // jqLiteEmpty takes no arguments but is a setter.
-    if (fn !== jqLiteEmpty &&
-        (((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2) === undefined)) {
-      if (isObject(arg1)) {
-
-        // we are a write, but the object properties are the key/values
-        for (i = 0; i < nodeCount; i++) {
-          if (fn === jqLiteData) {
-            // data() takes the whole object in jQuery
-            fn(this[i], arg1);
-          } else {
-            for (key in arg1) {
-              fn(this[i], key, arg1[key]);
-            }
-          }
-        }
-        // return self for chaining
-        return this;
-      } else {
-        // we are a read, so read the first child.
-        // TODO: do we still need this?
-        var value = fn.$dv;
-        // Only if we have $dv do we iterate over all, otherwise it is just the first element.
-        var jj = (value === undefined) ? Math.min(nodeCount, 1) : nodeCount;
-        for (var j = 0; j < jj; j++) {
-          var nodeValue = fn(this[j], arg1, arg2);
-          value = value ? value + nodeValue : nodeValue;
-        }
-        return value;
-      }
-    } else {
-      // we are a write, so apply to all children
-      for (i = 0; i < nodeCount; i++) {
-        fn(this[i], arg1, arg2);
-      }
-      // return self for chaining
-      return this;
-    }
-  };
-});
-
-function createEventHandler(element, events) {
-  var eventHandler = function (event, type) {
-    if (!event.preventDefault) {
-      event.preventDefault = function() {
-        event.returnValue = false; //ie
-      };
-    }
-
-    if (!event.stopPropagation) {
-      event.stopPropagation = function() {
-        event.cancelBubble = true; //ie
-      };
-    }
-
-    if (!event.target) {
-      event.target = event.srcElement || document;
-    }
-
-    if (isUndefined(event.defaultPrevented)) {
-      var prevent = event.preventDefault;
-      event.preventDefault = function() {
-        event.defaultPrevented = true;
-        prevent.call(event);
-      };
-      event.defaultPrevented = false;
-    }
-
-    event.isDefaultPrevented = function() {
-      return event.defaultPrevented || event.returnValue === false;
-    };
-
-    // Copy event handlers in case event handlers array is modified during execution.
-    var eventHandlersCopy = shallowCopy(events[type || event.type] || []);
-
-    forEach(eventHandlersCopy, function(fn) {
-      fn.call(element, event);
-    });
-
-    // Remove monkey-patched methods (IE),
-    // as they would cause memory leaks in IE8.
-    if (msie <= 8) {
-      // IE7/8 does not allow to delete property on native object
-      event.preventDefault = null;
-      event.stopPropagation = null;
-      event.isDefaultPrevented = null;
-    } else {
-      // It shouldn't affect normal browsers (native methods are defined on prototype).
-      delete event.preventDefault;
-      delete event.stopPropagation;
-      delete event.isDefaultPrevented;
-    }
-  };
-  eventHandler.elem = element;
-  return eventHandler;
-}
-
-//////////////////////////////////////////
-// Functions iterating traversal.
-// These functions chain results into a single
-// selector.
-//////////////////////////////////////////
-forEach({
-  removeData: jqLiteRemoveData,
-
-  dealoc: jqLiteDealoc,
-
-  on: function onFn(element, type, fn, unsupported){
-    if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');
-
-    var events = jqLiteExpandoStore(element, 'events'),
-        handle = jqLiteExpandoStore(element, 'handle');
-
-    if (!

<TRUNCATED>

[35/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/angular-translate.min.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/angular-translate.min.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/angular-translate.min.js
deleted file mode 100644
index b160cb2..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/angular-translate.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * angular-translate - v2.2.0 - 2014-06-03
- * http://github.com/PascalPrecht/angular-translate
- * Copyright (c) 2014 ; Licensed MIT
- */
-angular.module("pascalprecht.translate",["ng"]).run(["$translate",function(a){var b=a.storageKey(),c=a.storage();c?c.get(b)?a.use(c.get(b)):angular.isString(a.preferredLanguage())?a.use(a.preferredLanguage()):c.set(b,a.use()):angular.isString(a.preferredLanguage())&&a.use(a.preferredLanguage())}]),angular.module("pascalprecht.translate").provider("$translate",["$STORAGE_KEY",function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p={},q=[],r=a,s=[],t=!1,u="translate-cloak",v=!1,w=".",x=function(){var a=window.navigator;return(a.language||a.browserLanguage||a.systemLanguage||a.userLanguage||"").split("-").join("_")},y=function(a){for(var b=[],d=angular.lowercase(a),e=0,f=q.length;f>e;e++)b.push(angular.lowercase(q[e]));if(b.indexOf(d)>-1)return a;if(c){var g;for(var h in c){var i=!1,j=c.hasOwnProperty(h)&&angular.lowercase(h)===angular.lowercase(a);if("*"===h.slice(-1)&&(i=h.slice(0,-1)===a.slice(0,h.length-1)),(j||i)&&(g=c[h],b.indexOf(angular.lowercase(g))>-1))return g}}var k=a.split("_");retu
 rn k.length>1&&b.indexOf(angular.lowercase(k[0]))>-1?k[0]:a},z=function(a,b){if(!a&&!b)return p;if(a&&!b){if(angular.isString(a))return p[a]}else angular.isObject(p[a])||(p[a]={}),angular.extend(p[a],A(b));return this};this.translations=z,this.cloakClassName=function(a){return a?(u=a,this):u};var A=function(a,b,c,d){var e,f,g,h;b||(b=[]),c||(c={});for(e in a)a.hasOwnProperty(e)&&(h=a[e],angular.isObject(h)?A(h,b.concat(e),c,e):(f=b.length?""+b.join(w)+w+e:e,b.length&&e===d&&(g=""+b.join(w),c[g]="@:"+f),c[f]=h));return c};this.addInterpolation=function(a){return s.push(a),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")},this.useInterpolation=function(a){return k=a,this},this.useSanitizeValueStrategy=function(a){return t=a,this},this.preferredLanguage=function(a){return a?(b=a,this):b},this.translationNotFoundIndicator=function(a){return this.translationNotFoundIndicatorLeft(a),this.translationNotFoundIndicatorRi
 ght(a),this},this.translationNotFoundIndicatorLeft=function(a){return a?(n=a,this):n},this.translationNotFoundIndicatorRight=function(a){return a?(o=a,this):o},this.fallbackLanguage=function(a){return B(a),this};var B=function(a){return a?(angular.isString(a)?(e=!0,d=[a]):angular.isArray(a)&&(e=!1,d=a),angular.isString(b)&&d.push(b),this):e?d[0]:d};this.use=function(a){if(a){if(!p[a]&&!l)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+a+"'");return f=a,this}return f};var C=function(a){return a?(r=a,void 0):i?i+r:r};this.storageKey=C,this.useUrlLoader=function(a){return this.useLoader("$translateUrlLoader",{url:a})},this.useStaticFilesLoader=function(a){return this.useLoader("$translateStaticFilesLoader",a)},this.useLoader=function(a,b){return l=a,m=b||{},this},this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(
 a){return h=a,this},this.storagePrefix=function(a){return a?(i=a,this):a},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(a){return j=a,this},this.usePostCompiling=function(a){return v=!!a,this},this.determinePreferredLanguage=function(a){var c=a&&angular.isFunction(a)?a():x();return b=q.length?y(c):c,this},this.registerAvailableLanguageKeys=function(a,b){return a?(q=a,b&&(c=b),this):q},this.$get=["$log","$injector","$rootScope","$q",function(a,c,i,q){var w,x,D,E=c.get(k||"$translateDefaultInterpolation"),F=!1,G={},H={},I=function(a,c,e){if(angular.isArray(a)){var g=function(a){for(var b={},d=[],f=function(a){var d=q.defer(),f=function(c){b[a]=c,d.resolve([a,c])};return I(a,c,e).then(f,f),d.promise},g=0,h=a.length;h>g;g++)d.push(f(a[g]));return q.all(d).then(function(){return b})};return g(a)}var i=q.defer();a&&(a=a.trim());var j=function(){var a=b?H[b]:H[f]
 ;if(x=0,h&&!a){var c=w.get(r);if(a=H[c],d&&d.length){var e=J(d,c);x=e>-1?e+=1:0,d.push(b)}}return a}();return j?j.then(function(){U(a,c,e).then(i.resolve,i.reject)},i.reject):U(a,c,e).then(i.resolve,i.reject),i.promise},J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K=function(a){return n&&(a=[n,a].join(" ")),o&&(a=[a,o].join(" ")),a},L=function(a){f=a,i.$emit("$translateChangeSuccess"),h&&w.set(I.storageKey(),f),E.setLocale(f),angular.forEach(G,function(a,b){G[b].setLocale(f)}),i.$emit("$translateChangeEnd")},M=function(a){if(!a)throw"No language key specified for loading.";var b=q.defer();return i.$emit("$translateLoadingStart"),F=!0,c.get(l)(angular.extend(m,{key:a})).then(function(c){var d={};i.$emit("$translateLoadingSuccess"),angular.isArray(c)?angular.forEach(c,function(a){angular.extend(d,A(a))}):angular.extend(d,A(c)),F=!1,b.resolve({key:a,table:d}),i.$emit("$translateLoadingEnd")},function(a){i.$emit("$translateLoadingError"),b.reject(a),i.$e
 mit("$translateLoadingEnd")}),b.promise};if(h&&(w=c.get(h),!w.get||!w.set))throw new Error("Couldn't use storage '"+h+"', missing get() or set() method!");angular.isFunction(E.useSanitizeValueStrategy)&&E.useSanitizeValueStrategy(t),s.length&&angular.forEach(s,function(a){var d=c.get(a);d.setLocale(b||f),angular.isFunction(d.useSanitizeValueStrategy)&&d.useSanitizeValueStrategy(t),G[d.getInterpolationIdentifier()]=d});var N=function(a){var b=q.defer();return p.hasOwnProperty(a)?(b.resolve(p[a]),b.promise):(H[a].then(function(a){z(a.key,a.table),b.resolve(a.table)},b.reject),b.promise)},O=function(a,b,c,d){var e=q.defer();return N(a).then(function(g){g.hasOwnProperty(b)?(d.setLocale(a),e.resolve(d.interpolate(g[b],c)),d.setLocale(f)):e.reject()},e.reject),e.promise},P=function(a,b,c,d){var e,g=p[a];return g.hasOwnProperty(b)&&(d.setLocale(a),e=d.interpolate(g[b],c),d.setLocale(f)),e},Q=function(a,b,e,g){var h=q.defer();if(a<d.length){var i=d[a];O(i,b,e,g).then(function(a){h.resolve(a
 )},function(){var c=Q(a+1,b,e,g);h.resolve(c)})}else if(j){var k=c.get(j)(b,f);void 0!==k?h.resolve(k):h.resolve(b)}else h.resolve(b);return h.promise},R=function(a,b,c,e){var f;if(a<d.length){var g=d[a];f=P(g,b,c,e),f||(f=R(a+1,b,c,e))}return f},S=function(a,b,c){return Q(D>0?D:x,a,b,c)},T=function(a,b,c){return R(D>0?D:x,a,b,c)},U=function(a,b,e){var g=q.defer(),h=f?p[f]:p,i=e?G[e]:E;if(h&&h.hasOwnProperty(a)){var k=h[a];"@:"===k.substr(0,2)?I(k.substr(2),b,e).then(g.resolve,g.reject):g.resolve(i.interpolate(k,b))}else j&&!F&&c.get(j)(a,f),f&&d&&d.length?S(a,b,i).then(function(a){g.resolve(a)},function(a){g.reject(K(a))}):g.reject(K(a));return g.promise},V=function(a,b,e){var g,h=f?p[f]:p,i=e?G[e]:E;if(h&&h.hasOwnProperty(a)){var k=h[a];g="@:"===k.substr(0,2)?V(k.substr(2),b,e):i.interpolate(k,b)}else j&&!F&&c.get(j)(a,f),f&&d&&d.length?(x=0,g=T(a,b,i)):g=K(a);return g};if(I.preferredLanguage=function(){return b},I.cloakClassName=function(){return u},I.fallbackLanguage=function(a)
 {if(void 0!==a&&null!==a){if(B(a),l&&d&&d.length)for(var b=0,c=d.length;c>b;b++)H[d[b]]||(H[d[b]]=M(d[b]));I.use(I.use())}return e?d[0]:d},I.useFallbackLanguage=function(a){if(void 0!==a&&null!==a)if(a){var b=J(d,a);b>-1&&(D=b)}else D=0},I.proposedLanguage=function(){return g},I.storage=function(){return w},I.use=function(a){if(!a)return f;var b=q.defer();i.$emit("$translateChangeStart");var c=y(a);return c&&(a=c),!p[a]&&l?(g=a,H[a]=M(a).then(function(c){z(c.key,c.table),b.resolve(c.key),g===a&&(L(c.key),g=void 0)},function(a){g=void 0,i.$emit("$translateChangeError"),b.reject(a),i.$emit("$translateChangeEnd")})):(b.resolve(a),L(a)),b.promise},I.storageKey=function(){return C()},I.isPostCompilingEnabled=function(){return v},I.refresh=function(a){function b(){e.resolve(),i.$emit("$translateRefreshEnd")}function c(){e.reject(),i.$emit("$translateRefreshEnd")}if(!l)throw new Error("Couldn't refresh translation table, no loader registered!");var e=q.defer();if(i.$emit("$translateRefresh
 Start"),a)p[a]?M(a).then(function(c){z(c.key,c.table),a===f&&L(f),b()},c):c();else{var g=[];if(d&&d.length)for(var h=0,j=d.length;j>h;h++)g.push(M(d[h]));f&&g.push(M(f)),q.all(g).then(function(a){angular.forEach(a,function(a){p[a.key]&&delete p[a.key],z(a.key,a.table)}),f&&L(f),b()})}return e.promise},I.instant=function(a,e,g){if(null===a||angular.isUndefined(a))return a;if(angular.isArray(a)){for(var h={},i=0,k=a.length;k>i;i++)h[a[i]]=I.instant(a[i],e,g);return h}if(angular.isString(a)&&a.length<1)return a;a&&(a=a.trim());var l,m=[];b&&m.push(b),f&&m.push(f),d&&d.length&&(m=m.concat(d));for(var n=0,o=m.length;o>n;n++){var q=m[n];if(p[q]&&"undefined"!=typeof p[q][a]&&(l=V(a,e,g)),"undefined"!=typeof l)break}return l||""===l||(l=a,j&&!F&&c.get(j)(a,f)),l},l&&(angular.equals(p,{})&&I.use(I.use()),d&&d.length))for(var W=0,X=d.length;X>W;W++)H[d[W]]=M(d[W]);return I}]}]),angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",["$interpolate",function(a){var b,
 c={},d="default",e=null,f={escaped:function(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=angular.element("<div></div>").text(a[c]).html());return b}},g=function(a){var b;return b=angular.isFunction(f[e])?f[e](a):a};return c.setLocale=function(a){b=a},c.getInterpolationIdentifier=function(){return d},c.useSanitizeValueStrategy=function(a){return e=a,this},c.interpolate=function(b,c){return e&&(c=g(c)),a(b)(c||{})},c}]),angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",["$translate","$q","$interpolate","$compile","$parse","$rootScope",function(a,b,c,d,e,f){return{restrict:"AE",scope:!0,compile:function(b,g){var h=g.translateValues?g.translateValues:void 0,i=g.translateInterpolation?g.translateInterpolation:void 0,j=b[0].outerHTML.match(/translate-value-+/i);return function(b,k,l){if(b.interpolateParams={},l.$observe("translate",function(a){b.translationId=angular.equals(a,""
 )||!angular.isDefined(a)?c(k.text().replace(/^\s+|\s+$/g,""))(b.$parent):a}),l.$observe("translateDefault",function(a){b.defaultText=a}),h&&l.$observe("translateValues",function(a){a&&b.$parent.$watch(function(){angular.extend(b.interpolateParams,e(a)(b.$parent))})}),j){var m=function(a){l.$observe(a,function(c){b.interpolateParams[angular.lowercase(a.substr(14,1))+a.substr(15)]=c})};for(var n in l)l.hasOwnProperty(n)&&"translateValue"===n.substr(0,14)&&"translateValues"!==n&&m(n)}var o=function(b,c,e){e||"undefined"==typeof c.defaultText||(b=c.defaultText),k.html(b);var f=a.isPostCompilingEnabled(),h="undefined"!=typeof g.translateCompile,i=h&&"false"!==g.translateCompile;(f&&!h||i)&&d(k.contents())(c)},p=function(){return h||j?function(){var c=function(){b.translationId&&b.interpolateParams&&a(b.translationId,b.interpolateParams,i).then(function(a){o(a,b,!0)},function(a){o(a,b,!1)})};b.$watch("interpolateParams",c,!0),b.$watch("translationId",c)}:function(){var c=b.$watch("transla
 tionId",function(d){b.translationId&&d&&a(d,{},i).then(function(a){o(a,b,!0),c()},function(a){o(a,b,!1),c()})},!0)}}(),q=f.$on("$translateChangeSuccess",p);p(),b.$on("$destroy",q)}}}}]),angular.module("pascalprecht.translate").directive("translateCloak",["$rootScope","$translate",function(a,b){return{compile:function(c){a.$on("$translateLoadingSuccess",function(){c.removeClass(b.cloakClassName())}),c.addClass(b.cloakClassName())}}}]),angular.module("pascalprecht.translate").filter("translate",["$parse","$translate",function(a,b){return function(c,d,e){return angular.isObject(d)||(d=a(d)(this)),b.instant(c,d,e)}}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/bower.json
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/bower.json b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/bower.json
deleted file mode 100644
index 3dc3dab..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/bower.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "name": "angular-translate",
-  "version": "2.2.0",
-  "main": "./angular-translate.js"
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/.gitignore
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/.gitignore b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/.gitignore
deleted file mode 100644
index a6d9724..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/mcasimir-mobile-angular-ui-be39011/.gitignore
+++ /dev/null
@@ -1,102 +0,0 @@
-# Created by http://gitignore.io
-
-tmp
-
-### OSX ###
-.DS_Store
-.AppleDouble
-.LSOverride
-Icon
-
-logo.ai
-
-gh-pages
-
-# Thumbnails
-._*
-
-# Files that might appear on external disk
-.Spotlight-V100
-.Trashes
-
-### Windows ###
-# Windows image file caches
-Thumbs.db
-ehthumbs.db
-
-# Folder config file
-Desktop.ini
-
-# Recycle Bin used on file shares
-$RECYCLE.BIN/
-
-### Linux ###
-.*
-!.gitignore
-!.git*
-*~
-
-
-### Eclipse ###
-*.pydevproject
-.project
-.metadata
-bin/**
-tmp/**
-tmp/**/*
-*.tmp
-*.bak
-*.swp
-*~.nib
-local.properties
-.classpath
-.settings/
-.loadpath
-
-# External tool builders
-.externalToolBuilders/
-
-# Locally stored "Eclipse launch configurations"
-*.launch
-
-# CDT-specific
-.cproject
-
-# PDT-specific
-.buildpath
-
-### TextMate ###
-*.tmproj
-*.tmproject
-tmtags
-
-### SublimeText ###
-# SublimeText project files
-*.sublime-workspace
-
-### Node ###
-lib-cov
-*.seed
-*.log
-*.csv
-*.dat
-*.out
-*.pid
-*.gz
-
-pids
-logs
-results
-
-npm-debug.log
-node_modules
-
-### Bower ###
-bower_components
-
-experiments
-site/output
-site/tmp
-
-site/crash.log
-site/Gemfile.lock
\ No newline at end of file


[29/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/monitoring/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/monitoring/pom.xml b/brooklyn-library/sandbox/monitoring/pom.xml
deleted file mode 100644
index fb2df08..0000000
--- a/brooklyn-library/sandbox/monitoring/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.apache.brooklyn.sandbox</groupId>
-    <artifactId>brooklyn-sandbox-software-monitoring</artifactId>
-    <packaging>jar</packaging>
-    <name>Brooklyn Monitoring Software Entities</name>
-    <description>
-		Brooklyn entitites for monitoring
-	</description>
-
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixFeed.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixFeed.java b/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixFeed.java
deleted file mode 100644
index c899bdf..0000000
--- a/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixFeed.java
+++ /dev/null
@@ -1,463 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.monitoring.zabbix;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.URI;
-import java.net.URL;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.location.MachineLocation;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.EntityFunctions;
-import org.apache.brooklyn.core.feed.AbstractFeed;
-import org.apache.brooklyn.core.feed.AttributePollHandler;
-import org.apache.brooklyn.core.feed.PollHandler;
-import org.apache.brooklyn.core.feed.Poller;
-import org.apache.brooklyn.core.location.SupportsPortForwarding;
-import org.apache.brooklyn.core.location.access.BrooklynAccessUtils;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.util.http.HttpTool;
-import org.apache.brooklyn.util.http.HttpToolResponse;
-import org.apache.brooklyn.util.net.Cidr;
-import org.apache.http.client.HttpClient;
-import org.apache.http.impl.NoConnectionReuseStrategy;
-import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-import com.google.common.base.Objects;
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.base.Predicates;
-import com.google.common.base.Supplier;
-import com.google.common.base.Suppliers;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-import com.google.common.net.HostAndPort;
-import com.google.common.reflect.TypeToken;
-import com.google.gson.JsonObject;
-
-public class ZabbixFeed extends AbstractFeed {
-
-    public static final Logger log = LoggerFactory.getLogger(ZabbixFeed.class);
-
-    public static final String JSON_ITEM_GET =
-            "{ \"jsonrpc\":\"2.0\",\"method\":\"item.get\"," +
-                "\"params\":{\"output\":\"extend\"," +
-                    "\"filter\":{\"hostid\":[\"{{hostId}}\"],\"key_\":\"{{itemKey}}\"}}," +
-                "\"auth\":\"{{token}}\",\"id\":{{id}}}";
-    public static final String JSON_USER_LOGIN =
-            "{ \"jsonrpc\":\"2.0\",\"method\":\"user.login\"," +
-                "\"params\":{\"user\":\"{{username}}\",\"password\":\"{{password}}\"}," +
-                "\"id\":0 }";
-    public static final String JSON_HOST_CREATE =
-            "{ \"jsonrpc\":\"2.0\",\"method\":\"host.create\"," +
-                "\"params\":{\"host\":\"{{host}}\"," +
-                    "\"interfaces\":[{\"type\":1,\"main\":1,\"useip\":1,\"ip\":\"{{ip}}\",\"dns\":\"\",\"port\":\"{{port}}\"}]," +
-                    "\"groups\":[{\"groupid\":\"{{groupId}}\"}]," +
-                    "\"templates\":[{\"templateid\":\"{{templateId}}\"}]}," +
-                "\"auth\":\"{{token}}\",\"id\":{{id}}}";
-
-    private static final AtomicInteger id = new AtomicInteger(0);
-
-    @SuppressWarnings("serial")
-    public static final ConfigKey<Set<ZabbixPollConfig<?>>> POLLS = ConfigKeys.newConfigKey(
-            new TypeToken<Set<ZabbixPollConfig<?>>>() {},
-            "polls");
-
-    @SuppressWarnings("serial")
-    public static final ConfigKey<Supplier<URI>> BASE_URI_PROVIDER = ConfigKeys.newConfigKey(
-            new TypeToken<Supplier<URI>>() {},
-            "baseUriProvider");
-    
-    public static final ConfigKey<Integer> GROUP_ID = ConfigKeys.newIntegerConfigKey("groupId");
-    
-    public static final ConfigKey<Integer> TEMPLATE_ID = ConfigKeys.newIntegerConfigKey("templateId");
-
-    @SuppressWarnings("serial")
-    public static final ConfigKey<Function<? super EntityLocal, String>> UNIQUE_HOSTNAME_GENERATOR = ConfigKeys.newConfigKey(
-            new TypeToken<Function<? super EntityLocal, String>>() {},
-            "uniqueHostnameGenerator");
-
-    public static Builder<ZabbixFeed, ?> builder() {
-        return new ConcreteBuilder();
-    }
-
-    private static class ConcreteBuilder extends Builder<ZabbixFeed, ConcreteBuilder> {
-    }
-
-    public static class Builder<T extends ZabbixFeed, B extends Builder<T,B>> {
-        private EntityLocal entity;
-        private Supplier<URI> baseUriProvider;
-        private long period = 500;
-        private TimeUnit periodUnits = TimeUnit.MILLISECONDS;
-        private List<ZabbixPollConfig<?>> polls = Lists.newArrayList();
-        private URI baseUri;
-        private boolean suspended = false;
-        private volatile boolean built;
-        private ZabbixServer server;
-        private String username;
-        private String password;
-        private Integer sessionTimeout;
-        private Integer groupId;
-        private Integer templateId;
-        private Function<? super EntityLocal, String> uniqueHostnameGenerator = Functions.compose(
-                EntityFunctions.id(), 
-                EntityFunctions.locationMatching(Predicates.instanceOf(MachineLocation.class)));
-        private String uniqueTag;
-
-        @SuppressWarnings("unchecked")
-        protected B self() {
-           return (B) this;
-        }
-
-        public B entity(EntityLocal val) {
-            this.entity = val;
-            return self();
-        }
-        public B baseUri(Supplier<URI> val) {
-            if (baseUri!=null && val!=null)
-                throw new IllegalStateException("Builder cannot take both a URI and a URI Provider");
-            this.baseUriProvider = val;
-            return self();
-        }
-        public B baseUri(URI val) {
-            if (baseUriProvider!=null && val!=null)
-                throw new IllegalStateException("Builder cannot take both a URI and a URI Provider");
-            this.baseUri = val;
-            return self();
-        }
-        public B baseUrl(URL val) {
-            return baseUri(URI.create(val.toString()));
-        }
-        public B baseUri(String val) {
-            return baseUri(URI.create(val));
-        }
-        public B period(long millis) {
-            return period(millis, TimeUnit.MILLISECONDS);
-        }
-        public B period(long val, TimeUnit units) {
-            this.period = val;
-            this.periodUnits = units;
-            return self();
-        }
-        public B poll(ZabbixPollConfig<?> config) {
-            polls.add(config);
-            return self();
-        }
-        public B suspended() {
-            return suspended(true);
-        }
-        public B suspended(boolean startsSuspended) {
-            this.suspended = startsSuspended;
-            return self();
-        }
-
-        public B server(final ZabbixServer server) {
-            this.server = server;
-            baseUri(URI.create(server.getConfig(ZabbixServer.ZABBIX_SERVER_API_URL)));
-            username(server.getConfig(ZabbixServer.ZABBIX_SERVER_USERNAME));
-            password(server.getConfig(ZabbixServer.ZABBIX_SERVER_PASSWORD));
-            sessionTimeout(server.getConfig(ZabbixServer.ZABBIX_SESSION_TIMEOUT));
-            return self();
-        }
-        public B username(String username) {
-            this.username = username;
-            return self();
-        }
-        public B password(String password) {
-            this.password = password;
-            return self();
-        }
-        public B sessionTimeout(Integer sessionTimeout) {
-            this.sessionTimeout = sessionTimeout;
-            return self();
-        }
-        public B groupId(Integer groupId) {
-            this.groupId = groupId;
-            return self();
-        }
-        public B templateId(Integer templateId) {
-            this.templateId = templateId;
-            return self();
-        }
-        public B register(Integer groupId, Integer templateId) {
-            this.groupId = groupId;
-            this.templateId = templateId;
-            return self();
-        }
-        /**
-         * For generating the name to be used when registering the zabbix agent with the zabbix server.
-         * When called, guarantees that the entity will have a {@link MachineLocation} (see {@link Entity#getLocations()}).
-         * Must return a non-empty string that will be unique across all machines where zabbix agents are installed.
-         */
-        public B uniqueHostnameGenerator(Function<? super EntityLocal, String> val) {
-            this.uniqueHostnameGenerator = checkNotNull(val, "uniqueHostnameGenerator");
-            return self();
-        }
-        
-        public Builder uniqueTag(String uniqueTag) {
-            this.uniqueTag = uniqueTag;
-            return this;
-        }
-        
-        @SuppressWarnings("unchecked")
-        public T build() {
-            // If server not set and other config not available, try to obtain from entity config
-            if (server == null
-                    && (baseUri == null || baseUriProvider == null)
-                    && username == null && password == null && sessionTimeout == null) {
-                ZabbixServer server = Preconditions.checkNotNull(entity.getConfig(ZabbixMonitored.ZABBIX_SERVER), "The ZABBIX_SERVER config key must be set on the entity");
-                server(server);
-            }
-            // Now create feed
-            T result = (T) new ZabbixFeed(this);
-            result.setEntity(checkNotNull(entity, "entity"));
-            built = true;
-            if (suspended) result.suspend();
-            result.start();
-            return result;
-        }
-        @Override
-        protected void finalize() {
-            if (!built) log.warn("ZabbixFeed.Builder created, but build() never called");
-        }
-    }
-
-    protected static class ZabbixPollIdentifier {
-        final String itemName;
-
-        protected ZabbixPollIdentifier(String itemName) {
-            this.itemName = checkNotNull(itemName, "itemName");
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hashCode(itemName);
-        }
-
-        @Override
-        public boolean equals(Object other) {
-            if (!(other instanceof ZabbixPollIdentifier)) {
-                return false;
-            }
-            ZabbixPollIdentifier o = (ZabbixPollIdentifier) other;
-            return Objects.equal(itemName, o.itemName);
-        }
-    }
-
-    // Flag set when the Zabbix agent is registered for a host
-    protected final AtomicBoolean registered = new AtomicBoolean(false);
-
-    /**
-     * For rebind; do not call directly; use builder
-     */
-    public ZabbixFeed() {
-    }
-    
-    protected ZabbixFeed(final Builder<? extends ZabbixFeed, ?> builder) {
-        setConfig(BASE_URI_PROVIDER, builder.baseUriProvider);
-        if (builder.baseUri != null) {
-            if (builder.baseUriProvider != null) {
-                throw new IllegalStateException("Not permitted to supply baseUri and baseUriProvider");
-            }
-            setConfig(BASE_URI_PROVIDER, Suppliers.ofInstance(builder.baseUri));
-        } else {
-            setConfig(BASE_URI_PROVIDER, checkNotNull(builder.baseUriProvider, "baseUriProvider and baseUri"));
-        }
-
-        setConfig(GROUP_ID, checkNotNull(builder.groupId, "Zabbix groupId must be set"));
-        setConfig(TEMPLATE_ID, checkNotNull(builder.templateId, "Zabbix templateId must be set"));
-        setConfig(UNIQUE_HOSTNAME_GENERATOR, checkNotNull(builder.uniqueHostnameGenerator, "uniqueHostnameGenerator"));
-
-        Set<ZabbixPollConfig<?>> polls = Sets.newLinkedHashSet();
-        for (ZabbixPollConfig<?> config : builder.polls) {
-            if (!config.isEnabled()) continue;
-            @SuppressWarnings({ "unchecked", "rawtypes" })
-            ZabbixPollConfig<?> configCopy = new ZabbixPollConfig(config);
-            if (configCopy.getPeriod() < 0) configCopy.period(builder.period, builder.periodUnits);
-            polls.add(configCopy);
-        }
-        setConfig(POLLS, polls);
-        initUniqueTag(builder.uniqueTag, polls);
-    }
-
-    @Override
-    protected void preStart() {
-        final Supplier<URI> baseUriProvider = getConfig(BASE_URI_PROVIDER);
-        final Function<? super EntityLocal, String> uniqueHostnameGenerator = getConfig(UNIQUE_HOSTNAME_GENERATOR);
-        final Integer groupId = getConfig(GROUP_ID);
-        final Integer templateId = getConfig(TEMPLATE_ID);
-        final Set<ZabbixPollConfig<?>> polls = getConfig(POLLS);
-        
-        log.info("starting zabbix feed for {}", entity);
-
-        // TODO if supplier returns null, we may wish to defer initialization until url available?
-        // TODO for https should we really trust all?
-        final HttpClient httpClient = HttpTool.httpClientBuilder()
-                .trustAll()
-                .clientConnectionManager(new ThreadSafeClientConnManager())
-                .reuseStrategy(new NoConnectionReuseStrategy())
-                .uri(baseUriProvider.get())
-                .build();
-
-        // Registration job, calls Zabbix host.create API
-        final Callable<HttpToolResponse> registerJob = new Callable<HttpToolResponse>() {
-            @Override
-            public HttpToolResponse call() throws Exception {
-                if (!registered.get()) {
-                    // Find the first machine, if available
-                    Optional<Location> location = Iterables.tryFind(entity.getLocations(), Predicates.instanceOf(MachineLocation.class));
-                    if (!location.isPresent()) {
-                        return null; // Do nothing until location is present
-                    }
-                    MachineLocation machine = (MachineLocation) location.get();
-
-                    String host = uniqueHostnameGenerator.apply(entity);
-                    
-                    // Select address and port using port-forwarding if available
-                    String address = entity.getAttribute(Attributes.ADDRESS);
-                    Integer port = entity.getAttribute(ZabbixMonitored.ZABBIX_AGENT_PORT);
-                    if (machine instanceof SupportsPortForwarding) {
-                        Cidr management = entity.getConfig(BrooklynAccessUtils.MANAGEMENT_ACCESS_CIDR);
-                        HostAndPort forwarded = ((SupportsPortForwarding) machine).getSocketEndpointFor(management, port);
-                        address = forwarded.getHostText();
-                        port = forwarded.getPort();
-                    }
-
-                    // Fill in the JSON template and POST it
-                    byte[] body = JSON_HOST_CREATE
-                            .replace("{{token}}", entity.getConfig(ZabbixMonitored.ZABBIX_SERVER).getAttribute(ZabbixServer.ZABBIX_TOKEN))
-                            .replace("{{host}}", host)
-                            .replace("{{ip}}", address)
-                            .replace("{{port}}", Integer.toString(port))
-                            .replace("{{groupId}}", Integer.toString(groupId))
-                            .replace("{{templateId}}", Integer.toString(templateId))
-                            .replace("{{id}}", Integer.toString(id.incrementAndGet()))
-                            .getBytes();
-                    
-                    return HttpTool.httpPost(httpClient, baseUriProvider.get(), ImmutableMap.of("Content-Type", "application/json"), body);
-                }
-                return null;
-            }
-        };
-
-        // The handler for the registration job
-        PollHandler<? super HttpToolResponse> registrationHandler = new PollHandler<HttpToolResponse>() {
-            @Override
-            public void onSuccess(HttpToolResponse val) {
-                if (registered.get() || val == null) {
-                    return; // Skip if we are registered already or no data from job
-                }
-                JsonObject response = HttpValueFunctions.jsonContents().apply(val).getAsJsonObject();
-                if (response.has("error")) {
-                    // Parse the JSON error object and log the message
-                    JsonObject error = response.get("error").getAsJsonObject();
-                    String message = error.get("message").getAsString();
-                    String data = error.get("data").getAsString();
-                    log.warn("zabbix failed registering host - {}: {}", message, data);
-                } else if (response.has("result")) {
-                    // Parse the JSON result object and save the hostId
-                    JsonObject result = response.get("result").getAsJsonObject();
-                    String hostId = result.get("hostids").getAsJsonArray().get(0).getAsString();
-                    // Update the registered status if not set
-                    if (registered.compareAndSet(false, true)) {
-                        entity.sensors().set(ZabbixMonitored.ZABBIX_AGENT_HOSTID, hostId);
-                        log.info("zabbix registered host as id {}", hostId);
-                    }
-                } else {
-                    throw new IllegalStateException(String.format("zabbix host registration returned invalid result: %s", response.toString()));
-                }
-            }
-            @Override
-            public boolean checkSuccess(HttpToolResponse val) {
-                return (val.getResponseCode() == 200);
-            }
-            @Override
-            public void onFailure(HttpToolResponse val) {
-                log.warn("zabbix sever returned failure code: {}", val.getResponseCode());
-            }
-            @Override
-            public void onException(Exception exception) {
-                log.warn("zabbix exception registering host", exception);
-            }
-            @Override
-            public String toString() {
-                return super.toString()+"["+getDescription()+"]";
-            }
-            @Override
-            public String getDescription() {
-                return "Zabbix rest poll";
-            }
-        };
-
-        // Schedule registration attempt once per second
-        getPoller().scheduleAtFixedRate(registerJob, registrationHandler, 1000l); // TODO make configurable
-
-        // Create a polling job for each Zabbix metric
-        for (final ZabbixPollConfig<?> config : polls) {
-            Callable<HttpToolResponse> pollJob = new Callable<HttpToolResponse>() {
-                @Override
-                public HttpToolResponse call() throws Exception {
-                    if (registered.get()) {
-                        if (log.isTraceEnabled()) log.trace("zabbix polling {} for {}", entity, config);
-                        byte[] body = JSON_ITEM_GET
-                                .replace("{{token}}", entity.getConfig(ZabbixMonitored.ZABBIX_SERVER).getAttribute(ZabbixServer.ZABBIX_TOKEN))
-                                .replace("{{hostId}}", entity.getAttribute(ZabbixMonitored.ZABBIX_AGENT_HOSTID))
-                                .replace("{{itemKey}}", config.getItemKey())
-                                .replace("{{id}}", Integer.toString(id.incrementAndGet()))
-                                .getBytes();
-                        
-                        return HttpTool.httpPost(httpClient, baseUriProvider.get(), ImmutableMap.of("Content-Type", "application/json"), body);
-                    } else {
-                        throw new IllegalStateException("zabbix agent not yet registered");
-                    }
-                }
-            };
-
-            // Schedule the Zabbix polling job
-            AttributePollHandler<? super HttpToolResponse> pollHandler = new AttributePollHandler<HttpToolResponse>(config, entity, this);
-            long minPeriod = Integer.MAX_VALUE; // TODO make configurable
-            if (config.getPeriod() > 0) minPeriod = Math.min(minPeriod, config.getPeriod());
-            getPoller().scheduleAtFixedRate(pollJob, pollHandler, minPeriod);
-        }
-
-    }
-
-    @SuppressWarnings("unchecked")
-    protected Poller<HttpToolResponse> getPoller() {
-        return (Poller<HttpToolResponse>) super.getPoller();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixMonitored.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixMonitored.java b/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixMonitored.java
deleted file mode 100644
index deb8bf1..0000000
--- a/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixMonitored.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.monitoring.zabbix;
-
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensor;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-public interface ZabbixMonitored {
-
-    /** The entity representing the Zabbix server monitoring an entity. */
-    @SetFromFlag("zabbixServer")
-    ConfigKey<ZabbixServer> ZABBIX_SERVER = new BasicConfigKey<ZabbixServer>(ZabbixServer.class, "zabbix.server.entity", "Zabbix server for this entity");
-
-    PortAttributeSensorAndConfigKey ZABBIX_AGENT_PORT = new PortAttributeSensorAndConfigKey("zabbix.agent.port", "The port the Zabbix agent is listening on", "10050+");
-
-    AttributeSensor<String> ZABBIX_AGENT_HOSTID = new BasicAttributeSensor<String>(String.class, "zabbix.agent.hostid", "The hostId for a Zabbix monitored agent");
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixPollConfig.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixPollConfig.java b/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixPollConfig.java
deleted file mode 100644
index 3e9300f..0000000
--- a/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixPollConfig.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.monitoring.zabbix;
-
-import javax.annotation.Nullable;
-
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.feed.PollConfig;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.feed.http.JsonFunctions;
-import org.apache.brooklyn.util.collections.MutableList;
-import org.apache.brooklyn.util.http.HttpToolResponse;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.gson.JsonElement;
-
-public class ZabbixPollConfig<T> extends PollConfig<HttpToolResponse, T, ZabbixPollConfig<T>> {
-
-    private String itemKey;
-
-    public ZabbixPollConfig(AttributeSensor<T> sensor) {
-        super(sensor);
-        // Add onSuccess method to extract the last value of the item
-        // FIXME Fix generics
-        onSuccess((Function)HttpValueFunctions.chain(
-                HttpValueFunctions.jsonContents(),
-                new Function<JsonElement, JsonElement>() {
-                    @Override
-                    public JsonElement apply(@Nullable JsonElement input) {
-                        Preconditions.checkNotNull(input, "JSON input");
-                        return input.getAsJsonObject().get("result")
-                                .getAsJsonArray().get(0)
-                                .getAsJsonObject().get("lastvalue");
-                    }
-                },
-                JsonFunctions.cast(getSensor().getType())));
-    }
-
-    public ZabbixPollConfig(ZabbixPollConfig<T> other) {
-        super(other);
-        this.itemKey = other.getItemKey();
-    }
-
-    public String getItemKey() {
-        return itemKey;
-    }
-
-    public ZabbixPollConfig<T> itemKey(String val) {
-        this.itemKey = val;
-        return this;
-    }
-
-    @Override
-    protected MutableList<Object> equalsFields() {
-        return super.equalsFields().appendIfNotNull(itemKey);
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixServer.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixServer.java b/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixServer.java
deleted file mode 100644
index 9ecaada..0000000
--- a/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixServer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.monitoring.zabbix;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensor;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-
-@ImplementedBy(ZabbixServerImpl.class)
-public interface ZabbixServer extends Entity {
-
-    @SuppressWarnings({ "unchecked", "rawtypes" })
-    @SetFromFlag("filter")
-    ConfigKey<Predicate<? super Entity>> ENTITY_FILTER = new BasicConfigKey(Predicate.class, "zabbix.server.filter", "Filter for entities which will automatically be monitored", Predicates.instanceOf(ZabbixMonitored.class));
-
-    @SetFromFlag("serverApiUrl")
-    ConfigKey<String> ZABBIX_SERVER_API_URL = new BasicConfigKey<String>(String.class, "zabbix.server.apiUrl", "Main Zabbix server API URL");
-
-    @SetFromFlag("username")
-    ConfigKey<String> ZABBIX_SERVER_USERNAME = new BasicConfigKey<String>(String.class, "zabbix.server.username", "Zabbix server API login user");
-
-    @SetFromFlag("password")
-    ConfigKey<String> ZABBIX_SERVER_PASSWORD = new BasicConfigKey<String>(String.class, "zabbix.server.password", "Zabbix server API login password");
-
-    ConfigKey<Integer> ZABBIX_SESSION_TIMEOUT = new BasicConfigKey<Integer>(Integer.class, "zabbix.server.sessionTimeout", "Zabbix server API session timeout period (seconds)", 3600);
-
-    AttributeSensor<String> ZABBIX_TOKEN = new BasicAttributeSensor<String>(String.class, "zabbix.server.token", "Zabbix server API authentication token");
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixServerImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixServerImpl.java b/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixServerImpl.java
deleted file mode 100644
index 708c6c1..0000000
--- a/brooklyn-library/sandbox/monitoring/src/main/java/org/apache/brooklyn/entity/monitoring/zabbix/ZabbixServerImpl.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.monitoring.zabbix;
-
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.core.entity.AbstractEntity;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.group.AbstractMembershipTrackingPolicy;
-import org.apache.brooklyn.entity.group.DynamicGroup;
-import org.apache.brooklyn.feed.http.HttpFeed;
-import org.apache.brooklyn.feed.http.HttpPollConfig;
-import org.apache.brooklyn.feed.http.HttpValueFunctions;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Functions;
-import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-import com.google.common.collect.HashMultimap;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Multimap;
-
-public class ZabbixServerImpl extends AbstractEntity implements ZabbixServer {
-
-    private static final Logger log = LoggerFactory.getLogger(ZabbixServerImpl.class);
-
-    private Object[] mutex = new Object[0];
-    private DynamicGroup monitoredEntities;
-    private AgentTrackingPolicy policy;
-    private Multimap<Location, Entity> entityLocations = HashMultimap.create();
-
-    private transient HttpFeed login;
-
-    @Override
-    public void init() {
-        super.init();
-        Predicate<? super Entity> filter = getConfig(ENTITY_FILTER);
-        monitoredEntities = addChild(EntitySpec.create(DynamicGroup.class)
-                .configure(DynamicGroup.ENTITY_FILTER, filter)
-                .displayName("agents"));
-    }
-
-    @Override
-    public void onManagementStarted() {
-        final byte[] jsonData = ZabbixFeed.JSON_USER_LOGIN
-                .replace("{{username}}", getConfig(ZABBIX_SERVER_USERNAME))
-                .replace("{{password}}", getConfig(ZABBIX_SERVER_PASSWORD))
-                .getBytes();
-        login = HttpFeed.builder()
-                .entity(this)
-                .baseUri(getConfig(ZABBIX_SERVER_API_URL))
-                .headers(ImmutableMap.of("Content-Type", "application/json"))
-                .poll(new HttpPollConfig<String>(ZABBIX_TOKEN)
-                        .method("POST")
-                        .body(jsonData)
-                        .onFailure(Functions.constant(""))
-                        .onSuccess(HttpValueFunctions.jsonContents("result", String.class)))
-                .build();
-
-        policy = policies().add(PolicySpec.create(AgentTrackingPolicy.class)
-                .displayName("Zabbix Agent Tracker")
-                .configure("group", monitoredEntities));
-
-        for (Entity each : monitoredEntities.getMembers()) {
-            added(each);
-        }
-
-        sensors().set(Startable.SERVICE_UP, true);
-    }
-
-    public static class AgentTrackingPolicy extends AbstractMembershipTrackingPolicy {
-        @Override
-        protected void onEntityChange(Entity member) {
-            ((ZabbixServerImpl)entity).added(member); }
-        @Override
-        protected void onEntityAdded(Entity member) {
-        } // Ignore
-        @Override
-        protected void onEntityRemoved(Entity member) {
-            ((ZabbixServerImpl)entity).removed(member);
-        }
-    }
-    
-    public void added(Entity member) {
-        synchronized (mutex) {
-            Optional<Location> location = Iterables.tryFind(member.getLocations(), Predicates.instanceOf(SshMachineLocation.class));
-            if (location.isPresent() && member.getAttribute(Startable.SERVICE_UP)) {
-                SshMachineLocation machine = (SshMachineLocation) location.get();
-                if (!entityLocations.containsKey(machine)) {
-                    entityLocations.put(machine, member);
-                    // Configure the Zabbix agent
-                    List<String> commands = ImmutableList.<String>builder()
-                            .add("sed -i.bk 's/\\$HOSTNAME/" + machine.getDisplayName() + "/' /etc/zabbix/zabbix_agentd.conf")
-                            .add("zabbix_agentd")
-                            .build();
-                    int result = machine.execCommands("configuring zabbix_agentd", commands);
-                    if (result == 0) {
-                        log.info("zabbix_agentd configured on {} at {}", member, machine);
-                    } else {
-                        log.warn("failed to configure zabbix_agentd on {}, status {}", machine, result);
-                    }
-                }
-            } else {
-                log.warn("zabbix added({}) called but no location or service not started", member);
-            }
-        }
-    }
-
-    public void removed(Entity member) {
-        synchronized (mutex) {
-            for (Location location : member.getLocations()) {
-                entityLocations.remove(location, member);
-            }
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/nosql/README.md
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/nosql/README.md b/brooklyn-library/sandbox/nosql/README.md
deleted file mode 100644
index 034d49a..0000000
--- a/brooklyn-library/sandbox/nosql/README.md
+++ /dev/null
@@ -1,92 +0,0 @@
-# Brooklyn Entity for MongoDB #
-
-This entity allows MongoDB instances to be started and managed by Brooklyn.
-
-## Usage ##
-
-You can add a MongoDB entity with this code: (Groovy)
-
-    mongodb = new MongoDbServer(owner: myApplication);
-
-The entity supports the following configuration keys:
-
-  * MongoDbServer.PORT - the TCP port to listen on. Defaults to 27017+
-  * MongoDbServer.VERSION - which version of mongoDB to download and
-    install. Defaults to 2.2.2
-  * MongoDbServer.CONFIG_URL - a URL of a MongoDB configuration file to install.
-
-
-Note that several configuration parameters are reserved. If you supply
-a CONFIG_URL that attempts to set any of these parameters, they will
-be ignored.
-
-  * pidfilepath
-  * fork
-  * dbpath
-  * logpath
-
-## Further development ##
-
-The following areas are suggested for further development:
-
-### Sensors ###
-
-MongoDB has several statistics available through its programmatic API
-(visible in a similar way to documents). These could potentially be
-used to expose health data as Brooklyn sensors.
-
-See http://docs.mongodb.org/manual/administration/monitoring/#statistics
-
-### Replication ###
-
-MongoDB supports a *replication* system. This allows up to 12 MongoDB
-instances to be started and brought together as a replication set. One
-node becomes the primary and will service write requests, replicating
-to other nodes ("secondaries") in the set. Reads can be serviced by
-any node.
-
-Replication provides extra resilience, as the secondaries will monitor
-the health of the primary, and in the event of its failure, one of the
-secondaries will be promoted to primary.
-
-It also has the potential to act as a performance tool for heavy read
-scenarios, as reads can be directed to any node.
-
-It has an analog in multiple web application servers with a
-load-balancer node in front - a cluster controller will be required to
-expose effectors that control the size of the cluster, and sensors
-that aggregate the individual MongoDB sensors. It differs from the web
-tier example by not needing a load balancer - MongoDB manages this
-itself.
-
-See http://docs.mongodb.org/manual/core/replication/
-
-### Sharding ###
-
-Sharding distributes data between multiple nodes, each node
-responsible for a specific subset of the data. The allows MongoDB to
-scale up to handle large quantities of data that a single node could
-not handle on its own. It also improves performance in workloads
-involving many writes, as the write operations will be spread across
-multiple nodes (subject to the data being written being fairly evenly
-distributed across nodes).
-
-See http://docs.mongodb.org/manual/sharding/
-
-----
-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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/nosql/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/nosql/pom.xml b/brooklyn-library/sandbox/nosql/pom.xml
deleted file mode 100644
index c68f79d..0000000
--- a/brooklyn-library/sandbox/nosql/pom.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>org.apache.brooklyn.sandbox</groupId>
-    <artifactId>brooklyn-sandbox-software-nosql</artifactId>
-    <packaging>jar</packaging>
-    <name>Brooklyn NoSQL Software Entities</name>
-    <description>
-        Brooklyn entitites for NoSQL software processes
-    </description>
-
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <version>${testng.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-            <classifier>tests</classifier>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-locations-jclouds</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/nosql/src/main/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5Driver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/nosql/src/main/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5Driver.java b/brooklyn-library/sandbox/nosql/src/main/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5Driver.java
deleted file mode 100644
index 810450e..0000000
--- a/brooklyn-library/sandbox/nosql/src/main/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5Driver.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.infinispan;
-
-public interface Infinispan5Driver {
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/nosql/src/main/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5Server.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/nosql/src/main/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5Server.java b/brooklyn-library/sandbox/nosql/src/main/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5Server.java
deleted file mode 100644
index 7ec7bb4..0000000
--- a/brooklyn-library/sandbox/nosql/src/main/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5Server.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.infinispan;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.util.collections.MutableMap;
-
-/**
- * An {@link brooklyn.entity.Entity} that represents an Infinispan service
- */
-public class Infinispan5Server extends SoftwareProcessImpl implements UsesJmx {
-    private static final Logger log = LoggerFactory.getLogger(Infinispan5Server.class);
-    
-    public static final BasicAttributeSensorAndConfigKey<String> PROTOCOL = new BasicAttributeSensorAndConfigKey<String>(
-            String.class, "infinispan.server.protocol", 
-            "Infinispan protocol (e.g. memcached, hotrod, or websocket)", "memcached");
-    
-    public static final PortAttributeSensorAndConfigKey PORT = new PortAttributeSensorAndConfigKey(
-            "infinispan.server.port", "TCP port number to listen on");
-
-    @SetFromFlag("version")
-    public static final ConfigKey<String> SUGGESTED_VERSION =
-            ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "5.0.0.CR8");
-
-    // Default filename is "infinispan-${version}-all.zip"
-    @SetFromFlag("downloadUrl")
-    public static final BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey<String>(
-            SoftwareProcess.DOWNLOAD_URL, "http://sourceforge.net/projects/infinispan/files/infinispan/${version}/infinispan-${version}-all.zip/download");
-
-    public Infinispan5Server() {
-        this(MutableMap.of(), null);
-    }
-    public Infinispan5Server(Map properties) {
-        this(properties, null);
-    }
-    public Infinispan5Server(Entity parent) {
-        this(MutableMap.of(), parent);
-    }
-    public Infinispan5Server(Map properties, Entity parent) {
-        super(properties, parent);
-    }
-
-    @Override
-    public Class getDriverInterface() {
-        return Infinispan5Driver.class;
-    }
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        super.connectServiceUpIsRunning();
-    }
-    
-    @Override
-    protected void disconnectSensors() {
-        super.disconnectServiceUpIsRunning();
-        super.disconnectSensors();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/nosql/src/main/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5SshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/nosql/src/main/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5SshDriver.java b/brooklyn-library/sandbox/nosql/src/main/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5SshDriver.java
deleted file mode 100644
index 87f25c1..0000000
--- a/brooklyn-library/sandbox/nosql/src/main/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5SshDriver.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.infinispan;
-
-import static java.lang.String.format;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessSshDriver;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.ssh.BashCommands;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * Start a {@link TomcatServer} in a {@link Location} accessible over ssh.
- */
-public class Infinispan5SshDriver extends JavaSoftwareProcessSshDriver implements Infinispan5Driver {
-
-    public Infinispan5SshDriver(Infinispan5Server entity, SshMachineLocation machine) {
-        super(entity, machine);
-    }
-
-    @Override
-    protected String getLogFileLocation() {
-        throw new UnsupportedOperationException("Work in progress");
-    }
-
-    protected String getProtocol() {
-        return entity.getAttribute(Infinispan5Server.PROTOCOL);
-    }
-
-    protected Integer getPort() {
-        return entity.getAttribute(Infinispan5Server.PORT);
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = ImmutableList.<String>builder()
-                .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-                .add(BashCommands.INSTALL_ZIP)
-                .add("unzip " + saveAs)
-                .build();
-
-        newScript(INSTALLING).
-                failOnNonZeroResultCode().
-                body.append(commands).execute();
-    }
-
-    @Override
-    public void customize() {
-        // TODO create and reference a conf.xml? And start with --cache_config <path>
-        Map ports = MutableMap.of("port", getPort(), "jmxPort", getJmxPort());
-        Networking.checkPortsValid(ports);
-
-        newScript(CUSTOMIZING)
-                .body.append()
-                .execute();
-    }
-
-    @Override
-    public void launch() {
-        // FIXME Do we want to redirect stdout/stderr: >> %s/console 2>&1 </dev/null &", getRunDir())
-        newScript(MutableMap.of("usePidFile", true), LAUNCHING).
-                body.append(
-                        format("%s/bin/startServer.sh --protocol %s "
-                                +(getPort() != null ? " --port %s" : "")+" &", 
-                                getExpandedInstallDir(), getProtocol(), getPort()))
-                .execute();
-    }
-
-
-    @Override
-    public boolean isRunning() {
-        Map flags = MutableMap.of("usePidFile", true);
-        return newScript(flags, CHECK_RUNNING).execute() == 0;
-    }
-    
-    @Override
-    public void stop() {
-        Map flags = MutableMap.of("usePidFile", true);
-        newScript(flags, STOPPING).execute();
-    }
-
-    @Override
-    public void kill() {
-        Map flags = MutableMap.of("usePidFile", true);
-        newScript(flags, KILLING).execute();
-    }
-
-    @Override
-    protected List<String> getCustomJavaConfigOptions() {
-        List<String> options = new LinkedList<String>();
-        options.addAll(super.getCustomJavaConfigOptions());
-        options.add("-Xms200m");
-        options.add("-Xmx800m");
-        options.add("-XX:MaxPermSize=400m");
-        return options;
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/nosql/src/test/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5ServerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/nosql/src/test/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5ServerIntegrationTest.java b/brooklyn-library/sandbox/nosql/src/test/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5ServerIntegrationTest.java
deleted file mode 100644
index 2c2afc1..0000000
--- a/brooklyn-library/sandbox/nosql/src/test/java/org/apache/brooklyn/entity/nosql/infinispan/Infinispan5ServerIntegrationTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.nosql.infinispan;
-
-import static org.testng.Assert.fail;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.net.SocketException;
-import java.util.concurrent.Callable;
-
-import org.apache.brooklyn.api.entity.Application;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.test.entity.TestApplicationImpl;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.net.Networking;
-import org.apache.brooklyn.util.repeat.Repeater;
-import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-class Infinispan5ServerIntegrationTest {
-    private static final Logger logger = LoggerFactory.getLogger(Infinispan5ServerIntegrationTest.class);
-    
-    static String DEFAULT_PROTOCOL = "memcached";
-    static int DEFAULT_PORT = 11219;
-
-    static boolean portLeftOpen = false;
-    
-    @BeforeMethod(groups = "Integration")
-    public void failIfPortInUse() {
-        if (Networking.isPortAvailable(DEFAULT_PORT)) {
-            portLeftOpen = true;
-            fail("someone is already listening on port $DEFAULT_PORT; tests assume that port $DEFAULT_PORT is free on localhost");
-        }
-    }
- 
-    @AfterMethod(groups = "Integration")
-    public void ensureIsShutDown() {
-        boolean socketClosed = new Repeater("Checking Infinispan has shut down")
-            .every(Duration.millis(100))
-            .until(new Callable<Boolean>() {
-                @Override
-                public Boolean call() throws Exception {
-                    Socket shutdownSocket = null;
-
-                    try { shutdownSocket = new Socket(Networking.getLocalHost(), DEFAULT_PORT); }
-                    catch (SocketException e) { return true; }
-                    shutdownSocket.close();
-
-                    return false;
-                }
-            })
-            .limitIterationsTo(25)
-            .run();
-
-        if (socketClosed == false) {
-            logger.error("Infinispan did not shut down");
-            throw new IllegalStateException("Infinispan did not shut down");
-        }
-    }
-
-    public void ensureIsUp() throws IOException {
-        Socket socket = new Socket(Networking.getLocalHost(), DEFAULT_PORT);
-        socket.close();
-    }
-
-    @Test(groups = {"Integration", "WIP"})
-    public void testInfinispanStartsAndStops() {
-        Application app = new TestApplicationImpl();
-        try {
-            final Infinispan5Server infini = new Infinispan5Server(ImmutableMap.of("parent", app));
-            infini.config().set(Infinispan5Server.PORT.getConfigKey(), PortRanges.fromInteger(DEFAULT_PORT));
-            infini.start(ImmutableList.of(new LocalhostMachineProvisioningLocation(ImmutableMap.of("name","london"))));
-            EntityTestUtils.assertAttributeEqualsEventually(infini, Infinispan5Server.SERVICE_UP, Boolean.TRUE);
-        } finally {
-            Entities.destroy(app);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/pom.xml b/brooklyn-library/software/database/pom.xml
deleted file mode 100644
index 11cfcdb..0000000
--- a/brooklyn-library/software/database/pom.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>brooklyn-software-database</artifactId>
-    <packaging>jar</packaging>
-    <name>Brooklyn Database Software Entities</name>
-    <description>
-        Brooklyn entitites for database software processes
-    </description>
-
-    <parent>
-        <groupId>org.apache.brooklyn</groupId>
-        <artifactId>brooklyn-library</artifactId>
-        <version>0.9.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.rat</groupId>
-                    <artifactId>apache-rat-plugin</artifactId>
-                    <configuration>
-                        <excludes combine.children="append">
-                            <!--
-                                Configuration artifacts (for installations) are based on templated defaults for 
-                                the given components. These are files "without any degree of creativity" from the
-                                perspective of the Brooklyn/Apache contribution.
-                            -->
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini</exclude>
-                            <exclude>src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml</exclude>
-                        </excludes>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
-    
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-utils-common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.code.findbugs</groupId>
-            <artifactId>jsr305</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-base</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <!-- bring in jclouds for testing -->
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-locations-jclouds</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <version>${mysql-connector-java.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- we need this dependency since we are going to deploy mysql in various rackspace machines (Debian, Ubuntu etc) -->
-        <dependency>
-            <groupId>${jclouds.groupId}.provider</groupId>
-            <artifactId>rackspace-cloudservers-uk</artifactId>
-            <version>${jclouds.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>postgresql</groupId>
-            <artifactId>postgresql</artifactId>
-            <version>${postgresql.version}</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/DatabaseNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/DatabaseNode.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/DatabaseNode.java
deleted file mode 100644
index d034d7d..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/DatabaseNode.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database;
-
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-
-/** @deprecated since 0.7.0 use DatastoreMixins.DatastoreCommon */ @Deprecated 
-public interface DatabaseNode extends DatastoreMixins.DatastoreCommon {
-
-    /** @deprecated since 0.7.0 use DATASTORE_URL */ @Deprecated 
-    public static final AttributeSensor<String> DB_URL = DATASTORE_URL;
-    
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/DatastoreMixins.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/DatastoreMixins.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/DatastoreMixins.java
deleted file mode 100644
index 67eda16..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/DatastoreMixins.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database;
-
-import java.io.InputStream;
-
-import javax.annotation.Nullable;
-
-import org.apache.brooklyn.api.effector.Effector;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.util.core.ResourceUtils;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-import org.apache.brooklyn.util.stream.KnownSizeInputStream;
-import org.apache.brooklyn.util.text.Strings;
-
-public class DatastoreMixins {
-
-    private DatastoreMixins() {}
-    
-    
-    public static final AttributeSensor<String> DATASTORE_URL = HasDatastoreUrl.DATASTORE_URL;
-    
-    public static interface HasDatastoreUrl {
-        public static final AttributeSensor<String> DATASTORE_URL = Sensors.newStringSensor("datastore.url",
-            "Primary contact URL for a datastore (e.g. mysql://localhost:3306/)");
-    }
-
-    
-    public static final Effector<String> EXECUTE_SCRIPT = CanExecuteScript.EXECUTE_SCRIPT;
-    
-    public static interface CanExecuteScript {
-        ConfigKey<String> COMMANDS = ConfigKeys.newStringConfigKey("commands");
-        Effector<String> EXECUTE_SCRIPT = Effectors.effector(String.class, "executeScript")
-            .description("executes the given script contents")
-            .parameter(COMMANDS)
-            .buildAbstract();
-    }
-
-    
-    public static final ConfigKey<String> CREATION_SCRIPT_CONTENTS = CanGiveCreationScript.CREATION_SCRIPT_CONTENTS; 
-    public static final ConfigKey<String> CREATION_SCRIPT_URL = CanGiveCreationScript.CREATION_SCRIPT_URL; 
-
-    public static interface CanGiveCreationScript {
-        @SetFromFlag("creationScriptContents")
-        public static final ConfigKey<String> CREATION_SCRIPT_CONTENTS = ConfigKeys.newStringConfigKey(
-                "datastore.creation.script.contents",
-                "Contents of creation script to initialize the datastore",
-                "");
-        
-        @SetFromFlag("creationScriptUrl")
-        public static final ConfigKey<String> CREATION_SCRIPT_URL = ConfigKeys.newStringConfigKey(
-                "datastore.creation.script.url",
-                "URL of creation script to use to initialize the datastore (ignored if creationScriptContents is specified)",
-                "");
-    }
-
-    /** returns the creation script contents, if it exists, or null if none is defined (error if it cannot be loaded) */
-    @Nullable public static InputStream getDatabaseCreationScript(Entity entity) {
-        String url = entity.getConfig(DatastoreMixins.CREATION_SCRIPT_URL);
-        if (!Strings.isBlank(url))
-            return new ResourceUtils(entity).getResourceFromUrl(url);
-        String contents = entity.getConfig(DatastoreMixins.CREATION_SCRIPT_CONTENTS);
-        if (!Strings.isBlank(contents))
-            return KnownSizeInputStream.of(contents);
-        return null;
-    }
-
-    /** returns the creation script contents, if it exists, or null if none is defined (error if it cannot be loaded) */
-    @Nullable public static String getDatabaseCreationScriptAsString(Entity entity) {
-        String url = entity.getConfig(DatastoreMixins.CREATION_SCRIPT_URL);
-        if (!Strings.isBlank(url))
-            return new ResourceUtils(entity).getResourceAsString(url);
-        String contents = entity.getConfig(DatastoreMixins.CREATION_SCRIPT_CONTENTS);
-        if (!Strings.isBlank(contents))
-            return contents;
-        return null;
-    }
-    
-    /** An entity with the most common datastore config, sensors, and effectors */ 
-    public interface DatastoreCommon extends Entity, DatastoreMixins.HasDatastoreUrl, DatastoreMixins.CanExecuteScript, DatastoreMixins.CanGiveCreationScript {
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNode.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNode.java
deleted file mode 100644
index f22381a..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNode.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.crate;
-
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.AttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.java.UsesJava;
-import org.apache.brooklyn.entity.java.UsesJavaMXBeans;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-@ImplementedBy(CrateNodeImpl.class)
-public interface CrateNode extends SoftwareProcess, UsesJava,UsesJmx, UsesJavaMXBeans, DatastoreCommon {
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION,
-            "0.45.7");
-
-    @SetFromFlag("downloadUrl")
-    AttributeSensorAndConfigKey<String, String> DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey(
-            Attributes.DOWNLOAD_URL,
-            "https://cdn.crate.io/downloads/releases/crate-${version}.tar.gz");
-
-    @SetFromFlag("serverConfig")
-    BasicAttributeSensorAndConfigKey<String> SERVER_CONFIG_URL = new BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey(
-            "crate.serverConfig", "A URL of a YAML file to use to configure the server",
-            "classpath://org/apache/brooklyn/entity/database/crate/crate.yaml");
-
-    @SetFromFlag("port")
-    public static final PortAttributeSensorAndConfigKey CRATE_PORT = new PortAttributeSensorAndConfigKey(
-            "crate.port", "The port for node-to-node communication", PortRanges.fromString("4300+"));
-
-    @SetFromFlag("httpPort")
-    public static final PortAttributeSensorAndConfigKey CRATE_HTTP_PORT = new PortAttributeSensorAndConfigKey(
-            "crate.httpPort", "The port for HTTP traffic", PortRanges.fromString("4200+"));
-
-    AttributeSensor<String> MANAGEMENT_URL = Sensors.newStringSensor(
-            "crate.managementUri", "The address at which the Crate server listens");
-
-    AttributeSensor<String> SERVER_NAME = Sensors.newStringSensor(
-            "crate.server.name", "The name of the server");
-
-    AttributeSensor<Boolean> SERVER_OK = Sensors.newBooleanSensor(
-            "crate.server.ok", "True if the server reports thus");
-
-    AttributeSensor<Integer> SERVER_STATUS = Sensors.newIntegerSensor(
-            "crate.server.status", "The status of the server");
-
-    AttributeSensor<String> SERVER_BUILD_TIMESTAMP = Sensors.newStringSensor(
-            "crate.server.buildTimestamp", "The timestamp of the server build");
-
-    AttributeSensor<String> SERVER_BUILD_HASH = Sensors.newStringSensor(
-            "crate.server.buildHash", "The build hash of the server");
-
-    AttributeSensor<Boolean> SERVER_IS_BUILD_SNAPSHOT = Sensors.newBooleanSensor(
-            "crate.server.isBuildSnapshot", "True if the server reports it is a snapshot build");
-
-    AttributeSensor<String> SERVER_LUCENE_VERSION = Sensors.newStringSensor(
-            "crate.server.luceneVersion", "The Lucene version of the server");
-
-    AttributeSensor<String> SERVER_ES_VERSION = Sensors.newStringSensor(
-            "crate.server.esVersion", "The ES version of the server");
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNodeDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNodeDriver.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNodeDriver.java
deleted file mode 100644
index de01b6b..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/crate/CrateNodeDriver.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.entity.database.crate;
-
-import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
-
-public interface CrateNodeDriver extends JavaSoftwareProcessDriver {
-}


[36/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

Posted by he...@apache.org.
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/errors.json
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/errors.json b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/errors.json
deleted file mode 100644
index 91a32c9..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/errors.json
+++ /dev/null
@@ -1 +0,0 @@
-{"id":"ng","generated":"Tue Jul 01 2014 10:38:05 GMT-0700 (PDT)","errors":{"$cacheFactory":{"iid":"CacheId '{0}' is already taken!"},"ngModel":{"nonassign":"Expression '{0}' is non-assignable. Element: {1}"},"$sce":{"iequirks":"Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.","insecurl":"Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}","icontext":"Attempted to trust a value in invalid context. Context: {0}; Value: {1}","imatcher":"Matchers may only be \"self\", string patterns or RegExp objects","iwcard":"Illegal sequence *** in string matcher.  String: {0}","itype":"Attempted to trust a non-string value in a content requiring a string: Context: {0}","unsafe":"Attempting to use an unsafe value in a safe context."},"$controller":{"noscp":"Cannot export controlle
 r '{0}' as '{1}'! No $scope object provided via `locals`."},"$compile":{"nodomevents":"Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead.","multidir":"Multiple directives [{0}, {1}] asking for {2} on: {3}","nonassign":"Expression '{0}' used with directive '{1}' is non-assignable!","tplrt":"Template for directive '{0}' must have exactly one root element. {1}","selmulti":"Binding to the 'multiple' attribute is not supported. Element: {0}","tpload":"Failed to load template: {0}","iscp":"Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}","ctreq":"Controller '{0}', required by directive '{1}', can't be found!","uterdir":"Unterminated attribute, found '{0}' but no matching '{1}' found."},"$injector":{"modulerr":"Failed to instantiate module {0} due to:\n{1}","unpr":"Unknown provider: {0}","itkn":"Incorrect injection token! Expected service name as string, got {0}","cd
 ep":"Circular dependency found: {0}","nomod":"Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.","pget":"Provider '{0}' must define $get factory method."},"$rootScope":{"inprog":"{0} already in progress","infdig":"{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}"},"ngPattern":{"noregexp":"Expected {0} to be a RegExp but was {1}. Element: {2}"},"$interpolate":{"noconcat":"Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce","interr":"Can't interpolate: {0}\n{1}"},"jqLite":{"offargs":"jqLite#off() does not support the `selector` argument","onargs":"jqLite#on() does not support the `selector` or `eventData` parameters","nosel":"Looking up elements via selectors is not suppo
 rted by jqLite! See: http://docs.angularjs.org/api/angular.element"},"ngOptions":{"iexp":"Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}"},"ngRepeat":{"iidexp":"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.","dupes":"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}","iexp":"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'."},"ng":{"areq":"Argument '{0}' is {1}","cpws":"Can't copy! Making copies of Window or Scope instances is not supported.","badname":"hasOwnProperty is not a valid {0} name","btstrpd":"App Already Bootstrapped with this Element '{0}'","cpi":"Can't copy! Source and destination are identical."},"$animate":{"notcsel":"Expecting class selector starting with '.' got '{0}'."},"ngTransclude":{"orphan":"Illegal use of ngTransc
 lude directive in the template! No parent directive that requires a transclusion found. Element: {0}"},"$parse":{"isecfld":"Attempting to access a disallowed field in Angular expressions! Expression: {0}","syntax":"Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].","isecff":"Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}","isecdom":"Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}","lexerr":"Lexer Error: {0} at column{1} in expression [{2}].","ueoe":"Unexpected end of expression: {0}","isecwindow":"Referencing the Window in Angular expressions is disallowed! Expression: {0}","isecfn":"Referencing Function in Angular expressions is disallowed! Expression: {0}","isecobj":"Referencing Object in Angular expressions is disallowed! Expression: {0}"},"$httpBackend":{"noxhr":"This browser does not support XMLHttpRequest."},"$location":{"ipthprfx":"Invalid url \"{0}\", missing path prefix \
 "{1}\".","isrcharg":"The first argument of the `$location#search()` call must be a string or an object.","ihshprfx":"Invalid url \"{0}\", missing hash prefix \"{1}\"."},"$resource":{"badargs":"Expected up to 4 arguments [params, data, success, error], got {0} arguments","badmember":"Dotted member path \"@{0}\" is invalid.","badcfg":"Error in resource configuration. Expected response to contain an {0} but got an {1}","badname":"hasOwnProperty is not a valid parameter name."},"$sanitize":{"badparse":"The sanitizer was unable to parse the following block of html: {0}"}}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_de.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_de.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_de.js
deleted file mode 100644
index 6ea1f22..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_de.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
-  "DATETIME_FORMATS": {
-    "AMPMS": [
-      "vorm.",
-      "nachm."
-    ],
-    "DAY": [
-      "Sonntag",
-      "Montag",
-      "Dienstag",
-      "Mittwoch",
-      "Donnerstag",
-      "Freitag",
-      "Samstag"
-    ],
-    "MONTH": [
-      "Januar",
-      "Februar",
-      "M\u00e4rz",
-      "April",
-      "Mai",
-      "Juni",
-      "Juli",
-      "August",
-      "September",
-      "Oktober",
-      "November",
-      "Dezember"
-    ],
-    "SHORTDAY": [
-      "So.",
-      "Mo.",
-      "Di.",
-      "Mi.",
-      "Do.",
-      "Fr.",
-      "Sa."
-    ],
-    "SHORTMONTH": [
-      "Jan",
-      "Feb",
-      "M\u00e4r",
-      "Apr",
-      "Mai",
-      "Jun",
-      "Jul",
-      "Aug",
-      "Sep",
-      "Okt",
-      "Nov",
-      "Dez"
-    ],
-    "fullDate": "EEEE, d. MMMM y",
-    "longDate": "d. MMMM y",
-    "medium": "dd.MM.yyyy HH:mm:ss",
-    "mediumDate": "dd.MM.yyyy",
-    "mediumTime": "HH:mm:ss",
-    "short": "dd.MM.yy HH:mm",
-    "shortDate": "dd.MM.yy",
-    "shortTime": "HH:mm"
-  },
-  "NUMBER_FORMATS": {
-    "CURRENCY_SYM": "\u20ac",
-    "DECIMAL_SEP": ",",
-    "GROUP_SEP": ".",
-    "PATTERNS": [
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 3,
-        "minFrac": 0,
-        "minInt": 1,
-        "negPre": "-",
-        "negSuf": "",
-        "posPre": "",
-        "posSuf": ""
-      },
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 2,
-        "minFrac": 2,
-        "minInt": 1,
-        "negPre": "-",
-        "negSuf": "\u00a0\u00a4",
-        "posPre": "",
-        "posSuf": "\u00a0\u00a4"
-      }
-    ]
-  },
-  "id": "de",
-  "pluralCat": function (n) {  if (n == 1) {   return PLURAL_CATEGORY.ONE;  }  return PLURAL_CATEGORY.OTHER;}
-});
-}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_en-gb.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_en-gb.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_en-gb.js
deleted file mode 100644
index 4a0f59a..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_en-gb.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
-  "DATETIME_FORMATS": {
-    "AMPMS": [
-      "AM",
-      "PM"
-    ],
-    "DAY": [
-      "Sunday",
-      "Monday",
-      "Tuesday",
-      "Wednesday",
-      "Thursday",
-      "Friday",
-      "Saturday"
-    ],
-    "MONTH": [
-      "January",
-      "February",
-      "March",
-      "April",
-      "May",
-      "June",
-      "July",
-      "August",
-      "September",
-      "October",
-      "November",
-      "December"
-    ],
-    "SHORTDAY": [
-      "Sun",
-      "Mon",
-      "Tue",
-      "Wed",
-      "Thu",
-      "Fri",
-      "Sat"
-    ],
-    "SHORTMONTH": [
-      "Jan",
-      "Feb",
-      "Mar",
-      "Apr",
-      "May",
-      "Jun",
-      "Jul",
-      "Aug",
-      "Sep",
-      "Oct",
-      "Nov",
-      "Dec"
-    ],
-    "fullDate": "EEEE, d MMMM y",
-    "longDate": "d MMMM y",
-    "medium": "d MMM y HH:mm:ss",
-    "mediumDate": "d MMM y",
-    "mediumTime": "HH:mm:ss",
-    "short": "dd/MM/yyyy HH:mm",
-    "shortDate": "dd/MM/yyyy",
-    "shortTime": "HH:mm"
-  },
-  "NUMBER_FORMATS": {
-    "CURRENCY_SYM": "\u00a3",
-    "DECIMAL_SEP": ".",
-    "GROUP_SEP": ",",
-    "PATTERNS": [
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 3,
-        "minFrac": 0,
-        "minInt": 1,
-        "negPre": "-",
-        "negSuf": "",
-        "posPre": "",
-        "posSuf": ""
-      },
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 2,
-        "minFrac": 2,
-        "minInt": 1,
-        "negPre": "\u00a4-",
-        "negSuf": "",
-        "posPre": "\u00a4",
-        "posSuf": ""
-      }
-    ]
-  },
-  "id": "en-gb",
-  "pluralCat": function (n) {  if (n == 1) {   return PLURAL_CATEGORY.ONE;  }  return PLURAL_CATEGORY.OTHER;}
-});
-}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_en-us.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_en-us.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_en-us.js
deleted file mode 100644
index 953cd10..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_en-us.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
-  "DATETIME_FORMATS": {
-    "AMPMS": [
-      "AM",
-      "PM"
-    ],
-    "DAY": [
-      "Sunday",
-      "Monday",
-      "Tuesday",
-      "Wednesday",
-      "Thursday",
-      "Friday",
-      "Saturday"
-    ],
-    "MONTH": [
-      "January",
-      "February",
-      "March",
-      "April",
-      "May",
-      "June",
-      "July",
-      "August",
-      "September",
-      "October",
-      "November",
-      "December"
-    ],
-    "SHORTDAY": [
-      "Sun",
-      "Mon",
-      "Tue",
-      "Wed",
-      "Thu",
-      "Fri",
-      "Sat"
-    ],
-    "SHORTMONTH": [
-      "Jan",
-      "Feb",
-      "Mar",
-      "Apr",
-      "May",
-      "Jun",
-      "Jul",
-      "Aug",
-      "Sep",
-      "Oct",
-      "Nov",
-      "Dec"
-    ],
-    "fullDate": "EEEE, MMMM d, y",
-    "longDate": "MMMM d, y",
-    "medium": "MMM d, y h:mm:ss a",
-    "mediumDate": "MMM d, y",
-    "mediumTime": "h:mm:ss a",
-    "short": "M/d/yy h:mm a",
-    "shortDate": "M/d/yy",
-    "shortTime": "h:mm a"
-  },
-  "NUMBER_FORMATS": {
-    "CURRENCY_SYM": "$",
-    "DECIMAL_SEP": ".",
-    "GROUP_SEP": ",",
-    "PATTERNS": [
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 3,
-        "minFrac": 0,
-        "minInt": 1,
-        "negPre": "-",
-        "negSuf": "",
-        "posPre": "",
-        "posSuf": ""
-      },
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 2,
-        "minFrac": 2,
-        "minInt": 1,
-        "negPre": "(\u00a4",
-        "negSuf": ")",
-        "posPre": "\u00a4",
-        "posSuf": ""
-      }
-    ]
-  },
-  "id": "en-us",
-  "pluralCat": function (n) {  if (n == 1) {   return PLURAL_CATEGORY.ONE;  }  return PLURAL_CATEGORY.OTHER;}
-});
-}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_en.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_en.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_en.js
deleted file mode 100644
index ae07737..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_en.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
-  "DATETIME_FORMATS": {
-    "AMPMS": [
-      "AM",
-      "PM"
-    ],
-    "DAY": [
-      "Sunday",
-      "Monday",
-      "Tuesday",
-      "Wednesday",
-      "Thursday",
-      "Friday",
-      "Saturday"
-    ],
-    "MONTH": [
-      "January",
-      "February",
-      "March",
-      "April",
-      "May",
-      "June",
-      "July",
-      "August",
-      "September",
-      "October",
-      "November",
-      "December"
-    ],
-    "SHORTDAY": [
-      "Sun",
-      "Mon",
-      "Tue",
-      "Wed",
-      "Thu",
-      "Fri",
-      "Sat"
-    ],
-    "SHORTMONTH": [
-      "Jan",
-      "Feb",
-      "Mar",
-      "Apr",
-      "May",
-      "Jun",
-      "Jul",
-      "Aug",
-      "Sep",
-      "Oct",
-      "Nov",
-      "Dec"
-    ],
-    "fullDate": "EEEE, MMMM d, y",
-    "longDate": "MMMM d, y",
-    "medium": "MMM d, y h:mm:ss a",
-    "mediumDate": "MMM d, y",
-    "mediumTime": "h:mm:ss a",
-    "short": "M/d/yy h:mm a",
-    "shortDate": "M/d/yy",
-    "shortTime": "h:mm a"
-  },
-  "NUMBER_FORMATS": {
-    "CURRENCY_SYM": "$",
-    "DECIMAL_SEP": ".",
-    "GROUP_SEP": ",",
-    "PATTERNS": [
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 3,
-        "minFrac": 0,
-        "minInt": 1,
-        "negPre": "-",
-        "negSuf": "",
-        "posPre": "",
-        "posSuf": ""
-      },
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 2,
-        "minFrac": 2,
-        "minInt": 1,
-        "negPre": "(\u00a4",
-        "negSuf": ")",
-        "posPre": "\u00a4",
-        "posSuf": ""
-      }
-    ]
-  },
-  "id": "en",
-  "pluralCat": function (n) {  if (n == 1) {   return PLURAL_CATEGORY.ONE;  }  return PLURAL_CATEGORY.OTHER;}
-});
-}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_es.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_es.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_es.js
deleted file mode 100644
index 91aba87..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_es.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
-  "DATETIME_FORMATS": {
-    "AMPMS": [
-      "a.m.",
-      "p.m."
-    ],
-    "DAY": [
-      "domingo",
-      "lunes",
-      "martes",
-      "mi\u00e9rcoles",
-      "jueves",
-      "viernes",
-      "s\u00e1bado"
-    ],
-    "MONTH": [
-      "enero",
-      "febrero",
-      "marzo",
-      "abril",
-      "mayo",
-      "junio",
-      "julio",
-      "agosto",
-      "septiembre",
-      "octubre",
-      "noviembre",
-      "diciembre"
-    ],
-    "SHORTDAY": [
-      "dom",
-      "lun",
-      "mar",
-      "mi\u00e9",
-      "jue",
-      "vie",
-      "s\u00e1b"
-    ],
-    "SHORTMONTH": [
-      "ene",
-      "feb",
-      "mar",
-      "abr",
-      "may",
-      "jun",
-      "jul",
-      "ago",
-      "sep",
-      "oct",
-      "nov",
-      "dic"
-    ],
-    "fullDate": "EEEE, d 'de' MMMM 'de' y",
-    "longDate": "d 'de' MMMM 'de' y",
-    "medium": "dd/MM/yyyy HH:mm:ss",
-    "mediumDate": "dd/MM/yyyy",
-    "mediumTime": "HH:mm:ss",
-    "short": "dd/MM/yy HH:mm",
-    "shortDate": "dd/MM/yy",
-    "shortTime": "HH:mm"
-  },
-  "NUMBER_FORMATS": {
-    "CURRENCY_SYM": "\u20ac",
-    "DECIMAL_SEP": ",",
-    "GROUP_SEP": ".",
-    "PATTERNS": [
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 3,
-        "minFrac": 0,
-        "minInt": 1,
-        "negPre": "-",
-        "negSuf": "",
-        "posPre": "",
-        "posSuf": ""
-      },
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 2,
-        "minFrac": 2,
-        "minInt": 1,
-        "negPre": "-",
-        "negSuf": "\u00a0\u00a4",
-        "posPre": "",
-        "posSuf": "\u00a0\u00a4"
-      }
-    ]
-  },
-  "id": "es",
-  "pluralCat": function (n) {  if (n == 1) {   return PLURAL_CATEGORY.ONE;  }  return PLURAL_CATEGORY.OTHER;}
-});
-}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_fr.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_fr.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_fr.js
deleted file mode 100644
index b45cdc2..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_fr.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
-  "DATETIME_FORMATS": {
-    "AMPMS": [
-      "AM",
-      "PM"
-    ],
-    "DAY": [
-      "dimanche",
-      "lundi",
-      "mardi",
-      "mercredi",
-      "jeudi",
-      "vendredi",
-      "samedi"
-    ],
-    "MONTH": [
-      "janvier",
-      "f\u00e9vrier",
-      "mars",
-      "avril",
-      "mai",
-      "juin",
-      "juillet",
-      "ao\u00fbt",
-      "septembre",
-      "octobre",
-      "novembre",
-      "d\u00e9cembre"
-    ],
-    "SHORTDAY": [
-      "dim.",
-      "lun.",
-      "mar.",
-      "mer.",
-      "jeu.",
-      "ven.",
-      "sam."
-    ],
-    "SHORTMONTH": [
-      "janv.",
-      "f\u00e9vr.",
-      "mars",
-      "avr.",
-      "mai",
-      "juin",
-      "juil.",
-      "ao\u00fbt",
-      "sept.",
-      "oct.",
-      "nov.",
-      "d\u00e9c."
-    ],
-    "fullDate": "EEEE d MMMM y",
-    "longDate": "d MMMM y",
-    "medium": "d MMM y HH:mm:ss",
-    "mediumDate": "d MMM y",
-    "mediumTime": "HH:mm:ss",
-    "short": "dd/MM/yy HH:mm",
-    "shortDate": "dd/MM/yy",
-    "shortTime": "HH:mm"
-  },
-  "NUMBER_FORMATS": {
-    "CURRENCY_SYM": "\u20ac",
-    "DECIMAL_SEP": ",",
-    "GROUP_SEP": "\u00a0",
-    "PATTERNS": [
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 3,
-        "minFrac": 0,
-        "minInt": 1,
-        "negPre": "-",
-        "negSuf": "",
-        "posPre": "",
-        "posSuf": ""
-      },
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 2,
-        "minFrac": 2,
-        "minInt": 1,
-        "negPre": "(",
-        "negSuf": "\u00a0\u00a4)",
-        "posPre": "",
-        "posSuf": "\u00a0\u00a4"
-      }
-    ]
-  },
-  "id": "fr",
-  "pluralCat": function (n) {  if (n >= 0 && n <= 2 && n != 2) {   return PLURAL_CATEGORY.ONE;  }  return PLURAL_CATEGORY.OTHER;}
-});
-}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_ru.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_ru.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_ru.js
deleted file mode 100644
index ac00c61..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/i18n/angular-locale_ru.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
-  "DATETIME_FORMATS": {
-    "AMPMS": [
-      "\u0434\u043e \u043f\u043e\u043b\u0443\u0434\u043d\u044f",
-      "\u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0434\u043d\u044f"
-    ],
-    "DAY": [
-      "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
-      "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
-      "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
-      "\u0441\u0440\u0435\u0434\u0430",
-      "\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
-      "\u043f\u044f\u0442\u043d\u0438\u0446\u0430",
-      "\u0441\u0443\u0431\u0431\u043e\u0442\u0430"
-    ],
-    "MONTH": [
-      "\u044f\u043d\u0432\u0430\u0440\u044f",
-      "\u0444\u0435\u0432\u0440\u0430\u043b\u044f",
-      "\u043c\u0430\u0440\u0442\u0430",
-      "\u0430\u043f\u0440\u0435\u043b\u044f",
-      "\u043c\u0430\u044f",
-      "\u0438\u044e\u043d\u044f",
-      "\u0438\u044e\u043b\u044f",
-      "\u0430\u0432\u0433\u0443\u0441\u0442\u0430",
-      "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f",
-      "\u043e\u043a\u0442\u044f\u0431\u0440\u044f",
-      "\u043d\u043e\u044f\u0431\u0440\u044f",
-      "\u0434\u0435\u043a\u0430\u0431\u0440\u044f"
-    ],
-    "SHORTDAY": [
-      "\u0432\u0441",
-      "\u043f\u043d",
-      "\u0432\u0442",
-      "\u0441\u0440",
-      "\u0447\u0442",
-      "\u043f\u0442",
-      "\u0441\u0431"
-    ],
-    "SHORTMONTH": [
-      "\u044f\u043d\u0432.",
-      "\u0444\u0435\u0432\u0440.",
-      "\u043c\u0430\u0440\u0442\u0430",
-      "\u0430\u043f\u0440.",
-      "\u043c\u0430\u044f",
-      "\u0438\u044e\u043d\u044f",
-      "\u0438\u044e\u043b\u044f",
-      "\u0430\u0432\u0433.",
-      "\u0441\u0435\u043d\u0442.",
-      "\u043e\u043a\u0442.",
-      "\u043d\u043e\u044f\u0431.",
-      "\u0434\u0435\u043a."
-    ],
-    "fullDate": "EEEE, d MMMM y\u00a0'\u0433'.",
-    "longDate": "d MMMM y\u00a0'\u0433'.",
-    "medium": "dd.MM.yyyy H:mm:ss",
-    "mediumDate": "dd.MM.yyyy",
-    "mediumTime": "H:mm:ss",
-    "short": "dd.MM.yy H:mm",
-    "shortDate": "dd.MM.yy",
-    "shortTime": "H:mm"
-  },
-  "NUMBER_FORMATS": {
-    "CURRENCY_SYM": "\u0440\u0443\u0431.",
-    "DECIMAL_SEP": ",",
-    "GROUP_SEP": "\u00a0",
-    "PATTERNS": [
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 3,
-        "minFrac": 0,
-        "minInt": 1,
-        "negPre": "-",
-        "negSuf": "",
-        "posPre": "",
-        "posSuf": ""
-      },
-      {
-        "gSize": 3,
-        "lgSize": 3,
-        "macFrac": 0,
-        "maxFrac": 2,
-        "minFrac": 2,
-        "minInt": 1,
-        "negPre": "-",
-        "negSuf": "\u00a0\u00a4",
-        "posPre": "",
-        "posSuf": "\u00a0\u00a4"
-      }
-    ]
-  },
-  "id": "ru",
-  "pluralCat": function (n) {  if (n % 10 == 1 && n % 100 != 11) {   return PLURAL_CATEGORY.ONE;  }  if (n == (n | 0) && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) {   return PLURAL_CATEGORY.FEW;  }  if (n % 10 == 0 || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 11 && n % 100 <= 14) {   return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
-});
-}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/version.json
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/version.json b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/version.json
deleted file mode 100644
index 7589655..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/version.json
+++ /dev/null
@@ -1 +0,0 @@
-{"raw":"v1.2.19","major":1,"minor":2,"patch":19,"prerelease":[],"build":[],"version":"1.2.19","codeName":"precognitive-flashbacks","full":"1.2.19","cdn":{"raw":"v1.2.18","major":1,"minor":2,"patch":18,"prerelease":[],"build":[],"version":"1.2.18","isStable":true,"docsUrl":"http://code.angularjs.org/1.2.18/docs"}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/version.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/version.txt b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/version.txt
deleted file mode 100644
index f37ae4a..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-1.2.19/version.txt
+++ /dev/null
@@ -1 +0,0 @@
-1.2.19
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/.bower.json
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/.bower.json b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/.bower.json
deleted file mode 100644
index 732d397..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/.bower.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-  "name": "angular-translate-loader-static-files",
-  "version": "2.2.0",
-  "main": "./angular-translate-loader-static-files.js",
-  "dependencies": {
-    "angular-translate": "~2.2.0"
-  },
-  "homepage": "https://github.com/PascalPrecht/bower-angular-translate-loader-static-files",
-  "_release": "2.2.0",
-  "_resolution": {
-    "type": "version",
-    "tag": "2.2.0",
-    "commit": "6f0cbc619d478b371000aab3a0720bf93b556a63"
-  },
-  "_source": "git://github.com/PascalPrecht/bower-angular-translate-loader-static-files.git",
-  "_target": "~2.2.0",
-  "_originalSource": "angular-translate-loader-static-files",
-  "_direct": true
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/README.md
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/README.md b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/README.md
deleted file mode 100644
index dcc821c..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# bower-angular-translate-loader-static-files
-
-angular-translate-loader-static-files bower package
-
-### Installation
-
-````
-$ bower install angular-translate-loader-static-files
-````

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js
deleted file mode 100644
index 7878387..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*!
- * angular-translate - v2.2.0 - 2014-06-03
- * http://github.com/PascalPrecht/angular-translate
- * Copyright (c) 2014 ; Licensed MIT
- */
-angular.module('pascalprecht.translate').factory('$translateStaticFilesLoader', [
-  '$q',
-  '$http',
-  function ($q, $http) {
-    return function (options) {
-      if (!options || (!angular.isString(options.prefix) || !angular.isString(options.suffix))) {
-        throw new Error('Couldn\'t load static files, no prefix or suffix specified!');
-      }
-      var deferred = $q.defer();
-      $http({
-        url: [
-          options.prefix,
-          options.key,
-          options.suffix
-        ].join(''),
-        method: 'GET',
-        params: ''
-      }).success(function (data) {
-        deferred.resolve(data);
-      }).error(function (data) {
-        deferred.reject(options.key);
-      });
-      return deferred.promise;
-    };
-  }
-]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js
deleted file mode 100644
index 476c7df..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * angular-translate - v2.2.0 - 2014-06-03
- * http://github.com/PascalPrecht/angular-translate
- * Copyright (c) 2014 ; Licensed MIT
- */
-angular.module("pascalprecht.translate").factory("$translateStaticFilesLoader",["$q","$http",function(a,b){return function(c){if(!c||!angular.isString(c.prefix)||!angular.isString(c.suffix))throw new Error("Couldn't load static files, no prefix or suffix specified!");var d=a.defer();return b({url:[c.prefix,c.key,c.suffix].join(""),method:"GET",params:""}).success(function(a){d.resolve(a)}).error(function(){d.reject(c.key)}),d.promise}}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/bower.json
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/bower.json b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/bower.json
deleted file mode 100644
index 25c1368..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-loader-static-files/bower.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "name": "angular-translate-loader-static-files",
-  "version": "2.2.0",
-  "main": "./angular-translate-loader-static-files.js",
-  "dependencies": {
-    "angular-translate": "~2.2.0"
-  }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/.bower.json
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/.bower.json b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/.bower.json
deleted file mode 100644
index 137f75c..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/.bower.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-  "name": "angular-translate-storage-cookie",
-  "version": "2.2.0",
-  "main": "./angular-translate-storage-cookie.js",
-  "dependencies": {
-    "angular-translate": "~2.2.0"
-  },
-  "homepage": "https://github.com/PascalPrecht/bower-angular-translate-storage-cookie",
-  "_release": "2.2.0",
-  "_resolution": {
-    "type": "version",
-    "tag": "2.2.0",
-    "commit": "f3b6dfcc8882f2aa23f6e18daf19acafccfdcd6e"
-  },
-  "_source": "git://github.com/PascalPrecht/bower-angular-translate-storage-cookie.git",
-  "_target": "~2.2.0",
-  "_originalSource": "angular-translate-storage-cookie"
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/README.md
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/README.md b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/README.md
deleted file mode 100644
index a2d5176..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# bower-angular-translate-storage-cookie
-
-angular-translate-cookie-storage bower package
-
-### Installation
-
-````
-$ bower install angular-translate-storage-cookie
-````

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js
deleted file mode 100644
index 497c243..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*!
- * angular-translate - v2.2.0 - 2014-06-03
- * http://github.com/PascalPrecht/angular-translate
- * Copyright (c) 2014 ; Licensed MIT
- */
-angular.module('pascalprecht.translate').factory('$translateCookieStorage', [
-  '$cookieStore',
-  function ($cookieStore) {
-    var $translateCookieStorage = {
-        get: function (name) {
-          return $cookieStore.get(name);
-        },
-        set: function (name, value) {
-          $cookieStore.put(name, value);
-        }
-      };
-    return $translateCookieStorage;
-  }
-]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.min.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.min.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.min.js
deleted file mode 100644
index 12cd3b7..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * angular-translate - v2.2.0 - 2014-06-03
- * http://github.com/PascalPrecht/angular-translate
- * Copyright (c) 2014 ; Licensed MIT
- */
-angular.module("pascalprecht.translate").factory("$translateCookieStorage",["$cookieStore",function(a){var b={get:function(b){return a.get(b)},set:function(b,c){a.put(b,c)}};return b}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/bower.json
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/bower.json b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/bower.json
deleted file mode 100644
index 1c75713..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-cookie/bower.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "name": "angular-translate-storage-cookie",
-  "version": "2.2.0",
-  "main": "./angular-translate-storage-cookie.js",
-  "dependencies": {
-    "angular-translate": "~2.2.0"
-  }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/.bower.json
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/.bower.json b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/.bower.json
deleted file mode 100644
index b7daa7a..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/.bower.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "name": "angular-translate-storage-local",
-  "version": "2.2.0",
-  "main": "./angular-translate-storage-local.js",
-  "dependencies": {
-    "angular-translate": "~2.2.0",
-    "angular-translate-storage-cookie": "~2.2.0"
-  },
-  "homepage": "https://github.com/PascalPrecht/bower-angular-translate-storage-local",
-  "_release": "2.2.0",
-  "_resolution": {
-    "type": "version",
-    "tag": "2.2.0",
-    "commit": "1b2fbfc31ce70e3e75e0037f759b60fd92b46bd8"
-  },
-  "_source": "git://github.com/PascalPrecht/bower-angular-translate-storage-local.git",
-  "_target": "~2.2.0",
-  "_originalSource": "angular-translate-storage-local",
-  "_direct": true
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/README.md
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/README.md b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/README.md
deleted file mode 100644
index 56f3ec1..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# bower-angular-translate-storage-local
-
-angular-translate-cookie-local bower package
-
-### Installation
-
-````
-$ bower install angular-translate-storage-local
-````

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/angular-translate-storage-local.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/angular-translate-storage-local.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/angular-translate-storage-local.js
deleted file mode 100644
index d6c7cf9..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/angular-translate-storage-local.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/*!
- * angular-translate - v2.2.0 - 2014-06-03
- * http://github.com/PascalPrecht/angular-translate
- * Copyright (c) 2014 ; Licensed MIT
- */
-angular.module('pascalprecht.translate').factory('$translateLocalStorage', [
-  '$window',
-  '$translateCookieStorage',
-  function ($window, $translateCookieStorage) {
-    var localStorageAdapter = function () {
-        var langKey;
-        return {
-          get: function (name) {
-            if (!langKey) {
-              langKey = $window.localStorage.getItem(name);
-            }
-            return langKey;
-          },
-          set: function (name, value) {
-            langKey = value;
-            $window.localStorage.setItem(name, value);
-          }
-        };
-      }();
-    var hasLocalStorageSupport = 'localStorage' in $window && $window.localStorage !== null;
-    if (hasLocalStorageSupport) {
-      var testKey = 'pascalprecht.translate.storageTest';
-      try {
-        $window.localStorage.setItem(testKey, 'foo');
-        $window.localStorage.removeItem(testKey);
-      } catch (e) {
-        hasLocalStorageSupport = false;
-      }
-    }
-    var $translateLocalStorage = hasLocalStorageSupport ? localStorageAdapter : $translateCookieStorage;
-    return $translateLocalStorage;
-  }
-]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/angular-translate-storage-local.min.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/angular-translate-storage-local.min.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/angular-translate-storage-local.min.js
deleted file mode 100644
index 9571ce0..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/angular-translate-storage-local.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * angular-translate - v2.2.0 - 2014-06-03
- * http://github.com/PascalPrecht/angular-translate
- * Copyright (c) 2014 ; Licensed MIT
- */
-angular.module("pascalprecht.translate").factory("$translateLocalStorage",["$window","$translateCookieStorage",function(a,b){var c=function(){var b;return{get:function(c){return b||(b=a.localStorage.getItem(c)),b},set:function(c,d){b=d,a.localStorage.setItem(c,d)}}}(),d="localStorage"in a&&null!==a.localStorage;if(d){var e="pascalprecht.translate.storageTest";try{a.localStorage.setItem(e,"foo"),a.localStorage.removeItem(e)}catch(f){d=!1}}var g=d?c:b;return g}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/bower.json
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/bower.json b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/bower.json
deleted file mode 100644
index 3e89c60..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate-storage-local/bower.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "name": "angular-translate-storage-local",
-  "version": "2.2.0",
-  "main": "./angular-translate-storage-local.js",
-  "dependencies": {
-    "angular-translate": "~2.2.0",
-    "angular-translate-storage-cookie": "~2.2.0"
-  }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/.bower.json
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/.bower.json b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/.bower.json
deleted file mode 100644
index 16a3c0a..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/.bower.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "name": "angular-translate",
-  "version": "2.2.0",
-  "main": "./angular-translate.js",
-  "homepage": "https://github.com/PascalPrecht/bower-angular-translate",
-  "_release": "2.2.0",
-  "_resolution": {
-    "type": "version",
-    "tag": "2.2.0",
-    "commit": "21e6f3f41d53a53b627f3947b8e17dfb2ba26a74"
-  },
-  "_source": "git://github.com/PascalPrecht/bower-angular-translate.git",
-  "_target": "~2.2.0",
-  "_originalSource": "angular-translate",
-  "_direct": true
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/README.md
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/README.md b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/README.md
deleted file mode 100644
index 65dc3ae..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# bower-angular-translate
-
-angular-translate bower package
-
-### Installation
-
-````
-$ bower install angular-translate
-````

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/angular-translate.js
----------------------------------------------------------------------
diff --git a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/angular-translate.js b/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/angular-translate.js
deleted file mode 100644
index dbf3feb..0000000
--- a/brooklyn-library/sandbox/mobile-app/src/main/webapp/assets/mobile/libs/angular-translate/angular-translate.js
+++ /dev/null
@@ -1,883 +0,0 @@
-/*!
- * angular-translate - v2.2.0 - 2014-06-03
- * http://github.com/PascalPrecht/angular-translate
- * Copyright (c) 2014 ; Licensed MIT
- */
-angular.module('pascalprecht.translate', ['ng']).run([
-  '$translate',
-  function ($translate) {
-    var key = $translate.storageKey(), storage = $translate.storage();
-    if (storage) {
-      if (!storage.get(key)) {
-        if (angular.isString($translate.preferredLanguage())) {
-          $translate.use($translate.preferredLanguage());
-        } else {
-          storage.set(key, $translate.use());
-        }
-      } else {
-        $translate.use(storage.get(key));
-      }
-    } else if (angular.isString($translate.preferredLanguage())) {
-      $translate.use($translate.preferredLanguage());
-    }
-  }
-]);
-angular.module('pascalprecht.translate').provider('$translate', [
-  '$STORAGE_KEY',
-  function ($STORAGE_KEY) {
-    var $translationTable = {}, $preferredLanguage, $availableLanguageKeys = [], $languageKeyAliases, $fallbackLanguage, $fallbackWasString, $uses, $nextLang, $storageFactory, $storageKey = $STORAGE_KEY, $storagePrefix, $missingTranslationHandlerFactory, $interpolationFactory, $interpolatorFactories = [], $interpolationSanitizationStrategy = false, $loaderFactory, $cloakClassName = 'translate-cloak', $loaderOptions, $notFoundIndicatorLeft, $notFoundIndicatorRight, $postCompilingEnabled = false, NESTED_OBJECT_DELIMITER = '.';
-    var getLocale = function () {
-      var nav = window.navigator;
-      return (nav.language || nav.browserLanguage || nav.systemLanguage || nav.userLanguage || '').split('-').join('_');
-    };
-    var negotiateLocale = function (preferred) {
-      var avail = [], locale = angular.lowercase(preferred), i = 0, n = $availableLanguageKeys.length;
-      for (; i < n; i++) {
-        avail.push(angular.lowercase($availableLanguageKeys[i]));
-      }
-      if (avail.indexOf(locale) > -1) {
-        return preferred;
-      }
-      if ($languageKeyAliases) {
-        var alias;
-        for (var langKeyAlias in $languageKeyAliases) {
-          var hasWildcardKey = false;
-          var hasExactKey = $languageKeyAliases.hasOwnProperty(langKeyAlias) && angular.lowercase(langKeyAlias) === angular.lowercase(preferred);
-          if (langKeyAlias.slice(-1) === '*') {
-            hasWildcardKey = langKeyAlias.slice(0, -1) === preferred.slice(0, langKeyAlias.length - 1);
-          }
-          if (hasExactKey || hasWildcardKey) {
-            alias = $languageKeyAliases[langKeyAlias];
-            if (avail.indexOf(angular.lowercase(alias)) > -1) {
-              return alias;
-            }
-          }
-        }
-      }
-      var parts = preferred.split('_');
-      if (parts.length > 1 && avail.indexOf(angular.lowercase(parts[0])) > -1) {
-        return parts[0];
-      }
-      return preferred;
-    };
-    var translations = function (langKey, translationTable) {
-      if (!langKey && !translationTable) {
-        return $translationTable;
-      }
-      if (langKey && !translationTable) {
-        if (angular.isString(langKey)) {
-          return $translationTable[langKey];
-        }
-      } else {
-        if (!angular.isObject($translationTable[langKey])) {
-          $translationTable[langKey] = {};
-        }
-        angular.extend($translationTable[langKey], flatObject(translationTable));
-      }
-      return this;
-    };
-    this.translations = translations;
-    this.cloakClassName = function (name) {
-      if (!name) {
-        return $cloakClassName;
-      }
-      $cloakClassName = name;
-      return this;
-    };
-    var flatObject = function (data, path, result, prevKey) {
-      var key, keyWithPath, keyWithShortPath, val;
-      if (!path) {
-        path = [];
-      }
-      if (!result) {
-        result = {};
-      }
-      for (key in data) {
-        if (!data.hasOwnProperty(key)) {
-          continue;
-        }
-        val = data[key];
-        if (angular.isObject(val)) {
-          flatObject(val, path.concat(key), result, key);
-        } else {
-          keyWithPath = path.length ? '' + path.join(NESTED_OBJECT_DELIMITER) + NESTED_OBJECT_DELIMITER + key : key;
-          if (path.length && key === prevKey) {
-            keyWithShortPath = '' + path.join(NESTED_OBJECT_DELIMITER);
-            result[keyWithShortPath] = '@:' + keyWithPath;
-          }
-          result[keyWithPath] = val;
-        }
-      }
-      return result;
-    };
-    this.addInterpolation = function (factory) {
-      $interpolatorFactories.push(factory);
-      return this;
-    };
-    this.useMessageFormatInterpolation = function () {
-      return this.useInterpolation('$translateMessageFormatInterpolation');
-    };
-    this.useInterpolation = function (factory) {
-      $interpolationFactory = factory;
-      return this;
-    };
-    this.useSanitizeValueStrategy = function (value) {
-      $interpolationSanitizationStrategy = value;
-      return this;
-    };
-    this.preferredLanguage = function (langKey) {
-      if (langKey) {
-        $preferredLanguage = langKey;
-        return this;
-      }
-      return $preferredLanguage;
-    };
-    this.translationNotFoundIndicator = function (indicator) {
-      this.translationNotFoundIndicatorLeft(indicator);
-      this.translationNotFoundIndicatorRight(indicator);
-      return this;
-    };
-    this.translationNotFoundIndicatorLeft = function (indicator) {
-      if (!indicator) {
-        return $notFoundIndicatorLeft;
-      }
-      $notFoundIndicatorLeft = indicator;
-      return this;
-    };
-    this.translationNotFoundIndicatorRight = function (indicator) {
-      if (!indicator) {
-        return $notFoundIndicatorRight;
-      }
-      $notFoundIndicatorRight = indicator;
-      return this;
-    };
-    this.fallbackLanguage = function (langKey) {
-      fallbackStack(langKey);
-      return this;
-    };
-    var fallbackStack = function (langKey) {
-      if (langKey) {
-        if (angular.isString(langKey)) {
-          $fallbackWasString = true;
-          $fallbackLanguage = [langKey];
-        } else if (angular.isArray(langKey)) {
-          $fallbackWasString = false;
-          $fallbackLanguage = langKey;
-        }
-        if (angular.isString($preferredLanguage)) {
-          $fallbackLanguage.push($preferredLanguage);
-        }
-        return this;
-      } else {
-        if ($fallbackWasString) {
-          return $fallbackLanguage[0];
-        } else {
-          return $fallbackLanguage;
-        }
-      }
-    };
-    this.use = function (langKey) {
-      if (langKey) {
-        if (!$translationTable[langKey] && !$loaderFactory) {
-          throw new Error('$translateProvider couldn\'t find translationTable for langKey: \'' + langKey + '\'');
-        }
-        $uses = langKey;
-        return this;
-      }
-      return $uses;
-    };
-    var storageKey = function (key) {
-      if (!key) {
-        if ($storagePrefix) {
-          return $storagePrefix + $storageKey;
-        }
-        return $storageKey;
-      }
-      $storageKey = key;
-    };
-    this.storageKey = storageKey;
-    this.useUrlLoader = function (url) {
-      return this.useLoader('$translateUrlLoader', { url: url });
-    };
-    this.useStaticFilesLoader = function (options) {
-      return this.useLoader('$translateStaticFilesLoader', options);
-    };
-    this.useLoader = function (loaderFactory, options) {
-      $loaderFactory = loaderFactory;
-      $loaderOptions = options || {};
-      return this;
-    };
-    this.useLocalStorage = function () {
-      return this.useStorage('$translateLocalStorage');
-    };
-    this.useCookieStorage = function () {
-      return this.useStorage('$translateCookieStorage');
-    };
-    this.useStorage = function (storageFactory) {
-      $storageFactory = storageFactory;
-      return this;
-    };
-    this.storagePrefix = function (prefix) {
-      if (!prefix) {
-        return prefix;
-      }
-      $storagePrefix = prefix;
-      return this;
-    };
-    this.useMissingTranslationHandlerLog = function () {
-      return this.useMissingTranslationHandler('$translateMissingTranslationHandlerLog');
-    };
-    this.useMissingTranslationHandler = function (factory) {
-      $missingTranslationHandlerFactory = factory;
-      return this;
-    };
-    this.usePostCompiling = function (value) {
-      $postCompilingEnabled = !!value;
-      return this;
-    };
-    this.determinePreferredLanguage = function (fn) {
-      var locale = fn && angular.isFunction(fn) ? fn() : getLocale();
-      if (!$availableLanguageKeys.length) {
-        $preferredLanguage = locale;
-      } else {
-        $preferredLanguage = negotiateLocale(locale);
-      }
-      return this;
-    };
-    this.registerAvailableLanguageKeys = function (languageKeys, aliases) {
-      if (languageKeys) {
-        $availableLanguageKeys = languageKeys;
-        if (aliases) {
-          $languageKeyAliases = aliases;
-        }
-        return this;
-      }
-      return $availableLanguageKeys;
-    };
-    this.$get = [
-      '$log',
-      '$injector',
-      '$rootScope',
-      '$q',
-      function ($log, $injector, $rootScope, $q) {
-        var Storage, defaultInterpolator = $injector.get($interpolationFactory || '$translateDefaultInterpolation'), pendingLoader = false, interpolatorHashMap = {}, langPromises = {}, fallbackIndex, startFallbackIteration;
-        var $translate = function (translationId, interpolateParams, interpolationId) {
-          if (angular.isArray(translationId)) {
-            var translateAll = function (translationIds) {
-              var results = {};
-              var promises = [];
-              var translate = function (translationId) {
-                var deferred = $q.defer();
-                var regardless = function (value) {
-                  results[translationId] = value;
-                  deferred.resolve([
-                    translationId,
-                    value
-                  ]);
-                };
-                $translate(translationId, interpolateParams, interpolationId).then(regardless, regardless);
-                return deferred.promise;
-              };
-              for (var i = 0, c = translationIds.length; i < c; i++) {
-                promises.push(translate(translationIds[i]));
-              }
-              return $q.all(promises).then(function () {
-                return results;
-              });
-            };
-            return translateAll(translationId);
-          }
-          var deferred = $q.defer();
-          if (translationId) {
-            translationId = translationId.trim();
-          }
-          var promiseToWaitFor = function () {
-              var promise = $preferredLanguage ? langPromises[$preferredLanguage] : langPromises[$uses];
-              fallbackIndex = 0;
-              if ($storageFactory && !promise) {
-                var langKey = Storage.get($storageKey);
-                promise = langPromises[langKey];
-                if ($fallbackLanguage && $fallbackLanguage.length) {
-                  var index = indexOf($fallbackLanguage, langKey);
-                  fallbackIndex = index > -1 ? index += 1 : 0;
-                  $fallbackLanguage.push($preferredLanguage);
-                }
-              }
-              return promise;
-            }();
-          if (!promiseToWaitFor) {
-            determineTranslation(translationId, interpolateParams, interpolationId).then(deferred.resolve, deferred.reject);
-          } else {
-            promiseToWaitFor.then(function () {
-              determineTranslation(translationId, interpolateParams, interpolationId).then(deferred.resolve, deferred.reject);
-            }, deferred.reject);
-          }
-          return deferred.promise;
-        };
-        var indexOf = function (array, searchElement) {
-          for (var i = 0, len = array.length; i < len; i++) {
-            if (array[i] === searchElement) {
-              return i;
-            }
-          }
-          return -1;
-        };
-        var applyNotFoundIndicators = function (translationId) {
-          if ($notFoundIndicatorLeft) {
-            translationId = [
-              $notFoundIndicatorLeft,
-              translationId
-            ].join(' ');
-          }
-          if ($notFoundIndicatorRight) {
-            translationId = [
-              translationId,
-              $notFoundIndicatorRight
-            ].join(' ');
-          }
-          return translationId;
-        };
-        var useLanguage = function (key) {
-          $uses = key;
-          $rootScope.$emit('$translateChangeSuccess');
-          if ($storageFactory) {
-            Storage.set($translate.storageKey(), $uses);
-          }
-          defaultInterpolator.setLocale($uses);
-          angular.forEach(interpolatorHashMap, function (interpolator, id) {
-            interpolatorHashMap[id].setLocale($uses);
-          });
-          $rootScope.$emit('$translateChangeEnd');
-        };
-        var loadAsync = function (key) {
-          if (!key) {
-            throw 'No language key specified for loading.';
-          }
-          var deferred = $q.defer();
-          $rootScope.$emit('$translateLoadingStart');
-          pendingLoader = true;
-          $injector.get($loaderFactory)(angular.extend($loaderOptions, { key: key })).then(function (data) {
-            var translationTable = {};
-            $rootScope.$emit('$translateLoadingSuccess');
-            if (angular.isArray(data)) {
-              angular.forEach(data, function (table) {
-                angular.extend(translationTable, flatObject(table));
-              });
-            } else {
-              angular.extend(translationTable, flatObject(data));
-            }
-            pendingLoader = false;
-            deferred.resolve({
-              key: key,
-              table: translationTable
-            });
-            $rootScope.$emit('$translateLoadingEnd');
-          }, function (key) {
-            $rootScope.$emit('$translateLoadingError');
-            deferred.reject(key);
-            $rootScope.$emit('$translateLoadingEnd');
-          });
-          return deferred.promise;
-        };
-        if ($storageFactory) {
-          Storage = $injector.get($storageFactory);
-          if (!Storage.get || !Storage.set) {
-            throw new Error('Couldn\'t use storage \'' + $storageFactory + '\', missing get() or set() method!');
-          }
-        }
-        if (angular.isFunction(defaultInterpolator.useSanitizeValueStrategy)) {
-          defaultInterpolator.useSanitizeValueStrategy($interpolationSanitizationStrategy);
-        }
-        if ($interpolatorFactories.length) {
-          angular.forEach($interpolatorFactories, function (interpolatorFactory) {
-            var interpolator = $injector.get(interpolatorFactory);
-            interpolator.setLocale($preferredLanguage || $uses);
-            if (angular.isFunction(interpolator.useSanitizeValueStrategy)) {
-              interpolator.useSanitizeValueStrategy($interpolationSanitizationStrategy);
-            }
-            interpolatorHashMap[interpolator.getInterpolationIdentifier()] = interpolator;
-          });
-        }
-        var getTranslationTable = function (langKey) {
-          var deferred = $q.defer();
-          if ($translationTable.hasOwnProperty(langKey)) {
-            deferred.resolve($translationTable[langKey]);
-            return deferred.promise;
-          } else {
-            langPromises[langKey].then(function (data) {
-              translations(data.key, data.table);
-              deferred.resolve(data.table);
-            }, deferred.reject);
-          }
-          return deferred.promise;
-        };
-        var getFallbackTranslation = function (langKey, translationId, interpolateParams, Interpolator) {
-          var deferred = $q.defer();
-          getTranslationTable(langKey).then(function (translationTable) {
-            if (translationTable.hasOwnProperty(translationId)) {
-              Interpolator.setLocale(langKey);
-              deferred.resolve(Interpolator.interpolate(translationTable[translationId], interpolateParams));
-              Interpolator.setLocale($uses);
-            } else {
-              deferred.reject();
-            }
-          }, deferred.reject);
-          return deferred.promise;
-        };
-        var getFallbackTranslationInstant = function (langKey, translationId, interpolateParams, Interpolator) {
-          var result, translationTable = $translationTable[langKey];
-          if (translationTable.hasOwnProperty(translationId)) {
-            Interpolator.setLocale(langKey);
-            result = Interpolator.interpolate(translationTable[translationId], interpolateParams);
-            Interpolator.setLocale($uses);
-          }
-          return result;
-        };
-        var resolveForFallbackLanguage = function (fallbackLanguageIndex, translationId, interpolateParams, Interpolator) {
-          var deferred = $q.defer();
-          if (fallbackLanguageIndex < $fallbackLanguage.length) {
-            var langKey = $fallbackLanguage[fallbackLanguageIndex];
-            getFallbackTranslation(langKey, translationId, interpolateParams, Interpolator).then(function (translation) {
-              deferred.resolve(translation);
-            }, function () {
-              var nextFallbackLanguagePromise = resolveForFallbackLanguage(fallbackLanguageIndex + 1, translationId, interpolateParams, Interpolator);
-              deferred.resolve(nextFallbackLanguagePromise);
-            });
-          } else {
-            if ($missingTranslationHandlerFactory) {
-              var resultString = $injector.get($missingTranslationHandlerFactory)(translationId, $uses);
-              if (resultString !== undefined) {
-                deferred.resolve(resultString);
-              } else {
-                deferred.resolve(translationId);
-              }
-            } else {
-              deferred.resolve(translationId);
-            }
-          }
-          return deferred.promise;
-        };
-        var resolveForFallbackLanguageInstant = function (fallbackLanguageIndex, translationId, interpolateParams, Interpolator) {
-          var result;
-          if (fallbackLanguageIndex < $fallbackLanguage.length) {
-            var langKey = $fallbackLanguage[fallbackLanguageIndex];
-            result = getFallbackTranslationInstant(langKey, translationId, interpolateParams, Interpolator);
-            if (!result) {
-              result = resolveForFallbackLanguageInstant(fallbackLanguageIndex + 1, translationId, interpolateParams, Interpolator);
-            }
-          }
-          return result;
-        };
-        var fallbackTranslation = function (translationId, interpolateParams, Interpolator) {
-          return resolveForFallbackLanguage(startFallbackIteration > 0 ? startFallbackIteration : fallbackIndex, translationId, interpolateParams, Interpolator);
-        };
-        var fallbackTranslationInstant = function (translationId, interpolateParams, Interpolator) {
-          return resolveForFallbackLanguageInstant(startFallbackIteration > 0 ? startFallbackIteration : fallbackIndex, translationId, interpolateParams, Interpolator);
-        };
-        var determineTranslation = function (translationId, interpolateParams, interpolationId) {
-          var deferred = $q.defer();
-          var table = $uses ? $translationTable[$uses] : $translationTable, Interpolator = interpolationId ? interpolatorHashMap[interpolationId] : defaultInterpolator;
-          if (table && table.hasOwnProperty(translationId)) {
-            var translation = table[translationId];
-            if (translation.substr(0, 2) === '@:') {
-              $translate(translation.substr(2), interpolateParams, interpolationId).then(deferred.resolve, deferred.reject);
-            } else {
-              deferred.resolve(Interpolator.interpolate(translation, interpolateParams));
-            }
-          } else {
-            if ($missingTranslationHandlerFactory && !pendingLoader) {
-              $injector.get($missingTranslationHandlerFactory)(translationId, $uses);
-            }
-            if ($uses && $fallbackLanguage && $fallbackLanguage.length) {
-              fallbackTranslation(translationId, interpolateParams, Interpolator).then(function (translation) {
-                deferred.resolve(translation);
-              }, function (_translationId) {
-                deferred.reject(applyNotFoundIndicators(_translationId));
-              });
-            } else {
-              deferred.reject(applyNotFoundIndicators(translationId));
-            }
-          }
-          return deferred.promise;
-        };
-        var determineTranslationInstant = function (translationId, interpolateParams, interpolationId) {
-          var result, table = $uses ? $translationTable[$uses] : $translationTable, Interpolator = interpolationId ? interpolatorHashMap[interpolationId] : defaultInterpolator;
-          if (table && table.hasOwnProperty(translationId)) {
-            var translation = table[translationId];
-            if (translation.substr(0, 2) === '@:') {
-              result = determineTranslationInstant(translation.substr(2), interpolateParams, interpolationId);
-            } else {
-              result = Interpolator.interpolate(translation, interpolateParams);
-            }
-          } else {
-            if ($missingTranslationHandlerFactory && !pendingLoader) {
-              $injector.get($missingTranslationHandlerFactory)(translationId, $uses);
-            }
-            if ($uses && $fallbackLanguage && $fallbackLanguage.length) {
-              fallbackIndex = 0;
-              result = fallbackTranslationInstant(translationId, interpolateParams, Interpolator);
-            } else {
-              result = applyNotFoundIndicators(translationId);
-            }
-          }
-          return result;
-        };
-        $translate.preferredLanguage = function () {
-          return $preferredLanguage;
-        };
-        $translate.cloakClassName = function () {
-          return $cloakClassName;
-        };
-        $translate.fallbackLanguage = function (langKey) {
-          if (langKey !== undefined && langKey !== null) {
-            fallbackStack(langKey);
-            if ($loaderFactory) {
-              if ($fallbackLanguage && $fallbackLanguage.length) {
-                for (var i = 0, len = $fallbackLanguage.length; i < len; i++) {
-                  if (!langPromises[$fallbackLanguage[i]]) {
-                    langPromises[$fallbackLanguage[i]] = loadAsync($fallbackLanguage[i]);
-                  }
-                }
-              }
-            }
-            $translate.use($translate.use());
-          }
-          if ($fallbackWasString) {
-            return $fallbackLanguage[0];
-          } else {
-            return $fallbackLanguage;
-          }
-        };
-        $translate.useFallbackLanguage = function (langKey) {
-          if (langKey !== undefined && langKey !== null) {
-            if (!langKey) {
-              startFallbackIteration = 0;
-            } else {
-              var langKeyPosition = indexOf($fallbackLanguage, langKey);
-              if (langKeyPosition > -1) {
-                startFallbackIteration = langKeyPosition;
-              }
-            }
-          }
-        };
-        $translate.proposedLanguage = function () {
-          return $nextLang;
-        };
-        $translate.storage = function () {
-          return Storage;
-        };
-        $translate.use = function (key) {
-          if (!key) {
-            return $uses;
-          }
-          var deferred = $q.defer();
-          $rootScope.$emit('$translateChangeStart');
-          var aliasedKey = negotiateLocale(key);
-          if (aliasedKey) {
-            key = aliasedKey;
-          }
-          if (!$translationTable[key] && $loaderFactory) {
-            $nextLang = key;
-            langPromises[key] = loadAsync(key).then(function (translation) {
-              translations(translation.key, translation.table);
-              deferred.resolve(translation.key);
-              if ($nextLang === key) {
-                useLanguage(translation.key);
-                $nextLang = undefined;
-              }
-            }, function (key) {
-              $nextLang = undefined;
-              $rootScope.$emit('$translateChangeError');
-              deferred.reject(key);
-              $rootScope.$emit('$translateChangeEnd');
-            });
-          } else {
-            deferred.resolve(key);
-            useLanguage(key);
-          }
-          return deferred.promise;
-        };
-        $translate.storageKey = function () {
-          return storageKey();
-        };
-        $translate.isPostCompilingEnabled = function () {
-          return $postCompilingEnabled;
-        };
-        $translate.refresh = function (langKey) {
-          if (!$loaderFactory) {
-            throw new Error('Couldn\'t refresh translation table, no loader registered!');
-          }
-          var deferred = $q.defer();
-          function resolve() {
-            deferred.resolve();
-            $rootScope.$emit('$translateRefreshEnd');
-          }
-          function reject() {
-            deferred.reject();
-            $rootScope.$emit('$translateRefreshEnd');
-          }
-          $rootScope.$emit('$translateRefreshStart');
-          if (!langKey) {
-            var tables = [];
-            if ($fallbackLanguage && $fallbackLanguage.length) {
-              for (var i = 0, len = $fallbackLanguage.length; i < len; i++) {
-                tables.push(loadAsync($fallbackLanguage[i]));
-              }
-            }
-            if ($uses) {
-              tables.push(loadAsync($uses));
-            }
-            $q.all(tables).then(function (tableData) {
-              angular.forEach(tableData, function (data) {
-                if ($translationTable[data.key]) {
-                  delete $translationTable[data.key];
-                }
-                translations(data.key, data.table);
-              });
-              if ($uses) {
-                useLanguage($uses);
-              }
-              resolve();
-            });
-          } else if ($translationTable[langKey]) {
-            loadAsync(langKey).then(function (data) {
-              translations(data.key, data.table);
-              if (langKey === $uses) {
-                useLanguage($uses);
-              }
-              resolve();
-            }, reject);
-          } else {
-            reject();
-          }
-          return deferred.promise;
-        };
-        $translate.instant = function (translationId, interpolateParams, interpolationId) {
-          if (translationId === null || angular.isUndefined(translationId)) {
-            return translationId;
-          }
-          if (angular.isArray(translationId)) {
-            var results = {};
-            for (var i = 0, c = translationId.length; i < c; i++) {
-              results[translationId[i]] = $translate.instant(translationId[i], interpolateParams, interpolationId);
-            }
-            return results;
-          }
-          if (angular.isString(translationId) && translationId.length < 1) {
-            return translationId;
-          }
-          if (translationId) {
-            translationId = translationId.trim();
-          }
-          var result, possibleLangKeys = [];
-          if ($preferredLanguage) {
-            possibleLangKeys.push($preferredLanguage);
-          }
-          if ($uses) {
-            possibleLangKeys.push($uses);
-          }
-          if ($fallbackLanguage && $fallbackLanguage.length) {
-            possibleLangKeys = possibleLangKeys.concat($fallbackLanguage);
-          }
-          for (var j = 0, d = possibleLangKeys.length; j < d; j++) {
-            var possibleLangKey = possibleLangKeys[j];
-            if ($translationTable[possibleLangKey]) {
-              if (typeof $translationTable[possibleLangKey][translationId] !== 'undefined') {
-                result = determineTranslationInstant(translationId, interpolateParams, interpolationId);
-              }
-            }
-            if (typeof result !== 'undefined') {
-              break;
-            }
-          }
-          if (!result && result !== '') {
-            result = translationId;
-            if ($missingTranslationHandlerFactory && !pendingLoader) {
-              $injector.get($missingTranslationHandlerFactory)(translationId, $uses);
-            }
-          }
-          return result;
-        };
-        if ($loaderFactory) {
-          if (angular.equals($translationTable, {})) {
-            $translate.use($translate.use());
-          }
-          if ($fallbackLanguage && $fallbackLanguage.length) {
-            for (var i = 0, len = $fallbackLanguage.length; i < len; i++) {
-              langPromises[$fallbackLanguage[i]] = loadAsync($fallbackLanguage[i]);
-            }
-          }
-        }
-        return $translate;
-      }
-    ];
-  }
-]);
-angular.module('pascalprecht.translate').factory('$translateDefaultInterpolation', [
-  '$interpolate',
-  function ($interpolate) {
-    var $translateInterpolator = {}, $locale, $identifier = 'default', $sanitizeValueStrategy = null, sanitizeValueStrategies = {
-        escaped: function (params) {
-          var result = {};
-          for (var key in params) {
-            if (params.hasOwnProperty(key)) {
-              result[key] = angular.element('<div></div>').text(params[key]).html();
-            }
-          }
-          return result;
-        }
-      };
-    var sanitizeParams = function (params) {
-      var result;
-      if (angular.isFunction(sanitizeValueStrategies[$sanitizeValueStrategy])) {
-        result = sanitizeValueStrategies[$sanitizeValueStrategy](params);
-      } else {
-        result = params;
-      }
-      return result;
-    };
-    $translateInterpolator.setLocale = function (locale) {
-      $locale = locale;
-    };
-    $translateInterpolator.getInterpolationIdentifier = function () {
-      return $identifier;
-    };
-    $translateInterpolator.useSanitizeValueStrategy = function (value) {
-      $sanitizeValueStrategy = value;
-      return this;
-    };
-    $translateInterpolator.interpolate = function (string, interpolateParams) {
-      if ($sanitizeValueStrategy) {
-        interpolateParams = sanitizeParams(interpolateParams);
-      }
-      return $interpolate(string)(interpolateParams || {});
-    };
-    return $translateInterpolator;
-  }
-]);
-angular.module('pascalprecht.translate').constant('$STORAGE_KEY', 'NG_TRANSLATE_LANG_KEY');
-angular.module('pascalprecht.translate').directive('translate', [
-  '$translate',
-  '$q',
-  '$interpolate',
-  '$compile',
-  '$parse',
-  '$rootScope',
-  function ($translate, $q, $interpolate, $compile, $parse, $rootScope) {
-    return {
-      restrict: 'AE',
-      scope: true,
-      compile: function (tElement, tAttr) {
-        var translateValuesExist = tAttr.translateValues ? tAttr.translateValues : undefined;
-        var translateInterpolation = tAttr.translateInterpolation ? tAttr.translateInterpolation : undefined;
-        var translateValueExist = tElement[0].outerHTML.match(/translate-value-+/i);
-        return function linkFn(scope, iElement, iAttr) {
-          scope.interpolateParams = {};
-          iAttr.$observe('translate', function (translationId) {
-            if (angular.equals(translationId, '') || !angular.isDefined(translationId)) {
-              scope.translationId = $interpolate(iElement.text().replace(/^\s+|\s+$/g, ''))(scope.$parent);
-            } else {
-              scope.translationId = translationId;
-            }
-          });
-          iAttr.$observe('translateDefault', function (value) {
-            scope.defaultText = value;
-          });
-          if (translateValuesExist) {
-            iAttr.$observe('translateValues', function (interpolateParams) {
-              if (interpolateParams) {
-                scope.$parent.$watch(function () {
-                  angular.extend(scope.interpolateParams, $parse(interpolateParams)(scope.$parent));
-                });
-              }
-            });
-          }
-          if (translateValueExist) {
-            var fn = function (attrName) {
-              iAttr.$observe(attrName, function (value) {
-                scope.interpolateParams[angular.lowercase(attrName.substr(14, 1)) + attrName.substr(15)] = value;
-              });
-            };
-            for (var attr in iAttr) {
-              if (iAttr.hasOwnProperty(attr) && attr.substr(0, 14) === 'translateValue' && attr !== 'translateValues') {
-                fn(attr);
-              }
-            }
-          }
-          var applyElementContent = function (value, scope, successful) {
-            if (!successful && typeof scope.defaultText !== 'undefined') {
-              value = scope.defaultText;
-            }
-            iElement.html(value);
-            var globallyEnabled = $translate.isPostCompilingEnabled();
-            var locallyDefined = typeof tAttr.translateCompile !== 'undefined';
-            var locallyEnabled = locallyDefined && tAttr.translateCompile !== 'false';
-            if (globallyEnabled && !locallyDefined || locallyEnabled) {
-              $compile(iElement.contents())(scope);
-            }
-          };
-          var updateTranslationFn = function () {
-              if (!translateValuesExist && !translateValueExist) {
-                return function () {
-                  var unwatch = scope.$watch('translationId', function (value) {
-                      if (scope.translationId && value) {
-                        $translate(value, {}, translateInterpolation).then(function (translation) {
-                          applyElementContent(translation, scope, true);
-                          unwatch();
-                        }, function (translationId) {
-                          applyElementContent(translationId, scope, false);
-                          unwatch();
-                        });
-                      }
-                    }, true);
-                };
-              } else {
-                return function () {
-                  var updateTranslations = function () {
-                    if (scope.translationId && scope.interpolateParams) {
-                      $translate(scope.translationId, scope.interpolateParams, translateInterpolation).then(function (translation) {
-                        applyElementContent(translation, scope, true);
-                      }, function (translationId) {
-                        applyElementContent(translationId, scope, false);
-                      });
-                    }
-                  };
-                  scope.$watch('interpolateParams', updateTranslations, true);
-                  scope.$watch('translationId', updateTranslations);
-                };
-              }
-            }();
-          var unbind = $rootScope.$on('$translateChangeSuccess', updateTranslationFn);
-          updateTranslationFn();
-          scope.$on('$destroy', unbind);
-        };
-      }
-    };
-  }
-]);
-angular.module('pascalprecht.translate').directive('translateCloak', [
-  '$rootScope',
-  '$translate',
-  function ($rootScope, $translate) {
-    return {
-      compile: function (tElement) {
-        $rootScope.$on('$translateLoadingSuccess', function () {
-          tElement.removeClass($translate.cloakClassName());
-        });
-        tElement.addClass($translate.cloakClassName());
-      }
-    };
-  }
-]);
-angular.module('pascalprecht.translate').filter('translate', [
-  '$parse',
-  '$translate',
-  function ($parse, $translate) {
-    return function (translationId, interpolateParams, interpolation) {
-      if (!angular.isObject(interpolateParams)) {
-        interpolateParams = $parse(interpolateParams)(this);
-      }
-      return $translate.instant(translationId, interpolateParams, interpolation);
-    };
-  }
-]);
\ No newline at end of file