public class JoyentCloudTemplateOptions extends TemplateOptions implements Cloneable
ComputeService#createNodesInGroup
operation on the
"joyent-cloudapi" provider.
import static org.jclouds.joyent.cloudapi.v6_5.compute.options.JoyentCloudTemplateOptions.Builder.*;
ComputeService api = // get connection
templateBuilder.options(inboundPorts(22, 80, 8080, 443));
Set extends NodeMetadata> set = api.createNodesInGroup(tag, 2, templateBuilder.build());
Modifier and Type | Class and Description |
---|---|
static class |
JoyentCloudTemplateOptions.Builder |
TemplateOptions.ImmutableTemplateOptions
RunScriptOptions.ImmutableRunScriptOptions
Modifier and Type | Field and Description |
---|---|
protected com.google.common.base.Optional<Boolean> |
generateKey |
blockUntilRunning, inboundPorts, NONE, privateKey, publicKey, script, tags, userMetadata
authenticateSudo, blockOnComplete, loginPassword, loginPrivateKey, loginUser, port, runAsRoot, seconds, taskName, wrapInInitScript
Constructor and Description |
---|
JoyentCloudTemplateOptions() |
as, blockOnComplete, getInboundPorts, getPrivateKey, getPublicKey, getRunScript, getTags, getUserMetadata, runScript, shouldBlockUntilRunning, tags, wrapInInitScript
getLoginPassword, getLoginPrivateKey, getLoginUser, getPort, getSeconds, getTaskName, hasLoginPassword, hasLoginPasswordOption, hasLoginPrivateKey, hasLoginPrivateKeyOption, shouldAuthenticateSudo, shouldBlockOnComplete, shouldRunAsRoot, shouldWrapInInitScript, toString
protected com.google.common.base.Optional<Boolean> generateKey
public JoyentCloudTemplateOptions clone()
clone
in class TemplateOptions
public void copyTo(TemplateOptions to)
copyTo
in class TemplateOptions
public boolean equals(Object o)
equals
in class TemplateOptions
public int hashCode()
hashCode
in class TemplateOptions
public com.google.common.base.Objects.ToStringHelper string()
string
in class TemplateOptions
public JoyentCloudTemplateOptions generateKey(boolean enable)
shouldGenerateKey()
public com.google.common.base.Optional<Boolean> shouldGenerateKey()
public JoyentCloudTemplateOptions blockOnPort(int port, int seconds)
blockOnPort
in class TemplateOptions
public JoyentCloudTemplateOptions inboundPorts(int... ports)
inboundPorts
in class TemplateOptions
public JoyentCloudTemplateOptions authorizePublicKey(String publicKey)
authorizePublicKey
in class TemplateOptions
public JoyentCloudTemplateOptions installPrivateKey(String privateKey)
installPrivateKey
in class TemplateOptions
public JoyentCloudTemplateOptions blockUntilRunning(boolean blockUntilRunning)
TemplateOptions.ImmutableTemplateOptions.runScript(Statement)
and
RunScriptOptions.blockOnComplete(boolean)
, as all current
implementations utilize ssh in order to execute scripts.blockUntilRunning
in class TemplateOptions
blockUntilRunning
- (default true) whether to block until the nodes in this template
are in NodeMetadata.Status.RUNNING
statepublic JoyentCloudTemplateOptions dontAuthorizePublicKey()
dontAuthorizePublicKey
in class TemplateOptions
public JoyentCloudTemplateOptions nameTask(String name)
nameTask
in class TemplateOptions
jclouds-script-timestamp
where timestamp is millis since
epochpublic JoyentCloudTemplateOptions runAsRoot(boolean runAsRoot)
runAsRoot
in class TemplateOptions
public JoyentCloudTemplateOptions runScript(Statement script)
runScript
in class TemplateOptions
public JoyentCloudTemplateOptions overrideLoginCredentials(LoginCredentials overridingCredentials)
overrideLoginCredentials
in class TemplateOptions
public JoyentCloudTemplateOptions overrideLoginPassword(String password)
overrideLoginPassword
in class TemplateOptions
public JoyentCloudTemplateOptions overrideLoginPrivateKey(String privateKey)
overrideLoginPrivateKey
in class TemplateOptions
public JoyentCloudTemplateOptions overrideLoginUser(String loginUser)
overrideLoginUser
in class TemplateOptions
public JoyentCloudTemplateOptions overrideAuthenticateSudo(boolean authenticateSudo)
overrideAuthenticateSudo
in class TemplateOptions
public JoyentCloudTemplateOptions userMetadata(Map<String,String> userMetadata)
userMetadata
in class TemplateOptions
userMetadata
- user-defined metadata to assign to this serverpublic JoyentCloudTemplateOptions userMetadata(String key, String value)
userMetadata
in class TemplateOptions
key
- key to place into the metadata mapvalue
- value to associate with that keyCopyright © 2009-2013 jclouds. All Rights Reserved.