org.jclouds.gogrid.compute.options
Class GoGridTemplateOptions

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

public class GoGridTemplateOptions
extends TemplateOptions
implements Cloneable

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

Usage

The recommended way to instantiate a GoGridTemplateOptions object is to statically import GoGridTemplateOptions.* 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.runNodesWithTag(tag, 2, templateBuilder.build());
 
TODO add GoGrid specific options

Author:
Adrian Cole, Andrew Kennedy

Nested Class Summary
static class GoGridTemplateOptions.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
static GoGridTemplateOptions 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
blockOnComplete, overridingCredentials, port, runAsRoot, seconds, taskName, wrapInInitScript
 
Constructor Summary
GoGridTemplateOptions()
           
 
Method Summary
 GoGridTemplateOptions authorizePublicKey(Payload publicKey)
          Deprecated. 
 GoGridTemplateOptions authorizePublicKey(String publicKey)
          authorize an rsa ssh key.
 GoGridTemplateOptions blockOnPort(int port, int seconds)
          When the node is started, wait until the following port is active
 GoGridTemplateOptions clone()
           
 void copyTo(TemplateOptions to)
           
 GoGridTemplateOptions inboundPorts(int... ports)
          Opens the set of ports to public access.
 GoGridTemplateOptions installPrivateKey(Payload privateKey)
          Deprecated. 
 GoGridTemplateOptions installPrivateKey(String privateKey)
          replaces the rsa ssh key used at login.
 GoGridTemplateOptions runScript(byte[] script)
          Deprecated. 
 GoGridTemplateOptions runScript(Payload script)
           
 GoGridTemplateOptions userMetadata(Map<String,String> userMetadata)
          
 GoGridTemplateOptions 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, overrideCredentialsWith, overrideLoginCredentialWith, overrideLoginUserWith, runAsRoot, runScript, shouldBlockUntilRunning, tags, toString, wrapInInitScript
 
Methods inherited from class org.jclouds.compute.options.RunScriptOptions
getOverridingCredentials, getPort, getSeconds, getTaskName, shouldBlockOnComplete, shouldRunAsRoot, shouldWrapInInitScript
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final GoGridTemplateOptions NONE
Constructor Detail

GoGridTemplateOptions

public GoGridTemplateOptions()
Method Detail

clone

public GoGridTemplateOptions clone()
Overrides:
clone in class TemplateOptions

copyTo

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

blockOnPort

public GoGridTemplateOptions 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 GoGridTemplateOptions 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 GoGridTemplateOptions authorizePublicKey(String publicKey)
Description copied from class: TemplateOptions
authorize an rsa ssh key.

Overrides:
authorizePublicKey in class TemplateOptions
See Also:
TemplateOptions.authorizePublicKey(String)

authorizePublicKey

@Deprecated
public GoGridTemplateOptions authorizePublicKey(Payload publicKey)
Deprecated. 

Description copied from class: TemplateOptions
authorize an rsa ssh key.

please use alternative that uses String

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

installPrivateKey

public GoGridTemplateOptions 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)

installPrivateKey

@Deprecated
public GoGridTemplateOptions installPrivateKey(Payload privateKey)
Deprecated. 

Description copied from class: TemplateOptions
replaces the rsa ssh key used at login.

please use alternative that uses String

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

runScript

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

runScript

@Deprecated
public GoGridTemplateOptions runScript(byte[] script)
Deprecated. 

Description copied from class: TemplateOptions

please use alternative that uses the Statement object

Overrides:
runScript in class TemplateOptions
See Also:
TemplateOptions.runScript(byte[])

userMetadata

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

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

userMetadata

public GoGridTemplateOptions 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-2011 jclouds. All Rights Reserved.