org.jclouds.compute.util
Class ComputeServiceUtils
java.lang.Object
org.jclouds.compute.util.ComputeServiceUtils
public class ComputeServiceUtils
- extends Object
- Author:
- Adrian Cole
Method Summary |
static void |
checkNodeHasIps(NodeMetadata node)
|
static String |
createExecutionErrorMessage(Map<?,Exception> executionExceptions)
|
static String |
createNodeErrorMessage(Map<? extends NodeMetadata,? extends Throwable> failedNodes)
|
static org.jclouds.scriptbuilder.domain.Statement |
execHttpResponse(org.jclouds.http.HttpRequest request)
build a shell script that invokes the contents of the http request in bash. |
static org.jclouds.scriptbuilder.domain.Statement |
execHttpResponse(URI location)
|
static org.jclouds.scriptbuilder.domain.Statement |
extractTargzIntoDirectory(org.jclouds.http.HttpRequest targz,
String directory)
build a shell script that invokes the contents of the http request in bash. |
static org.jclouds.scriptbuilder.domain.Statement |
extractTargzIntoDirectory(URI targz,
String directory)
|
static org.jclouds.scriptbuilder.domain.Statement |
extractZipIntoDirectory(org.jclouds.http.HttpRequest zip,
String directory)
build a shell script that invokes the contents of the http request in bash. |
static org.jclouds.scriptbuilder.domain.Statement |
extractZipIntoDirectory(URI zip,
String directory)
|
static Iterable<? extends ComputeMetadata> |
filterByName(Iterable<? extends ComputeMetadata> nodes,
String name)
|
static org.jclouds.net.IPSocket |
findReachableSocketOnNode(RetryIfSocketNotYetOpen socketTester,
NodeMetadata node,
int port)
|
static double |
getCores(Hardware input)
|
static double |
getCoresAndSpeed(Hardware input)
|
static double |
getSpace(Hardware input)
|
static Iterable<String> |
getSupportedProviders()
|
static String |
parseGroupFromName(String from)
|
static OsFamily |
parseOsFamilyOrUnrecognized(String in)
|
static String |
parseVersionOrReturnEmptyString(OsFamily family,
String in,
Map<OsFamily,Map<String,String>> osVersionMap)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DELIMETED_BY_HYPHEN_ENDING_IN_HYPHEN_HEX
public static final Pattern DELIMETED_BY_HYPHEN_ENDING_IN_HYPHEN_HEX
ComputeServiceUtils
public ComputeServiceUtils()
execHttpResponse
public static org.jclouds.scriptbuilder.domain.Statement execHttpResponse(org.jclouds.http.HttpRequest request)
- build a shell script that invokes the contents of the http request in bash.
- Returns:
- a shell script that will invoke the http request
execHttpResponse
public static org.jclouds.scriptbuilder.domain.Statement execHttpResponse(URI location)
extractTargzIntoDirectory
public static org.jclouds.scriptbuilder.domain.Statement extractTargzIntoDirectory(org.jclouds.http.HttpRequest targz,
String directory)
- build a shell script that invokes the contents of the http request in bash.
- Returns:
- a shell script that will invoke the http request
extractTargzIntoDirectory
public static org.jclouds.scriptbuilder.domain.Statement extractTargzIntoDirectory(URI targz,
String directory)
extractZipIntoDirectory
public static org.jclouds.scriptbuilder.domain.Statement extractZipIntoDirectory(org.jclouds.http.HttpRequest zip,
String directory)
- build a shell script that invokes the contents of the http request in bash.
- Returns:
- a shell script that will invoke the http request
extractZipIntoDirectory
public static org.jclouds.scriptbuilder.domain.Statement extractZipIntoDirectory(URI zip,
String directory)
parseGroupFromName
public static String parseGroupFromName(String from)
- Returns:
- null if group cannot be parsed
getCores
public static double getCores(Hardware input)
getCoresAndSpeed
public static double getCoresAndSpeed(Hardware input)
getSpace
public static double getSpace(Hardware input)
parseOsFamilyOrUnrecognized
public static OsFamily parseOsFamilyOrUnrecognized(String in)
createExecutionErrorMessage
public static String createExecutionErrorMessage(Map<?,Exception> executionExceptions)
createNodeErrorMessage
public static String createNodeErrorMessage(Map<? extends NodeMetadata,? extends Throwable> failedNodes)
filterByName
public static Iterable<? extends ComputeMetadata> filterByName(Iterable<? extends ComputeMetadata> nodes,
String name)
getSupportedProviders
public static Iterable<String> getSupportedProviders()
findReachableSocketOnNode
public static org.jclouds.net.IPSocket findReachableSocketOnNode(RetryIfSocketNotYetOpen socketTester,
NodeMetadata node,
int port)
checkNodeHasIps
public static void checkNodeHasIps(NodeMetadata node)
parseVersionOrReturnEmptyString
public static String parseVersionOrReturnEmptyString(OsFamily family,
String in,
Map<OsFamily,Map<String,String>> osVersionMap)
Copyright © 2009-2011 jclouds. All Rights Reserved.