org.jclouds.compute.options
Class RunScriptOptions.ImmutableRunScriptOptions
java.lang.Object
org.jclouds.compute.options.RunScriptOptions
org.jclouds.compute.options.RunScriptOptions.ImmutableRunScriptOptions
- Enclosing class:
- RunScriptOptions
public static class RunScriptOptions.ImmutableRunScriptOptions
- extends RunScriptOptions
Fields inherited from class org.jclouds.compute.options.RunScriptOptions |
authenticateSudo, blockOnComplete, loginPassword, loginPrivateKey, loginUser, NONE, port, runAsRoot, seconds, taskName, wrapInInitScript |
RunScriptOptions.ImmutableRunScriptOptions
public RunScriptOptions.ImmutableRunScriptOptions(RunScriptOptions delegate)
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.