|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rundeck.api.RundeckClient
public class RundeckClient
Main entry point to talk to a RunDeck instance.
Usage :
RundeckClient rundeck = new RundeckClient("http://localhost:4440", "admin", "admin");
List<RundeckJob> jobs = rundeck.getJobs();
RundeckJob job = rundeck.findJob("my-project", "main-group/sub-group", "job-name");
RundeckExecution execution = rundeck.triggerJob(job.getId(),
new OptionsBuilder().addOption("version", "1.2.0").toProperties());
List<RundeckExecution> runningExecutions = rundeck.getRunningExecutions("my-project");
Field Summary | |
---|---|
static String |
API_ENDPOINT
|
static int |
API_VERSION
|
Constructor Summary | |
---|---|
RundeckClient(String url,
String login,
String password)
Instantiate a new RundeckClient for the RunDeck instance at the given url |
Method Summary | |
---|---|
RundeckAbort |
abortExecution(Long executionId)
Abort an execution (identified by the given ID). |
String |
deleteJob(String jobId)
Delete a single job, identified by the given ID |
boolean |
equals(Object obj)
|
InputStream |
exportJob(String jobId)
Export the definition of a single job, identified by the given ID |
InputStream |
exportJobs(String project)
Export the definitions of all jobs that belongs to the given project |
InputStream |
exportJobs(String project,
String jobFilter,
String groupPath,
String... jobIds)
Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, groupPath and jobIds) |
void |
exportJobsToFile(String filename,
String project)
Export the definitions of all jobs that belongs to the given project, as an XML file |
void |
exportJobsToFile(String filename,
String project,
String jobFilter,
String groupPath,
String... jobIds)
Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, groupPath and jobIds), as an XML file |
void |
exportJobToFile(String filename,
String jobId)
Export the definition of a single job (identified by the given ID), as an XML file |
RundeckJob |
findJob(String project,
String groupPath,
String name)
Find a job, identified by its project, group and name. |
RundeckExecution |
getExecution(Long executionId)
Get a single execution, identified by the given ID |
RundeckJob |
getJob(String jobId)
Get the definition of a single job, identified by the given ID |
List<RundeckExecution> |
getJobExecutions(String jobId)
Get the executions of the given job |
List<RundeckExecution> |
getJobExecutions(String jobId,
RundeckExecution.ExecutionStatus status)
Get the executions of the given job |
List<RundeckExecution> |
getJobExecutions(String jobId,
RundeckExecution.ExecutionStatus status,
Long max,
Long offset)
Get the executions of the given job |
List<RundeckJob> |
getJobs()
List all jobs (for all projects) |
List<RundeckJob> |
getJobs(String project)
List all jobs that belongs to the given project |
List<RundeckJob> |
getJobs(String project,
String jobFilter,
String groupPath,
String... jobIds)
List the jobs that belongs to the given project, and matches the given criteria (jobFilter, groupPath and jobIds) |
String |
getLogin()
|
RundeckNode |
getNode(String name,
String project)
Get the definition of a single node |
List<RundeckNode> |
getNodes()
List all nodes (for all projects) |
List<RundeckNode> |
getNodes(String project)
List all nodes that belongs to the given project |
List<RundeckNode> |
getNodes(String project,
Properties nodeFilters)
List nodes that belongs to the given project |
String |
getPassword()
|
RundeckProject |
getProject(String projectName)
Get the definition of a single project, identified by the given name |
List<RundeckProject> |
getProjects()
List all projects |
List<RundeckExecution> |
getRunningExecutions()
Get all running executions (for all projects) |
List<RundeckExecution> |
getRunningExecutions(String project)
Get the running executions for the given project |
RundeckSystemInfo |
getSystemInfo()
Get system informations about the RunDeck server |
String |
getUrl()
|
int |
hashCode()
|
void |
ping()
Try to "ping" the RunDeck instance to see if it is alive |
RundeckExecution |
runAdhocCommand(String project,
String command)
Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. |
RundeckExecution |
runAdhocCommand(String project,
String command,
long poolingInterval,
TimeUnit poolingUnit)
Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. |
RundeckExecution |
runAdhocCommand(String project,
String command,
Properties nodeFilters)
Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. |
RundeckExecution |
runAdhocCommand(String project,
String command,
Properties nodeFilters,
Integer nodeThreadcount,
Boolean nodeKeepgoing)
Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. |
RundeckExecution |
runAdhocCommand(String project,
String command,
Properties nodeFilters,
Integer nodeThreadcount,
Boolean nodeKeepgoing,
long poolingInterval,
TimeUnit poolingUnit)
Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. |
RundeckExecution |
runAdhocCommand(String project,
String command,
Properties nodeFilters,
long poolingInterval,
TimeUnit poolingUnit)
Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. |
RundeckExecution |
runJob(String jobId)
Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. |
RundeckExecution |
runJob(String jobId,
Properties options)
Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. |
RundeckExecution |
runJob(String jobId,
Properties options,
long poolingInterval,
TimeUnit poolingUnit)
Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. |
RundeckExecution |
runJob(String jobId,
Properties options,
Properties nodeFilters)
Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. |
RundeckExecution |
runJob(String jobId,
Properties options,
Properties nodeFilters,
long poolingInterval,
TimeUnit poolingUnit)
Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. |
void |
testCredentials()
Test your credentials (login/password) on the RunDeck instance |
String |
toString()
|
RundeckExecution |
triggerAdhocCommand(String project,
String command)
Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). |
RundeckExecution |
triggerAdhocCommand(String project,
String command,
Properties nodeFilters)
Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). |
RundeckExecution |
triggerAdhocCommand(String project,
String command,
Properties nodeFilters,
Integer nodeThreadcount,
Boolean nodeKeepgoing)
Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). |
RundeckExecution |
triggerJob(String jobId)
Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the end of the job execution) |
RundeckExecution |
triggerJob(String jobId,
Properties options)
Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the end of the job execution) |
RundeckExecution |
triggerJob(String jobId,
Properties options,
Properties nodeFilters)
Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the end of the job execution) |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final transient int API_VERSION
public static final transient String API_ENDPOINT
Constructor Detail |
---|
public RundeckClient(String url, String login, String password) throws IllegalArgumentException
RundeckClient
for the RunDeck instance at the given url
url
- of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc)login
- password
-
IllegalArgumentException
- if the url, login or password is blank (null, empty or whitespace)Method Detail |
---|
public void ping() throws RundeckApiException
RundeckApiException
- if the ping failspublic void testCredentials() throws RundeckApiException.RundeckApiLoginException
RundeckApiException.RundeckApiLoginException
- if the login failspublic List<RundeckProject> getProjects() throws RundeckApiException, RundeckApiException.RundeckApiLoginException
List
of RundeckProject
: might be empty, but won't be null
RundeckApiException
- in case of error when calling the API
RundeckApiException.RundeckApiLoginException
- if the login failedpublic RundeckProject getProject(String projectName) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
projectName
- name of the project - mandatory
RundeckProject
instance - won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the projectName is blank (null, empty or whitespace)public List<RundeckJob> getJobs() throws RundeckApiException, RundeckApiException.RundeckApiLoginException
List
of RundeckJob
: might be empty, but won't be null
RundeckApiException
- in case of error when calling the API
RundeckApiException.RundeckApiLoginException
- if the login failedpublic List<RundeckJob> getJobs(String project) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatory
List
of RundeckJob
: might be empty, but won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project is blank (null, empty or whitespace)getJobs(String, String, String, String...)
public List<RundeckJob> getJobs(String project, String jobFilter, String groupPath, String... jobIds) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatoryjobFilter
- a filter for the job Name - optionalgroupPath
- a group or partial group path to include all jobs within that group path - optionaljobIds
- a list of Job IDs to include - optional
List
of RundeckJob
: might be empty, but won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project is blank (null, empty or whitespace)getJobs(String)
public void exportJobsToFile(String filename, String project) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException, IOException
filename
- path of the file where the content should be savedproject
- name of the project - mandatory
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project is blank (null, empty or whitespace)
IOException
- if we failed to write to the fileexportJobsToFile(String, String, String, String, String...)
,
exportJobs(String)
public void exportJobsToFile(String filename, String project, String jobFilter, String groupPath, String... jobIds) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException, IOException
filename
- path of the file where the content should be savedproject
- name of the project - mandatoryjobFilter
- a filter for the job Name - optionalgroupPath
- a group or partial group path to include all jobs within that group path - optionaljobIds
- a list of Job IDs to include - optional
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project is blank (null, empty or whitespace)
IOException
- if we failed to write to the fileexportJobsToFile(String, String)
,
exportJobs(String, String, String, String...)
public InputStream exportJobs(String project) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatory
InputStream
instance, not linked to any network resources - won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project is blank (null, empty or whitespace)exportJobs(String, String, String, String...)
,
exportJobsToFile(String, String)
public InputStream exportJobs(String project, String jobFilter, String groupPath, String... jobIds) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatoryjobFilter
- a filter for the job Name - optionalgroupPath
- a group or partial group path to include all jobs within that group path - optionaljobIds
- a list of Job IDs to include - optional
InputStream
instance, not linked to any network resources - won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project is blank (null, empty or whitespace)exportJobs(String)
,
exportJobsToFile(String, String, String, String, String...)
public void exportJobToFile(String filename, String jobId) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException, IOException
filename
- path of the file where the content should be savedjobId
- identifier of the job - mandatory
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)
IOException
- if we failed to write to the fileexportJob(String)
,
getJob(String)
public InputStream exportJob(String jobId) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatory
InputStream
instance, not linked to any network resources - won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)exportJobToFile(String, String)
,
getJob(String)
public RundeckJob findJob(String project, String groupPath, String name) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatorygroupPath
- group to which the job belongs (if it belongs to a group) - optionalname
- of the job to find - mandatory
RundeckJob
instance - null if not found
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project or the name is blank (null, empty or whitespace)getJob(String)
public RundeckJob getJob(String jobId) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatory
RundeckJob
instance - won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)findJob(String, String, String)
,
exportJob(String)
public String deleteJob(String jobId) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatory
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)public RundeckExecution triggerJob(String jobId) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatory
RundeckExecution
instance for the newly created (and running) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)triggerJob(String, Properties, Properties)
,
runJob(String)
public RundeckExecution triggerJob(String jobId, Properties options) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatoryoptions
- of the job - optional. See OptionsBuilder
.
RundeckExecution
instance for the newly created (and running) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)triggerJob(String, Properties, Properties)
,
runJob(String, Properties)
public RundeckExecution triggerJob(String jobId, Properties options, Properties nodeFilters) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatoryoptions
- of the job - optional. See OptionsBuilder
.nodeFilters
- for overriding the nodes on which the job will be executed - optional. See
NodeFiltersBuilder
RundeckExecution
instance for the newly created (and running) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)triggerJob(String)
,
runJob(String, Properties, Properties)
public RundeckExecution runJob(String jobId) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatory
RundeckExecution
instance for the (finished/aborted) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)triggerJob(String)
,
runJob(String, Properties, Properties, long, TimeUnit)
public RundeckExecution runJob(String jobId, Properties options) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatoryoptions
- of the job - optional. See OptionsBuilder
.
RundeckExecution
instance for the (finished/aborted) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)triggerJob(String, Properties)
,
runJob(String, Properties, Properties, long, TimeUnit)
public RundeckExecution runJob(String jobId, Properties options, Properties nodeFilters) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatoryoptions
- of the job - optional. See OptionsBuilder
.nodeFilters
- for overriding the nodes on which the job will be executed - optional. See
NodeFiltersBuilder
RundeckExecution
instance for the (finished/aborted) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)triggerJob(String, Properties, Properties)
,
runJob(String, Properties, Properties, long, TimeUnit)
public RundeckExecution runJob(String jobId, Properties options, long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatoryoptions
- of the job - optional. See OptionsBuilder
.poolingInterval
- for checking the status of the execution. Must be > 0.poolingUnit
- unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
RundeckExecution
instance for the (finished/aborted) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)triggerJob(String, Properties)
,
runJob(String, Properties, Properties, long, TimeUnit)
public RundeckExecution runJob(String jobId, Properties options, Properties nodeFilters, long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatoryoptions
- of the job - optional. See OptionsBuilder
.nodeFilters
- for overriding the nodes on which the job will be executed - optional. See
NodeFiltersBuilder
poolingInterval
- for checking the status of the execution. Must be > 0.poolingUnit
- unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
RundeckExecution
instance for the (finished/aborted) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)triggerJob(String, Properties)
,
runJob(String, Properties, Properties, long, TimeUnit)
public RundeckExecution triggerAdhocCommand(String project, String command) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatorycommand
- to be executed - mandatory
RundeckExecution
instance for the newly created (and running) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)triggerAdhocCommand(String, String, Properties, Integer, Boolean)
,
runAdhocCommand(String, String)
public RundeckExecution triggerAdhocCommand(String project, String command, Properties nodeFilters) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatorycommand
- to be executed - mandatorynodeFilters
- for selecting nodes on which the command will be executed. See NodeFiltersBuilder
RundeckExecution
instance for the newly created (and running) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)triggerAdhocCommand(String, String, Properties, Integer, Boolean)
,
runAdhocCommand(String, String, Properties)
public RundeckExecution triggerAdhocCommand(String project, String command, Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatorycommand
- to be executed - mandatorynodeFilters
- for selecting nodes on which the command will be executed. See NodeFiltersBuilder
nodeThreadcount
- thread count to use (for parallelizing when running on multiple nodes) - optionalnodeKeepgoing
- if true, continue executing on other nodes even if some fail - optional
RundeckExecution
instance for the newly created (and running) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)triggerAdhocCommand(String, String)
,
runAdhocCommand(String, String, Properties)
public RundeckExecution runAdhocCommand(String project, String command) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatorycommand
- to be executed - mandatory
RundeckExecution
instance for the (finished/aborted) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
,
triggerAdhocCommand(String, String)
public RundeckExecution runAdhocCommand(String project, String command, long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatorycommand
- to be executed - mandatorypoolingInterval
- for checking the status of the execution. Must be > 0.poolingUnit
- unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
RundeckExecution
instance for the (finished/aborted) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
,
triggerAdhocCommand(String, String)
public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatorycommand
- to be executed - mandatorynodeFilters
- for selecting nodes on which the command will be executed. See NodeFiltersBuilder
RundeckExecution
instance for the (finished/aborted) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
,
triggerAdhocCommand(String, String, Properties)
public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters, long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatorycommand
- to be executed - mandatorynodeFilters
- for selecting nodes on which the command will be executed. See NodeFiltersBuilder
poolingInterval
- for checking the status of the execution. Must be > 0.poolingUnit
- unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
RundeckExecution
instance for the (finished/aborted) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
,
triggerAdhocCommand(String, String, Properties)
public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatorycommand
- to be executed - mandatorynodeFilters
- for selecting nodes on which the command will be executed. See NodeFiltersBuilder
nodeThreadcount
- thread count to use (for parallelizing when running on multiple nodes) - optionalnodeKeepgoing
- if true, continue executing on other nodes even if some fail - optional
RundeckExecution
instance for the (finished/aborted) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
,
triggerAdhocCommand(String, String, Properties, Integer, Boolean)
public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing, long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatorycommand
- to be executed - mandatorynodeFilters
- for selecting nodes on which the command will be executed. See NodeFiltersBuilder
nodeThreadcount
- thread count to use (for parallelizing when running on multiple nodes) - optionalnodeKeepgoing
- if true, continue executing on other nodes even if some fail - optionalpoolingInterval
- for checking the status of the execution. Must be > 0.poolingUnit
- unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
RundeckExecution
instance for the (finished/aborted) execution - won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)triggerAdhocCommand(String, String, Properties, Integer, Boolean)
public List<RundeckExecution> getRunningExecutions() throws RundeckApiException, RundeckApiException.RundeckApiLoginException
List
of RundeckExecution
: might be empty, but won't be null
RundeckApiException
- in case of error when calling the API
RundeckApiException.RundeckApiLoginException
- if the login failedpublic List<RundeckExecution> getRunningExecutions(String project) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatory
List
of RundeckExecution
: might be empty, but won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project is blank (null, empty or whitespace)public List<RundeckExecution> getJobExecutions(String jobId) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatory
List
of RundeckExecution
: might be empty, but won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)public List<RundeckExecution> getJobExecutions(String jobId, RundeckExecution.ExecutionStatus status) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatorystatus
- of the executions - optional (null for all)
List
of RundeckExecution
: might be empty, but won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)public List<RundeckExecution> getJobExecutions(String jobId, RundeckExecution.ExecutionStatus status, Long max, Long offset) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
jobId
- identifier of the job - mandatorystatus
- of the executions - optional (null for all)max
- number of results to return - optional (null for all)offset
- the 0-indexed offset for the first result to return - optional
List
of RundeckExecution
: might be empty, but won't be null
RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)public RundeckExecution getExecution(Long executionId) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
executionId
- identifier of the execution - mandatory
RundeckExecution
instance - won't be null
RundeckApiException
- in case of error when calling the API (non-existent execution with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the executionId is nullpublic RundeckAbort abortExecution(Long executionId) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
executionId
- identifier of the execution - mandatory
RundeckAbort
instance - won't be null
RundeckApiException
- in case of error when calling the API (non-existent execution with this ID)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the executionId is nullpublic List<RundeckNode> getNodes() throws RundeckApiException, RundeckApiException.RundeckApiLoginException
List
of RundeckNode
: might be empty, but won't be null
RundeckApiException
- in case of error when calling the API
RundeckApiException.RundeckApiLoginException
- if the login failedpublic List<RundeckNode> getNodes(String project) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatory
List
of RundeckNode
: might be empty, but won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project is blank (null, empty or whitespace)getNodes(String, Properties)
public List<RundeckNode> getNodes(String project, Properties nodeFilters) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
project
- name of the project - mandatorynodeFilters
- for filtering the nodes - optional. See NodeFiltersBuilder
List
of RundeckNode
: might be empty, but won't be null
RundeckApiException
- in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project is blank (null, empty or whitespace)public RundeckNode getNode(String name, String project) throws RundeckApiException, RundeckApiException.RundeckApiLoginException, IllegalArgumentException
name
- of the node - mandatoryproject
- name of the project - mandatory
RundeckNode
instance - won't be null
RundeckApiException
- in case of error when calling the API (non-existent name or project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the name or project is blank (null, empty or whitespace)public RundeckSystemInfo getSystemInfo() throws RundeckApiException, RundeckApiException.RundeckApiLoginException
RundeckSystemInfo
instance - won't be null
RundeckApiException
- in case of error when calling the API
RundeckApiException
- if the login failed
RundeckApiException.RundeckApiLoginException
public String getUrl()
public String getLogin()
public String getPassword()
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |