public class JcloudsUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APT_INSTALL
Deprecated.
since 0.7; see
BashCommands |
static org.jclouds.scriptbuilder.domain.Statement |
APT_RUN_SCRIPT
Deprecated.
since 0.7; see
installJavaAndCurl(OperatingSystem) |
static org.jclouds.scriptbuilder.domain.Statement |
YUM_RUN_SCRIPT
Deprecated.
since 0.7; see
installJavaAndCurl(OperatingSystem) |
static org.jclouds.scriptbuilder.domain.Statement |
ZYPPER_RUN_SCRIPT
Deprecated.
since 0.7;
installJavaAndCurl(OperatingSystem) |
Modifier and Type | Method and Description |
---|---|
static org.jclouds.scriptbuilder.domain.Statement |
addAuthorizedKeysToRoot(java.io.File publicKeyFile)
Deprecated.
since 0.7
|
static org.jclouds.scriptbuilder.domain.Statement |
addAuthorizedKeysToRoot(java.lang.String publicKey)
Deprecated.
since 0.7
|
static org.jclouds.scriptbuilder.domain.Statement |
authorizePortInIpTables(int port)
Deprecated.
since 0.7; see
IptablesCommands |
static java.util.Map<java.lang.Integer,java.lang.Integer> |
dockerPortMappingsFor(JcloudsLocation docker,
java.lang.String containerId) |
static org.jclouds.compute.ComputeService |
findComputeService(ConfigBag conf)
Deprecated.
|
static org.jclouds.compute.ComputeService |
findComputeService(ConfigBag conf,
boolean allowReuse)
Deprecated.
|
static com.google.common.collect.ImmutableSet<com.google.inject.Module> |
getCommonModules()
Deprecated.
since 0.7; see
ComputeServiceRegistry |
static java.lang.String |
getFirstReachableAddress(org.jclouds.compute.ComputeServiceContext context,
org.jclouds.compute.domain.NodeMetadata node)
Deprecated.
since 0.9.0; use
getFirstReachableAddress(NodeMetadata, Duration) |
static java.lang.String |
getFirstReachableAddress(org.jclouds.compute.domain.NodeMetadata node,
Duration timeout)
Uses
Networking.isReachablePredicate() to determine reachability. |
static java.lang.String |
getFirstReachableAddress(org.jclouds.compute.domain.NodeMetadata node,
Duration timeout,
com.google.common.base.Predicate<? super com.google.common.net.HostAndPort> socketTester) |
static java.lang.Iterable<com.google.common.net.HostAndPort> |
getReachableAddresses(java.lang.Iterable<com.google.common.net.HostAndPort> sockets,
Duration timeout,
com.google.common.base.Predicate<? super com.google.common.net.HostAndPort> socketTester)
Uses
ReachableSocketFinder to determine which sockets are reachable. |
static java.lang.Iterable<com.google.common.net.HostAndPort> |
getReachableAddresses(java.lang.Iterable<java.lang.String> hosts,
int port,
Duration timeout,
com.google.common.base.Predicate<? super com.google.common.net.HostAndPort> socketTester) |
static java.lang.Iterable<com.google.common.net.HostAndPort> |
getReachableAddresses(org.jclouds.compute.domain.NodeMetadata node,
Duration timeout,
com.google.common.base.Predicate<? super com.google.common.net.HostAndPort> socketTester) |
static java.lang.String |
installAfterUpdatingIfNotPresent(java.lang.String cmd)
Deprecated.
since 0.7; see
BashCommands |
static org.jclouds.scriptbuilder.domain.Statement |
installJavaAndCurl(org.jclouds.compute.domain.OperatingSystem os)
Deprecated.
since 0.7; see
BashCommands.installJava7() and BashCommands.INSTALL_CURL |
static void |
mapSecurityGroupRuleToIpTables(org.jclouds.compute.ComputeService computeService,
org.jclouds.compute.domain.NodeMetadata node,
org.jclouds.domain.LoginCredentials credentials,
java.lang.String networkInterface,
java.lang.Iterable<java.lang.Integer> ports)
Deprecated.
since 0.7
|
static com.google.common.base.Predicate<org.jclouds.compute.domain.NodeMetadata> |
predicateMatchingById(org.jclouds.compute.domain.NodeMetadata node)
Deprecated.
since 0.7
|
static com.google.common.base.Predicate<org.jclouds.compute.domain.NodeMetadata> |
predicateMatchingById(java.lang.String id)
Deprecated.
since 0.7
|
static org.jclouds.compute.domain.ExecResponse |
runScriptOnNode(org.jclouds.compute.ComputeService computeService,
org.jclouds.compute.domain.NodeMetadata node,
org.jclouds.scriptbuilder.domain.Statement statement,
java.lang.String scriptName)
Deprecated.
since 0.7
|
static java.lang.String |
waitForPasswordOnAws(org.jclouds.compute.ComputeService computeService,
org.jclouds.compute.domain.NodeMetadata node,
long timeout,
java.util.concurrent.TimeUnit timeUnit) |
@Deprecated public static java.lang.String APT_INSTALL
BashCommands
@Deprecated public static final org.jclouds.scriptbuilder.domain.Statement APT_RUN_SCRIPT
installJavaAndCurl(OperatingSystem)
@Deprecated public static final org.jclouds.scriptbuilder.domain.Statement YUM_RUN_SCRIPT
installJavaAndCurl(OperatingSystem)
@Deprecated public static final org.jclouds.scriptbuilder.domain.Statement ZYPPER_RUN_SCRIPT
installJavaAndCurl(OperatingSystem)
@Deprecated public static java.lang.String installAfterUpdatingIfNotPresent(java.lang.String cmd)
BashCommands
@Deprecated public static com.google.common.base.Predicate<org.jclouds.compute.domain.NodeMetadata> predicateMatchingById(org.jclouds.compute.domain.NodeMetadata node)
@Deprecated public static com.google.common.base.Predicate<org.jclouds.compute.domain.NodeMetadata> predicateMatchingById(java.lang.String id)
@Deprecated public static org.jclouds.scriptbuilder.domain.Statement authorizePortInIpTables(int port)
IptablesCommands
@Deprecated public static org.jclouds.compute.domain.ExecResponse runScriptOnNode(org.jclouds.compute.ComputeService computeService, org.jclouds.compute.domain.NodeMetadata node, org.jclouds.scriptbuilder.domain.Statement statement, java.lang.String scriptName) throws org.jclouds.compute.RunScriptOnNodesException
org.jclouds.compute.RunScriptOnNodesException
java.lang.IllegalStateException
- If do not find exactly one matching node@Deprecated public static org.jclouds.scriptbuilder.domain.Statement installJavaAndCurl(org.jclouds.compute.domain.OperatingSystem os)
BashCommands.installJava7()
and BashCommands.INSTALL_CURL
@Deprecated public static org.jclouds.compute.ComputeService findComputeService(ConfigBag conf)
ComputeServiceRegistry.findComputeService(ConfigBag, boolean)
@Deprecated public static org.jclouds.compute.ComputeService findComputeService(ConfigBag conf, boolean allowReuse)
ComputeServiceRegistry.findComputeService(ConfigBag, boolean)
@Deprecated public static com.google.common.collect.ImmutableSet<com.google.inject.Module> getCommonModules()
ComputeServiceRegistry
@Deprecated public static org.jclouds.scriptbuilder.domain.Statement addAuthorizedKeysToRoot(java.io.File publicKeyFile) throws java.io.IOException
java.io.IOException
@Deprecated public static org.jclouds.scriptbuilder.domain.Statement addAuthorizedKeysToRoot(java.lang.String publicKey)
@Deprecated public static java.lang.String getFirstReachableAddress(org.jclouds.compute.ComputeServiceContext context, org.jclouds.compute.domain.NodeMetadata node)
getFirstReachableAddress(NodeMetadata, Duration)
public static java.lang.String getFirstReachableAddress(org.jclouds.compute.domain.NodeMetadata node, Duration timeout)
Networking.isReachablePredicate()
to determine reachability.public static java.lang.String getFirstReachableAddress(org.jclouds.compute.domain.NodeMetadata node, Duration timeout, com.google.common.base.Predicate<? super com.google.common.net.HostAndPort> socketTester)
public static java.lang.Iterable<com.google.common.net.HostAndPort> getReachableAddresses(org.jclouds.compute.domain.NodeMetadata node, Duration timeout, com.google.common.base.Predicate<? super com.google.common.net.HostAndPort> socketTester)
getReachableAddresses(Iterable, Duration, Predicate)
public static java.lang.Iterable<com.google.common.net.HostAndPort> getReachableAddresses(java.lang.Iterable<java.lang.String> hosts, int port, Duration timeout, com.google.common.base.Predicate<? super com.google.common.net.HostAndPort> socketTester)
public static java.lang.Iterable<com.google.common.net.HostAndPort> getReachableAddresses(java.lang.Iterable<com.google.common.net.HostAndPort> sockets, Duration timeout, com.google.common.base.Predicate<? super com.google.common.net.HostAndPort> socketTester)
ReachableSocketFinder
to determine which sockets are reachable. Iterators
are unmodifiable and are lazily evaluated.sockets
- The host-and-ports to testtimeout
- Max time to try to connect to the ip:portsocketTester
- A predicate determining reachability.public static java.lang.String waitForPasswordOnAws(org.jclouds.compute.ComputeService computeService, org.jclouds.compute.domain.NodeMetadata node, long timeout, java.util.concurrent.TimeUnit timeUnit) throws java.util.concurrent.TimeoutException
java.util.concurrent.TimeoutException
public static java.util.Map<java.lang.Integer,java.lang.Integer> dockerPortMappingsFor(JcloudsLocation docker, java.lang.String containerId)
@Deprecated public static void mapSecurityGroupRuleToIpTables(org.jclouds.compute.ComputeService computeService, org.jclouds.compute.domain.NodeMetadata node, org.jclouds.domain.LoginCredentials credentials, java.lang.String networkInterface, java.lang.Iterable<java.lang.Integer> ports)