Class NovaTemplateOptions
java.lang.Object
org.jclouds.compute.options.RunScriptOptions
org.jclouds.compute.options.TemplateOptions
org.jclouds.openstack.nova.v2_0.compute.options.NovaTemplateOptions
- All Implemented Interfaces:
Cloneable
Contains options supported in the
ComputeService#runNode operation on the
"openstack-nova" provider. Usage
The recommended way to instantiate a NovaTemplateOptions object is to statically import NovaTemplateOptions.* and invoke a static creation method followed by an instance mutator (if needed):
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());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.jclouds.compute.options.TemplateOptions
TemplateOptions.ImmutableTemplateOptionsNested classes/interfaces inherited from class org.jclouds.compute.options.RunScriptOptions
RunScriptOptions.ImmutableRunScriptOptions -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected Set<BlockDeviceMapping>protected booleanprotected Stringprotected booleanprotected Stringprotected byte[]Fields inherited from class org.jclouds.compute.options.TemplateOptions
blockUntilRunning, inboundPorts, networks, nodeNames, NONE, privateKey, publicKey, script, securityGroups, tags, userMetadataFields inherited from class org.jclouds.compute.options.RunScriptOptions
authenticateSudo, blockOnComplete, loginPassword, loginPrivateKey, loginUser, port, runAsRoot, seconds, taskName, wrapInInitScript -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthorizePublicKey(String publicKey) autoAssignFloatingIp(boolean enable) availabilityZone(String availabilityZone) blockDeviceMappings(Iterable<BlockDeviceMapping> blockDeviceMappings) blockDeviceMappings(BlockDeviceMapping... blockDeviceMappings) blockOnPort(int port, int seconds) blockUntilRunning(boolean blockUntilRunning) clone()configDrive(boolean configDrive) OpenStack can be configured to write metadata to a special configuration drive that will be attached to the instance when it boots.voiddiskConfig(String diskConfig) booleanfloatingIpPoolNames(Iterable<String> floatingIpPoolNames) floatingIpPoolNames(String... floatingIpPoolNames) generateKeyPair(boolean enable) booleanThe floating IP pool name(s) to use when allocating a FloatingIP.Specifies the keypair used to run instances withbyte[]inthashCode()inboundPorts(int... ports) installPrivateKey(String privateKey) keyPairName(String keyPairName)
Ensures NovaTemplateOptions can work with networks specified as Strings.
Ensures NovaTemplateOptions can work with networks specified as Strings.novaNetworks(Set<Network> novaNetworks) overrideAuthenticateSudo(boolean authenticateSudo) overrideLoginCredentials(org.jclouds.domain.LoginCredentials overridingCredentials) overrideLoginPassword(String password) overrideLoginPrivateKey(String privateKey) overrideLoginUser(String loginUser) runAsRoot(boolean runAsRoot) runScript(org.jclouds.scriptbuilder.domain.Statement script) booleanNotebooleanNotecom.google.common.base.MoreObjects.ToStringHelperstring()userData(byte[] userData) User data as bytes (not base64-encoded)userMetadata(String key, String value) userMetadata(Map<String, String> userMetadata) Methods inherited from class org.jclouds.compute.options.TemplateOptions
as, blockOnComplete, getGroups, getInboundPorts, getNetworks, getNodeNames, getPrivateKey, getPublicKey, getRunScript, getTags, getUserMetadata, runScript, securityGroups, securityGroups, shouldBlockUntilRunning, tags, wrapInInitScriptMethods inherited from class org.jclouds.compute.options.RunScriptOptions
copyTo, getLoginPassword, getLoginPrivateKey, getLoginUser, getPort, getSeconds, getTaskName, hasLoginPassword, hasLoginPasswordOption, hasLoginPrivateKey, hasLoginPrivateKeyOption, overrideLoginPassword, overrideLoginPrivateKey, shouldAuthenticateSudo, shouldBlockOnComplete, shouldRunAsRoot, shouldWrapInInitScript, toString
-
Field Details
-
autoAssignFloatingIp
protected boolean autoAssignFloatingIp -
floatingIpPoolNames
-
generateKeyPair
protected boolean generateKeyPair -
keyPairName
-
userData
protected byte[] userData -
diskConfig
-
configDrive
protected boolean configDrive -
novaNetworks
-
availabilityZone
-
blockDeviceMappings
-
-
Constructor Details
-
NovaTemplateOptions
public NovaTemplateOptions()
-
-
Method Details
-
clone
- Overrides:
clonein classTemplateOptions
-
copyTo
- Overrides:
copyToin classTemplateOptions
-
equals
- Overrides:
equalsin classTemplateOptions
-
hashCode
public int hashCode()- Overrides:
hashCodein classTemplateOptions
-
string
public com.google.common.base.MoreObjects.ToStringHelper string()- Overrides:
stringin classTemplateOptions
-
autoAssignFloatingIp
- See Also:
-
floatingIpPoolNames
- See Also:
-
floatingIpPoolNames
- See Also:
-
generateKeyPair
- See Also:
-
keyPairName
- See Also:
-
shouldAutoAssignFloatingIp
public boolean shouldAutoAssignFloatingIp()- Returns:
- true if auto assignment of a floating ip to each vm is enabled
-
availabilityZone
-
blockDeviceMappings
- See Also:
-
blockDeviceMappings
- See Also:
-
getFloatingIpPoolNames
The floating IP pool name(s) to use when allocating a FloatingIP. Applicable only if #shouldAutoAssignFloatingIp() returns true. If not set will attempt to use whatever FloatingIP(s) can be found regardless of which pool they originated from- Returns:
- floating-ip-pool names to use
-
getKeyPairName
Specifies the keypair used to run instances with- Returns:
- the keypair to be used
-
shouldGenerateKeyPair
public boolean shouldGenerateKeyPair()- Returns:
- true if auto generation of keypairs is enabled
-
getUserData
public byte[] getUserData() -
getDiskConfig
- See Also:
-
getConfigDrive
public boolean getConfigDrive()- See Also:
-
getNovaNetworks
- See Also:
-
getAvailabilityZone
-
getBlockDeviceMappings
-
blockOnPort
- Overrides:
blockOnPortin classTemplateOptions
-
inboundPorts
- Overrides:
inboundPortsin classTemplateOptions
-
authorizePublicKey
- Overrides:
authorizePublicKeyin classTemplateOptions
-
installPrivateKey
- Overrides:
installPrivateKeyin classTemplateOptions
-
blockUntilRunning
- Overrides:
blockUntilRunningin classTemplateOptions
-
dontAuthorizePublicKey
- Overrides:
dontAuthorizePublicKeyin classTemplateOptions
-
nameTask
- Overrides:
nameTaskin classTemplateOptions
-
runAsRoot
- Overrides:
runAsRootin classTemplateOptions
-
runScript
- Overrides:
runScriptin classTemplateOptions
-
overrideLoginCredentials
public NovaTemplateOptions overrideLoginCredentials(org.jclouds.domain.LoginCredentials overridingCredentials) - Overrides:
overrideLoginCredentialsin classTemplateOptions
-
overrideLoginPassword
- Overrides:
overrideLoginPasswordin classTemplateOptions
-
overrideLoginPrivateKey
- Overrides:
overrideLoginPrivateKeyin classTemplateOptions
-
overrideLoginUser
- Overrides:
overrideLoginUserin classTemplateOptions
-
overrideAuthenticateSudo
- Overrides:
overrideAuthenticateSudoin classTemplateOptions
-
userMetadata
- Overrides:
userMetadatain classTemplateOptions
-
userMetadata
- Overrides:
userMetadatain classTemplateOptions
-
nodeNames
- Overrides:
nodeNamesin classTemplateOptions
-
networks
Ensures NovaTemplateOptions can work with networks specified as Strings. Also provides for compatibility with the abstraction layer.- Overrides:
networksin classTemplateOptions
-
networks
Ensures NovaTemplateOptions can work with networks specified as Strings. Also provides for compatibility with the abstraction layer.- Overrides:
networksin classTemplateOptions
-
userData
User data as bytes (not base64-encoded) -
diskConfig
- See Also:
-
configDrive
OpenStack can be configured to write metadata to a special configuration drive that will be attached to the instance when it boots. The instance can retrieve any information that would normally be available through the metadata service by mounting this disk and reading files from it. To enable the config drive, set this parameter to "true". This has to be enabled for user data cases.- See Also:
-
novaNetworks
- Parameters:
novaNetworks- The list of network declarations. Nova-specific network declarations allow for specifying network UUIDs, port UUIDs, and fixed IPs. Unlinenetworks(Iterable)this supports setting additional network parameters and not just network UUIDs.- See Also:
-