org.jclouds.compute.options
Class RunScriptOptions.ImmutableRunScriptOptions

java.lang.Object
  extended by org.jclouds.compute.options.RunScriptOptions
      extended by org.jclouds.compute.options.RunScriptOptions.ImmutableRunScriptOptions
Enclosing class:
RunScriptOptions

public static class RunScriptOptions.ImmutableRunScriptOptions
extends RunScriptOptions


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jclouds.compute.options.RunScriptOptions
RunScriptOptions.Builder, RunScriptOptions.ImmutableRunScriptOptions
 
Field Summary
 
Fields inherited from class org.jclouds.compute.options.RunScriptOptions
authenticateSudo, blockOnComplete, loginPassword, loginPrivateKey, loginUser, NONE, port, runAsRoot, seconds, taskName, wrapInInitScript
 
Constructor Summary
RunScriptOptions.ImmutableRunScriptOptions(RunScriptOptions delegate)
           
 
Method Summary
 RunScriptOptions blockOnComplete(boolean blockOnComplete)
          As of version 1.1.0, we cannot kick off a script unless a node is in RUNNING state.
 RunScriptOptions blockOnPort(int port, int seconds)
          When the node is started, wait until the following port is active
 String getLoginPassword()
           
 String getLoginPrivateKey()
           
 String getLoginUser()
           
 int getPort()
           
 int getSeconds()
           
 String getTaskName()
           
 RunScriptOptions nameTask(String name)
           
 RunScriptOptions overrideAuthenticateSudo(boolean authenticateSudo)
           
 RunScriptOptions overrideCredentialsWith(Credentials overridingCredentials)
          Deprecated. 
 RunScriptOptions overrideLoginCredentials(LoginCredentials overridingCredentials)
           
 RunScriptOptions overrideLoginCredentialWith(String loginCredential)
          to be removed in jclouds 1.4.0
 RunScriptOptions overrideLoginPassword(String password)
           
 RunScriptOptions overrideLoginPrivateKey(String privateKey)
           
 RunScriptOptions overrideLoginUser(String loginUser)
           
 RunScriptOptions overrideLoginUserWith(String loginUser)
          Deprecated. 
 RunScriptOptions runAsRoot(boolean runAsRoot)
           
 Boolean shouldAuthenticateSudo()
           
 boolean shouldBlockOnComplete()
           
 boolean shouldRunAsRoot()
          Whether to run the script as root (or run with current privileges).
 boolean shouldWrapInInitScript()
          Whether to wait until the script has completed.
 String toString()
           
 RunScriptOptions wrapInInitScript(boolean wrapInInitScript)
          default true

 
Methods inherited from class org.jclouds.compute.options.RunScriptOptions
equals, getOverridingCredentials, hashCode, hasLoginPassword, hasLoginPasswordOption, hasLoginPrivateKey, hasLoginPrivateKeyOption
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RunScriptOptions.ImmutableRunScriptOptions

public RunScriptOptions.ImmutableRunScriptOptions(RunScriptOptions delegate)
Method Detail

toString

public String toString()
Overrides:
toString in class RunScriptOptions

shouldRunAsRoot

public boolean shouldRunAsRoot()
Description copied from class: RunScriptOptions
Whether to run the script as root (or run with current privileges). By default, true.

Overrides:
shouldRunAsRoot in class RunScriptOptions
Returns:
value

runAsRoot

public RunScriptOptions runAsRoot(boolean runAsRoot)
Overrides:
runAsRoot in class RunScriptOptions

shouldBlockOnComplete

public boolean shouldBlockOnComplete()
Overrides:
shouldBlockOnComplete in class RunScriptOptions
See Also:
RunScriptOptions.blockOnComplete(boolean)

blockOnComplete

public RunScriptOptions blockOnComplete(boolean blockOnComplete)
Description copied from class: RunScriptOptions
As of version 1.1.0, we cannot kick off a script unless a node is in RUNNING state.

Overrides:
blockOnComplete in class RunScriptOptions
Parameters:
blockOnComplete - (default true) false means kick off the script in the background, but don't wait for it to finish. (as of version 1.1.0, implemented as nohup)

overrideLoginCredentials

public RunScriptOptions overrideLoginCredentials(LoginCredentials overridingCredentials)
Overrides:
overrideLoginCredentials in class RunScriptOptions

