org.jenkinsci.plugins.rundeck.domain
Class RundeckInstance
java.lang.Object
org.jenkinsci.plugins.rundeck.domain.RundeckInstance
- All Implemented Interfaces:
- Serializable
public class RundeckInstance
- extends Object
- implements Serializable
Represents a RunDeck instance, and allows to communicate with it. Uses RunDeck 1.2 "WebApi" (version 1).
- Author:
- Vincent Behar
- See Also:
- Serialized Form
RundeckInstance
public RundeckInstance(String url,
String login,
String password)
- Build a new RunDeck instance
- Parameters:
url - of the RunDeck server (http://localhost:4440)login - to usepassword - associated with the login
isConfigurationValid
public boolean isConfigurationValid()
- Returns:
- true if the configuration is valid, false otherwise
isAlive
public boolean isAlive()
- Returns:
- true if this RunDeck instance is alive, false otherwise
isLoginValid
public boolean isLoginValid()
- Returns:
- true if the credentials (login/password) are valid, false otherwise
runJob
public RundeckExecution runJob(Long jobId,
Properties options)
throws RundeckApiException,
RundeckApiException.RundeckApiLoginException,
RundeckApiException.RundeckApiJobRunException
- Run a job, identified by the given id.
- Parameters:
jobId - - mandatoryoptions - for the job, optional
- Returns:
- a
RundeckExecution instance (won't be null), with details on the execution
- Throws:
RundeckApiException.RundeckApiLoginException - if the login failed
RundeckApiException.RundeckApiJobRunException - if the run failed
RundeckApiException - in case of error calling the API
getUrl
public String getUrl()
getLogin
public String getLogin()
getPassword
public String getPassword()
toString
public String toString()
- Overrides:
toString in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
Copyright © 2004-2011. All Rights Reserved.