You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ha...@apache.org on 2015/08/14 05:42:59 UTC
[30/54] incubator-brooklyn git commit: [BROOKLYN-162] Renaming
package brooklyn.location
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/main/java/org/apache/brooklyn/location/geo/MaxMind2HostGeoLookup.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/location/geo/MaxMind2HostGeoLookup.java b/core/src/main/java/org/apache/brooklyn/location/geo/MaxMind2HostGeoLookup.java
new file mode 100644
index 0000000..f907329
--- /dev/null
+++ b/core/src/main/java/org/apache/brooklyn/location/geo/MaxMind2HostGeoLookup.java
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.brooklyn.location.geo;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.MalformedURLException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import brooklyn.util.internal.BrooklynSystemProperties;
+import brooklyn.util.net.Networking;
+import brooklyn.util.text.Strings;
+
+import com.google.common.base.Throwables;
+import com.google.common.collect.Lists;
+import com.maxmind.geoip2.DatabaseReader;
+import com.maxmind.geoip2.model.CityResponse;
+import com.maxmind.geoip2.record.Subdivision;
+
+public class MaxMind2HostGeoLookup implements HostGeoLookup {
+
+ public static final Logger log = LoggerFactory.getLogger(MaxMind2HostGeoLookup.class);
+
+ static final String MAXMIND_DB_URL = "http://dev.maxmind.com/geoip/geoip2/geolite2/#Downloads";
+ // TODO this should be configurable from system property or brooklyn.properties
+ // TODO and should use properties BrooklynServerConfig.MGMT_BASE_DIR (but hard to get mgmt properties here!)
+ static final String MAXMIND_DB_PATH = System.getProperty("user.home")+"/"+".brooklyn/"+"GeoLite2-City.mmdb";
+
+ static boolean lookupFailed = false;
+ static DatabaseReader databaseReader = null;
+
+ public static synchronized DatabaseReader getDatabaseReader() {
+ if (databaseReader!=null) return databaseReader;
+ try {
+ File f = new File(MAXMIND_DB_PATH);
+ databaseReader = new DatabaseReader.Builder(f).build();
+ } catch (IOException e) {
+ lookupFailed = true;
+ log.debug("MaxMind geo lookup unavailable; either download and unpack the latest "+
+ "binary from "+MAXMIND_DB_URL+" into "+MAXMIND_DB_PATH+", "+
+ "or specify a different HostGeoLookup implementation with the key "+
+ BrooklynSystemProperties.HOST_GEO_LOOKUP_IMPL.getPropertyName()+" (error trying to read: "+e+")");
+ }
+ return databaseReader;
+ }
+
+ public HostGeoInfo getHostGeoInfo(InetAddress address) throws MalformedURLException, IOException {
+ if (lookupFailed) return null;
+
+ DatabaseReader ll = getDatabaseReader();
+ if (ll==null) return null;
+
+ InetAddress extAddress = address;
+ if (Networking.isPrivateSubnet(extAddress)) extAddress = InetAddress.getByName(LocalhostExternalIpLoader.getLocalhostIpQuicklyOrDefault());
+
+ try {
+ CityResponse l = ll.city(extAddress);
+ if (l==null) {
+ if (log.isDebugEnabled()) log.debug("Geo info failed to find location for address {}, using {}", extAddress, ll);
+ return null;
+ }
+
+ StringBuilder name = new StringBuilder();
+
+ if (l.getCity()!=null && l.getCity().getName()!=null) name.append(l.getCity().getName());
+
+ if (l.getSubdivisions()!=null) {
+ for (Subdivision subd: Lists.reverse(l.getSubdivisions())) {
+ if (name.length()>0) name.append(", ");
+ // prefer e.g. USA state codes over state names
+ if (!Strings.isBlank(subd.getIsoCode()))
+ name.append(subd.getIsoCode());
+ else
+ name.append(subd.getName());
+ }
+ }
+
+ if (l.getCountry()!=null) {
+ if (name.length()==0) {
+ name.append(l.getCountry().getName());
+ } else {
+ name.append(" ("); name.append(l.getCountry().getIsoCode()); name.append(")");
+ }
+ }
+
+
+ HostGeoInfo geo = new HostGeoInfo(address.getHostName(), name.toString(), l.getLocation().getLatitude(), l.getLocation().getLongitude());
+ log.debug("Geo info lookup (MaxMind DB) for "+address+" returned: "+geo);
+ return geo;
+ } catch (Exception e) {
+ if (log.isDebugEnabled())
+ log.debug("Geo info lookup failed: "+e);
+ throw Throwables.propagate(e);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/main/java/org/apache/brooklyn/location/geo/UtraceHostGeoLookup.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/location/geo/UtraceHostGeoLookup.java b/core/src/main/java/org/apache/brooklyn/location/geo/UtraceHostGeoLookup.java
new file mode 100644
index 0000000..9b2537c
--- /dev/null
+++ b/core/src/main/java/org/apache/brooklyn/location/geo/UtraceHostGeoLookup.java
@@ -0,0 +1,210 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.brooklyn.location.geo;
+
+import groovy.util.Node;
+import groovy.util.NodeList;
+import groovy.util.XmlParser;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.MalformedURLException;
+import java.util.concurrent.atomic.AtomicReference;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import brooklyn.util.exceptions.Exceptions;
+import brooklyn.util.javalang.JavaClassNames;
+import brooklyn.util.net.Networking;
+import brooklyn.util.time.Duration;
+import brooklyn.util.time.Durations;
+
+import com.google.common.base.Throwables;
+
+public class UtraceHostGeoLookup implements HostGeoLookup {
+
+
+ /*
+ *
+http://xml.utrace.de/?query=88.198.156.18
+(IP address or hostname)
+
+The XML result is as follows:
+
+<?xml version="1.0" encoding="iso-8869-1"?>
+<results>
+<result>
+<ip>88.198.156.18</ip>
+<host>utrace.de</host>
+<isp>Hetzner Online AG</isp>
+<org>Pagedesign GmbH</org>
+<region>Hamburg</region>
+<countrycode>DE</countrycode>
+<latitude>53.5499992371</latitude>
+<longitude>10</longitude>
+<queries>10</queries>
+</result>
+</results>
+
+Note the queries count field -- you are permitted 100 per day.
+Beyond this you get blacklisted and requests may time out, or return none.
+(This may last for several days once blacklisting, not sure how long.)
+ */
+
+ /** after failures, subsequent retries within this time interval are blocked */
+ private static final Duration RETRY_INTERVAL = Duration.FIVE_MINUTES;
+ /** requests taking longer than this period are deemed to have timed out and failed;
+ * set reasonably low so that if we are blacklisted for making too many requests,
+ * the call to get geo info does not take very long */
+ private static final Duration REQUEST_TIMEOUT = Duration.seconds(3);
+
+ public static final Logger log = LoggerFactory.getLogger(UtraceHostGeoLookup.class);
+
+ public String getLookupUrlForPublicIp(String ip) {
+ return "http://xml.utrace.de/?query="+ip.trim();
+ }
+
+ /**
+ * @deprecated since 0.7.0. Use {@link LocalhostExternalIpLoader} instead.
+ */
+ @Deprecated
+ public static String getLocalhostExternalIp() {
+ return LocalhostExternalIpLoader.getLocalhostIpWithin(Duration.seconds(2));
+ }
+
+ /**
+ * @deprecated since 0.7.0. Use {@link LocalhostExternalIpLoader} instead.
+ */
+ @Deprecated
+ public static String getLocalhostExternalIpImpl() {
+ return LocalhostExternalIpLoader.getLocalhostIpWithin(Duration.seconds(2));
+ }
+
+ public String getLookupUrlForLocalhost() {
+ return getLookupUrlForPublicIp(LocalhostExternalIpLoader.getLocalhostIpQuicklyOrDefault());
+ }
+
+ /** returns URL to get properties for the given address (assuming localhost if address is on a subnet) */
+ public String getLookupUrlFor(InetAddress address) {
+ if (Networking.isPrivateSubnet(address)) return getLookupUrlForLocalhost();
+ return getLookupUrlForPublicIp(address.getHostAddress());
+ }
+
+ private static boolean LOGGED_GEO_LOOKUP_UNAVAILABLE = false;
+ private static long LAST_FAILURE_UTC = -1;
+
+ /** does the {@link #retrieveHostGeoInfo(InetAddress)}, but in the background with a default timeout */
+ public HostGeoInfo getHostGeoInfo(InetAddress address) throws MalformedURLException, IOException {
+ if (Duration.sinceUtc(LAST_FAILURE_UTC).compareTo(RETRY_INTERVAL) < 0) {
+ // wait at least 60s since a failure
+ return null;
+ }
+ return getHostGeoInfo(address, REQUEST_TIMEOUT);
+ }
+
+ /** does a {@link #retrieveHostGeoInfo(InetAddress)} with a timeout (returning null, interrupting, and setting failure time) */
+ public HostGeoInfo getHostGeoInfo(final InetAddress address, Duration timeout) throws MalformedURLException, IOException {
+ final AtomicReference<HostGeoInfo> result = new AtomicReference<HostGeoInfo>();
+ Thread lt = new Thread() {
+ public void run() {
+ try {
+ result.set(retrieveHostGeoInfo(address));
+ } catch (Exception e) {
+ log.warn("Error computing geo info for "+address+"; internet issues or too many requests to (free) servers for "+JavaClassNames.simpleClassName(UtraceHostGeoLookup.this)+": "+e);
+ log.debug("Detail of host geo error: "+e, e);
+ }
+ }
+ };
+ lt.start();
+
+ try {
+ Durations.join(lt, timeout);
+ } catch (InterruptedException e) {
+ throw Exceptions.propagate(e);
+ }
+
+ if (lt.isAlive()) {
+ // interrupt and set the failure time so that subsequent attempts do not face this timeout
+ lt.interrupt();
+ LAST_FAILURE_UTC = System.currentTimeMillis();
+ log.debug("Geo info lookup for "+address+" timed out after "+timeout);
+ }
+
+ return result.get();
+ }
+
+ public HostGeoInfo retrieveHostGeoInfo(InetAddress address) throws MalformedURLException, IOException {
+ String url = getLookupUrlFor(address);
+ if (log.isDebugEnabled())
+ log.debug("Geo info lookup for "+address+" at "+url);
+ Node xml;
+ try {
+ xml = new XmlParser().parse(getLookupUrlFor(address));
+ } catch (Exception e) {
+ LAST_FAILURE_UTC = System.currentTimeMillis();
+ if (log.isDebugEnabled())
+ log.debug("Geo info lookup for "+address+" failed: "+e);
+ if (!LOGGED_GEO_LOOKUP_UNAVAILABLE) {
+ LOGGED_GEO_LOOKUP_UNAVAILABLE = true;
+ log.info("Geo info lookup unavailable (for "+address+"; cause "+e+")");
+ }
+ return null;
+ }
+ try {
+ String org = getXmlResultsField(xml, "org").trim();
+ if (org.isEmpty()) org = getXmlResultsField(xml, "isp").trim();
+ String region = getXmlResultsField(xml, "region").trim();
+ if (!org.isEmpty()) {
+ if (!region.isEmpty()) region = org+", "+region;
+ else region = org;
+ }
+ if (region.isEmpty()) region = getXmlResultsField(xml, "isp").trim();
+ if (region.isEmpty()) region = address.toString();
+ HostGeoInfo geo = new HostGeoInfo(address.getHostName(),
+ region+
+ " ("+getXmlResultsField(xml, "countrycode")+")",
+ Double.parseDouble(""+getXmlResultsField(xml, "latitude")),
+ Double.parseDouble(""+getXmlResultsField(xml, "longitude")));
+ log.info("Geo info lookup for "+address+" returned: "+geo);
+ return geo;
+ } catch (Exception e) {
+ if (log.isDebugEnabled())
+ log.debug("Geo info lookup failed, for "+address+" at "+url+", due to "+e+"; response is "+xml);
+ throw Throwables.propagate(e);
+ }
+ }
+
+ @Nullable
+ private static Node getFirstChild(Node xml, String field) {
+ if (xml==null) return null;
+ NodeList nl = (NodeList)xml.get(field);
+ if (nl==null || nl.isEmpty()) return null;
+ return (Node)nl.get(0);
+ }
+ @Nonnull
+ private static String getXmlResultsField(Node xml, String field) {
+ Node f1 = getFirstChild(getFirstChild(xml, "result"), field);
+ if (f1==null) return "";
+ return f1.text();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/main/java/org/apache/brooklyn/location/paas/PaasLocation.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/location/paas/PaasLocation.java b/core/src/main/java/org/apache/brooklyn/location/paas/PaasLocation.java
new file mode 100644
index 0000000..e90f757
--- /dev/null
+++ b/core/src/main/java/org/apache/brooklyn/location/paas/PaasLocation.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.brooklyn.location.paas;
+
+import org.apache.brooklyn.location.Location;
+
+/**
+ * {@link Location} representing an application container on a PaaS provider.
+ */
+public interface PaasLocation extends Location {
+
+ String getPaasProviderName();
+}
+
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/main/resources/META-INF/services/brooklyn.location.LocationResolver
----------------------------------------------------------------------
diff --git a/core/src/main/resources/META-INF/services/brooklyn.location.LocationResolver b/core/src/main/resources/META-INF/services/brooklyn.location.LocationResolver
deleted file mode 100644
index fd14323..0000000
--- a/core/src/main/resources/META-INF/services/brooklyn.location.LocationResolver
+++ /dev/null
@@ -1,9 +0,0 @@
-brooklyn.location.basic.DefinedLocationByIdResolver
-brooklyn.location.basic.NamedLocationResolver
-brooklyn.location.basic.CatalogLocationResolver
-brooklyn.location.basic.LocalhostLocationResolver
-brooklyn.location.basic.ByonLocationResolver
-brooklyn.location.basic.SingleMachineLocationResolver
-brooklyn.location.basic.HostLocationResolver
-brooklyn.location.basic.MultiLocationResolver
-brooklyn.location.access.PortForwardManagerLocationResolver
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/main/resources/META-INF/services/org.apache.brooklyn.location.LocationResolver
----------------------------------------------------------------------
diff --git a/core/src/main/resources/META-INF/services/org.apache.brooklyn.location.LocationResolver b/core/src/main/resources/META-INF/services/org.apache.brooklyn.location.LocationResolver
new file mode 100644
index 0000000..721b7e7
--- /dev/null
+++ b/core/src/main/resources/META-INF/services/org.apache.brooklyn.location.LocationResolver
@@ -0,0 +1,9 @@
+org.apache.brooklyn.location.basic.DefinedLocationByIdResolver
+org.apache.brooklyn.location.basic.NamedLocationResolver
+org.apache.brooklyn.location.basic.CatalogLocationResolver
+org.apache.brooklyn.location.basic.LocalhostLocationResolver
+org.apache.brooklyn.location.basic.ByonLocationResolver
+org.apache.brooklyn.location.basic.SingleMachineLocationResolver
+org.apache.brooklyn.location.basic.HostLocationResolver
+org.apache.brooklyn.location.basic.MultiLocationResolver
+org.apache.brooklyn.location.access.PortForwardManagerLocationResolver
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/main/resources/brooklyn/location/basic/os-details.sh
----------------------------------------------------------------------
diff --git a/core/src/main/resources/brooklyn/location/basic/os-details.sh b/core/src/main/resources/brooklyn/location/basic/os-details.sh
deleted file mode 100755
index d6f84c3..0000000
--- a/core/src/main/resources/brooklyn/location/basic/os-details.sh
+++ /dev/null
@@ -1,93 +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.
-#
-# /etc/os-release is the new-ish standard for specifying OS details.
-# See http://www.freedesktop.org/software/systemd/man/os-release.html.
-# There are a multitude of system-dependent files we can check (see list
-# at http://linuxmafia.com/faq/Admin/release-files.html). We can support
-# them as we need.
-
-# Survey of CentOS 6.5, Debian Jessie, Fedora 17, OSX and Ubuntu 12.04 suggests
-# uname -m is the most reliable flag for architecture
-ARCHITECTURE=$(uname -m)
-
-# Tests for existence of commands
-function exists {
- command -v $1 >/dev/null 2>&1
-}
-
-# OS info
-if [ -f /etc/os-release ]; then
- source /etc/os-release
-elif [ -f /etc/redhat-release ]; then
- # Example: Red Hat Enterprise Linux Server release 6.3 (Santiago)
- # Match everything up to ' release'
- NAME=$(cat /etc/redhat-release | sed 's/ release.*//')
- # Match everything between 'release ' and the next space
- VERSION_ID=$(cat /etc/redhat-release | sed 's/.*release \([^ ]*\).*/\1/')
-elif exists lsb_release; then
- NAME=$(lsb_release -s -i)
- VERSION_ID=$(lsb_release -s -r)
-elif exists sw_vers; then
- # sw_vers is an OSX command
- NAME=$(sw_vers -productName)
- VERSION_ID=$(sw_vers -productVersion)
-fi
-
-# Debian os-release doesn't set versions, and Debian 6 doesn't have os-release or lsb_release
-if [ -z $VERSION_ID ] && [ -f /etc/debian_version ]; then
- NAME=Debian
- VERSION_ID=$(cat /etc/debian_version)
-fi
-
-# Suse doesn't have os-release or lsb_release
-if [ -z $VERSION_ID ] && [ -f /etc/SuSE-release ]; then
- NAME=Suse
- VERSION_MAJOR=$(cat /etc/SuSE-release | grep VERSION | sed 's/VERSION \= //')
- VERSION_PATCH=$(cat /etc/SuSE-release | grep PATCHLEVEL | sed 's/PATCHLEVEL \= //')
- if [ -z $VERSION_PATCH ]; then
- VERSION_ID=${VERSION_MAJOR}
- else
- VERSION_ID=${VERSION_MAJOR}.${VERSION_PATCH}
- fi
-fi
-
-# Hardware info
-# Is the loss of precision converting bytes and kilobytes to megabytes acceptable?
-# We can do floating point calculations with precision with the bc program, but it
-# isn't available by default on all systems.
-if exists sw_vers; then
- # sysctl outputs total in bytes, linux meminfo uses kilobytes
- bytes=$(sysctl -n hw.memsize)
- RAM=$((bytes/1048576))
- CPU_COUNT=$(sysctl -n hw.ncpu)
-else
- # e.g. "MemTotal: 1019352 kB" -> "1019352"
- # grep -o '[0-9]*' would be simpler than the sed command but I've observed it match
- # nothing on Centos 5.6 instances.
- kilobytes=$(grep MemTotal /proc/meminfo | sed 's/^MemTotal:[ ]*\([0-9]*\) kB/\1/')
- RAM=$((kilobytes/1024))
- CPU_COUNT=$(grep processor /proc/cpuinfo | wc -l)
-fi
-
-echo "name:$NAME"
-echo "version:$VERSION_ID"
-echo "architecture:$ARCHITECTURE"
-echo "ram:$RAM"
-echo "cpus:$CPU_COUNT"
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/main/resources/brooklyn/location/geo/external-ip-address-resolvers.txt
----------------------------------------------------------------------
diff --git a/core/src/main/resources/brooklyn/location/geo/external-ip-address-resolvers.txt b/core/src/main/resources/brooklyn/location/geo/external-ip-address-resolvers.txt
deleted file mode 100644
index bc3c26e..0000000
--- a/core/src/main/resources/brooklyn/location/geo/external-ip-address-resolvers.txt
+++ /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.
-
-http://jsonip.com/
-http://myip.dnsomatic.com/
-http://checkip.dyndns.org/
-http://www.telize.com/ip
-http://wtfismyip.com/text
-http://whatismyip.akamai.com/
-http://myip.wampdeveloper.com/
-http://icanhazip.com/
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/main/resources/org/apache/brooklyn/location/basic/os-details.sh
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/brooklyn/location/basic/os-details.sh b/core/src/main/resources/org/apache/brooklyn/location/basic/os-details.sh
new file mode 100755
index 0000000..d6f84c3
--- /dev/null
+++ b/core/src/main/resources/org/apache/brooklyn/location/basic/os-details.sh
@@ -0,0 +1,93 @@
+#!/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.
+#
+# /etc/os-release is the new-ish standard for specifying OS details.
+# See http://www.freedesktop.org/software/systemd/man/os-release.html.
+# There are a multitude of system-dependent files we can check (see list
+# at http://linuxmafia.com/faq/Admin/release-files.html). We can support
+# them as we need.
+
+# Survey of CentOS 6.5, Debian Jessie, Fedora 17, OSX and Ubuntu 12.04 suggests
+# uname -m is the most reliable flag for architecture
+ARCHITECTURE=$(uname -m)
+
+# Tests for existence of commands
+function exists {
+ command -v $1 >/dev/null 2>&1
+}
+
+# OS info
+if [ -f /etc/os-release ]; then
+ source /etc/os-release
+elif [ -f /etc/redhat-release ]; then
+ # Example: Red Hat Enterprise Linux Server release 6.3 (Santiago)
+ # Match everything up to ' release'
+ NAME=$(cat /etc/redhat-release | sed 's/ release.*//')
+ # Match everything between 'release ' and the next space
+ VERSION_ID=$(cat /etc/redhat-release | sed 's/.*release \([^ ]*\).*/\1/')
+elif exists lsb_release; then
+ NAME=$(lsb_release -s -i)
+ VERSION_ID=$(lsb_release -s -r)
+elif exists sw_vers; then
+ # sw_vers is an OSX command
+ NAME=$(sw_vers -productName)
+ VERSION_ID=$(sw_vers -productVersion)
+fi
+
+# Debian os-release doesn't set versions, and Debian 6 doesn't have os-release or lsb_release
+if [ -z $VERSION_ID ] && [ -f /etc/debian_version ]; then
+ NAME=Debian
+ VERSION_ID=$(cat /etc/debian_version)
+fi
+
+# Suse doesn't have os-release or lsb_release
+if [ -z $VERSION_ID ] && [ -f /etc/SuSE-release ]; then
+ NAME=Suse
+ VERSION_MAJOR=$(cat /etc/SuSE-release | grep VERSION | sed 's/VERSION \= //')
+ VERSION_PATCH=$(cat /etc/SuSE-release | grep PATCHLEVEL | sed 's/PATCHLEVEL \= //')
+ if [ -z $VERSION_PATCH ]; then
+ VERSION_ID=${VERSION_MAJOR}
+ else
+ VERSION_ID=${VERSION_MAJOR}.${VERSION_PATCH}
+ fi
+fi
+
+# Hardware info
+# Is the loss of precision converting bytes and kilobytes to megabytes acceptable?
+# We can do floating point calculations with precision with the bc program, but it
+# isn't available by default on all systems.
+if exists sw_vers; then
+ # sysctl outputs total in bytes, linux meminfo uses kilobytes
+ bytes=$(sysctl -n hw.memsize)
+ RAM=$((bytes/1048576))
+ CPU_COUNT=$(sysctl -n hw.ncpu)
+else
+ # e.g. "MemTotal: 1019352 kB" -> "1019352"
+ # grep -o '[0-9]*' would be simpler than the sed command but I've observed it match
+ # nothing on Centos 5.6 instances.
+ kilobytes=$(grep MemTotal /proc/meminfo | sed 's/^MemTotal:[ ]*\([0-9]*\) kB/\1/')
+ RAM=$((kilobytes/1024))
+ CPU_COUNT=$(grep processor /proc/cpuinfo | wc -l)
+fi
+
+echo "name:$NAME"
+echo "version:$VERSION_ID"
+echo "architecture:$ARCHITECTURE"
+echo "ram:$RAM"
+echo "cpus:$CPU_COUNT"
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/main/resources/org/apache/brooklyn/location/geo/external-ip-address-resolvers.txt
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/brooklyn/location/geo/external-ip-address-resolvers.txt b/core/src/main/resources/org/apache/brooklyn/location/geo/external-ip-address-resolvers.txt
new file mode 100644
index 0000000..bc3c26e
--- /dev/null
+++ b/core/src/main/resources/org/apache/brooklyn/location/geo/external-ip-address-resolvers.txt
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT 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://jsonip.com/
+http://myip.dnsomatic.com/
+http://checkip.dyndns.org/
+http://www.telize.com/ip
+http://wtfismyip.com/text
+http://whatismyip.akamai.com/
+http://myip.wampdeveloper.com/
+http://icanhazip.com/
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/enricher/CustomAggregatingEnricherDeprecatedTest.groovy
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/enricher/CustomAggregatingEnricherDeprecatedTest.groovy b/core/src/test/java/brooklyn/enricher/CustomAggregatingEnricherDeprecatedTest.groovy
index 93c4884..ac1df97 100644
--- a/core/src/test/java/brooklyn/enricher/CustomAggregatingEnricherDeprecatedTest.groovy
+++ b/core/src/test/java/brooklyn/enricher/CustomAggregatingEnricherDeprecatedTest.groovy
@@ -25,16 +25,13 @@ import org.slf4j.LoggerFactory
import org.testng.annotations.AfterMethod
import org.testng.annotations.BeforeMethod
import org.testng.annotations.Test
-
-import brooklyn.entity.basic.ApplicationBuilder
import brooklyn.entity.basic.BasicGroup
import brooklyn.entity.basic.Entities
import org.apache.brooklyn.api.entity.proxying.EntitySpec
import org.apache.brooklyn.api.event.AttributeSensor
import brooklyn.event.basic.BasicAttributeSensor
-import brooklyn.location.basic.SimulatedLocation
+import org.apache.brooklyn.location.basic.SimulatedLocation
import org.apache.brooklyn.test.TestUtils
-import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
import org.apache.brooklyn.test.entity.TestApplication
import org.apache.brooklyn.test.entity.TestEntity
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/enricher/CustomAggregatingEnricherTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/enricher/CustomAggregatingEnricherTest.java b/core/src/test/java/brooklyn/enricher/CustomAggregatingEnricherTest.java
index e539631..666e898 100644
--- a/core/src/test/java/brooklyn/enricher/CustomAggregatingEnricherTest.java
+++ b/core/src/test/java/brooklyn/enricher/CustomAggregatingEnricherTest.java
@@ -34,8 +34,8 @@ import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.entity.basic.BasicGroup;
import brooklyn.entity.basic.Entities;
import brooklyn.event.basic.BasicAttributeSensor;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.util.collections.MutableMap;
import com.google.common.base.Function;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/enricher/TransformingEnricherDeprecatedTest.groovy
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/enricher/TransformingEnricherDeprecatedTest.groovy b/core/src/test/java/brooklyn/enricher/TransformingEnricherDeprecatedTest.groovy
index cf9fdc1..7a0fa1c 100644
--- a/core/src/test/java/brooklyn/enricher/TransformingEnricherDeprecatedTest.groovy
+++ b/core/src/test/java/brooklyn/enricher/TransformingEnricherDeprecatedTest.groovy
@@ -28,12 +28,11 @@ import org.testng.annotations.BeforeMethod
import org.testng.annotations.Test
import brooklyn.enricher.basic.SensorTransformingEnricher
-import brooklyn.entity.basic.ApplicationBuilder
import brooklyn.entity.basic.Entities
import org.apache.brooklyn.api.entity.proxying.EntitySpec
import org.apache.brooklyn.api.event.AttributeSensor
import brooklyn.event.basic.BasicAttributeSensor
-import brooklyn.location.basic.SimulatedLocation
+import org.apache.brooklyn.location.basic.SimulatedLocation
import org.apache.brooklyn.test.TestUtils
import org.apache.brooklyn.test.entity.TestApplication
import org.apache.brooklyn.test.entity.TestEntity
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/enricher/TransformingEnricherTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/enricher/TransformingEnricherTest.java b/core/src/test/java/brooklyn/enricher/TransformingEnricherTest.java
index 9e3319e..06b6ac8 100644
--- a/core/src/test/java/brooklyn/enricher/TransformingEnricherTest.java
+++ b/core/src/test/java/brooklyn/enricher/TransformingEnricherTest.java
@@ -29,7 +29,7 @@ import org.testng.annotations.Test;
import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.event.basic.BasicAttributeSensor;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.util.math.MathFunctions;
import com.google.common.base.Function;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/EffectorMetadataTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/EffectorMetadataTest.java b/core/src/test/java/brooklyn/entity/EffectorMetadataTest.java
index d265a73..485504e 100644
--- a/core/src/test/java/brooklyn/entity/EffectorMetadataTest.java
+++ b/core/src/test/java/brooklyn/entity/EffectorMetadataTest.java
@@ -38,7 +38,7 @@ import brooklyn.entity.basic.BasicParameterType;
import brooklyn.entity.basic.MethodEffector;
import brooklyn.entity.effector.Effectors;
import brooklyn.entity.trait.Startable;
-import brooklyn.location.Location;
+import org.apache.brooklyn.location.Location;
import brooklyn.management.internal.EffectorUtils;
import com.google.common.collect.ImmutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/SetFromFlagTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/SetFromFlagTest.java b/core/src/test/java/brooklyn/entity/SetFromFlagTest.java
index fa33ec8..e28038f 100644
--- a/core/src/test/java/brooklyn/entity/SetFromFlagTest.java
+++ b/core/src/test/java/brooklyn/entity/SetFromFlagTest.java
@@ -26,8 +26,8 @@ import org.apache.brooklyn.api.entity.Entity;
import org.testng.annotations.Test;
import brooklyn.entity.basic.AbstractEntity;
-import brooklyn.location.PortRange;
-import brooklyn.location.basic.PortRanges;
+import org.apache.brooklyn.location.PortRange;
+import org.apache.brooklyn.location.basic.PortRanges;
import brooklyn.util.collections.MutableMap;
import brooklyn.util.flags.SetFromFlag;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/AbstractApplicationLegacyTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/AbstractApplicationLegacyTest.java b/core/src/test/java/brooklyn/entity/basic/AbstractApplicationLegacyTest.java
index de330ee..b78562e 100644
--- a/core/src/test/java/brooklyn/entity/basic/AbstractApplicationLegacyTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/AbstractApplicationLegacyTest.java
@@ -34,8 +34,8 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import brooklyn.entity.BrooklynAppUnitTestSupport;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
/**
* Tests the deprecated use of AbstractAppliation, where its constructor is called directly.
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/AbstractEntityLegacyTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/AbstractEntityLegacyTest.java b/core/src/test/java/brooklyn/entity/basic/AbstractEntityLegacyTest.java
index 6689740..96c7589 100644
--- a/core/src/test/java/brooklyn/entity/basic/AbstractEntityLegacyTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/AbstractEntityLegacyTest.java
@@ -25,7 +25,6 @@ import java.util.List;
import java.util.Map;
import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.proxying.EntitySpec;
import org.apache.brooklyn.api.entity.proxying.ImplementedBy;
import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
import org.apache.brooklyn.test.entity.TestApplication;
@@ -34,7 +33,7 @@ import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.util.collections.MutableMap;
/**
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/BasicStartableTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/BasicStartableTest.java b/core/src/test/java/brooklyn/entity/basic/BasicStartableTest.java
index ef49562..cbd1c8b 100644
--- a/core/src/test/java/brooklyn/entity/basic/BasicStartableTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/BasicStartableTest.java
@@ -41,10 +41,10 @@ import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
-import brooklyn.location.Location;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.Locations.LocationsFilter;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.Locations.LocationsFilter;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.util.collections.MutableSet;
public class BasicStartableTest {
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/DataEntityTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/DataEntityTest.java b/core/src/test/java/brooklyn/entity/basic/DataEntityTest.java
index 1f9c706..228a6fe 100644
--- a/core/src/test/java/brooklyn/entity/basic/DataEntityTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/DataEntityTest.java
@@ -34,8 +34,8 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import brooklyn.event.basic.Sensors;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.test.Asserts;
import brooklyn.util.collections.MutableMap;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/EntitiesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/EntitiesTest.java b/core/src/test/java/brooklyn/entity/basic/EntitiesTest.java
index 6cd57b8..888e2e5 100644
--- a/core/src/test/java/brooklyn/entity/basic/EntitiesTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/EntitiesTest.java
@@ -31,8 +31,8 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import brooklyn.entity.BrooklynAppUnitTestSupport;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.test.Asserts;
import brooklyn.util.collections.MutableSet;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageLegacyTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageLegacyTest.java b/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageLegacyTest.java
index 1304d36..fec12e3 100644
--- a/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageLegacyTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageLegacyTest.java
@@ -32,7 +32,7 @@ import org.testng.annotations.Test;
import brooklyn.config.ConfigKey;
import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.event.basic.DependentConfiguration;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.util.collections.MutableMap;
import brooklyn.util.time.Time;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageTest.java b/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageTest.java
index bac3da9..ff4d83e 100644
--- a/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageTest.java
@@ -36,7 +36,7 @@ import brooklyn.config.ConfigKey;
import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.event.basic.BasicConfigKey;
import brooklyn.event.basic.DependentConfiguration;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.util.exceptions.Exceptions;
import com.google.common.base.Function;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/EntityFunctionsTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/EntityFunctionsTest.java b/core/src/test/java/brooklyn/entity/basic/EntityFunctionsTest.java
index db563b6..8597942 100644
--- a/core/src/test/java/brooklyn/entity/basic/EntityFunctionsTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/EntityFunctionsTest.java
@@ -27,7 +27,7 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import brooklyn.entity.BrooklynAppUnitTestSupport;
-import brooklyn.location.Location;
+import org.apache.brooklyn.location.Location;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/EntityLocationsTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/EntityLocationsTest.java b/core/src/test/java/brooklyn/entity/basic/EntityLocationsTest.java
index b0c6e93..77ad89a 100644
--- a/core/src/test/java/brooklyn/entity/basic/EntityLocationsTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/EntityLocationsTest.java
@@ -29,7 +29,7 @@ import org.testng.Assert;
import org.testng.annotations.Test;
import brooklyn.entity.BrooklynAppUnitTestSupport;
-import brooklyn.location.Location;
+import org.apache.brooklyn.location.Location;
import brooklyn.test.Asserts;
import com.google.common.collect.ImmutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/EntityPredicatesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/EntityPredicatesTest.java b/core/src/test/java/brooklyn/entity/basic/EntityPredicatesTest.java
index 0636a0a..8b47dd2 100644
--- a/core/src/test/java/brooklyn/entity/basic/EntityPredicatesTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/EntityPredicatesTest.java
@@ -28,7 +28,7 @@ import org.testng.annotations.Test;
import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.entity.trait.Changeable;
-import brooklyn.location.Location;
+import org.apache.brooklyn.location.Location;
import brooklyn.util.text.StringPredicates;
import com.google.common.collect.ImmutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/EntitySpecTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/EntitySpecTest.java b/core/src/test/java/brooklyn/entity/basic/EntitySpecTest.java
index 92f65c8..849aeac 100644
--- a/core/src/test/java/brooklyn/entity/basic/EntitySpecTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/EntitySpecTest.java
@@ -37,7 +37,7 @@ import brooklyn.config.ConfigKey;
import brooklyn.enricher.basic.AbstractEnricher;
import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.event.basic.BasicConfigKey;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.policy.basic.AbstractPolicy;
import brooklyn.test.Asserts;
import brooklyn.util.flags.SetFromFlag;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/EntitySubscriptionTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/EntitySubscriptionTest.java b/core/src/test/java/brooklyn/entity/basic/EntitySubscriptionTest.java
index 6b0a91b..5525d1b 100644
--- a/core/src/test/java/brooklyn/entity/basic/EntitySubscriptionTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/EntitySubscriptionTest.java
@@ -31,7 +31,7 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import brooklyn.event.basic.BasicSensorEvent;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.test.Asserts;
import com.google.common.collect.ImmutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/EntitySuppliersTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/EntitySuppliersTest.java b/core/src/test/java/brooklyn/entity/basic/EntitySuppliersTest.java
index ed23cad..edd1665 100644
--- a/core/src/test/java/brooklyn/entity/basic/EntitySuppliersTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/EntitySuppliersTest.java
@@ -27,9 +27,9 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import brooklyn.entity.BrooklynAppUnitTestSupport;
-import brooklyn.location.Location;
-import brooklyn.location.MachineProvisioningLocation;
-import brooklyn.location.basic.SshMachineLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.MachineProvisioningLocation;
+import org.apache.brooklyn.location.basic.SshMachineLocation;
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/MapListAndOtherStructuredConfigKeyTest.groovy
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/MapListAndOtherStructuredConfigKeyTest.groovy b/core/src/test/java/brooklyn/entity/basic/MapListAndOtherStructuredConfigKeyTest.groovy
index cd90553..a52e7d5 100644
--- a/core/src/test/java/brooklyn/entity/basic/MapListAndOtherStructuredConfigKeyTest.groovy
+++ b/core/src/test/java/brooklyn/entity/basic/MapListAndOtherStructuredConfigKeyTest.groovy
@@ -34,7 +34,7 @@ import brooklyn.event.basic.DependentConfiguration
import brooklyn.event.basic.ListConfigKey.ListModifications
import brooklyn.event.basic.MapConfigKey.MapModifications
import brooklyn.event.basic.SetConfigKey.SetModifications
-import brooklyn.location.basic.SimulatedLocation
+import org.apache.brooklyn.location.basic.SimulatedLocation
import org.apache.brooklyn.test.entity.TestApplication
import org.apache.brooklyn.test.entity.TestEntity
import brooklyn.util.collections.MutableMap
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/basic/ServiceStateLogicTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/ServiceStateLogicTest.java b/core/src/test/java/brooklyn/entity/basic/ServiceStateLogicTest.java
index 81967ba..e08cf97 100644
--- a/core/src/test/java/brooklyn/entity/basic/ServiceStateLogicTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/ServiceStateLogicTest.java
@@ -35,7 +35,7 @@ import brooklyn.entity.basic.ServiceStateLogic.ServiceNotUpLogic;
import brooklyn.entity.basic.ServiceStateLogic.ServiceProblemsLogic;
import brooklyn.entity.group.DynamicCluster;
import brooklyn.event.basic.Sensors;
-import brooklyn.location.Location;
+import org.apache.brooklyn.location.Location;
import brooklyn.util.collections.QuorumCheck.QuorumChecks;
import brooklyn.util.exceptions.Exceptions;
import brooklyn.util.time.Duration;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/drivers/BasicEntityDriverManagerTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/drivers/BasicEntityDriverManagerTest.java b/core/src/test/java/brooklyn/entity/drivers/BasicEntityDriverManagerTest.java
index c57b9cd..71eaac9 100644
--- a/core/src/test/java/brooklyn/entity/drivers/BasicEntityDriverManagerTest.java
+++ b/core/src/test/java/brooklyn/entity/drivers/BasicEntityDriverManagerTest.java
@@ -29,8 +29,8 @@ import brooklyn.entity.drivers.ReflectiveEntityDriverFactoryTest.MyDriver;
import brooklyn.entity.drivers.ReflectiveEntityDriverFactoryTest.MyDriverDependentEntity;
import brooklyn.entity.drivers.ReflectiveEntityDriverFactoryTest.MySshDriver;
import brooklyn.entity.drivers.RegistryEntityDriverFactoryTest.MyOtherSshDriver;
-import brooklyn.location.basic.SimulatedLocation;
-import brooklyn.location.basic.SshMachineLocation;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.basic.SshMachineLocation;
import brooklyn.util.collections.MutableMap;
public class BasicEntityDriverManagerTest {
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/drivers/EntityDriverRegistryTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/drivers/EntityDriverRegistryTest.java b/core/src/test/java/brooklyn/entity/drivers/EntityDriverRegistryTest.java
index aa57db3..7ebceda 100644
--- a/core/src/test/java/brooklyn/entity/drivers/EntityDriverRegistryTest.java
+++ b/core/src/test/java/brooklyn/entity/drivers/EntityDriverRegistryTest.java
@@ -31,7 +31,7 @@ import brooklyn.entity.basic.Entities;
import brooklyn.entity.drivers.ReflectiveEntityDriverFactoryTest.MyDriver;
import brooklyn.entity.drivers.ReflectiveEntityDriverFactoryTest.MyDriverDependentEntity;
import brooklyn.entity.drivers.RegistryEntityDriverFactoryTest.MyOtherSshDriver;
-import brooklyn.location.basic.SshMachineLocation;
+import org.apache.brooklyn.location.basic.SshMachineLocation;
import brooklyn.util.collections.MutableMap;
public class EntityDriverRegistryTest {
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/drivers/ReflectiveEntityDriverFactoryTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/drivers/ReflectiveEntityDriverFactoryTest.java b/core/src/test/java/brooklyn/entity/drivers/ReflectiveEntityDriverFactoryTest.java
index f6b6f8c..2eb6a29 100644
--- a/core/src/test/java/brooklyn/entity/drivers/ReflectiveEntityDriverFactoryTest.java
+++ b/core/src/test/java/brooklyn/entity/drivers/ReflectiveEntityDriverFactoryTest.java
@@ -19,9 +19,9 @@
package brooklyn.entity.drivers;
import brooklyn.entity.basic.AbstractEntity;
-import brooklyn.location.Location;
-import brooklyn.location.basic.SshMachineLocation;
-import brooklyn.location.paas.PaasLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.basic.SshMachineLocation;
+import org.apache.brooklyn.location.paas.PaasLocation;
import brooklyn.test.location.TestPaasLocation;
import brooklyn.util.collections.MutableMap;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/drivers/RegistryEntityDriverFactoryTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/drivers/RegistryEntityDriverFactoryTest.java b/core/src/test/java/brooklyn/entity/drivers/RegistryEntityDriverFactoryTest.java
index 39e4feb..7b45974 100644
--- a/core/src/test/java/brooklyn/entity/drivers/RegistryEntityDriverFactoryTest.java
+++ b/core/src/test/java/brooklyn/entity/drivers/RegistryEntityDriverFactoryTest.java
@@ -30,9 +30,9 @@ import org.testng.annotations.Test;
import brooklyn.entity.drivers.ReflectiveEntityDriverFactoryTest.MyDriver;
import brooklyn.entity.drivers.ReflectiveEntityDriverFactoryTest.MyDriverDependentEntity;
-import brooklyn.location.Location;
-import brooklyn.location.basic.SimulatedLocation;
-import brooklyn.location.basic.SshMachineLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.basic.SshMachineLocation;
import brooklyn.util.collections.MutableMap;
public class RegistryEntityDriverFactoryTest {
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/drivers/downloads/BasicDownloadsRegistryTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/drivers/downloads/BasicDownloadsRegistryTest.java b/core/src/test/java/brooklyn/entity/drivers/downloads/BasicDownloadsRegistryTest.java
index c11f4aa..5be9551 100644
--- a/core/src/test/java/brooklyn/entity/drivers/downloads/BasicDownloadsRegistryTest.java
+++ b/core/src/test/java/brooklyn/entity/drivers/downloads/BasicDownloadsRegistryTest.java
@@ -34,8 +34,8 @@ import brooklyn.entity.basic.ApplicationBuilder;
import brooklyn.entity.basic.Attributes;
import brooklyn.entity.basic.BrooklynConfigKeys;
import brooklyn.entity.basic.Entities;
-import brooklyn.location.Location;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.management.internal.LocalManagementContext;
import com.google.common.collect.ImmutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadProducerFromLocalRepoTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadProducerFromLocalRepoTest.java b/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadProducerFromLocalRepoTest.java
index 8ec4d3c..07f9f14 100644
--- a/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadProducerFromLocalRepoTest.java
+++ b/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadProducerFromLocalRepoTest.java
@@ -35,8 +35,8 @@ import brooklyn.config.BrooklynProperties;
import brooklyn.entity.basic.ApplicationBuilder;
import brooklyn.entity.basic.BrooklynConfigKeys;
import brooklyn.entity.basic.Entities;
-import brooklyn.location.Location;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.management.internal.LocalManagementContext;
import com.google.common.collect.ImmutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadProducerFromPropertiesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadProducerFromPropertiesTest.java b/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadProducerFromPropertiesTest.java
index 02da899..dc36f8c 100644
--- a/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadProducerFromPropertiesTest.java
+++ b/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadProducerFromPropertiesTest.java
@@ -35,8 +35,8 @@ import brooklyn.config.BrooklynProperties;
import brooklyn.entity.basic.ApplicationBuilder;
import brooklyn.entity.basic.BrooklynConfigKeys;
import brooklyn.entity.basic.Entities;
-import brooklyn.location.Location;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.management.internal.LocalManagementContext;
import com.google.common.collect.ImmutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadSubstitutersTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadSubstitutersTest.java b/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadSubstitutersTest.java
index 53ab2d1..344e16b 100644
--- a/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadSubstitutersTest.java
+++ b/core/src/test/java/brooklyn/entity/drivers/downloads/DownloadSubstitutersTest.java
@@ -31,8 +31,8 @@ import org.testng.annotations.Test;
import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.entity.basic.BrooklynConfigKeys;
-import brooklyn.location.Location;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import com.google.common.base.Functions;
import com.google.common.collect.ImmutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/drivers/downloads/MyEntityDriver.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/drivers/downloads/MyEntityDriver.java b/core/src/test/java/brooklyn/entity/drivers/downloads/MyEntityDriver.java
index c190790..02154f7 100644
--- a/core/src/test/java/brooklyn/entity/drivers/downloads/MyEntityDriver.java
+++ b/core/src/test/java/brooklyn/entity/drivers/downloads/MyEntityDriver.java
@@ -22,7 +22,7 @@ import org.apache.brooklyn.api.entity.Entity;
import org.apache.brooklyn.api.entity.basic.EntityLocal;
import org.apache.brooklyn.api.entity.drivers.EntityDriver;
-import brooklyn.location.Location;
+import org.apache.brooklyn.location.Location;
public class MyEntityDriver implements EntityDriver {
private final Entity entity;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/effector/EffectorBasicTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/effector/EffectorBasicTest.java b/core/src/test/java/brooklyn/entity/effector/EffectorBasicTest.java
index 5d561bc..ce3dffc 100644
--- a/core/src/test/java/brooklyn/entity/effector/EffectorBasicTest.java
+++ b/core/src/test/java/brooklyn/entity/effector/EffectorBasicTest.java
@@ -37,7 +37,7 @@ import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.entity.basic.Entities;
import brooklyn.entity.trait.FailingEntity;
import brooklyn.entity.trait.Startable;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.management.internal.ManagementContextInternal;
import brooklyn.util.collections.MutableMap;
import brooklyn.util.exceptions.Exceptions;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/group/DynamicClusterTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/group/DynamicClusterTest.java b/core/src/test/java/brooklyn/entity/group/DynamicClusterTest.java
index 5e16db6..1418868 100644
--- a/core/src/test/java/brooklyn/entity/group/DynamicClusterTest.java
+++ b/core/src/test/java/brooklyn/entity/group/DynamicClusterTest.java
@@ -63,8 +63,8 @@ import org.apache.brooklyn.test.entity.TestEntityImpl;
import brooklyn.entity.basic.ServiceStateLogic;
import brooklyn.entity.trait.Changeable;
import brooklyn.entity.trait.FailingEntity;
-import brooklyn.location.Location;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.test.Asserts;
import brooklyn.util.collections.MutableMap;
import brooklyn.util.collections.MutableSet;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/group/DynamicClusterWithAvailabilityZonesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/group/DynamicClusterWithAvailabilityZonesTest.java b/core/src/test/java/brooklyn/entity/group/DynamicClusterWithAvailabilityZonesTest.java
index 5289855..064f2ac 100644
--- a/core/src/test/java/brooklyn/entity/group/DynamicClusterWithAvailabilityZonesTest.java
+++ b/core/src/test/java/brooklyn/entity/group/DynamicClusterWithAvailabilityZonesTest.java
@@ -40,12 +40,12 @@ import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.entity.basic.EntityPredicates;
import brooklyn.entity.group.zoneaware.ProportionalZoneFailureDetector;
import brooklyn.entity.trait.FailingEntity;
-import brooklyn.location.Location;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.LocationInternal;
-import brooklyn.location.basic.SimulatedLocation;
-import brooklyn.location.cloud.AbstractAvailabilityZoneExtension;
-import brooklyn.location.cloud.AvailabilityZoneExtension;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.LocationInternal;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.cloud.AbstractAvailabilityZoneExtension;
+import org.apache.brooklyn.location.cloud.AvailabilityZoneExtension;
import brooklyn.test.Asserts;
import brooklyn.util.time.Duration;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/group/DynamicFabricTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/group/DynamicFabricTest.java b/core/src/test/java/brooklyn/entity/group/DynamicFabricTest.java
index 4e3098d..0ce3faf 100644
--- a/core/src/test/java/brooklyn/entity/group/DynamicFabricTest.java
+++ b/core/src/test/java/brooklyn/entity/group/DynamicFabricTest.java
@@ -49,9 +49,9 @@ import brooklyn.entity.basic.BasicEntity;
import brooklyn.entity.basic.Entities;
import brooklyn.entity.basic.EntityFactory;
import brooklyn.entity.trait.Startable;
-import brooklyn.location.Location;
-import brooklyn.location.basic.PortRanges;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.basic.PortRanges;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.test.Asserts;
import brooklyn.util.collections.MutableList;
import brooklyn.util.collections.MutableMap;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/group/DynamicMultiGroupTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/group/DynamicMultiGroupTest.java b/core/src/test/java/brooklyn/entity/group/DynamicMultiGroupTest.java
index 7f4fb56..55a8c97 100644
--- a/core/src/test/java/brooklyn/entity/group/DynamicMultiGroupTest.java
+++ b/core/src/test/java/brooklyn/entity/group/DynamicMultiGroupTest.java
@@ -45,12 +45,11 @@ import brooklyn.entity.basic.ApplicationBuilder;
import brooklyn.entity.basic.BasicGroup;
import brooklyn.entity.basic.Entities;
import brooklyn.event.basic.Sensors;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.test.Asserts;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
public class DynamicMultiGroupTest {
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/group/DynamicRegionsFabricTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/group/DynamicRegionsFabricTest.java b/core/src/test/java/brooklyn/entity/group/DynamicRegionsFabricTest.java
index 9d34ebe..b0821e5 100644
--- a/core/src/test/java/brooklyn/entity/group/DynamicRegionsFabricTest.java
+++ b/core/src/test/java/brooklyn/entity/group/DynamicRegionsFabricTest.java
@@ -31,8 +31,8 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import brooklyn.entity.BrooklynAppUnitTestSupport;
-import brooklyn.location.Location;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.util.collections.MutableSet;
import brooklyn.util.exceptions.Exceptions;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/group/GroupTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/group/GroupTest.java b/core/src/test/java/brooklyn/entity/group/GroupTest.java
index ea5e562..ab73812 100644
--- a/core/src/test/java/brooklyn/entity/group/GroupTest.java
+++ b/core/src/test/java/brooklyn/entity/group/GroupTest.java
@@ -35,8 +35,8 @@ import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.entity.basic.AbstractEntity;
import brooklyn.entity.basic.BasicGroup;
import brooklyn.entity.basic.Entities;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.test.Asserts;
public class GroupTest extends BrooklynAppUnitTestSupport {
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/group/MembershipTrackingPolicyTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/group/MembershipTrackingPolicyTest.java b/core/src/test/java/brooklyn/entity/group/MembershipTrackingPolicyTest.java
index dd5ce7f..65ab601 100644
--- a/core/src/test/java/brooklyn/entity/group/MembershipTrackingPolicyTest.java
+++ b/core/src/test/java/brooklyn/entity/group/MembershipTrackingPolicyTest.java
@@ -38,8 +38,8 @@ import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.entity.basic.BasicGroup;
import brooklyn.entity.basic.Entities;
import brooklyn.entity.trait.Startable;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.test.Asserts;
import brooklyn.util.collections.MutableMap;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/group/QuarantineGroupTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/group/QuarantineGroupTest.java b/core/src/test/java/brooklyn/entity/group/QuarantineGroupTest.java
index e86c662..b96310e 100644
--- a/core/src/test/java/brooklyn/entity/group/QuarantineGroupTest.java
+++ b/core/src/test/java/brooklyn/entity/group/QuarantineGroupTest.java
@@ -28,8 +28,8 @@ import org.testng.annotations.Test;
import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.entity.basic.Entities;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import com.google.common.collect.ImmutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/group/zoneaware/BalancingNodePlacementStrategyTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/group/zoneaware/BalancingNodePlacementStrategyTest.java b/core/src/test/java/brooklyn/entity/group/zoneaware/BalancingNodePlacementStrategyTest.java
index e021f10..975db33 100644
--- a/core/src/test/java/brooklyn/entity/group/zoneaware/BalancingNodePlacementStrategyTest.java
+++ b/core/src/test/java/brooklyn/entity/group/zoneaware/BalancingNodePlacementStrategyTest.java
@@ -27,9 +27,9 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import brooklyn.entity.BrooklynAppUnitTestSupport;
-import brooklyn.location.Location;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.test.Asserts;
import com.google.common.collect.ImmutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/group/zoneaware/ProportionalZoneFailureDetectorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/group/zoneaware/ProportionalZoneFailureDetectorTest.java b/core/src/test/java/brooklyn/entity/group/zoneaware/ProportionalZoneFailureDetectorTest.java
index f24886f..367952b 100644
--- a/core/src/test/java/brooklyn/entity/group/zoneaware/ProportionalZoneFailureDetectorTest.java
+++ b/core/src/test/java/brooklyn/entity/group/zoneaware/ProportionalZoneFailureDetectorTest.java
@@ -30,8 +30,8 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import brooklyn.entity.BrooklynAppUnitTestSupport;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.util.time.Duration;
import com.google.common.base.Ticker;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/hello/LocalEntitiesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/hello/LocalEntitiesTest.java b/core/src/test/java/brooklyn/entity/hello/LocalEntitiesTest.java
index 18b1ea3..91fc9aa 100644
--- a/core/src/test/java/brooklyn/entity/hello/LocalEntitiesTest.java
+++ b/core/src/test/java/brooklyn/entity/hello/LocalEntitiesTest.java
@@ -48,7 +48,7 @@ import org.testng.collections.Lists;
import brooklyn.entity.BrooklynAppUnitTestSupport;
import brooklyn.entity.basic.Entities;
import brooklyn.entity.basic.EntityInternal;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.test.Asserts;
import brooklyn.util.collections.MutableMap;
import brooklyn.util.time.Time;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/rebind/RebindCatalogItemTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/RebindCatalogItemTest.java b/core/src/test/java/brooklyn/entity/rebind/RebindCatalogItemTest.java
index fe15c77..ff37f74 100644
--- a/core/src/test/java/brooklyn/entity/rebind/RebindCatalogItemTest.java
+++ b/core/src/test/java/brooklyn/entity/rebind/RebindCatalogItemTest.java
@@ -47,7 +47,7 @@ import brooklyn.catalog.internal.CatalogDto;
import brooklyn.config.BrooklynProperties;
import brooklyn.config.BrooklynServerConfig;
import brooklyn.internal.BrooklynFeatureEnablement;
-import brooklyn.location.basic.LocalhostMachineProvisioningLocation;
+import org.apache.brooklyn.location.basic.LocalhostMachineProvisioningLocation;
import brooklyn.management.internal.LocalManagementContext;
import brooklyn.policy.basic.AbstractPolicy;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/rebind/RebindEnricherTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/RebindEnricherTest.java b/core/src/test/java/brooklyn/entity/rebind/RebindEnricherTest.java
index 18857d8..5e9f9d9 100644
--- a/core/src/test/java/brooklyn/entity/rebind/RebindEnricherTest.java
+++ b/core/src/test/java/brooklyn/entity/rebind/RebindEnricherTest.java
@@ -49,8 +49,8 @@ import brooklyn.entity.basic.EntityInternal;
import brooklyn.entity.basic.EntityPredicates;
import brooklyn.entity.group.DynamicCluster;
import brooklyn.event.basic.Sensors;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
import brooklyn.test.Asserts;
import brooklyn.util.collections.MutableSet;
import brooklyn.util.flags.SetFromFlag;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/rebind/RebindEntityTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/RebindEntityTest.java b/core/src/test/java/brooklyn/entity/rebind/RebindEntityTest.java
index 84c61bc..cf246d1 100644
--- a/core/src/test/java/brooklyn/entity/rebind/RebindEntityTest.java
+++ b/core/src/test/java/brooklyn/entity/rebind/RebindEntityTest.java
@@ -69,9 +69,9 @@ import brooklyn.event.basic.BasicConfigKey;
import brooklyn.event.basic.BasicSensorEvent;
import brooklyn.event.basic.DependentConfiguration;
import brooklyn.event.basic.Sensors;
-import brooklyn.location.Location;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.LocationConfigTest.MyLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.LocationConfigTest.MyLocation;
import brooklyn.management.internal.LocalManagementContext;
import brooklyn.test.Asserts;
import brooklyn.util.collections.MutableMap;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/rebind/RebindFeedTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/RebindFeedTest.java b/core/src/test/java/brooklyn/entity/rebind/RebindFeedTest.java
index ba7fee9..6935a48 100644
--- a/core/src/test/java/brooklyn/entity/rebind/RebindFeedTest.java
+++ b/core/src/test/java/brooklyn/entity/rebind/RebindFeedTest.java
@@ -49,9 +49,9 @@ import brooklyn.event.feed.http.HttpValueFunctions;
import brooklyn.event.feed.ssh.SshFeed;
import brooklyn.event.feed.ssh.SshPollConfig;
import brooklyn.event.feed.ssh.SshValueFunctions;
-import brooklyn.location.Location;
-import brooklyn.location.basic.LocalhostMachineProvisioningLocation;
-import brooklyn.location.basic.SshMachineLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.basic.LocalhostMachineProvisioningLocation;
+import org.apache.brooklyn.location.basic.SshMachineLocation;
import brooklyn.management.internal.BrooklynGarbageCollector;
import brooklyn.test.Asserts;
import brooklyn.util.collections.MutableList;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/rebind/RebindLocalhostLocationTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/RebindLocalhostLocationTest.java b/core/src/test/java/brooklyn/entity/rebind/RebindLocalhostLocationTest.java
index a69de14..aac9b21 100644
--- a/core/src/test/java/brooklyn/entity/rebind/RebindLocalhostLocationTest.java
+++ b/core/src/test/java/brooklyn/entity/rebind/RebindLocalhostLocationTest.java
@@ -30,9 +30,9 @@ import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.LocalhostMachineProvisioningLocation;
-import brooklyn.location.basic.SshMachineLocation;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.LocalhostMachineProvisioningLocation;
+import org.apache.brooklyn.location.basic.SshMachineLocation;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/rebind/RebindLocationTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/RebindLocationTest.java b/core/src/test/java/brooklyn/entity/rebind/RebindLocationTest.java
index 721cea0..c245d85 100644
--- a/core/src/test/java/brooklyn/entity/rebind/RebindLocationTest.java
+++ b/core/src/test/java/brooklyn/entity/rebind/RebindLocationTest.java
@@ -38,11 +38,10 @@ import org.testng.annotations.Test;
import brooklyn.config.ConfigKey;
import brooklyn.entity.basic.ConfigKeys;
-import brooklyn.entity.basic.EntityInternal;
import brooklyn.entity.rebind.RebindEntityTest.MyEntity;
-import brooklyn.location.Location;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.AbstractLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.AbstractLocation;
import brooklyn.test.Asserts;
import brooklyn.util.collections.MutableMap;
import brooklyn.util.flags.SetFromFlag;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/rebind/RebindPolicyTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/RebindPolicyTest.java b/core/src/test/java/brooklyn/entity/rebind/RebindPolicyTest.java
index 6020618..0223324 100644
--- a/core/src/test/java/brooklyn/entity/rebind/RebindPolicyTest.java
+++ b/core/src/test/java/brooklyn/entity/rebind/RebindPolicyTest.java
@@ -42,8 +42,8 @@ import brooklyn.entity.basic.BasicGroup;
import brooklyn.entity.basic.ConfigKeys;
import brooklyn.entity.basic.Entities;
import brooklyn.entity.rebind.RebindEnricherTest.MyEnricher;
-import brooklyn.location.Location;
-import brooklyn.location.basic.Locations;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.basic.Locations;
import brooklyn.policy.basic.AbstractPolicy;
import brooklyn.test.Asserts;
import brooklyn.util.collections.MutableMap;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/rebind/RebindSshMachineLocationTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/RebindSshMachineLocationTest.java b/core/src/test/java/brooklyn/entity/rebind/RebindSshMachineLocationTest.java
index d83db50..89c4875 100644
--- a/core/src/test/java/brooklyn/entity/rebind/RebindSshMachineLocationTest.java
+++ b/core/src/test/java/brooklyn/entity/rebind/RebindSshMachineLocationTest.java
@@ -28,9 +28,9 @@ import org.slf4j.LoggerFactory;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.FixedListMachineProvisioningLocation;
-import brooklyn.location.basic.SshMachineLocation;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.FixedListMachineProvisioningLocation;
+import org.apache.brooklyn.location.basic.SshMachineLocation;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/rebind/RebindTestUtils.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/RebindTestUtils.java b/core/src/test/java/brooklyn/entity/rebind/RebindTestUtils.java
index 0dac5e5..c7b02d8 100644
--- a/core/src/test/java/brooklyn/entity/rebind/RebindTestUtils.java
+++ b/core/src/test/java/brooklyn/entity/rebind/RebindTestUtils.java
@@ -49,7 +49,7 @@ import brooklyn.entity.rebind.persister.BrooklynMementoPersisterToObjectStore;
import brooklyn.entity.rebind.persister.FileBasedObjectStore;
import brooklyn.entity.rebind.persister.PersistMode;
import brooklyn.entity.rebind.persister.PersistenceObjectStore;
-import brooklyn.location.Location;
+import org.apache.brooklyn.location.Location;
import brooklyn.management.ha.ManagementPlaneSyncRecordPersisterToObjectStore;
import brooklyn.management.internal.LocalManagementContext;
import brooklyn.management.internal.ManagementContextInternal;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/rebind/RecordingRebindExceptionHandler.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/RecordingRebindExceptionHandler.java b/core/src/test/java/brooklyn/entity/rebind/RecordingRebindExceptionHandler.java
index ef47a5b..f6860fc 100644
--- a/core/src/test/java/brooklyn/entity/rebind/RecordingRebindExceptionHandler.java
+++ b/core/src/test/java/brooklyn/entity/rebind/RecordingRebindExceptionHandler.java
@@ -26,7 +26,7 @@ import org.apache.brooklyn.api.entity.Entity;
import org.apache.brooklyn.api.entity.rebind.BrooklynObjectType;
import org.apache.brooklyn.api.entity.rebind.RebindManager;
-import brooklyn.location.Location;
+import org.apache.brooklyn.location.Location;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/rebind/persister/BrooklynMementoPersisterTestFixture.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/persister/BrooklynMementoPersisterTestFixture.java b/core/src/test/java/brooklyn/entity/rebind/persister/BrooklynMementoPersisterTestFixture.java
index e87db3b..6806e42 100644
--- a/core/src/test/java/brooklyn/entity/rebind/persister/BrooklynMementoPersisterTestFixture.java
+++ b/core/src/test/java/brooklyn/entity/rebind/persister/BrooklynMementoPersisterTestFixture.java
@@ -47,9 +47,9 @@ import brooklyn.entity.rebind.PersistenceExceptionHandlerImpl;
import brooklyn.entity.rebind.RebindContextImpl;
import brooklyn.entity.rebind.RebindTestUtils;
import brooklyn.entity.rebind.RecordingRebindExceptionHandler;
-import brooklyn.location.Location;
-import brooklyn.location.LocationSpec;
-import brooklyn.location.basic.SshMachineLocation;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.basic.SshMachineLocation;
import brooklyn.test.policy.TestPolicy;
import com.google.common.collect.Iterables;
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/rebind/persister/XmlMementoSerializerTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/persister/XmlMementoSerializerTest.java b/core/src/test/java/brooklyn/entity/rebind/persister/XmlMementoSerializerTest.java
index 3efd123..3d4acd4 100644
--- a/core/src/test/java/brooklyn/entity/rebind/persister/XmlMementoSerializerTest.java
+++ b/core/src/test/java/brooklyn/entity/rebind/persister/XmlMementoSerializerTest.java
@@ -32,6 +32,8 @@ import java.util.Set;
import brooklyn.management.osgi.OsgiTestResources;
+import org.apache.brooklyn.location.basic.SimulatedLocation;
+import org.apache.brooklyn.api.management.ManagementContext;
import org.apache.brooklyn.mementos.BrooklynMementoPersister.LookupContext;
import org.apache.brooklyn.policy.Enricher;
import org.apache.brooklyn.policy.Policy;
@@ -56,8 +58,8 @@ import brooklyn.catalog.internal.CatalogItemDtoAbstract;
import brooklyn.catalog.internal.CatalogTestUtils;
import brooklyn.entity.basic.Entities;
import brooklyn.entity.group.DynamicCluster;
-import brooklyn.location.Location;
-import brooklyn.location.LocationSpec;
+import org.apache.brooklyn.location.Location;
+import org.apache.brooklyn.location.LocationSpec;
import brooklyn.management.osgi.OsgiVersionMoreEntityTest;
import brooklyn.util.collections.MutableList;
import brooklyn.util.collections.MutableMap;
@@ -176,7 +178,7 @@ public class XmlMementoSerializerTest {
ManagementContext managementContext = app.getManagementContext();
try {
@SuppressWarnings("deprecation")
- final Location loc = managementContext.getLocationManager().createLocation(LocationSpec.create(brooklyn.location.basic.SimulatedLocation.class));
+ final Location loc = managementContext.getLocationManager().createLocation(LocationSpec.create(SimulatedLocation.class));
serializer.setLookupContext(new LookupContextImpl(managementContext,
ImmutableList.<Entity>of(), ImmutableList.of(loc), ImmutableList.<Policy>of(),
ImmutableList.<Enricher>of(), ImmutableList.<Feed>of(), ImmutableList.<CatalogItem<?, ?>>of(), true));
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e2c57058/core/src/test/java/brooklyn/entity/trait/FailingEntityImpl.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/trait/FailingEntityImpl.java b/core/src/test/java/brooklyn/entity/trait/FailingEntityImpl.java
index ab80fd3..71cf3f7 100644
--- a/core/src/test/java/brooklyn/entity/trait/FailingEntityImpl.java
+++ b/core/src/test/java/brooklyn/entity/trait/FailingEntityImpl.java
@@ -25,7 +25,7 @@ import org.apache.brooklyn.test.entity.TestEntityImpl;
import org.testng.Assert;
import brooklyn.entity.basic.Entities;
-import brooklyn.location.Location;
+import org.apache.brooklyn.location.Location;
import brooklyn.util.exceptions.Exceptions;
import brooklyn.util.task.Tasks;