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 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 client = // get connection
 templateBuilder.options(inboundPorts(22, 80, 8080, 443));
 Set<? extends NodeMetadata> set = client.createNodesInGroup(tag, 2, templateBuilder.build());
 

Author:
Adrian Cole

Nested Class Summary
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
protected  String ip
           
static GleSYSTemplateOptions NONE
           
 
Fields inherited from class org.jclouds.compute.options.TemplateOptions
blockUntilRunning, inboundPorts, privateKey, publicKey, script, 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)
          authorize an rsa ssh key.
 GleSYSTemplateOptions blockOnPort(int port, int seconds)
          When the node is started, wait until the following port is active
 GleSYSTemplateOptions clone()
           
 void copyTo(TemplateOptions to)
           
 String getIp()
           
 GleSYSTemplateOptions inboundPorts(int... ports)
          Opens the set of ports to public access.
 GleSYSTemplateOptions installPrivateKey(String privateKey)
          replaces the rsa ssh key used at login.
 TemplateOptions ip(String ip)
           
 GleSYSTemplateOptions runScript(Payload script)
          Deprecated. 
 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, getInboundPorts, getPrivateKey, getPublicKey, getRunScript, getTags, getUserMetadata, hashCode, nameTask, overrideAuthenticateSudo, overrideCredentialsWith, overrideLoginCredentials, overrideLoginCredentialWith, overrideLoginPassword, overrideLoginPrivateKey, overrideLoginUser, overrideLoginUserWith, runAsRoot, runScript, runScript, shouldBlockUntilRunning, tags, toString, wrapInInitScript
 
Methods inherited from class org.jclouds.compute.options.RunScriptOptions
getLoginPassword, getLoginPrivateKey, getLoginUser, getOverridingCredentials, getPort, getSeconds, getTaskName, hasLoginPassword, hasLoginPasswordOption, hasLoginPrivateKey, hasLoginPrivateKeyOption, shouldAuthenticateSudo, shouldBlockOnComplete, shouldRunAsRoot, shouldWrapInInitScript
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ip

protected String ip

NONE

public static final GleSYSTemplateOptions NONE
Constructor Detail

GleSYSTemplateOptions

public GleSYSTemplateOptions()
Method Detail

clone

public GleSYSTemplateOptions clone()
Overrides:
clone in class TemplateOptions

copyTo

public void copyTo(TemplateOptions to)
Overrides:
copyTo in class TemplateOptions

ip

public TemplateOptions ip(String ip)
See Also:
ServerClient.createServerWithHostnameAndRootPassword(org.jclouds.glesys.domain.ServerSpec, java.lang.String, java.lang.String, org.jclouds.glesys.options.CreateServerOptions...), InetAddresses.isInetAddress(java.lang.String)

getIp

public String getIp()

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 class TemplateOptions
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 class TemplateOptions
See Also:
TemplateOptions.inboundPorts(int...)

authorizePublicKey

public GleSYSTemplateOptions authorizePublicKey(String publicKey)
Description copied from class: TemplateOptions
authorize an rsa ssh key.

Overrides:
authorizePublicKey in class TemplateOptions
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 class TemplateOptions
See Also:
TemplateOptions.installPrivateKey(String)

runScript

@Deprecated
public GleSYSTemplateOptions runScript(Payload script)
Deprecated. 

Description copied from class: TemplateOptions
to be removed in jclouds 1.4.0

Overrides:
runScript in class TemplateOptions
See Also:
TemplateOptions.runScript(Payload)

userMetadata

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

Overrides:
userMetadata in class TemplateOptions
Parameters:
userMetadata - user-defined metadata to assign to this server

userMetadata

public GleSYSTemplateOptions userMetadata(String key,
                                          String value)

Overrides:
userMetadata in class TemplateOptions
Parameters:
key - key to place into the metadata map
value - value to associate with that key


Copyright © 2009-2012 jclouds. All Rights Reserved.