Class GoGridTemplateOptions
- java.lang.Object
-
- org.jclouds.compute.options.RunScriptOptions
-
- org.jclouds.compute.options.TemplateOptions
-
- org.jclouds.gogrid.compute.options.GoGridTemplateOptions
-
- All Implemented Interfaces:
Cloneable
public class GoGridTemplateOptions extends TemplateOptions implements Cloneable
Contains options supported by theComputeService#createNodesInGroup(String, int, TemplateOptions)andComputeService#createNodesInGroup(String, int, TemplateOptions)operations on the gogrid provider.Usage
The recommended way to instantiate aGoGridTemplateOptionsobject is to statically importGoGridTemplateOptions.*and invoke a static creation method followed by an instance mutator (if needed):import static org.jclouds.compute.options.GoGridTemplateOptions.Builder.*; ComputeService client = // get connection templateBuilder.options(inboundPorts(22, 80, 8080, 443)); Set<? extends NodeMetadata> set = client.createNodesInGroup(tag, 2, templateBuilder.build());
TODO add GoGrid specific options
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGoGridTemplateOptions.Builder-
Nested classes/interfaces inherited from class org.jclouds.compute.options.TemplateOptions
TemplateOptions.ImmutableTemplateOptions
-
Nested classes/interfaces inherited from class org.jclouds.compute.options.RunScriptOptions
RunScriptOptions.ImmutableRunScriptOptions
-
-
Field Summary
Fields Modifier and Type Field Description static GoGridTemplateOptionsNONE-
Fields inherited from class org.jclouds.compute.options.TemplateOptions
blockUntilRunning, inboundPorts, networks, nodeNames, privateKey, publicKey, script, securityGroups, tags, userMetadata
-
Fields inherited from class org.jclouds.compute.options.RunScriptOptions
authenticateSudo, blockOnComplete, loginPassword, loginPrivateKey, loginUser, port, runAsRoot, seconds, taskName, wrapInInitScript
-
-
Constructor Summary
Constructors Constructor Description GoGridTemplateOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GoGridTemplateOptionsauthorizePublicKey(String publicKey)authorize an rsa ssh key.GoGridTemplateOptionsblockOnPort(int port, int seconds)When the node is started, wait until the following port is activeGoGridTemplateOptionsclone()voidcopyTo(TemplateOptions to)GoGridTemplateOptionsinboundPorts(int... ports)Opens the set of ports to public access.GoGridTemplateOptionsinstallPrivateKey(String privateKey)replaces the rsa ssh key used at login.GoGridTemplateOptionsnetworks(Iterable<String> networks)Assigns the created nodes to these networksGoGridTemplateOptionsnodeNames(Iterable<String> nodeNames)specifies names to be used for the created nodes.GoGridTemplateOptionsuserMetadata(String key, String value)GoGridTemplateOptionsuserMetadata(Map<String,String> userMetadata)-
Methods inherited from class org.jclouds.compute.options.TemplateOptions
as, blockOnComplete, blockUntilRunning, dontAuthorizePublicKey, equals, getGroups, getInboundPorts, getNetworks, getNodeNames, getPrivateKey, getPublicKey, getRunScript, getTags, getUserMetadata, hashCode, nameTask, networks, overrideAuthenticateSudo, overrideLoginCredentials, overrideLoginPassword, overrideLoginPrivateKey, overrideLoginUser, runAsRoot, runScript, runScript, securityGroups, securityGroups, shouldBlockUntilRunning, string, tags, wrapInInitScript
-
Methods 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 Detail
-
NONE
public static final GoGridTemplateOptions NONE
-
-
Method Detail
-
clone
public GoGridTemplateOptions clone()
- Overrides:
clonein classTemplateOptions
-
copyTo
public void copyTo(TemplateOptions to)
- Overrides:
copyToin classTemplateOptions
-
blockOnPort
public GoGridTemplateOptions blockOnPort(int port, int seconds)
Description copied from class:RunScriptOptionsWhen the node is started, wait until the following port is active- Overrides:
blockOnPortin classTemplateOptions- See Also:
TemplateOptions.blockOnPort(int, int)
-
inboundPorts
public GoGridTemplateOptions inboundPorts(int... ports)
Description copied from class:TemplateOptionsOpens the set of ports to public access.- Overrides:
inboundPortsin classTemplateOptions- See Also:
TemplateOptions.inboundPorts(int...)
-
authorizePublicKey
public GoGridTemplateOptions authorizePublicKey(String publicKey)
Description copied from class:TemplateOptionsauthorize an rsa ssh key.- Overrides:
authorizePublicKeyin classTemplateOptions- See Also:
TemplateOptions.authorizePublicKey(String)
-
installPrivateKey
public GoGridTemplateOptions installPrivateKey(String privateKey)
Description copied from class:TemplateOptionsreplaces the rsa ssh key used at login.- Overrides:
installPrivateKeyin classTemplateOptions- See Also:
TemplateOptions.installPrivateKey(String)
-
userMetadata
public GoGridTemplateOptions userMetadata(Map<String,String> userMetadata)
- Overrides:
userMetadatain classTemplateOptions- Parameters:
userMetadata- user-defined metadata to assign to this server
-
userMetadata
public GoGridTemplateOptions userMetadata(String key, String value)
- Overrides:
userMetadatain classTemplateOptions- Parameters:
key- key to place into the metadata mapvalue- value to associate with that key
-
nodeNames
public GoGridTemplateOptions nodeNames(Iterable<String> 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
public GoGridTemplateOptions networks(Iterable<String> networks)
Assigns the created nodes to these networks- Overrides:
networksin classTemplateOptions
-
-