public class NovaTemplateOptions extends TemplateOptions implements Cloneable
ComputeService#runNode
operation on the
"openstack-nova" provider.
import static org.jclouds.aws.ec2.compute.options.NovaTemplateOptions.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 |
NovaTemplateOptions.Builder |
TemplateOptions.ImmutableTemplateOptions
RunScriptOptions.ImmutableRunScriptOptions
Modifier and Type | Field and Description |
---|---|
protected boolean |
autoAssignFloatingIp |
protected boolean |
generateKeyPair |
protected String |
keyPairName |
static NovaTemplateOptions |
NONE |
protected com.google.common.base.Optional<Set<String>> |
securityGroupNames |
protected byte[] |
userData |
blockUntilRunning, inboundPorts, privateKey, publicKey, script, tags, userMetadata
authenticateSudo, blockOnComplete, loginPassword, loginPrivateKey, loginUser, port, runAsRoot, seconds, taskName, wrapInInitScript
Constructor and Description |
---|
NovaTemplateOptions() |
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 boolean autoAssignFloatingIp
protected boolean generateKeyPair
protected String keyPairName
protected byte[] userData
public static final NovaTemplateOptions NONE
public NovaTemplateOptions 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 NovaTemplateOptions autoAssignFloatingIp(boolean enable)
shouldAutoAssignFloatingIp()
public NovaTemplateOptions generateKeyPair(boolean enable)
shouldGenerateKeyPair()
public NovaTemplateOptions keyPairName(String keyPairName)
shouldGenerateKeyPair()
public NovaTemplateOptions securityGroupNames(String... securityGroupNames)
public NovaTemplateOptions securityGroupNames(Iterable<String> securityGroupNames)
public boolean shouldAutoAssignFloatingIp()
NovaApi#getExtensionForZone(String)
to return
present
public String getKeyPairName()
public boolean shouldGenerateKeyPair()
public com.google.common.base.Optional<Set<String>> getSecurityGroupNames()
jclouds#
according
to TemplateOptions.getInboundPorts()
public byte[] getUserData()
public NovaTemplateOptions blockOnPort(int port, int seconds)
blockOnPort
in class TemplateOptions
public NovaTemplateOptions inboundPorts(int... ports)
inboundPorts
in class TemplateOptions
public NovaTemplateOptions authorizePublicKey(String publicKey)
authorizePublicKey
in class TemplateOptions
public NovaTemplateOptions installPrivateKey(String privateKey)
installPrivateKey
in class TemplateOptions
public NovaTemplateOptions 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 NovaTemplateOptions dontAuthorizePublicKey()
dontAuthorizePublicKey
in class TemplateOptions
public NovaTemplateOptions nameTask(String name)
nameTask
in class TemplateOptions
jclouds-script-timestamp
where timestamp is millis since
epochpublic NovaTemplateOptions runAsRoot(boolean runAsRoot)
runAsRoot
in class TemplateOptions
public NovaTemplateOptions runScript(Statement script)
runScript
in class TemplateOptions
public NovaTemplateOptions overrideLoginCredentials(LoginCredentials overridingCredentials)
overrideLoginCredentials
in class TemplateOptions
public NovaTemplateOptions overrideLoginPassword(String password)
overrideLoginPassword
in class TemplateOptions
public NovaTemplateOptions overrideLoginPrivateKey(String privateKey)
overrideLoginPrivateKey
in class TemplateOptions
public NovaTemplateOptions overrideLoginUser(String loginUser)
overrideLoginUser
in class TemplateOptions
public NovaTemplateOptions overrideAuthenticateSudo(boolean authenticateSudo)
overrideAuthenticateSudo
in class TemplateOptions
public NovaTemplateOptions userMetadata(Map<String,String> userMetadata)
userMetadata
in class TemplateOptions
userMetadata
- user-defined metadata to assign to this serverpublic NovaTemplateOptions userMetadata(String key, String value)
userMetadata
in class TemplateOptions
key
- key to place into the metadata mapvalue
- value to associate with that keypublic NovaTemplateOptions userData(byte[] userData)
Copyright © 2009-2013 jclouds. All Rights Reserved.