From 0487b209f107bce253a9864b71bec3ec5af71634 Mon Sep 17 00:00:00 2001 From: Vincent Behar Date: Thu, 7 Jul 2011 17:10:59 +0200 Subject: [PATCH] add example of exporting jobs to file --- src/site/confluence/groovy.confluence | 9 +++++++++ src/site/confluence/jruby.confluence | 9 +++++++++ src/site/confluence/jython.confluence | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/src/site/confluence/groovy.confluence b/src/site/confluence/groovy.confluence index 9eb4d8b..61ff200 100644 --- a/src/site/confluence/groovy.confluence +++ b/src/site/confluence/groovy.confluence @@ -77,6 +77,15 @@ execution = rundeck.triggerAdhocCommand("my-project", "uptime") execution = rundeck.runAdhocCommand("my-project", "uptime", new Properties(os-family: "unix")) {code} +h2. Exporting jobs + +{code} +import org.rundeck.api.RundeckClient +rundeck = new RundeckClient("http://localhost:4440", "admin", "admin") + +rundeck.exportJobsToFile("/tmp/jobs.xml", "my-project") +{code} + h2. And more... See the API documentation of the [RundeckClient|./apidocs/org/rundeck/api/RundeckClient.html] class for more interactions with your RunDeck instance... diff --git a/src/site/confluence/jruby.confluence b/src/site/confluence/jruby.confluence index 6350f21..6c9cd2d 100644 --- a/src/site/confluence/jruby.confluence +++ b/src/site/confluence/jruby.confluence @@ -78,6 +78,15 @@ execution = rundeck.triggerAdhocCommand("my-project", "uptime") execution = rundeck.runAdhocCommand("my-project", "uptime", NodeFiltersBuilder.new().osFamily("unix").toProperties()) {code} +h2. Exporting jobs + +{code} +import org.rundeck.api.RundeckClient +rundeck = RundeckClient.new("http://localhost:4440", "admin", "admin") + +rundeck.exportJobsToFile("/tmp/jobs.xml", "my-project") +{code} + h2. And more... See the API documentation of the [RundeckClient|./apidocs/org/rundeck/api/RundeckClient.html] class for more interactions with your RunDeck instance... diff --git a/src/site/confluence/jython.confluence b/src/site/confluence/jython.confluence index e358100..60f2177 100644 --- a/src/site/confluence/jython.confluence +++ b/src/site/confluence/jython.confluence @@ -63,6 +63,15 @@ execution = rundeck.triggerAdhocCommand("my-project", "uptime") execution = rundeck.runAdhocCommand("my-project", "uptime", NodeFiltersBuilder().osFamily("unix").toProperties()) {code} +h2. Exporting jobs + +{code} +from org.rundeck.api import RundeckClient +rundeck = RundeckClient("http://localhost:4440", "admin", "admin") + +rundeck.exportJobsToFile("/tmp/jobs.xml", "my-project") +{code} + h2. And more... See the API documentation of the [RundeckClient|./apidocs/org/rundeck/api/RundeckClient.html] class for more interactions with your RunDeck instance...