org.jclouds.trmk.vcloud_0_8.compute.options
Class TerremarkVCloudTemplateOptions

java.lang.Object
  extended by org.jclouds.compute.options.RunScriptOptions
      extended by org.jclouds.compute.options.TemplateOptions
          extended by org.jclouds.trmk.vcloud_0_8.compute.options.TerremarkVCloudTemplateOptions
All Implemented Interfaces:
Cloneable

public class TerremarkVCloudTemplateOptions
extends TemplateOptions
implements Cloneable

Contains options supported in the ComputeService#runNode operation on the "trmk-vcloudexpress" provider.

Usage

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

import static org.jclouds.vcloud.terremark.compute.options.TerremarkVCloudTemplateOptions.Builder.*;

ComputeService client = // get connection templateBuilder.options(inboundPorts(22, 80, 8080, 443)); Set set = client.runNodesWithTag(tag, 2, templateBuilder.build());

Author:
Adrian Cole

Nested Class Summary
static class TerremarkVCloudTemplateOptions.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 TerremarkVCloudTemplateOptions 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
TerremarkVCloudTemplateOptions()
           
 
Method Summary
 TerremarkVCloudTemplateOptions authorizePublicKey(String publicKey)
          authorize an rsa ssh key.
 TerremarkVCloudTemplateOptions blockOnPort(int port, int seconds)
          When the node is started, wait until the following port is active
 TerremarkVCloudTemplateOptions clone()
           
 void copyTo(TemplateOptions to)
           
 boolean equals(Object obj)
           
 String getSshKeyFingerprint()
           
 int hashCode()
           
 TerremarkVCloudTemplateOptions inboundPorts(int... ports)
          special thing is that we do assume if you are passing groups that you have everything you need already defined.
 TerremarkVCloudTemplateOptions installPrivateKey(String privateKey)
          replaces the rsa ssh key used at login.
 TerremarkVCloudTemplateOptions noKeyPair()
          Do not use a keypair on instances
 TerremarkVCloudTemplateOptions runScript(Payload script)
          Deprecated. 
 boolean shouldAutomaticallyCreateKeyPair()
           
 TerremarkVCloudTemplateOptions sshKeyFingerprint(String keyPair)
          Specifies the keypair used to run instances with
 String toString()
           
 TerremarkVCloudTemplateOptions userMetadata(Map<String,String> userMetadata)
           
 TerremarkVCloudTemplateOptions userMetadata(String key, String value)
          
 
Methods inherited from class org.jclouds.compute.options.TemplateOptions
as, blockOnComplete, blockUntilRunning, dontAuthorizePublicKey, getInboundPorts, getPrivateKey, getPublicKey, getRunScript, getTags, getUserMetadata, nameTask, overrideAuthenticateSudo, overrideCredentialsWith, overrideLoginCredentials, overrideLoginCredentialWith, overrideLoginPassword, overrideLoginPrivateKey, overrideLoginUser, overrideLoginUserWith, runAsRoot, runScript, runScript, shouldBlockUntilRunning, tags, 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

NONE

public static final TerremarkVCloudTemplateOptions NONE
Constructor Detail

TerremarkVCloudTemplateOptions

public TerremarkVCloudTemplateOptions()
Method Detail

clone

public TerremarkVCloudTemplateOptions clone()
Overrides:
clone in class TemplateOptions

copyTo

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

sshKeyFingerprint

public TerremarkVCloudTemplateOptions sshKeyFingerprint(String keyPair)
Specifies the keypair used to run instances with


noKeyPair

public TerremarkVCloudTemplateOptions noKeyPair()
Do not use a keypair on instances


blockOnPort

public TerremarkVCloudTemplateOptions 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 TerremarkVCloudTemplateOptions inboundPorts(int... ports)
special thing is that we do assume if you are passing groups that you have everything you need already defined. for example, our option inboundPorts normally creates ingress rules accordingly but if we notice you've specified securityGroups, we do not mess with rules at all

Overrides:
inboundPorts in class TemplateOptions
See Also:
TemplateOptions.inboundPorts

authorizePublicKey

public TerremarkVCloudTemplateOptions 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 TerremarkVCloudTemplateOptions 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 TerremarkVCloudTemplateOptions 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 TerremarkVCloudTemplateOptions userMetadata(Map<String,String> userMetadata)
Overrides:
userMetadata in class TemplateOptions
Parameters:
userMetadata - user-defined metadata to assign to this server
See Also:
TemplateOptions.userMetadata

userMetadata

public TerremarkVCloudTemplateOptions 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

getSshKeyFingerprint

public String getSshKeyFingerprint()
Returns:
keyPair to use when running the instance or null, to generate a keypair.

shouldAutomaticallyCreateKeyPair

public boolean shouldAutomaticallyCreateKeyPair()
Returns:
true (default) if we are supposed to use a keypair

hashCode

public int hashCode()
Overrides:
hashCode in class TemplateOptions

equals

public boolean equals(Object obj)
Overrides:
equals in class TemplateOptions

toString

public String toString()
Overrides:
toString in class TemplateOptions


Copyright © 2009-2012 jclouds. All Rights Reserved.