brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [10/18] brooklyn-server git commit: update tests to use LocationRegistry spec methods
Date Fri, 18 Mar 2016 11:06:31 GMT
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationResolverTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationResolverTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationResolverTest.java
index 1ef3148..03c7ab6 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationResolverTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationResolverTest.java
@@ -273,7 +273,7 @@ public class JcloudsLocationResolverTest {
         conf = resolve("named:softlayer-was2").config().getBag().getAllConfig();
         assertEquals(conf.get("region"), "was02");
         
-        conf = ((LocationInternal) managementContext.getLocationRegistry().resolve("named:softlayer-was2", MutableMap.of("region", "was03")))
+        conf = ((LocationInternal) managementContext.getLocationRegistry().getLocationManaged("named:softlayer-was2", MutableMap.of("region", "was03")))
             .config().getBag().getAllConfig();;
         assertEquals(conf.get("region"), "was03");
     }
@@ -391,6 +391,6 @@ public class JcloudsLocationResolverTest {
     }
     
     private JcloudsLocation resolve(String spec) {
-        return (JcloudsLocation) managementContext.getLocationRegistry().resolve(spec);
+        return (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(spec);
     }
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationSuspendResumeMachineLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationSuspendResumeMachineLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationSuspendResumeMachineLiveTest.java
index 048a563..dd8865a 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationSuspendResumeMachineLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationSuspendResumeMachineLiveTest.java
@@ -41,7 +41,7 @@ public class JcloudsLocationSuspendResumeMachineLiveTest extends AbstractJclouds
     public void setUp() throws Exception {
         super.setUp();
         jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry()
-                .resolve(AWS_EC2_PROVIDER + ":" + AWS_EC2_EUWEST_REGION_NAME);
+                .getLocationManaged(AWS_EC2_PROVIDER + ":" + AWS_EC2_EUWEST_REGION_NAME);
     }
 
     @Test(groups = "Live")

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationTemplateOptionsCustomisersLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationTemplateOptionsCustomisersLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationTemplateOptionsCustomisersLiveTest.java
index 60b4725..b47595f 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationTemplateOptionsCustomisersLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationTemplateOptionsCustomisersLiveTest.java
@@ -103,6 +103,6 @@ public class JcloudsLocationTemplateOptionsCustomisersLiveTest extends AbstractJ
     }
 
     private JcloudsLocation resolve(String spec) {
-        return (JcloudsLocation) managementContext.getLocationRegistry().resolve("jclouds:"+spec);
+        return (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged("jclouds:"+spec);
     }
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLoginLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLoginLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLoginLiveTest.java
index d8c38fa..8c2b68b 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLoginLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLoginLiveTest.java
@@ -87,7 +87,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
     protected void testAwsEc2SpecifyingJustPrivateSshKeyInDeprecatedForm() throws Exception {
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USER.getName(), "myname");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.LEGACY_PRIVATE_KEY_FILE.getName(), "~/.ssh/id_rsa");
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         
         machine = createEc2Machine();
         assertSshable(machine);
@@ -105,7 +105,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USER.getName(), "myname");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.LEGACY_PRIVATE_KEY_FILE.getName(), "~/.ssh/id_rsa");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.LEGACY_PUBLIC_KEY_FILE.getName(), "~/.ssh/id_rsa.pub");
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         
         machine = createEc2Machine();
         assertSshable(machine);
@@ -121,7 +121,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
     @Test(groups = {"Live"})
     protected void testAwsEc2SpecifyingNoKeyFiles() throws Exception {
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USER.getName(), "myname");
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         
         machine = createEc2Machine();
         assertSshable(machine);
@@ -140,7 +140,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
             
             brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USER.getName(), "myname");
             brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.PASSWORD.getName(), "mypassword");
-            jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+            jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
             
             machine = createEc2Machine();
             assertSshable(machine);
@@ -162,7 +162,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
             moveSshKeyFiles();
             
             brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USER.getName(), "myname");
-            jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+            jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
             
             machine = createEc2Machine();
             assertSshable(machine);
@@ -190,7 +190,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
         if (leavePasswordSsh) {
             brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.DISABLE_ROOT_AND_PASSWORD_SSH.getName(), false);
         }
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         
         machine = createEc2Machine();
         assertSshable(machine);
@@ -223,7 +223,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
     protected void testSpecifyingPasswordIgnoresDefaultSshKeys() throws Exception {
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USER.getName(), "myname");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.PASSWORD.getName(), "mypassword");
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         
         machine = createEc2Machine();
         assertSshable(machine);
@@ -246,7 +246,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USER.getName(), "myname");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.PASSWORD.getName(), "mypassword");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USE_JCLOUDS_SSH_INIT.getName(), "false");
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         
         machine = createEc2Machine();
         assertSshable(machine);
@@ -270,7 +270,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.PASSWORD.getName(), "mypassword");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.PUBLIC_KEY_FILE.getName(), "~/.ssh/id_rsa.pub");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.DISABLE_ROOT_AND_PASSWORD_SSH.getName(), false);
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         
         machine = createEc2Machine();
         assertSshable(machine);
@@ -297,7 +297,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
             brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USER.getName(), "root");
             brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.PASSWORD.getName(), "mypassword");
             brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.DISABLE_ROOT_AND_PASSWORD_SSH.getName(), false);
-            jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+            jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
             
             machine = createEc2Machine();
             assertSshable(machine);
@@ -317,7 +317,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USER.getName(), "root");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.PRIVATE_KEY_FILE.getName(), "~/.ssh/id_rsa");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.PUBLIC_KEY_FILE.getName(), "~/.ssh/id_rsa.pub");
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         
         machine = createEc2Machine(ImmutableMap.<String,Object>of("imageId", AWS_EC2_UBUNTU_10_IMAGE_ID));
         assertSshable(machine);
@@ -334,7 +334,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USER.getName(), "");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.PRIVATE_KEY_FILE.getName(), "~/.ssh/id_rsa");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.PUBLIC_KEY_FILE.getName(), "~/.ssh/id_rsa.pub");
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         
         machine = createEc2Machine(ImmutableMap.<String,Object>of("imageId", AWS_EC2_UBUNTU_10_IMAGE_ID));
         assertSshable(machine);