overrideLoginPassword

public RunScriptOptions overrideLoginPassword(String password)
Overrides:
overrideLoginPassword in class RunScriptOptions

overrideLoginPrivateKey

public RunScriptOptions overrideLoginPrivateKey(String privateKey)
Overrides:
overrideLoginPrivateKey in class RunScriptOptions

overrideAuthenticateSudo

public RunScriptOptions overrideAuthenticateSudo(boolean authenticateSudo)
Overrides:
overrideAuthenticateSudo in class RunScriptOptions

getLoginUser

public String getLoginUser()
Overrides:
getLoginUser in class RunScriptOptions
Returns:
the login user for ComputeService.runScriptOnNode(java.lang.String, org.jclouds.scriptbuilder.domain.Statement, org.jclouds.compute.options.RunScriptOptions). By default, null.

shouldAuthenticateSudo

public Boolean shouldAuthenticateSudo()
Overrides:
shouldAuthenticateSudo in class RunScriptOptions
Returns:
Whether the login user should authenticate sudo during ComputeService.runScriptOnNode(java.lang.String, org.jclouds.scriptbuilder.domain.Statement, org.jclouds.compute.options.RunScriptOptions). By default, null.

getLoginPassword

public String getLoginPassword()
Overrides:
getLoginPassword in class RunScriptOptions
Returns:
the login password for ComputeService.runScriptOnNode(java.lang.String, org.jclouds.scriptbuilder.domain.Statement, org.jclouds.compute.options.RunScriptOptions). By default, null.

getLoginPrivateKey

public String getLoginPrivateKey()
Overrides:
getLoginPrivateKey in class RunScriptOptions
Returns:
the login ssh key for ComputeService.runScriptOnNode(java.lang.String, org.jclouds.scriptbuilder.domain.Statement, org.jclouds.compute.options.RunScriptOptions). By default, null.

shouldWrapInInitScript

public boolean shouldWrapInInitScript()
Description copied from class: RunScriptOptions
Whether to wait until the script has completed. By default, true.

Overrides:
shouldWrapInInitScript in class RunScriptOptions
Returns:
value

overrideLoginUserWith

@Deprecated
public RunScriptOptions overrideLoginUserWith(String loginUser)
Deprecated. 

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

Overrides:
overrideLoginUserWith in class RunScriptOptions
See Also:
RunScriptOptions.overrideLoginCredentials(org.jclouds.domain.LoginCredentials)

overrideLoginUser

public RunScriptOptions overrideLoginUser(String loginUser)
Overrides:
overrideLoginUser in class RunScriptOptions

overrideLoginCredentialWith

public RunScriptOptions overrideLoginCredentialWith(String loginCredential)
Description copied from class: RunScriptOptions
to be removed in jclouds 1.4.0

Overrides:
overrideLoginCredentialWith in class RunScriptOptions
See Also:
RunScriptOptions.overrideLoginCredentials(org.jclouds.domain.LoginCredentials)

wrapInInitScript

public RunScriptOptions wrapInInitScript(boolean wrapInInitScript)
Description copied from class: RunScriptOptions
default true

Overrides:
wrapInInitScript in class RunScriptOptions
Parameters:
wrapInInitScript - if the command is long-running, use this option to ensure it is wrapInInitScripted properly. (ex. have jclouds wrap it an init script, nohup, etc)
Returns:

overrideCredentialsWith

@Deprecated
public RunScriptOptions overrideCredentialsWith(Credentials overridingCredentials)
Deprecated. 

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

Overrides:
overrideCredentialsWith in class RunScriptOptions
See Also:
RunScriptOptions.overrideLoginCredentials(org.jclouds.domain.LoginCredentials)

getTaskName

public String getTaskName()
Overrides:
getTaskName in class RunScriptOptions

nameTask

public RunScriptOptions nameTask(String name)
Overrides:
nameTask in class RunScriptOptions
Returns:
What to call the task relating to this script; default jclouds-script-timestamp where timestamp is millis since epoch

blockOnPort

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

getPort

public int getPort()
Overrides:
getPort in class RunScriptOptions

getSeconds

public int getSeconds()
Overrides:
getSeconds in class RunScriptOptions


Copyright © 2009-2012 jclouds. All Rights Reserved.