You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sv...@apache.org on 2015/10/21 08:19:01 UTC
[3/5] incubator-brooklyn git commit: Re-add
Machines.findUniqueSshMachineLocation
Re-add Machines.findUniqueSshMachineLocation
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/32fa1ae9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/32fa1ae9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/32fa1ae9
Branch: refs/heads/master
Commit: 32fa1ae98fe14632bb69e870934bbc9e00a4ad89
Parents: ac58462
Author: Aled Sage <al...@gmail.com>
Authored: Tue Oct 20 17:46:27 2015 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Tue Oct 20 17:46:27 2015 +0100
----------------------------------------------------------------------
.../apache/brooklyn/core/location/Machines.java | 21 ++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/32fa1ae9/core/src/main/java/org/apache/brooklyn/core/location/Machines.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/location/Machines.java b/core/src/main/java/org/apache/brooklyn/core/location/Machines.java
index 9ec97e7..c4eb84c 100644
--- a/core/src/main/java/org/apache/brooklyn/core/location/Machines.java
+++ b/core/src/main/java/org/apache/brooklyn/core/location/Machines.java
@@ -27,15 +27,15 @@ import org.apache.brooklyn.api.entity.Entity;
import org.apache.brooklyn.api.location.Location;
import org.apache.brooklyn.api.location.MachineLocation;
import org.apache.brooklyn.core.entity.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.Iterables;
-
import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation.LocalhostMachine;
+import org.apache.brooklyn.location.ssh.SshMachineLocation;
import org.apache.brooklyn.util.guava.Maybe;
import org.apache.brooklyn.util.net.HasNetworkAddresses;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.collect.Iterables;
/** utilities for working with MachineLocations */
public class Machines {
@@ -98,7 +98,16 @@ public class Machines {
return Maybe.absent(new IllegalStateException("No instances of "+type+" available (in "+items+")"));
return Maybe.of(result);
}
-
+
+ /**
+ * @deprecated since 0.9.0; see {@link #findUniqueMachineLocation(Iterable, Class)},
+ * e.g. {@code findUniqueMachineLocation(locations, SshMachineLocation.class)}
+ */
+ @Deprecated
+ public static Maybe<SshMachineLocation> findUniqueSshMachineLocation(Iterable<? extends Location> locations) {
+ return findUniqueMachineLocation(locations, SshMachineLocation.class);
+ }
+
public static Maybe<MachineLocation> findUniqueMachineLocation(Iterable<? extends Location> locations) {
return findUniqueMachineLocation(locations, MachineLocation.class);
}