Class GleSYSTemplateOptions
- java.lang.Object
-
- org.jclouds.compute.options.RunScriptOptions
-
- org.jclouds.compute.options.TemplateOptions
-
- org.jclouds.glesys.compute.options.GleSYSTemplateOptions
-
- All Implemented Interfaces:
Cloneable
public class GleSYSTemplateOptions extends TemplateOptions implements Cloneable
Contains options supported by theComputeService#createNodesInGroup(String, int, TemplateOptions)
andComputeService#createNodesInGroup(String, int, TemplateOptions)
operations on the glesys provider.Usage
The recommended way to instantiate aGleSYSTemplateOptions
object is to statically importGleSYSTemplateOptions.*
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
Nested Classes Modifier and Type Class Description static class
GleSYSTemplateOptions.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 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
Constructors Constructor Description GleSYSTemplateOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GleSYSTemplateOptions
authorizePublicKey(String publicKey)
authorize an rsa ssh key.GleSYSTemplateOptions
blockOnPort(int port, int seconds)
When the node is started, wait until the following port is activeGleSYSTemplateOptions
clone()
void
copyTo(TemplateOptions to)
String
getIp()
String
getRootPassword()
int
getTransferGB()
boolean
hasRootPassword()
GleSYSTemplateOptions
inboundPorts(int... ports)
Opens the set of ports to public access.GleSYSTemplateOptions
installPrivateKey(String privateKey)
replaces the rsa ssh key used at login.GleSYSTemplateOptions
ip(String ip)
Sets the IP address to assign to the new server instance.GleSYSTemplateOptions
networks(Iterable<String> networks)
Assigns the created nodes to these networksGleSYSTemplateOptions
nodeNames(Iterable<String> nodeNames)
specifies names to be used for the created nodes.GleSYSTemplateOptions
rootPassword(String rootPassword)
Sets the password for the root user on the created server instance.com.google.common.base.MoreObjects.ToStringHelper
string()
GleSYSTemplateOptions
transferGB(int transferGB)
Sets the monthly data transfer limit (in GB) for the server.GleSYSTemplateOptions
userMetadata(String key, String value)
GleSYSTemplateOptions
userMetadata(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, 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
-
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.
-
-
Method Detail
-
clone
public GleSYSTemplateOptions clone()
- Overrides:
clone
in classTemplateOptions
-
copyTo
public void copyTo(TemplateOptions to)
- Overrides:
copyTo
in classTemplateOptions
-
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)
Description copied from class:RunScriptOptions
When the node is started, wait until the following port is active- Overrides:
blockOnPort
in classTemplateOptions
- See Also:
TemplateOptions.blockOnPort(int, int)
-
inboundPorts
public GleSYSTemplateOptions inboundPorts(int... ports)
Description copied from class:TemplateOptions
Opens the set of ports to public access.- Overrides:
inboundPorts
in classTemplateOptions
- See Also:
TemplateOptions.inboundPorts(int...)
-
authorizePublicKey
public GleSYSTemplateOptions authorizePublicKey(String publicKey)
Description copied from class:TemplateOptions
authorize an rsa ssh key.- Overrides:
authorizePublicKey
in classTemplateOptions
- See Also:
TemplateOptions.authorizePublicKey(String)
-
installPrivateKey
public GleSYSTemplateOptions installPrivateKey(String privateKey)
Description copied from class:TemplateOptions
replaces the rsa ssh key used at login.- Overrides:
installPrivateKey
in classTemplateOptions
- See Also:
TemplateOptions.installPrivateKey(String)
-
userMetadata
public GleSYSTemplateOptions userMetadata(Map<String,String> userMetadata)
- Overrides:
userMetadata
in classTemplateOptions
- Parameters:
userMetadata
- user-defined metadata to assign to this server
-
userMetadata
public GleSYSTemplateOptions userMetadata(String key, String value)
- Overrides:
userMetadata
in classTemplateOptions
- Parameters:
key
- key to place into the metadata mapvalue
- value to associate with that key
-
nodeNames
public GleSYSTemplateOptions 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:
nodeNames
in classTemplateOptions
-
networks
public GleSYSTemplateOptions networks(Iterable<String> networks)
Assigns the created nodes to these networks- Overrides:
networks
in classTemplateOptions
-
string
public com.google.common.base.MoreObjects.ToStringHelper string()
- Overrides:
string
in classTemplateOptions
-
-