@@ -353,7 +353,7 @@ public class JcloudsLoginLiveTest extends AbstractJcloudsLiveTest {
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USER.getName(), "ec2-user");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.PRIVATE_KEY_FILE.getName(), "~/.ssh/id_rsa");
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.PUBLIC_KEY_FILE.getName(), "~/.ssh/id_rsa.pub");
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         
         machine = createEc2Machine(ImmutableMap.<String,Object>of("imageId", AWS_EC2_UBUNTU_10_IMAGE_ID));
         assertSshable(machine);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRebindLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRebindLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRebindLiveTest.java
index de3fb1c..ec014c2 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRebindLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRebindLiveTest.java
@@ -129,7 +129,7 @@ public class JcloudsRebindLiveTest extends RebindTestFixtureWithApp {
     }
     
     protected void runTest(String locSpec, Map<String, ?> obtainFlags) throws Exception {
-        JcloudsLocation location = (JcloudsLocation) mgmt().getLocationRegistry().resolve(locSpec);
+        JcloudsLocation location = (JcloudsLocation) mgmt().getLocationRegistry().getLocationManaged(locSpec);
         
         JcloudsMachineLocation origMachine = obtainMachine(location, obtainFlags);
         String origHostname = origMachine.getHostname();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRebindStubTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRebindStubTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRebindStubTest.java
index ea9e1c6..1d33bc5 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRebindStubTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRebindStubTest.java
@@ -181,7 +181,7 @@ public class JcloudsRebindStubTest extends RebindTestFixtureWithApp {
                 "myHostname");
         
         ByonComputeServiceRegistry computeServiceRegistry = new ByonComputeServiceRegistry(node);
-        JcloudsLocation origJcloudsLoc = (JcloudsLocation) mgmt().getLocationRegistry().resolve("jclouds:softlayer", ImmutableMap.of(
+        JcloudsLocation origJcloudsLoc = (JcloudsLocation) mgmt().getLocationRegistry().getLocationManaged("jclouds:softlayer", ImmutableMap.of(
                 JcloudsLocation.COMPUTE_SERVICE_REGISTRY, computeServiceRegistry,
                 JcloudsLocation.WAIT_FOR_SSHABLE, false,
                 JcloudsLocation.USE_JCLOUDS_SSH_INIT, false));

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsSshingLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsSshingLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsSshingLiveTest.java
index 1f38361..584ceb3 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsSshingLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsSshingLiveTest.java
@@ -49,7 +49,7 @@ public class JcloudsSshingLiveTest extends AbstractJcloudsLiveTest {
     protected void runCreatesUser(boolean useJcloudsSshInit) throws Exception {
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USE_JCLOUDS_SSH_INIT.getName(), Boolean.toString(useJcloudsSshInit));
         brooklynProperties.put(BROOKLYN_PROPERTIES_PREFIX+JcloudsLocationConfig.USER.getName(), "myname");
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(SOTLAYER_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(SOTLAYER_LOCATION_SPEC);
         
         JcloudsSshMachineLocation machine = obtainMachine(MutableMap.<String,Object>builder()
                 .putIfAbsent("inboundPorts", ImmutableList.of(22))

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsSuseLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsSuseLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsSuseLiveTest.java
index a8019a6..8fe3dc2 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsSuseLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsSuseLiveTest.java
@@ -48,7 +48,7 @@ public class JcloudsSuseLiveTest extends AbstractJcloudsLiveTest {
     // TODO Also requires https://github.com/jclouds/jclouds/pull/827
     @Test(groups = {"Live", "WIP"})
     protected void testSuseUsingJcloudsSshInit() throws Exception {
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         
         JcloudsSshMachineLocation machine = createEc2Machine(ImmutableMap.<String,Object>of(
                 JcloudsLocation.USE_JCLOUDS_SSH_INIT.getName(), true,
@@ -65,7 +65,7 @@ public class JcloudsSuseLiveTest extends AbstractJcloudsLiveTest {
     // TODO Also requires https://github.com/jclouds/jclouds/pull/??? (see BROOKLYN-188, for checking if group exists)
     @Test(groups = {"Live", "WIP"})
     protected void testSuseSkippingJcloudsSshInit() throws Exception {
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         
         JcloudsSshMachineLocation machine = createEc2Machine(ImmutableMap.<String,Object>of(
                 JcloudsLocation.USE_JCLOUDS_SSH_INIT.getName(), false,

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/RebindJcloudsLocationLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/RebindJcloudsLocationLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/RebindJcloudsLocationLiveTest.java
index de2c2ec..dd6d58f 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/RebindJcloudsLocationLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/RebindJcloudsLocationLiveTest.java
@@ -62,7 +62,7 @@ public class RebindJcloudsLocationLiveTest extends AbstractJcloudsLiveTest {
     public void setUp() throws Exception {
         super.setUp();
 
-        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
+        jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(AWS_EC2_LOCATION_SPEC);
         jcloudsLocation.config().set(JcloudsLocation.HARDWARE_ID, AWS_EC2_SMALL_HARDWARE_ID);
         
         origApp = TestApplication.Factory.newManagedInstanceForTests(managementContext);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/RebindJcloudsLocationTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/RebindJcloudsLocationTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/RebindJcloudsLocationTest.java
index 598e2fd..9261758 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/RebindJcloudsLocationTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/RebindJcloudsLocationTest.java
@@ -40,7 +40,7 @@ public class RebindJcloudsLocationTest extends RebindTestFixtureWithApp {
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        origLoc = (JcloudsLocation) origManagementContext.getLocationRegistry().resolve(LOC_SPEC);
+        origLoc = (JcloudsLocation) origManagementContext.getLocationRegistry().getLocationManaged(LOC_SPEC);
     }
 
     // Previously, the rebound config contained "id" which was then passed to createTemporarySshMachineLocation, causing

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/SimpleJcloudsLocationUserLoginAndConfigLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/SimpleJcloudsLocationUserLoginAndConfigLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/SimpleJcloudsLocationUserLoginAndConfigLiveTest.java
index 9429329..9587515 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/SimpleJcloudsLocationUserLoginAndConfigLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/SimpleJcloudsLocationUserLoginAndConfigLiveTest.java
@@ -243,6 +243,6 @@ public class SimpleJcloudsLocationUserLoginAndConfigLiveTest extends AbstractJcl
     }
 
     private JcloudsLocation resolve(String spec) {
-        return (JcloudsLocation) managementContext.getLocationRegistry().resolve("jclouds:"+spec);
+        return (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged("jclouds:"+spec);
     }
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/SingleMachineProvisioningLocationJcloudsLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/SingleMachineProvisioningLocationJcloudsLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/SingleMachineProvisioningLocationJcloudsLiveTest.java
index 7c24565..35a0a89 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/SingleMachineProvisioningLocationJcloudsLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/SingleMachineProvisioningLocationJcloudsLiveTest.java
@@ -115,7 +115,7 @@ private static final Logger log = LoggerFactory.getLogger(SingleMachineProvision
     @SuppressWarnings("unchecked")
     private SingleMachineProvisioningLocation<JcloudsSshMachineLocation> resolve(String spec) {
         SingleMachineProvisioningLocation<JcloudsSshMachineLocation> result = (SingleMachineProvisioningLocation<JcloudsSshMachineLocation>) 
-                managementContext.getLocationRegistry().resolve(spec);
+                managementContext.getLocationRegistry().getLocationManaged(spec);
         // FIXME Do we really need to setManagementContext?!
         //result.setManagementContext(managementContext);
         return result;

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/AbstractJcloudsLocationTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/AbstractJcloudsLocationTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/AbstractJcloudsLocationTest.java
index b40a294..3bec46b 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/AbstractJcloudsLocationTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/AbstractJcloudsLocationTest.java
@@ -145,7 +145,7 @@ public abstract class AbstractJcloudsLocationTest {
     	useMgmt(newMockManagementContext());
     	
         Map<String, Object> dummy = ImmutableMap.<String, Object>of("identity", "DUMMY", "credential", "DUMMY");
-        loc = (JcloudsLocation) mgmt().getLocationRegistry().resolve(provider + (regionName == null ? "" : ":" + regionName), dummy);
+        loc = (JcloudsLocation) mgmt().getLocationRegistry().getLocationManaged(provider + (regionName == null ? "" : ":" + regionName), dummy);
         ImmutableMap.Builder<String, Object> builder = ImmutableMap.<String, Object>builder().put("imageId", imageId);
         if (imageOwner != null) builder.put("imageOwner", imageOwner);
         Map<String, Object> tagMapping = builder.build();
@@ -157,7 +157,7 @@ public abstract class AbstractJcloudsLocationTest {
 
     @Test(groups = "Live", dataProvider="fromImageId")
     public void testProvisionVmUsingImageId(String regionName, String imageId, String imageOwner) {
-        loc = (JcloudsLocation) mgmt().getLocationRegistry().resolve(provider + (regionName == null ? "" : ":" + regionName));
+        loc = (JcloudsLocation) mgmt().getLocationRegistry().getLocationManaged(provider + (regionName == null ? "" : ":" + regionName));
         SshMachineLocation machine = obtainMachine(MutableMap.of("imageId", imageId, "imageOwner", imageOwner, JcloudsLocation.MACHINE_CREATE_ATTEMPTS, 2));
 
         LOG.info("Provisioned {} vm {}; checking if ssh'able", provider, machine);
@@ -166,7 +166,7 @@ public abstract class AbstractJcloudsLocationTest {
     
     @Test(groups = "Live", dataProvider="fromImageNamePattern")
     public void testProvisionVmUsingImageNamePattern(String regionName, String imageNamePattern, String imageOwner) {
-        loc = (JcloudsLocation) mgmt().getLocationRegistry().resolve(provider + (regionName == null ? "" : ":" + regionName));
+        loc = (JcloudsLocation) mgmt().getLocationRegistry().getLocationManaged(provider + (regionName == null ? "" : ":" + regionName));
         SshMachineLocation machine = obtainMachine(MutableMap.of("imageNameRegex", imageNamePattern, "imageOwner", imageOwner, JcloudsLocation.MACHINE_CREATE_ATTEMPTS, 2));
         
         LOG.info("Provisioned {} vm {}; checking if ssh'able", provider, machine);
@@ -175,7 +175,7 @@ public abstract class AbstractJcloudsLocationTest {
     
     @Test(groups = "Live", dataProvider="fromImageDescriptionPattern")
     public void testProvisionVmUsingImageDescriptionPattern(String regionName, String imageDescriptionPattern, String imageOwner) {
-        loc = (JcloudsLocation) mgmt().getLocationRegistry().resolve(provider + (regionName == null ? "" : ":" + regionName));
+        loc = (JcloudsLocation) mgmt().getLocationRegistry().getLocationManaged(provider + (regionName == null ? "" : ":" + regionName));
         SshMachineLocation machine = obtainMachine(MutableMap.of("imageDescriptionRegex", imageDescriptionPattern, "imageOwner", imageOwner, JcloudsLocation.MACHINE_CREATE_ATTEMPTS, 2));
         
         LOG.info("Provisioned {} vm {}; checking if ssh'able", provider, machine);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/AwsEc2LocationWindowsLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/AwsEc2LocationWindowsLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/AwsEc2LocationWindowsLiveTest.java
index 7c3618c..b5fdf82 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/AwsEc2LocationWindowsLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/AwsEc2LocationWindowsLiveTest.java
@@ -55,7 +55,7 @@ public class AwsEc2LocationWindowsLiveTest {
     public void setUp() {
         ctx = Entities.newManagementContext(ImmutableMap.of("provider", PROVIDER));
 
-        loc = (JcloudsLocation) ctx.getLocationRegistry().resolve(LOCATION_ID);
+        loc = (JcloudsLocation) ctx.getLocationRegistry().getLocationManaged(LOCATION_ID);
     }
 
     @AfterMethod(groups = "Live")

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/CarrenzaLocationLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/CarrenzaLocationLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/CarrenzaLocationLiveTest.java
index 235c725..32b7984 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/CarrenzaLocationLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/CarrenzaLocationLiveTest.java
@@ -90,7 +90,7 @@ class CarrenzaLocationLiveTest {
         brooklynProperties.put("brooklyn.jclouds."+PROVIDER+".natMapping", ImmutableMap.of("192.168.0.100", "195.3.186.200", "192.168.0.101", "195.3.186.42"));
 
         managementContext = new LocalManagementContext(brooklynProperties);
-        loc = (JcloudsLocation) managementContext.getLocationRegistry().resolve(LOCATION_ID);
+        loc = (JcloudsLocation) managementContext.getLocationRegistry().getLocationManaged(LOCATION_ID);
     }
     
     @AfterMethod(groups = "Live")

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/RackspaceLocationLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/RackspaceLocationLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/RackspaceLocationLiveTest.java
index 4102880..4877973 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/RackspaceLocationLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/RackspaceLocationLiveTest.java
@@ -70,7 +70,7 @@ public class RackspaceLocationLiveTest extends AbstractJcloudsLocationTest {
 
     @Test(groups = "Live")
     public void testVmMetadata() {
-        loc = (JcloudsLocation) mgmt().getLocationRegistry().resolve(PROVIDER + (REGION_NAME == null ? "" : ":" + REGION_NAME));
+        loc = (JcloudsLocation) mgmt().getLocationRegistry().getLocationManaged(PROVIDER + (REGION_NAME == null ? "" : ":" + REGION_NAME));
         SshMachineLocation machine = obtainMachine(MutableMap.of("imageId", IMAGE_ID, "userMetadata", MutableMap.of("mykey", "myval"), JcloudsLocation.MACHINE_CREATE_ATTEMPTS, 2));
 
         LOG.info("Provisioned {} vm {}; checking metadata and if ssh'able", PROVIDER, machine);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/zone/AwsAvailabilityZoneExtensionTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/zone/AwsAvailabilityZoneExtensionTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/zone/AwsAvailabilityZoneExtensionTest.java
index 93b4278..2fbf16f 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/zone/AwsAvailabilityZoneExtensionTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/zone/AwsAvailabilityZoneExtensionTest.java
@@ -56,7 +56,7 @@ public class AwsAvailabilityZoneExtensionTest {
     @BeforeMethod(alwaysRun=true)
     public void setUp() throws Exception {
         mgmt = new LocalManagementContext();
-        loc = (JcloudsLocation) mgmt.getLocationRegistry().resolve(LOCATION_SPEC);
+        loc = (JcloudsLocation) mgmt.getLocationRegistry().getLocationManaged(LOCATION_SPEC);
         zoneExtension = new AwsAvailabilityZoneExtension(mgmt, loc);
     }
     

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/locations/jclouds/src/test/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicyLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicyLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicyLiveTest.java
index eb74031..b6c6e70 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicyLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicyLiveTest.java
@@ -29,17 +29,16 @@ import org.apache.brooklyn.api.location.Location;
 import org.apache.brooklyn.api.location.LocationSpec;
 import org.apache.brooklyn.api.location.MachineProvisioningLocation;
 import org.apache.brooklyn.api.policy.PolicySpec;
+import org.apache.brooklyn.core.entity.EntityAsserts;
 import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
 import org.apache.brooklyn.core.test.entity.TestEntity;
-import org.apache.brooklyn.policy.jclouds.os.CreateUserPolicy;
-import org.apache.brooklyn.test.EntityTestUtils;
+import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
+import org.apache.brooklyn.location.ssh.SshMachineLocation;
 import org.apache.brooklyn.util.core.internal.ssh.SshTool;
 import org.apache.brooklyn.util.text.Identifiers;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.Test;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
@@ -61,7 +60,7 @@ public class CreateUserPolicyLiveTest extends BrooklynAppLiveTestSupport {
     public void testLiveCreatesUserOnCentos() throws Exception {
         String locSpec = "jclouds:softlayer:ams01";
         ImmutableMap<String, String> locArgs = ImmutableMap.of("imageId", "CENTOS_6_64");
-        Location loc = mgmt.getLocationRegistry().resolve(locSpec, locArgs);
+        Location loc = mgmt.getLocationRegistry().getLocationManaged(locSpec, locArgs);
         runTestCreatesUser((MachineProvisioningLocation<SshMachineLocation>) loc);
     }
     
@@ -71,7 +70,7 @@ public class CreateUserPolicyLiveTest extends BrooklynAppLiveTestSupport {
         // No SUSE images on Softlayer, so test on AWS
         String locSpec = "jclouds:aws-ec2:us-east-1";
         ImmutableMap<String, String> locArgs = ImmutableMap.of("imageId", "us-east-1/ami-8dd105e6", "loginUser", "ec2-user");
-        Location loc = mgmt.getLocationRegistry().resolve(locSpec, locArgs);
+        Location loc = mgmt.getLocationRegistry().getLocationManaged(locSpec, locArgs);
         runTestCreatesUser((MachineProvisioningLocation<SshMachineLocation>) loc);
     }
     
@@ -88,7 +87,7 @@ public class CreateUserPolicyLiveTest extends BrooklynAppLiveTestSupport {
 
             app.start(ImmutableList.of(machine));
             
-            String creds = EntityTestUtils.assertAttributeEventuallyNonNull(entity, CreateUserPolicy.VM_USER_CREDENTIALS);
+            String creds = EntityAsserts.assertAttributeEventuallyNonNull(entity, CreateUserPolicy.VM_USER_CREDENTIALS);
             Pattern pattern = Pattern.compile("(.*) : (.*) @ (.*):(.*)");
             Matcher matcher = pattern.matcher(creds);
             assertTrue(matcher.matches());

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java
index 9cf3892..78aa1e2 100644
--- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java
+++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java
@@ -79,7 +79,7 @@ public class LocationResourceTest extends BrooklynRestResourceTest {
         assertEquals(location.getSpec(), "brooklyn.catalog:"+legacyLocationName+":"+legacyLocationVersion);
         assertTrue(addedLegacyLocationUri.getPath().startsWith("/locations/"));
 
-        JcloudsLocation l = (JcloudsLocation) getManagementContext().getLocationRegistry().resolve(legacyLocationName);
+        JcloudsLocation l = (JcloudsLocation) getManagementContext().getLocationRegistry().getLocationManaged(legacyLocationName);
         Assert.assertEquals(l.getProvider(), "aws-ec2");
         Assert.assertEquals(l.getRegion(), "us-east-1");
         Assert.assertEquals(l.getIdentity(), "bob");
@@ -119,7 +119,7 @@ public class LocationResourceTest extends BrooklynRestResourceTest {
         Assert.assertEquals(locationSummary.getSpec(), "brooklyn.catalog:"+locationName+":"+locationVersion);
 
         // Ensure location is usable - can instantiate, and has right config
-        JcloudsLocation l = (JcloudsLocation) getManagementContext().getLocationRegistry().resolve(locationName);
+        JcloudsLocation l = (JcloudsLocation) getManagementContext().getLocationRegistry().getLocationManaged(locationName);
         Assert.assertEquals(l.getProvider(), "aws-ec2");
         Assert.assertEquals(l.getRegion(), "us-east-1");
         Assert.assertEquals(l.getIdentity(), "bob");

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/SensorResourceIntegrationTest.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/SensorResourceIntegrationTest.java b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/SensorResourceIntegrationTest.java
index 2a6b564..7cf082b 100644
--- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/SensorResourceIntegrationTest.java
+++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/SensorResourceIntegrationTest.java
@@ -52,7 +52,7 @@ public class SensorResourceIntegrationTest extends BrooklynRestResourceTest {
         app = mgmt.getEntityManager().createEntity(EntitySpec.create(BasicApplication.class).displayName("simple-app")
             .child(EntitySpec.create(Entity.class, RestMockSimpleEntity.class).displayName("simple-ent")));
         mgmt.getEntityManager().manage(app);
-        app.start(MutableList.of(mgmt.getLocationRegistry().resolve("localhost")));
+        app.start(MutableList.of(mgmt.getLocationRegistry().getLocationManaged("localhost")));
     }
 
     // marked integration because of time

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java
index f0c65e4..3aee845 100644
--- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java
+++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java
@@ -49,7 +49,7 @@ public class EntityLocationUtilsTest extends BrooklynAppUnitTestSupport {
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        loc = mgmt.getLocationRegistry().resolve("localhost");
+        loc = mgmt.getLocationRegistry().getLocationManaged("localhost");
         ((AbstractLocation)loc).setHostGeoInfo(new HostGeoInfo("localhost", "localhost", 50, 0));
     }
     

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java
----------------------------------------------------------------------
diff --git a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java
index fe78b83..7f36af4 100644
--- a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java
+++ b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java
@@ -77,7 +77,7 @@ public class LocationResourceTest extends BrooklynRestResourceTest {
         assertEquals(location.getSpec(), "brooklyn.catalog:"+legacyLocationName+":"+legacyLocationVersion);
         assertTrue(addedLegacyLocationUri.getPath().startsWith("/v1/locations/"));
 
-        JcloudsLocation l = (JcloudsLocation) getManagementContext().getLocationRegistry().resolve(legacyLocationName);
+        JcloudsLocation l = (JcloudsLocation) getManagementContext().getLocationRegistry().getLocationManaged(legacyLocationName);
         Assert.assertEquals(l.getProvider(), "aws-ec2");
         Assert.assertEquals(l.getRegion(), "us-east-1");
         Assert.assertEquals(l.getIdentity(), "bob");
@@ -117,7 +117,7 @@ public class LocationResourceTest extends BrooklynRestResourceTest {
         Assert.assertEquals(locationSummary.getSpec(), "brooklyn.catalog:"+locationName+":"+locationVersion);
 
         // Ensure location is usable - can instantiate, and has right config
-        JcloudsLocation l = (JcloudsLocation) getManagementContext().getLocationRegistry().resolve(locationName);
+        JcloudsLocation l = (JcloudsLocation) getManagementContext().getLocationRegistry().getLocationManaged(locationName);
         Assert.assertEquals(l.getProvider(), "aws-ec2");
         Assert.assertEquals(l.getRegion(), "us-east-1");
         Assert.assertEquals(l.getIdentity(), "bob");

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/SensorResourceIntegrationTest.java
----------------------------------------------------------------------
diff --git a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/SensorResourceIntegrationTest.java b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/SensorResourceIntegrationTest.java
index f90b677..2ecc169 100644
--- a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/SensorResourceIntegrationTest.java
+++ b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/SensorResourceIntegrationTest.java
@@ -60,7 +60,7 @@ public class SensorResourceIntegrationTest extends BrooklynRestApiLauncherTestFi
         app = mgmt.getEntityManager().createEntity(EntitySpec.create(BasicApplication.class).displayName("simple-app")
             .child(EntitySpec.create(Entity.class, RestMockSimpleEntity.class).displayName("simple-ent")));
         mgmt.getEntityManager().manage(app);
-        app.start(MutableList.of(mgmt.getLocationRegistry().resolve("localhost")));
+        app.start(MutableList.of(mgmt.getLocationRegistry().getLocationManaged("localhost")));
     }
     
     // marked integration because of time

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java
----------------------------------------------------------------------
diff --git a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java
index f0c65e4..3aee845 100644
--- a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java
+++ b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java
@@ -49,7 +49,7 @@ public class EntityLocationUtilsTest extends BrooklynAppUnitTestSupport {
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        loc = mgmt.getLocationRegistry().resolve("localhost");
+        loc = mgmt.getLocationRegistry().getLocationManaged("localhost");
         ((AbstractLocation)loc).setHostGeoInfo(new HostGeoInfo("localhost", "localhost", 50, 0));
     }
     

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/AbstractEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/AbstractEc2LiveTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/AbstractEc2LiveTest.java
index 3874346..a3cb9b7 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/AbstractEc2LiveTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/AbstractEc2LiveTest.java
@@ -144,7 +144,7 @@ public abstract class AbstractEc2LiveTest extends BrooklynAppLiveTestSupport {
                 .put("tags", ImmutableList.of(getClass().getName()))
                 .putAll(flags)
                 .build();
-        jcloudsLocation = mgmt.getLocationRegistry().resolve(LOCATION_SPEC, allFlags);
+        jcloudsLocation = mgmt.getLocationRegistry().getLocationManaged(LOCATION_SPEC, allFlags);
 
         doTest(jcloudsLocation);
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/AbstractGoogleComputeLiveTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/AbstractGoogleComputeLiveTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/AbstractGoogleComputeLiveTest.java
index 499f3d3..e2c0dcc 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/AbstractGoogleComputeLiveTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/AbstractGoogleComputeLiveTest.java
@@ -128,7 +128,7 @@ public abstract class AbstractGoogleComputeLiveTest {
                 .put("tags", ImmutableList.of(tag))
                 .putAll(flags)
                 .build();
-        jcloudsLocation = ctx.getLocationRegistry().resolve(LOCATION_SPEC, allFlags);
+        jcloudsLocation = ctx.getLocationRegistry().getLocationManaged(LOCATION_SPEC, allFlags);
 
         doTest(jcloudsLocation);
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/AbstractSoftlayerLiveTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/AbstractSoftlayerLiveTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/AbstractSoftlayerLiveTest.java
index 04c5c15..5ef83ab 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/AbstractSoftlayerLiveTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/AbstractSoftlayerLiveTest.java
@@ -106,7 +106,7 @@ public abstract class AbstractSoftlayerLiveTest {
                 .put("vmNameMaxLength", MAX_VM_NAME_LENGTH)
                 .putAll(flags)
                 .build();
-        jcloudsLocation = ctx.getLocationRegistry().resolve(PROVIDER, allFlags);
+        jcloudsLocation = ctx.getLocationRegistry().getLocationManaged(PROVIDER, allFlags);
 
         doTest(jcloudsLocation);
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/chef/ChefLiveTestSupport.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/chef/ChefLiveTestSupport.java b/software/base/src/test/java/org/apache/brooklyn/entity/chef/ChefLiveTestSupport.java
index b1772d6..4492b68 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/chef/ChefLiveTestSupport.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/chef/ChefLiveTestSupport.java
@@ -22,19 +22,18 @@ import java.io.File;
 import java.io.IOException;
 
 import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.location.Location;
+import org.apache.brooklyn.api.location.LocationSpec;
 import org.apache.brooklyn.api.location.MachineProvisioningLocation;
 import org.apache.brooklyn.api.mgmt.ManagementContext;
 import org.apache.brooklyn.core.entity.EntityInternal;
 import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
-import org.apache.brooklyn.entity.chef.ChefConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeMethod;
 import org.apache.brooklyn.location.ssh.SshMachineLocation;
 import org.apache.brooklyn.util.core.ResourceUtils;
 import org.apache.brooklyn.util.io.FileUtil;
 import org.apache.brooklyn.util.stream.InputStreamSupplier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.BeforeMethod;
 
 import com.google.common.base.Throwables;
 import com.google.common.io.Files;
@@ -61,17 +60,19 @@ public class ChefLiveTestSupport extends BrooklynAppLiveTestSupport {
      * (because you might not want to set up Chef on localhost) 
      * and ensuring tests against Chef use the same configured location 
      **/
-    @SuppressWarnings("unchecked")
     public static MachineProvisioningLocation<? extends SshMachineLocation> createLocation(ManagementContext mgmt) {
-        Location bestLocation = mgmt.getLocationRegistry().resolve("named:ChefTests", true, null).orNull();
+        LocationSpec<?> bestLocation = mgmt.getLocationRegistry().getLocationSpec("named:ChefTests").orNull();
         if (bestLocation==null) {
             log.info("using AWS for chef tests because named:ChefTests does not exist");
-            bestLocation = mgmt.getLocationRegistry().resolve("jclouds:aws-ec2:us-east-1");
+            bestLocation = mgmt.getLocationRegistry().getLocationSpec("jclouds:aws-ec2:us-east-1").orNull();
         }
         if (bestLocation==null) {
             throw new IllegalStateException("Need a location called named:ChefTests or AWS configured for these tests");
         }
-        return (MachineProvisioningLocation<? extends SshMachineLocation>)bestLocation; 
+        @SuppressWarnings("unchecked")
+        MachineProvisioningLocation<? extends SshMachineLocation> result = (MachineProvisioningLocation<? extends SshMachineLocation>) 
+        mgmt.getLocationManager().createLocation(bestLocation);
+        return result;
     }
     
     private static String defaultConfigFile = null; 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/machine/MachineEntityRebindTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/machine/MachineEntityRebindTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/machine/MachineEntityRebindTest.java
index 62327b4..22c2718 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/machine/MachineEntityRebindTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/machine/MachineEntityRebindTest.java
@@ -34,7 +34,7 @@ public class MachineEntityRebindTest extends RebindTestFixtureWithApp {
     @Test(groups = "Integration")
     public void testRebindToMachineEntity() throws Exception {
         EmptySoftwareProcess machine = origApp.createAndManageChild(EntitySpec.create(EmptySoftwareProcess.class));
-        origApp.start(ImmutableList.of(origManagementContext.getLocationRegistry().resolve("localhost")));
+        origApp.start(ImmutableList.of(origManagementContext.getLocationRegistry().getLocationManaged("localhost")));
         EntityTestUtils.assertAttributeEqualsEventually(machine, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
         rebind(false);
         Entity machine2 = newManagementContext.getEntityManager().getEntity(machine.getId());

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/machine/SetHostnameCustomizerLiveTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/machine/SetHostnameCustomizerLiveTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/machine/SetHostnameCustomizerLiveTest.java
index 7e139f3..0a7a9de 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/machine/SetHostnameCustomizerLiveTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/machine/SetHostnameCustomizerLiveTest.java
@@ -80,7 +80,7 @@ public class SetHostnameCustomizerLiveTest extends BrooklynAppLiveTestSupport {
         
         super.setUp();
         
-        loc = (MachineProvisioningLocation<SshMachineLocation>) mgmt.getLocationRegistry().resolve(LOCATION_SPEC);
+        loc = (MachineProvisioningLocation<SshMachineLocation>) mgmt.getLocationRegistry().getLocationManaged(LOCATION_SPEC);
     }
 
     @Test(groups = {"Live"})

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/machine/pool/ServerPoolLiveTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/machine/pool/ServerPoolLiveTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/machine/pool/ServerPoolLiveTest.java
index ddf1a06..287fdae 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/machine/pool/ServerPoolLiveTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/machine/pool/ServerPoolLiveTest.java
@@ -50,7 +50,7 @@ public class ServerPoolLiveTest extends AbstractServerPoolTest {
                 .put("vmNameMaxLength", 30)
                 .put("imageId", "CENTOS_6_64")
                 .build();
-        return mgmt.getLocationRegistry().resolve(PROVIDER, allFlags);
+        return mgmt.getLocationRegistry().getLocationManaged(PROVIDER, allFlags);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/machine/pool/ServerPoolLocationResolverTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/machine/pool/ServerPoolLocationResolverTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/machine/pool/ServerPoolLocationResolverTest.java
index 2a036e2..cd71497 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/machine/pool/ServerPoolLocationResolverTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/machine/pool/ServerPoolLocationResolverTest.java
@@ -82,7 +82,7 @@ public class ServerPoolLocationResolverTest {
 
     private ServerPoolLocation resolve(String val) {
         Map<String, Object> flags = MutableMap.<String, Object>of(DynamicLocation.OWNER.getName(), locationOwner);
-        Location l = managementContext.getLocationRegistry().resolve(val, flags);
+        Location l = managementContext.getLocationRegistry().getLocationManaged(val, flags);
         Assert.assertNotNull(l);
         return (ServerPoolLocation) l;
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/software/base/AbstractDockerLiveTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/AbstractDockerLiveTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/AbstractDockerLiveTest.java
index 8b44023..f7602c0 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/AbstractDockerLiveTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/AbstractDockerLiveTest.java
@@ -91,7 +91,7 @@ public abstract class AbstractDockerLiveTest {
                 .put("tags", ImmutableList.of(tag))
                 .putAll(flags)
                 .build();
-        jcloudsLocation = ctx.getLocationRegistry().resolve(PROVIDER, allFlags);
+        jcloudsLocation = ctx.getLocationRegistry().getLocationManaged(PROVIDER, allFlags);
         doTest(jcloudsLocation);
     }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessOpenIptablesStreamsLiveTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessOpenIptablesStreamsLiveTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessOpenIptablesStreamsLiveTest.java
index ae25aa8..ca79ac0 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessOpenIptablesStreamsLiveTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessOpenIptablesStreamsLiveTest.java
@@ -58,7 +58,7 @@ public class SoftwareProcessOpenIptablesStreamsLiveTest extends BrooklynAppLiveT
 
         mgmt = new LocalManagementContextForTests(BrooklynProperties.Factory.newDefault());
 
-        jcloudsLocation = mgmt.getLocationRegistry().resolve("jclouds:aws-ec2:us-west-1", ImmutableMap.<String, Object>builder()
+        jcloudsLocation = mgmt.getLocationRegistry().getLocationManaged("jclouds:aws-ec2:us-west-1", ImmutableMap.<String, Object>builder()
                 .put("osFamily", "centos")
                 .put("osVersionRegex", "6\\..*")
                 .put("inboundPorts", ImmutableList.of(22, 31880, 31001, 8080, 8443, 1099))

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessSubclassTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessSubclassTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessSubclassTest.java
index 29229ea..f97c3e6 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessSubclassTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessSubclassTest.java
@@ -103,7 +103,7 @@ public class SoftwareProcessSubclassTest extends BrooklynAppUnitTestSupport {
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        loc = mgmt.getLocationRegistry().resolve("localhost");
+        loc = mgmt.getLocationRegistry().getLocationManaged("localhost");
         locs = ImmutableList.of(loc);
         entity = app.createAndManageChild(EntitySpec.create(SubSoftwareProcess.class));
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessAndChildrenIntegrationTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessAndChildrenIntegrationTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessAndChildrenIntegrationTest.java
index 228c441..4dc11db 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessAndChildrenIntegrationTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessAndChildrenIntegrationTest.java
@@ -69,7 +69,7 @@ public class VanillaSoftwareProcessAndChildrenIntegrationTest {
     @BeforeMethod(alwaysRun=true)
     public void setup() {
         app = TestApplication.Factory.newManagedInstanceForTests();
-        localhost = app.getManagementContext().getLocationRegistry().resolve("localhost");
+        localhost = app.getManagementContext().getLocationRegistry().getLocationManaged("localhost");
     }
 
     @AfterMethod(alwaysRun=true)

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessIntegrationTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessIntegrationTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessIntegrationTest.java
index 082c4b1..22ca8f4 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessIntegrationTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessIntegrationTest.java
@@ -44,7 +44,7 @@ public class VanillaSoftwareProcessIntegrationTest extends BrooklynAppLiveTestSu
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        localhost = app.getManagementContext().getLocationRegistry().resolve("localhost");
+        localhost = app.getManagementContext().getLocationRegistry().getLocationManaged("localhost");
         
         runRecord = Files.createTempFile("testVanillaSoftwareProcess-runRecord", ".txt");
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessStreamsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessStreamsIntegrationTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessStreamsIntegrationTest.java
index 7e5f122..2712b84 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessStreamsIntegrationTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessStreamsIntegrationTest.java
@@ -34,7 +34,7 @@ public class VanillaSoftwareProcessStreamsIntegrationTest extends AbstractSoftwa
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        localhost = app.getManagementContext().getLocationRegistry().resolve("localhost");
+        localhost = app.getManagementContext().getLocationRegistry().getLocationManaged("localhost");
     }
 
     @Test(groups = "Integration")

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/autoscaling/AutoScalerPolicyNoMoreMachinesTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/autoscaling/AutoScalerPolicyNoMoreMachinesTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/autoscaling/AutoScalerPolicyNoMoreMachinesTest.java
index e3dfb12..299c40a 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/autoscaling/AutoScalerPolicyNoMoreMachinesTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/autoscaling/AutoScalerPolicyNoMoreMachinesTest.java
@@ -70,7 +70,7 @@ public class AutoScalerPolicyNoMoreMachinesTest extends BrooklynAppUnitTestSuppo
                 .configure(TestCluster.INITIAL_SIZE, 0)
                 .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(EmptySoftwareProcess.class)
                         .configure(BrooklynConfigKeys.SKIP_ON_BOX_BASE_DIR_RESOLUTION, true)));
-        loc = mgmt.getLocationRegistry().resolve("byon(hosts='1.1.1.1,1.1.1.2')");
+        loc = mgmt.getLocationRegistry().getLocationManaged("byon(hosts='1.1.1.1,1.1.1.2')");
         app.start(ImmutableList.of(loc));
         
         entitiesAdded = Sets.newLinkedHashSet();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/location/WindowsTestFixture.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/location/WindowsTestFixture.java b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/location/WindowsTestFixture.java
index 597c543..07ccdef 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/location/WindowsTestFixture.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/location/WindowsTestFixture.java
@@ -51,7 +51,7 @@ public class WindowsTestFixture {
         mgmt.getBrooklynProperties().remove("brooklyn.location.jclouds.userMetadata");
         mgmt.getBrooklynProperties().remove("brooklyn.location.userMetadata");
         
-        return (JcloudsLocation) mgmt.getLocationRegistry().resolve("jclouds:aws-ec2:us-west-2", MutableMap.<String, Object>builder()
+        return (JcloudsLocation) mgmt.getLocationRegistry().getLocationManaged("jclouds:aws-ec2:us-west-2", MutableMap.<String, Object>builder()
                 .put("inboundPorts", ImmutableList.of(5985, 3389))
                 .put("displayName", "AWS Oregon (Windows)")
                 .put("imageOwner", "801119661308")
@@ -73,6 +73,6 @@ public class WindowsTestFixture {
         config.put("useJcloudsSshInit", "false");
         config.put("byonIdentity", "123");
         config.putAll(props);
-        return (MachineProvisioningLocation<?>) mgmt.getLocationRegistry().resolve("byon", config);
+        return (MachineProvisioningLocation<?>) mgmt.getLocationRegistry().getLocationManaged("byon", config);
     }
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/sensor/core/PortAttributeSensorAndConfigKeyTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/sensor/core/PortAttributeSensorAndConfigKeyTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/sensor/core/PortAttributeSensorAndConfigKeyTest.java
index 179a6f4..160f92e 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/sensor/core/PortAttributeSensorAndConfigKeyTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/sensor/core/PortAttributeSensorAndConfigKeyTest.java
@@ -53,14 +53,14 @@ public class PortAttributeSensorAndConfigKeyTest extends BrooklynAppUnitTestSupp
      */
     @Test(enabled=false, groups="Integration") // test is slow (for some reason - why?)
     public void testStoppingEntityReleasesPortFromMachineForReuse() throws Exception {
-        LocalhostMachineProvisioningLocation loc = (LocalhostMachineProvisioningLocation) mgmt.getLocationRegistry().resolve("localhost");
+        LocalhostMachineProvisioningLocation loc = (LocalhostMachineProvisioningLocation) mgmt.getLocationRegistry().getLocationManaged("localhost");
         SshMachineLocation machine = loc.obtain();
         runStoppingEntityReleasesPortFromLocalhostForReuse(machine);
     }
 
     @Test(groups="Integration") // test is slow (for some reason - why?)
     public void testStoppingEntityReleasesPortFromLocalhostProvisioningLocationForReuse() throws Exception {
-        LocalhostMachineProvisioningLocation loc = (LocalhostMachineProvisioningLocation) mgmt.getLocationRegistry().resolve("localhost");
+        LocalhostMachineProvisioningLocation loc = (LocalhostMachineProvisioningLocation) mgmt.getLocationRegistry().getLocationManaged("localhost");
         runStoppingEntityReleasesPortFromLocalhostForReuse(loc);
     }
     

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/base/src/test/java/org/apache/brooklyn/entity/system_service/SystemServiceEnricherTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/system_service/SystemServiceEnricherTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/system_service/SystemServiceEnricherTest.java
index 70c0da5..0cb6ba1 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/system_service/SystemServiceEnricherTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/system_service/SystemServiceEnricherTest.java
@@ -53,7 +53,7 @@ public class SystemServiceEnricherTest extends BrooklynAppLiveTestSupport {
     @BeforeMethod(alwaysRun=true)
     public void setUp() throws Exception {
         super.setUp();
-        location = (JcloudsLocation) mgmt.getLocationRegistry().resolve(LOCATION_SPEC);
+        location = (JcloudsLocation) mgmt.getLocationRegistry().getLocationManaged(LOCATION_SPEC);
     }
 
     @Test(groups = "Live")

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeedLiveTest.java
----------------------------------------------------------------------
diff --git a/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeedLiveTest.java b/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeedLiveTest.java
index 412a732..2795e89 100644
--- a/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeedLiveTest.java
+++ b/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeedLiveTest.java
@@ -75,7 +75,7 @@ public class WindowsPerformanceCounterFeedLiveTest extends BrooklynAppLiveTestSu
                 .put("tags", ImmutableList.of(getClass().getName()))
                 .build();
         MachineProvisioningLocation<?> provisioningLocation = (MachineProvisioningLocation<?>) 
-                mgmt.getLocationRegistry().resolve(LOCATION_SPEC, allFlags);
+                mgmt.getLocationRegistry().getLocationManaged(LOCATION_SPEC, allFlags);
         loc = provisioningLocation.obtain(ImmutableMap.of());
 
         entity = app.createAndManageChild(EntitySpec.create(TestEntity.class));

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/software/winrm/src/test/java/org/apache/brooklyn/location/winrm/ByonLocationResolverTest.java
----------------------------------------------------------------------
diff --git a/software/winrm/src/test/java/org/apache/brooklyn/location/winrm/ByonLocationResolverTest.java b/software/winrm/src/test/java/org/apache/brooklyn/location/winrm/ByonLocationResolverTest.java
index 62aa66d..93dae2b 100644
--- a/software/winrm/src/test/java/org/apache/brooklyn/location/winrm/ByonLocationResolverTest.java
+++ b/software/winrm/src/test/java/org/apache/brooklyn/location/winrm/ByonLocationResolverTest.java
@@ -19,6 +19,7 @@
 package org.apache.brooklyn.location.winrm;
 
 import static org.testng.Assert.assertEquals;
+
 import java.util.Map;
 
 import org.apache.brooklyn.api.location.MachineLocation;
@@ -27,32 +28,24 @@ import org.apache.brooklyn.core.entity.Entities;
 import org.apache.brooklyn.core.internal.BrooklynProperties;
 import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
 import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests;
-import org.apache.brooklyn.util.text.StringPredicates;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.brooklyn.location.byon.FixedListMachineProvisioningLocation;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
-import org.apache.brooklyn.location.byon.FixedListMachineProvisioningLocation;
 
 public class ByonLocationResolverTest {
 
-    private static final Logger log = LoggerFactory.getLogger(ByonLocationResolverTest.class);
-    
     private BrooklynProperties brooklynProperties;
     private LocalManagementContext managementContext;
-    private Predicate<CharSequence> defaultNamePredicate;
     
     @BeforeMethod(alwaysRun=true)
     public void setUp() throws Exception {
         managementContext = LocalManagementContextForTests.newInstance();
         brooklynProperties = managementContext.getBrooklynProperties();
-        defaultNamePredicate = StringPredicates.startsWith(FixedListMachineProvisioningLocation.class.getSimpleName());
     }
     
     @AfterMethod(alwaysRun=true)
@@ -83,13 +76,8 @@ public class ByonLocationResolverTest {
     }
 
     @SuppressWarnings("unchecked")
-    private FixedListMachineProvisioningLocation<MachineLocation> resolve(String val) {
-        return (FixedListMachineProvisioningLocation<MachineLocation>) managementContext.getLocationRegistry().resolve(val);
-    }
-
-    @SuppressWarnings("unchecked")
     private FixedListMachineProvisioningLocation<MachineLocation> resolve(String val, Map<?, ?> locationFlags) {
-        return (FixedListMachineProvisioningLocation<MachineLocation>) managementContext.getLocationRegistry().resolve(val, locationFlags);
+        return (FixedListMachineProvisioningLocation<MachineLocation>) managementContext.getLocationRegistry().getLocationManaged(val, locationFlags);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3f1e4c61/utils/common/src/main/java/org/apache/brooklyn/util/collections/MutableMap.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/collections/MutableMap.java b/utils/common/src/main/java/org/apache/brooklyn/util/collections/MutableMap.java
index 8ca2652..95bb76b 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/collections/MutableMap.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/collections/MutableMap.java
@@ -207,7 +207,7 @@ public class MutableMap<K,V> extends LinkedHashMap<K,V> {
             return this;
         }
         
-        public Builder<K, V> removeAll(K... keys) {
+        public Builder<K, V> removeAll(@SuppressWarnings("unchecked") K... keys) {
             for (K key : keys) {
                 result.remove(key);
             }


Mime
View raw message