org.jclouds.glesys.compute.options
Class GleSYSTemplateOptions

java.lang.Object
  extended by org.jclouds.compute.options.RunScriptOptions
      extended by org.jclouds.compute.options.TemplateOptions
          extended by org.jclouds.glesys.compute.options.GleSYSTemplateOptions
All Implemented Interfaces:
Cloneable

public class GleSYSTemplateOptions
extends org.jclouds.compute.options.TemplateOptions
implements Cloneable

Contains options supported by the ComputeService#createNodesInGroup(String, int, TemplateOptions) and ComputeService#createNodesInGroup(String, int, TemplateOptions) operations on the glesys provider.

Usage

The recommended way to instantiate a GleSYSTemplateOptions object is to statically import GleSYSTemplateOptions.* and invoke a static creation method followed by an instance mutator (if needed):

 import static org.jclouds.compute.options.GleSYSTemplateOptions.Builder.*;
 ComputeService api = // get connection
 templateBuilder.options(rootPassword("caQu5rou"));
 Set<? extends NodeMetadata> set = api.createNodesInGroup(tag, 2, templateBuilder.build());
 


Nested Class Summary
static class GleSYSTemplateOptions.Builder
           
 
Nested classes/interfaces inherited from class org.jclouds.compute.options.TemplateOptions
org.jclouds.compute.options.TemplateOptions.ImmutableTemplateOptions
 
Nested classes/interfaces inherited from class org.jclouds.compute.options.RunScriptOptions
org.jclouds.compute.options.RunScriptOptions.ImmutableRunScriptOptions
 
Field Summary
protected  String ip
          The IP address to assign to the new node instance.
protected  String rootPassword
          The password to set for the root user on the created server instance.
protected  int transferGB
          The monthly data transfer limit (in GB) for the server.
 
Fields inherited from class org.jclouds.compute.options.TemplateOptions
blockUntilRunning, inboundPorts, networks, nodeNames, NONE, 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
GleSYSTemplateOptions()
           
 
Method Summary
 GleSYSTemplateOptions authorizePublicKey(String publicKey)
           
 GleSYSTemplateOptions blockOnPort(int port, int seconds)
           
 GleSYSTemplateOptions clone()
           
 void copyTo(org.jclouds.compute.options.TemplateOptions to)
           
 String getIp()
           
 String getRootPassword()
           
 int getTransferGB()
           
 boolean hasRootPassword()
           
 GleSYSTemplateOptions inboundPorts(int... ports)
           
 GleSYSTemplateOptions installPrivateKey(String privateKey)
           
 GleSYSTemplateOptions ip(String ip)
          Sets the IP address to assign to the new server instance.
 GleSYSTemplateOptions networks(Iterable<String> networks)
          
 GleSYSTemplateOptions nodeNames(Iterable<String> nodeNames)
          
 GleSYSTemplateOptions rootPassword(String rootPassword)
          Sets the password for the root user on the created server instance.
 com.google.common.base.Objects.ToStringHelper string()
           
 GleSYSTemplateOptions transferGB(int transferGB)
          Sets the monthly data transfer limit (in GB) for the server.
 GleSYSTemplateOptions userMetadata(Map<String,String> userMetadata)
          
 GleSYSTemplateOptions userMetadata(String key, String value)
          
 
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, tags, wrapInInitScript
 
Methods inherited from class org.jclouds.compute.options.RunScriptOptions
getLoginPassword, getLoginPrivateKey, getLoginUser, getPort, getSeconds, getTaskName, hasLoginPassword, hasLoginPasswordOption, hasLoginPrivateKey, hasLoginPrivateKeyOption, shouldAuthenticateSudo, shouldBlockOnComplete, shouldRunAsRoot, shouldWrapInInitScript, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ip

protected String ip
The IP address to assign to the new node instance. If set to " any" the node will be automatically assigned a free IP address.


rootPassword

protected String rootPassword
The password to set for the root user on the created server instance. If left unspecified, a random password will be assigned.


transferGB

protected int transferGB
The monthly data transfer limit (in GB) for the server.

Constructor Detail

GleSYSTemplateOptions

public GleSYSTemplateOptions()
Method Detail

clone

public GleSYSTemplateOptions clone()
Overrides:
clone in class org.jclouds.compute.options.TemplateOptions

copyTo

public void copyTo(org.jclouds.compute.options.TemplateOptions to)
Overrides:
copyTo in class org.jclouds.compute.options.TemplateOptions

ip

public GleSYSTemplateOptions ip(String ip)
Sets the IP address to assign to the new server instance. If set to " any" the server will be automatically assigned a free IP address.

See Also:
ServerApi#createWithHostnameAndRootPassword, InetAddresses.isInetAddress(java.lang.String)

getIp

public String getIp()
Returns:
the IP address to assign to the new server instance.

rootPassword

public GleSYSTemplateOptions rootPassword(String rootPassword)
Sets the password for the root user on the created server instance. If left unspecified, a random password will be assigned.

See Also:
ServerApi#createWithHostnameAndRootPassword

getRootPassword

public String getRootPassword()
Returns:
the password set for the root user or null if none is set (and a random password will be assigned).

hasRootPassword

public boolean hasRootPassword()
Returns:
true if a root password has been specified.

transferGB

public GleSYSTemplateOptions transferGB(int transferGB)
Sets the monthly data transfer limit (in GB) for the server.

See Also:
ServerSpec#getTransferGB()

getTransferGB

public int getTransferGB()
Returns:
the monthly data transfer limit (in GB) for the server.

blockOnPort

public GleSYSTemplateOptions blockOnPort(int port,
                                         int seconds)
Overrides:
blockOnPort in class org.jclouds.compute.options.TemplateOptions
See Also:
TemplateOptions.blockOnPort(int, int)

inboundPorts

public GleSYSTemplateOptions inboundPorts(int... ports)
Overrides:
inboundPorts in class org.jclouds.compute.options.TemplateOptions
See Also:
TemplateOptions.inboundPorts(int...)

authorizePublicKey

public GleSYSTemplateOptions authorizePublicKey(String publicKey)
Overrides:
authorizePublicKey in class org.jclouds.compute.options.TemplateOptions
See Also:
TemplateOptions.authorizePublicKey(String)

installPrivateKey

public GleSYSTemplateOptions installPrivateKey(String privateKey)
Overrides:
installPrivateKey in class org.jclouds.compute.options.TemplateOptions
See Also:
TemplateOptions.installPrivateKey(String)

userMetadata

public GleSYSTemplateOptions userMetadata(Map<String,String> userMetadata)

Overrides:
userMetadata in class org.jclouds.compute.options.TemplateOptions

userMetadata

public GleSYSTemplateOptions userMetadata(String key,
                                          String value)

Overrides:
userMetadata in class org.jclouds.compute.options.TemplateOptions

nodeNames

public GleSYSTemplateOptions nodeNames(Iterable<String> nodeNames)

Overrides:
nodeNames in class org.jclouds.compute.options.TemplateOptions

networks

public GleSYSTemplateOptions networks(Iterable<String> networks)

Overrides:
networks in class org.jclouds.compute.options.TemplateOptions

string

public com.google.common.base.Objects.ToStringHelper string()
Overrides:
string in class org.jclouds.compute.options.TemplateOptions


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.