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 String |
availabilityZone |
protected Set<BlockDeviceMapping> |
blockDeviceMappings |
protected boolean |
configDrive |
protected String |
diskConfig |
protected com.google.common.base.Optional<Set<String>> |
floatingIpPoolNames |
protected boolean |
generateKeyPair |
protected String |
keyPairName |
protected Set<Network> |
novaNetworks |
protected byte[] |
userData |
blockUntilRunning, inboundPorts, networks, nodeNames, NONE, privateKey, publicKey, script, securityGroups, tags, userMetadata
authenticateSudo, blockOnComplete, loginPassword, loginPrivateKey, loginUser, port, runAsRoot, seconds, taskName, wrapInInitScript
Constructor and Description |
---|
NovaTemplateOptions() |
as, blockOnComplete, getGroups, getInboundPorts, getNetworks, getNodeNames, getPrivateKey, getPublicKey, getRunScript, getTags, getUserMetadata, runScript, securityGroups, securityGroups, shouldBlockUntilRunning, tags, wrapInInitScript
copyTo, getLoginPassword, getLoginPrivateKey, getLoginUser, getPort, getSeconds, getTaskName, hasLoginPassword, hasLoginPasswordOption, hasLoginPrivateKey, hasLoginPrivateKeyOption, overrideLoginPassword, overrideLoginPrivateKey, shouldAuthenticateSudo, shouldBlockOnComplete, shouldRunAsRoot, shouldWrapInInitScript, toString
protected boolean autoAssignFloatingIp
protected boolean generateKeyPair
protected String keyPairName
protected byte[] userData
protected String diskConfig
protected boolean configDrive
protected String availabilityZone
protected Set<BlockDeviceMapping> blockDeviceMappings
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.MoreObjects.ToStringHelper string()
string
in class TemplateOptions
public NovaTemplateOptions autoAssignFloatingIp(boolean enable)
getFloatingIpPoolNames()
public NovaTemplateOptions floatingIpPoolNames(String... floatingIpPoolNames)
getFloatingIpPoolNames()
public NovaTemplateOptions floatingIpPoolNames(Iterable<String> floatingIpPoolNames)
getFloatingIpPoolNames()
public NovaTemplateOptions generateKeyPair(boolean enable)
shouldGenerateKeyPair()
public NovaTemplateOptions keyPairName(String keyPairName)
shouldGenerateKeyPair()
public boolean shouldAutoAssignFloatingIp()
public NovaTemplateOptions availabilityZone(String availabilityZone)
public NovaTemplateOptions blockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
getBlockDeviceMappings()
public NovaTemplateOptions blockDeviceMappings(Iterable<BlockDeviceMapping> blockDeviceMappings)
getBlockDeviceMappings()
public com.google.common.base.Optional<Set<String>> getFloatingIpPoolNames()
public String getKeyPairName()
public boolean shouldGenerateKeyPair()
public byte[] getUserData()
public String getDiskConfig()
CreateServerOptions.getDiskConfig()
public boolean getConfigDrive()
CreateServerOptions.getConfigDrive()
public Set<Network> getNovaNetworks()
CreateServerOptions.getNetworks()
public String getAvailabilityZone()
public Set<BlockDeviceMapping> getBlockDeviceMappings()
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.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 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 nodeNames(Iterable<String> nodeNames)
nodeNames
in class TemplateOptions
public NovaTemplateOptions networks(Iterable<String> networks)
networks
in class TemplateOptions
public NovaTemplateOptions networks(String... networks)
networks
in class TemplateOptions
TemplateOptions.networks(Iterable)
public NovaTemplateOptions userData(byte[] userData)
public NovaTemplateOptions diskConfig(String diskConfig)
CreateServerOptions.getDiskConfig()
public NovaTemplateOptions configDrive(boolean configDrive)
CreateServerOptions.getConfigDrive()
public NovaTemplateOptions novaNetworks(Set<Network> novaNetworks)
novaNetworks
- The list of network declarations.
Nova-specific network declarations allow for specifying network UUIDs, port UUIDs, and fixed IPs.
Unline networks(Iterable)
this supports setting additional network parameters and not just network UUIDs.CreateServerOptions.getNetworks()
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.