Class SoftLayerTemplateOptions
java.lang.Object
org.jclouds.compute.options.RunScriptOptions
org.jclouds.compute.options.TemplateOptions
org.jclouds.softlayer.compute.options.SoftLayerTemplateOptions
- All Implemented Interfaces:
Cloneable
Contains options supported by the
ComputeService.createNodesInGroup(String, int, TemplateOptions) and
ComputeService.createNodesInGroup(String, int, TemplateOptions)
operations on the gogrid provider.
Usage
The recommended way to instantiate aSoftLayerTemplateOptions object is to statically import
SoftLayerTemplateOptions.* and invoke a static creation method
followed by an instance mutator (if needed):
import static org.jclouds.compute.options.SoftLayerTemplateOptions.Builder.*; ComputeService client = // get connection templateBuilder.options(inboundPorts(22, 80, 8080, 443)); Set<? extends NodeMetadata> set = client.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 Stringprotected Booleanprotected Integerprotected Stringprotected Integerprotected Integerprotected Booleanprotected StringFields 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) authorize an rsa ssh key.blockDevices(Integer... capacities) blockDevices(Iterable<Integer> capacities) blockOnPort(int port, int seconds) When the node is started, wait until the following port is activeblockUntilRunning(boolean blockUntilRunning) Noteclone()voiddedicatedAccountHostOnlyFlag(Boolean dedicatedAccountHostOnlyFlag) domainName(String domainName) will replace the default domain used when ordering virtual guests.hourlyBillingFlag(Boolean hourlyBillingFlag) inboundPorts(int... ports) Opens the set of ports to public access.installPrivateKey(String privateKey) replaces the rsa ssh key used at login.Assigns the created nodes to these networksspecifies names to be used for the created nodes.overrideAuthenticateSudo(boolean authenticateSudo) overrideLoginCredentials(LoginCredentials overridingCredentials) overrideLoginPassword(String password) overrideLoginPrivateKey(String privateKey) overrideLoginUser(String loginUser) postInstallScriptUri(String postInstallScriptUri) primaryBackendNetworkComponentNetworkVlanId(Integer primaryBackendNetworkComponentNetworkVlanId) primaryNetworkComponentNetworkVlanId(Integer primaryNetworkComponentNetworkVlanId) privateNetworkOnlyFlag(Boolean privateNetworkOnlyFlag) runAsRoot(boolean runAsRoot) This script will be executed as the root user upon system startup.userMetadata(String key, String value) userMetadata(Map<String, String> userMetadata) Methods inherited from class org.jclouds.compute.options.TemplateOptions
as, blockOnComplete, equals, getGroups, getInboundPorts, getNetworks, getNodeNames, getPrivateKey, getPublicKey, getRunScript, getTags, getUserMetadata, hashCode, networks, runScript, securityGroups, securityGroups, shouldBlockUntilRunning, string, 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
-
domainName
-
blockDevices
-
diskType
-
portSpeed
-
userData
-
-
primaryBackendNetworkComponentNetworkVlanId
-
hourlyBillingFlag
-
dedicatedAccountHostOnlyFlag
-
privateNetworkOnlyFlag
-
postInstallScriptUri
-
sshKeys
-
-
Constructor Details
-
SoftLayerTemplateOptions
public SoftLayerTemplateOptions()
-
-
Method Details
-
clone
- Overrides:
clonein classTemplateOptions
-
copyTo
- Overrides:
copyToin classTemplateOptions
-
domainName
will replace the default domain used when ordering virtual guests. Note this needs to contain a public suffix!- See Also:
-
blockDevices
-
blockDevices
-
diskType
-
portSpeed
-
userData
-
primaryNetworkComponentNetworkVlanId
public SoftLayerTemplateOptions primaryNetworkComponentNetworkVlanId(@Nullable Integer primaryNetworkComponentNetworkVlanId) -
primaryBackendNetworkComponentNetworkVlanId
public SoftLayerTemplateOptions primaryBackendNetworkComponentNetworkVlanId(@Nullable Integer primaryBackendNetworkComponentNetworkVlanId) -
hourlyBillingFlag
-
dedicatedAccountHostOnlyFlag
public SoftLayerTemplateOptions dedicatedAccountHostOnlyFlag(@Nullable Boolean dedicatedAccountHostOnlyFlag) -
privateNetworkOnlyFlag
-
postInstallScriptUri
-
sshKeys
-
sshKeys
-
getDomainName
-
getBlockDevices
-
getDiskType
-
getPortSpeed
-
getUserData
-
getPrimaryNetworkComponentNetworkVlanId
-
getPrimaryBackendNetworkComponentNetworkVlanId
-
isHourlyBillingFlag
-
isDedicatedAccountHostOnlyFlag
-
isPrivateNetworkOnlyFlag
-
getPostInstallScriptUri
-
getSshKeys
-
blockOnPort
When the node is started, wait until the following port is active- Overrides:
blockOnPortin classTemplateOptions
-
inboundPorts
Opens the set of ports to public access.- Overrides:
inboundPortsin classTemplateOptions
-
authorizePublicKey
authorize an rsa ssh key.- Overrides:
authorizePublicKeyin classTemplateOptions
-
installPrivateKey
replaces the rsa ssh key used at login.- Overrides:
installPrivateKeyin classTemplateOptions
-
blockUntilRunning
Note
As of version 1.1.0, this option is incompatible withTemplateOptions.runScript(Statement)andRunScriptOptions.blockOnComplete(boolean), as all current implementations utilize ssh in order to execute scripts.- Overrides:
blockUntilRunningin classTemplateOptions- Parameters:
blockUntilRunning- (default true) whether to block until the nodes in this template are instateinvalid reference
Status#RUNNING
-
dontAuthorizePublicKey
- Overrides:
dontAuthorizePublicKeyin classTemplateOptions
-
nameTask
- Overrides:
nameTaskin classTemplateOptions- Returns:
- What to call the task relating to this script; default
jclouds-script-timestampwhere timestamp is millis since epoch
-
runAsRoot
- Overrides:
runAsRootin classTemplateOptions
-
runScript
This script will be executed as the root user upon system startup. This script gets a prologue, so no #!/bin/bash required, path set up, etc- Overrides:
runScriptin classTemplateOptions
-
overrideLoginCredentials
- Overrides:
overrideLoginCredentialsin classTemplateOptions
-
overrideLoginPassword
- Overrides:
overrideLoginPasswordin classTemplateOptions
-
overrideLoginPrivateKey
- Overrides:
overrideLoginPrivateKeyin classTemplateOptions
-
overrideLoginUser
- Overrides:
overrideLoginUserin classTemplateOptions
-
overrideAuthenticateSudo
- Overrides:
overrideAuthenticateSudoin classTemplateOptions
-
userMetadata
- Overrides:
userMetadatain classTemplateOptions- Parameters:
userMetadata- user-defined metadata to assign to this server
-
userMetadata
- Overrides:
userMetadatain classTemplateOptions- Parameters:
key- key to place into the metadata mapvalue- value to associate with that key
-
nodeNames
specifies names to be used for the created nodes. Note that this does not guarantee uniqueness - if there are already existing nodes with a name specified here, there will still be a new node created with the same name. Also, if more nodes are to be created than there are names, subsequent names will use the default naming strategy for that cloud.- Overrides:
nodeNamesin classTemplateOptions
-
networks
Assigns the created nodes to these networks- Overrides:
networksin classTemplateOptions
-