Package org.jclouds.compute.util
Class ComputeServiceUtils
java.lang.Object
org.jclouds.compute.util.ComputeServiceUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NodeMetadataBuilderstatic NodeMetadataBuilderstatic StringcreateExecutionErrorMessage(Map<?, Exception> executionExceptions) static StringcreateNodeErrorMessage(Map<? extends NodeMetadata, ? extends Throwable> failedNodes) static org.jclouds.scriptbuilder.domain.StatementexecHttpResponse(URI location) static org.jclouds.scriptbuilder.domain.StatementexecHttpResponse(org.jclouds.http.HttpRequest request) build a shell script that invokes the contents of the http request in bash.static org.jclouds.scriptbuilder.domain.StatementextractTargzIntoDirectory(URI targz, String directory) static org.jclouds.scriptbuilder.domain.StatementextractTargzIntoDirectory(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.StatementextractZipIntoDirectory(URI zip, String directory) static org.jclouds.scriptbuilder.domain.StatementextractZipIntoDirectory(org.jclouds.http.HttpRequest zip, String directory) build a shell script that invokes the contents of the http request in bash.static Iterable<? extends ComputeMetadata>filterByName(Iterable<? extends ComputeMetadata> nodes, String name) static StringformatStatus(ComputeMetadataIncludingStatus<?> resource) status as a string which optionally includes the backend statusstatic doublestatic doublegetCoresAndSpeed(Hardware input) getPortRangesFromList(int... ports) static doublestatic StringgroupFromMapOrName(Map<String, String> metadataMap, String nodeName, GroupNamingConvention namingConvention) For cloud apis that need to namespace tags as the value of the keyjclouds.tagsFor cloud apis that have a pattern of using empty strings as tags, return a map that contains that.static OsFamilystatic StringparseVersionOrReturnEmptyString(OsFamily family, String in, Map<OsFamily, Map<String, String>> osVersionMap)
-
Field Details
-
DELIMITED_BY_HYPHEN_ENDING_IN_HYPHEN_HEX
-
-
Constructor Details
-
ComputeServiceUtils
public ComputeServiceUtils()
-
-
Method Details
-
formatStatus
status as a string which optionally includes the backend status -
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
-
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
-
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
-
getCores
-
getCoresAndSpeed
-
getSpace
-
parseOsFamilyOrUnrecognized
-
createExecutionErrorMessage
-
createNodeErrorMessage
public static String createNodeErrorMessage(Map<? extends NodeMetadata, ? extends Throwable> failedNodes) -
filterByName
public static Iterable<? extends ComputeMetadata> filterByName(Iterable<? extends ComputeMetadata> nodes, String name) -
metadataAndTagsAsValuesOfEmptyString
For cloud apis that have a pattern of using empty strings as tags, return a map that contains that. -
addMetadataAndParseTagsFromValuesOfEmptyString
public static NodeMetadataBuilder addMetadataAndParseTagsFromValuesOfEmptyString(NodeMetadataBuilder builder, Map<String, String> map) -
metadataAndTagsAsCommaDelimitedValue
For cloud apis that need to namespace tags as the value of the keyjclouds.tags -
addMetadataAndParseTagsFromCommaDelimitedValue
public static NodeMetadataBuilder addMetadataAndParseTagsFromCommaDelimitedValue(NodeMetadataBuilder builder, Map<String, String> map) -
parseVersionOrReturnEmptyString
-
getPortRangesFromList
-
groupFromMapOrName
-