mirror of
https://github.com/Fishwaldo/rundeck-api-java-client.git
synced 2025-07-06 13:08:38 +00:00
Merge pull request #17 from rundeck/issue/apiv11-fix
Fix API v11 response issues
This commit is contained in:
commit
e548d640c0
14 changed files with 1122 additions and 8 deletions
|
@ -1085,7 +1085,16 @@ public class RundeckClient implements Serializable {
|
||||||
if(null!=jobRun.getAsUser()) {
|
if(null!=jobRun.getAsUser()) {
|
||||||
apiPath.param("asUser", jobRun.getAsUser());
|
apiPath.param("asUser", jobRun.getAsUser());
|
||||||
}
|
}
|
||||||
return new ApiCall(this).get(apiPath, new ExecutionParser(rootXpath()+"/executions/execution"));
|
return new ApiCall(this).get(apiPath,
|
||||||
|
APIV11Helper.unwrapIfNeeded(
|
||||||
|
new ExecutionParser(
|
||||||
|
rootXpath() +
|
||||||
|
"/executions/execution"
|
||||||
|
), rootXpath() +
|
||||||
|
"/executions/execution"
|
||||||
|
)
|
||||||
|
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1587,9 +1596,15 @@ public class RundeckClient implements Serializable {
|
||||||
.param(new ExecutionQueryParameters(query))
|
.param(new ExecutionQueryParameters(query))
|
||||||
.param("max", max)
|
.param("max", max)
|
||||||
.param("offset", offset),
|
.param("offset", offset),
|
||||||
|
APIV11Helper.unwrapIfNeeded(
|
||||||
new PagedResultParser<RundeckExecution>(
|
new PagedResultParser<RundeckExecution>(
|
||||||
new ListParser<RundeckExecution>(new ExecutionParser(), "execution"),
|
new ListParser<RundeckExecution>(
|
||||||
rootXpath()+"/executions"
|
new ExecutionParser(),
|
||||||
|
"execution"
|
||||||
|
),
|
||||||
|
rootXpath() + "/executions"
|
||||||
|
),
|
||||||
|
rootXpath() + "/executions"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1607,8 +1622,15 @@ public class RundeckClient implements Serializable {
|
||||||
public RundeckExecution getExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException,
|
public RundeckExecution getExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException,
|
||||||
RundeckApiTokenException, IllegalArgumentException {
|
RundeckApiTokenException, IllegalArgumentException {
|
||||||
AssertUtil.notNull(executionId, "executionId is mandatory to get the details of an execution !");
|
AssertUtil.notNull(executionId, "executionId is mandatory to get the details of an execution !");
|
||||||
return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString()),
|
return new ApiCall(this).get(
|
||||||
new ExecutionParser(rootXpath()+"/executions/execution"));
|
new ApiPathBuilder("/execution/", executionId.toString()),
|
||||||
|
APIV11Helper.unwrapIfNeeded(
|
||||||
|
new ExecutionParser(
|
||||||
|
rootXpath() + "/executions/execution"
|
||||||
|
),
|
||||||
|
rootXpath() + "/executions/execution"
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
78
src/main/java/org/rundeck/api/parser/APIV11Helper.java
Normal file
78
src/main/java/org/rundeck/api/parser/APIV11Helper.java
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
package org.rundeck.api.parser;
|
||||||
|
|
||||||
|
import org.dom4j.DocumentHelper;
|
||||||
|
import org.dom4j.Element;
|
||||||
|
import org.dom4j.Node;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility to handle API v11 responses with <result> wrapper element.
|
||||||
|
*
|
||||||
|
* @author Greg Schueler <greg@simplifyops.com>
|
||||||
|
* @since 2014-11-10
|
||||||
|
*/
|
||||||
|
public class APIV11Helper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Detect and remove extra <result> wrapper around xml response.
|
||||||
|
* @param parser
|
||||||
|
* @param xpath
|
||||||
|
* @param <T>
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static <T> XmlNodeParser<T> unwrapIfNeeded(
|
||||||
|
final XmlNodeParser<T> parser,
|
||||||
|
final String xpath
|
||||||
|
) {
|
||||||
|
return new NodeParser_unwrap<T>(parser, xpath);
|
||||||
|
}
|
||||||
|
|
||||||
|
static class NodeParser_unwrap<T> implements XmlNodeParser<T> {
|
||||||
|
XmlNodeParser<T> parser;
|
||||||
|
String xpath;
|
||||||
|
|
||||||
|
public NodeParser_unwrap(final XmlNodeParser<T> parser, final String xpath) {
|
||||||
|
this.parser = parser;
|
||||||
|
this.xpath = xpath;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public T parseXmlNode(final Node node) {
|
||||||
|
|
||||||
|
Node sourceNode = unwrapResultElement(node, xpath);
|
||||||
|
return parser.parseXmlNode(sourceNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the node for matching the xpath string, if it doesnt match, attempt to prefix it with
|
||||||
|
* "result" and match that. If that matches, return the first child of the 'result' element.
|
||||||
|
*
|
||||||
|
* @param node
|
||||||
|
* @param xpath
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Node unwrapResultElement(final Node node, final String xpath) {
|
||||||
|
Node sourceNode = node;
|
||||||
|
final Node tested = sourceNode.selectSingleNode(xpath);
|
||||||
|
if (null == tested && !xpath.startsWith("result")) {
|
||||||
|
//prepend /result
|
||||||
|
if (null != sourceNode.selectSingleNode("result" + xpath)) {
|
||||||
|
Node resultNode = sourceNode.selectSingleNode("result");
|
||||||
|
if (resultNode instanceof Element) {
|
||||||
|
Element result = (Element) resultNode;
|
||||||
|
if (result.elements().size() == 1) {
|
||||||
|
|
||||||
|
Node node1 = (Node) result.elements().get(0);
|
||||||
|
if (node1 instanceof Element) {
|
||||||
|
sourceNode = node1;
|
||||||
|
|
||||||
|
sourceNode.getParent().remove(sourceNode);
|
||||||
|
DocumentHelper.createDocument((Element) sourceNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sourceNode;
|
||||||
|
}
|
||||||
|
}
|
|
@ -26,6 +26,7 @@ package org.rundeck.api.parser;
|
||||||
|
|
||||||
import org.dom4j.Element;
|
import org.dom4j.Element;
|
||||||
import org.dom4j.Node;
|
import org.dom4j.Node;
|
||||||
|
import org.rundeck.api.RundeckApiException;
|
||||||
import org.rundeck.api.util.PagedResults;
|
import org.rundeck.api.util.PagedResults;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -38,7 +39,7 @@ import java.util.*;
|
||||||
*/
|
*/
|
||||||
public class PagedResultParser<T> implements XmlNodeParser<PagedResults<T>> {
|
public class PagedResultParser<T> implements XmlNodeParser<PagedResults<T>> {
|
||||||
ListParser<T> itemParser;
|
ListParser<T> itemParser;
|
||||||
String xpath;
|
private String xpath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a PagedResultParser
|
* Create a PagedResultParser
|
||||||
|
@ -54,7 +55,9 @@ public class PagedResultParser<T> implements XmlNodeParser<PagedResults<T>> {
|
||||||
@Override
|
@Override
|
||||||
public PagedResults<T> parseXmlNode(Node node) {
|
public PagedResults<T> parseXmlNode(Node node) {
|
||||||
Node pagedNodeContainer = node.selectSingleNode(xpath);
|
Node pagedNodeContainer = node.selectSingleNode(xpath);
|
||||||
|
if(null==pagedNodeContainer) {
|
||||||
|
throw new RundeckApiException("XML content did not match XPATH expression: " + xpath);
|
||||||
|
}
|
||||||
Element el = (Element) pagedNodeContainer;
|
Element el = (Element) pagedNodeContainer;
|
||||||
final int max = integerAttribute(el, "max", -1);
|
final int max = integerAttribute(el, "max", -1);
|
||||||
final int offset = integerAttribute(el, "offset", -1);
|
final int offset = integerAttribute(el, "offset", -1);
|
||||||
|
@ -113,4 +116,8 @@ public class PagedResultParser<T> implements XmlNodeParser<PagedResults<T>> {
|
||||||
}
|
}
|
||||||
return parseMax;
|
return parseMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getXpath() {
|
||||||
|
return xpath;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -275,7 +275,47 @@ public class RundeckClientTest {
|
||||||
}
|
}
|
||||||
Assert.assertEquals(Arrays.asList("bob"), names);
|
Assert.assertEquals(Arrays.asList("bob"), names);
|
||||||
}
|
}
|
||||||
|
@Test
|
||||||
|
@Betamax(tape="get_execution")
|
||||||
|
public void getExecution() throws Exception{
|
||||||
|
RundeckClient client = createClient(TEST_TOKEN_7, 5);
|
||||||
|
RundeckExecution execution = client.getExecution(945L);
|
||||||
|
Assert.assertEquals("echo test trigger_adhoc_command", execution.getDescription());
|
||||||
|
Assert.assertEquals("2 seconds", execution.getDuration());
|
||||||
|
Assert.assertEquals("test", execution.getProject());
|
||||||
|
Assert.assertEquals("admin", execution.getStartedBy());
|
||||||
|
Assert.assertEquals(null, execution.getJob());
|
||||||
|
Assert.assertEquals(null, execution.getAbortedBy());
|
||||||
|
}
|
||||||
|
@Test
|
||||||
|
@Betamax(tape="get_execution_v11")
|
||||||
|
public void getExecution_v11() throws Exception{
|
||||||
|
RundeckClient client = createClient(TEST_TOKEN_7, 11);
|
||||||
|
RundeckExecution execution = client.getExecution(945L);
|
||||||
|
Assert.assertEquals("echo test trigger_adhoc_command", execution.getDescription());
|
||||||
|
Assert.assertEquals("2 seconds", execution.getDuration());
|
||||||
|
Assert.assertEquals("test", execution.getProject());
|
||||||
|
Assert.assertEquals("admin", execution.getStartedBy());
|
||||||
|
Assert.assertEquals(null, execution.getJob());
|
||||||
|
Assert.assertEquals(null, execution.getAbortedBy());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test incorrect <result> wrapper is handled correctly
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
@Betamax(tape="get_execution_v11_buggy")
|
||||||
|
public void getExecution_v11_buggy() throws Exception{
|
||||||
|
RundeckClient client = createClient(TEST_TOKEN_7, 11);
|
||||||
|
RundeckExecution execution = client.getExecution(945L);
|
||||||
|
Assert.assertEquals("echo test trigger_adhoc_command", execution.getDescription());
|
||||||
|
Assert.assertEquals("2 seconds", execution.getDuration());
|
||||||
|
Assert.assertEquals("test", execution.getProject());
|
||||||
|
Assert.assertEquals("admin", execution.getStartedBy());
|
||||||
|
Assert.assertEquals(null, execution.getJob());
|
||||||
|
Assert.assertEquals(null, execution.getAbortedBy());
|
||||||
|
}
|
||||||
@Test
|
@Test
|
||||||
@Betamax(tape = "get_executions",
|
@Betamax(tape = "get_executions",
|
||||||
mode = TapeMode.READ_ONLY,
|
mode = TapeMode.READ_ONLY,
|
||||||
|
@ -402,6 +442,132 @@ public class RundeckClientTest {
|
||||||
.build(), 2L, 0L);
|
.build(), 2L, 0L);
|
||||||
assertPageResults(adhocTest, 2, 2, 2, 0, 2);
|
assertPageResults(adhocTest, 2, 2, 2, 0, 2);
|
||||||
}
|
}
|
||||||
|
@Test
|
||||||
|
@Betamax(tape = "get_executions_v11",
|
||||||
|
mode = TapeMode.READ_ONLY,
|
||||||
|
match = {MatchRule.uri, MatchRule.headers, MatchRule.method, MatchRule.path, MatchRule.query})
|
||||||
|
public void getExecutionsV11() throws Exception {
|
||||||
|
|
||||||
|
RundeckClient client = createClient(TEST_TOKEN_7, 11);
|
||||||
|
|
||||||
|
|
||||||
|
final String projectName = "blah";
|
||||||
|
final PagedResults<RundeckExecution> jobTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.job("test job")
|
||||||
|
.build(),
|
||||||
|
2L,
|
||||||
|
0L);
|
||||||
|
assertPageResults(jobTest, 2, 2, 2, 0, 2);
|
||||||
|
final PagedResults<RundeckExecution> jobExactTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.jobExact("test job")
|
||||||
|
.build(),
|
||||||
|
2L,
|
||||||
|
0L);
|
||||||
|
assertPageResults(jobExactTest, 2, 2, 2, 0, 2);
|
||||||
|
final PagedResults<RundeckExecution> excludeJobTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.excludeJob("test job")
|
||||||
|
.build(),
|
||||||
|
2L,
|
||||||
|
0L);
|
||||||
|
assertPageResults(excludeJobTest, 2, 2, 2, 0, 2);
|
||||||
|
final PagedResults<RundeckExecution> excludeJobExactTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.excludeJobExact("test job")
|
||||||
|
.build(),
|
||||||
|
2L,
|
||||||
|
0L);
|
||||||
|
assertPageResults(excludeJobExactTest, 2, 2, 2, 0, 2);
|
||||||
|
final PagedResults<RundeckExecution> descriptionTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.description("a description")
|
||||||
|
.build(), 2L, 0L);
|
||||||
|
assertPageResults(descriptionTest, 2, 2, 2, 0, 2);
|
||||||
|
final PagedResults<RundeckExecution> abortedbyTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.abortedby("admin")
|
||||||
|
.build(),
|
||||||
|
2L,
|
||||||
|
0L);
|
||||||
|
assertPageResults(abortedbyTest, 1, 1, 2, 0, 1);
|
||||||
|
final PagedResults<RundeckExecution> beginTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.begin(new Date(1347581178168L))
|
||||||
|
.build(), 2L, 0L);
|
||||||
|
assertPageResults(beginTest, 2, 2, 2, 0, 6);
|
||||||
|
final PagedResults<RundeckExecution> endTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.end(new Date(1415388156385L))
|
||||||
|
.build(), 2L, 0L);
|
||||||
|
assertPageResults(endTest, 2, 2, 2, 0, 4);
|
||||||
|
final List<String> excludeJobIdList = Arrays.asList("123", "456");
|
||||||
|
final PagedResults<RundeckExecution> excludeJobIdListTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.excludeJobIdList(excludeJobIdList)
|
||||||
|
.build(), 2L, 0L);
|
||||||
|
assertPageResults(excludeJobIdListTest, 2, 2, 2, 0, 4);
|
||||||
|
final List<String> jobList = Arrays.asList("fruit/mango", "fruit/lemon");
|
||||||
|
final PagedResults<RundeckExecution> jobListTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.jobList(jobList)
|
||||||
|
.build(), 2L, 0L);
|
||||||
|
assertPageResults(jobListTest, 2, 2, 2, 0, 2);
|
||||||
|
final List<String> excludeJobList = Arrays.asList("a/path/job1", "path/to/job2");
|
||||||
|
final PagedResults<RundeckExecution> excludeJobListTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.excludeJobList(excludeJobList)
|
||||||
|
.build(), 2L, 0L);
|
||||||
|
assertPageResults(excludeJobListTest, 2, 2, 2, 0, 4);
|
||||||
|
final List<String> list = Arrays.asList("9aa33253-17a3-4dce-890c-e5f10f9f00d6",
|
||||||
|
"2dd94199-00c4-4690-9b4d-beda4812bed0");
|
||||||
|
final PagedResults<RundeckExecution> jobIdListTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.jobIdList(list)
|
||||||
|
.build(), 2L, 0L);
|
||||||
|
assertPageResults(jobIdListTest, 2, 2, 2, 0, 2);
|
||||||
|
final PagedResults<RundeckExecution> groupPathTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.groupPath("fruit")
|
||||||
|
.build(),
|
||||||
|
2L,
|
||||||
|
0L);
|
||||||
|
assertPageResults(groupPathTest, 2, 2, 2, 0, 2);
|
||||||
|
final PagedResults<RundeckExecution> groupPathExactTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.groupPathExact("fruit")
|
||||||
|
.build(), 2L, 0L);
|
||||||
|
assertPageResults(groupPathExactTest, 2, 2, 2, 0, 2);
|
||||||
|
|
||||||
|
final PagedResults<RundeckExecution> excludeGroupPathTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.excludeGroupPath("fruit")
|
||||||
|
.build(),
|
||||||
|
2L,
|
||||||
|
0L);
|
||||||
|
assertPageResults(excludeGroupPathTest, 2, 2, 2, 0, 2);
|
||||||
|
final PagedResults<RundeckExecution> excliudeGroupPathExactTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.excludeGroupPathExact("fruit")
|
||||||
|
.build(), 2L, 0L);
|
||||||
|
assertPageResults(excliudeGroupPathExactTest, 2, 2, 2, 0, 2);
|
||||||
|
|
||||||
|
final PagedResults<RundeckExecution> recentTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.recent("1h").build(), 2L, 0L);
|
||||||
|
assertPageResults(recentTest, 2, 2, 2, 0, 2);
|
||||||
|
final PagedResults<RundeckExecution> statusTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.status(RundeckExecution.ExecutionStatus.SUCCEEDED)
|
||||||
|
.build(), 2L, 0L);
|
||||||
|
assertPageResults(statusTest, 2, 2, 2, 0, 3);
|
||||||
|
final PagedResults<RundeckExecution> adhocTest = client.getExecutions(ExecutionQuery.builder()
|
||||||
|
.project(projectName)
|
||||||
|
.adhoc(true)
|
||||||
|
.build(), 2L, 0L);
|
||||||
|
assertPageResults(adhocTest, 2, 2, 2, 0, 2);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test paging values from results
|
* Test paging values from results
|
||||||
|
@ -509,6 +675,48 @@ public class RundeckClientTest {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API v11 request to trigger job, with expected xml response without <result> wrapper
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
@Betamax(tape = "trigger_job_basic_v11")
|
||||||
|
public void triggerJobBasic_v11() throws Exception {
|
||||||
|
RundeckClient client = createClient(TEST_TOKEN_7, 11);
|
||||||
|
|
||||||
|
final RundeckExecution test
|
||||||
|
= client.triggerJob(RunJobBuilder.builder().setJobId("bda8b956-43a5-4eef-9c67" +
|
||||||
|
"-3f27cc0ee1a5").build());
|
||||||
|
|
||||||
|
Assert.assertEquals((Long) 943L, test.getId());
|
||||||
|
Assert.assertEquals(null, test.getArgstring());
|
||||||
|
Assert.assertEquals(null, test.getAbortedBy());
|
||||||
|
Assert.assertEquals("echo hi there ${job.username} ; sleep 90", test.getDescription());
|
||||||
|
Assert.assertEquals("admin", test.getStartedBy());
|
||||||
|
Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response for API v11 incorrectly includes <result>, but we should handle this case
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
@Betamax(tape = "trigger_job_basic_v11_patch")
|
||||||
|
public void triggerJobBasic_v11_patch() throws Exception {
|
||||||
|
RundeckClient client = createClient(TEST_TOKEN_7, 11);
|
||||||
|
|
||||||
|
final RundeckExecution test
|
||||||
|
= client.triggerJob(RunJobBuilder.builder().setJobId("bda8b956-43a5-4eef-9c67" +
|
||||||
|
"-3f27cc0ee1a5").build());
|
||||||
|
|
||||||
|
Assert.assertEquals((Long) 944L, test.getId());
|
||||||
|
Assert.assertEquals(null, test.getArgstring());
|
||||||
|
Assert.assertEquals(null, test.getAbortedBy());
|
||||||
|
Assert.assertEquals("echo hi there ${job.username} ; sleep 90", test.getDescription());
|
||||||
|
Assert.assertEquals("admin", test.getStartedBy());
|
||||||
|
Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Betamax(tape = "trigger_job_as_user")
|
@Betamax(tape = "trigger_job_as_user")
|
||||||
public void triggerJobAsUser() throws Exception {
|
public void triggerJobAsUser() throws Exception {
|
||||||
|
@ -567,6 +775,43 @@ public class RundeckClientTest {
|
||||||
Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, test.getStatus());
|
Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, test.getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Betamax(tape = "trigger_adhoc_command_v11_buggy")
|
||||||
|
public void triggerAdhocCommand_v11_buggy() throws Exception {
|
||||||
|
RundeckClient client = createClient(TEST_TOKEN_7, 11);
|
||||||
|
|
||||||
|
final RundeckExecution test
|
||||||
|
= client.triggerAdhocCommand(RunAdhocCommandBuilder.builder()
|
||||||
|
.setProject("test")
|
||||||
|
.setCommand("echo test trigger_adhoc_command")
|
||||||
|
.build());
|
||||||
|
|
||||||
|
Assert.assertEquals((Long) 945L, test.getId());
|
||||||
|
Assert.assertEquals(null, test.getArgstring());
|
||||||
|
Assert.assertEquals(null, test.getAbortedBy());
|
||||||
|
Assert.assertEquals("echo test trigger_adhoc_command", test.getDescription());
|
||||||
|
Assert.assertEquals("admin", test.getStartedBy());
|
||||||
|
Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus());
|
||||||
|
}
|
||||||
|
@Test
|
||||||
|
@Betamax(tape = "trigger_adhoc_command_v11")
|
||||||
|
public void triggerAdhocCommand_v11() throws Exception {
|
||||||
|
RundeckClient client = createClient(TEST_TOKEN_7, 11);
|
||||||
|
|
||||||
|
final RundeckExecution test
|
||||||
|
= client.triggerAdhocCommand(RunAdhocCommandBuilder.builder()
|
||||||
|
.setProject("test")
|
||||||
|
.setCommand("echo test trigger_adhoc_command")
|
||||||
|
.build());
|
||||||
|
|
||||||
|
Assert.assertEquals((Long) 946L, test.getId());
|
||||||
|
Assert.assertEquals(null, test.getArgstring());
|
||||||
|
Assert.assertEquals(null, test.getAbortedBy());
|
||||||
|
Assert.assertEquals("echo test trigger_adhoc_command", test.getDescription());
|
||||||
|
Assert.assertEquals("admin", test.getStartedBy());
|
||||||
|
Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Betamax(tape = "trigger_adhoc_command_as_user")
|
@Betamax(tape = "trigger_adhoc_command_as_user")
|
||||||
|
@ -631,6 +876,54 @@ public class RundeckClientTest {
|
||||||
Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus());
|
Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle incorrect <result> wrapper for v11 response
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
@Betamax(tape = "trigger_adhoc_script_v11_buggy")
|
||||||
|
public void triggerAdhocScript_v11_buggy() throws Exception {
|
||||||
|
RundeckClient client = createClient(TEST_TOKEN_7, 11);
|
||||||
|
String script = "#!/bin/bash\n" +
|
||||||
|
"echo test trigger_adhoc_script\n";
|
||||||
|
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(script.getBytes());
|
||||||
|
|
||||||
|
final RundeckExecution test
|
||||||
|
= client.triggerAdhocScript(RunAdhocScriptBuilder.builder().setProject("test").setScript
|
||||||
|
(byteArrayInputStream).build());
|
||||||
|
|
||||||
|
Assert.assertEquals((Long) 947L, test.getId());
|
||||||
|
Assert.assertEquals(null, test.getArgstring());
|
||||||
|
Assert.assertEquals(null, test.getAbortedBy());
|
||||||
|
Assert.assertEquals("#!/bin/bash\necho test trigger_adhoc_script", test.getDescription());
|
||||||
|
Assert.assertEquals("admin", test.getStartedBy());
|
||||||
|
Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Handle v11 response without <result> wrapper
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
@Betamax(tape = "trigger_adhoc_script_v11")
|
||||||
|
public void triggerAdhocScript_v11() throws Exception {
|
||||||
|
RundeckClient client = createClient(TEST_TOKEN_7, 11);
|
||||||
|
String script = "#!/bin/bash\n" +
|
||||||
|
"echo test trigger_adhoc_script\n";
|
||||||
|
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(script.getBytes());
|
||||||
|
|
||||||
|
final RundeckExecution test
|
||||||
|
= client.triggerAdhocScript(RunAdhocScriptBuilder.builder().setProject("test").setScript
|
||||||
|
(byteArrayInputStream).build());
|
||||||
|
|
||||||
|
Assert.assertEquals((Long) 948L, test.getId());
|
||||||
|
Assert.assertEquals(null, test.getArgstring());
|
||||||
|
Assert.assertEquals(null, test.getAbortedBy());
|
||||||
|
Assert.assertEquals("#!/bin/bash\necho test trigger_adhoc_script", test.getDescription());
|
||||||
|
Assert.assertEquals("admin", test.getStartedBy());
|
||||||
|
Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Betamax(tape = "trigger_adhoc_script_as_user")
|
@Betamax(tape = "trigger_adhoc_script_as_user")
|
||||||
public void triggerAdhocScriptAsUser() throws Exception {
|
public void triggerAdhocScriptAsUser() throws Exception {
|
||||||
|
|
25
src/test/resources/betamax/tapes/get_execution.yaml
Normal file
25
src/test/resources/betamax/tapes/get_execution.yaml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
!tape
|
||||||
|
name: get_execution
|
||||||
|
interactions:
|
||||||
|
- recorded: 2014-11-10T19:43:41.415Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/5/execution/945
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 5
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
Set-Cookie: JSESSIONID=1x4pkxxmmforonss2ga8ylvdc;Path=/
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
X-Rundeck-API-XML-Response-Wrapper: 'true'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='1'>\n <execution id='945' href='http://dignan:4440/execution/follow/945' status='succeeded' project='test'>\n <user>admin</user>\n <date-started unixtime='1415647116739'>2014-11-10T19:18:36Z</date-started>\n\
|
||||||
|
\ <date-ended unixtime='1415647118931'>2014-11-10T19:18:38Z</date-ended>\n <description>echo test trigger_adhoc_command</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n \
|
||||||
|
\ </execution>\n </executions>\n</result>"
|
24
src/test/resources/betamax/tapes/get_execution_v11.yaml
Normal file
24
src/test/resources/betamax/tapes/get_execution_v11.yaml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
!tape
|
||||||
|
name: get_execution_v11
|
||||||
|
interactions:
|
||||||
|
- recorded: 2014-11-10T19:44:57.642Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/execution/945
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: application/xml;charset=UTF-8
|
||||||
|
Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
Set-Cookie: JSESSIONID=yzyycrxo7utb154qrsuggbtp6;Path=/
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
X-Rundeck-API-XML-Response-Wrapper: 'false'
|
||||||
|
body: !!binary |-
|
||||||
|
PGV4ZWN1dGlvbnMgY291bnQ9JzEnPgogIDxleGVjdXRpb24gaWQ9Jzk0NScgaHJlZj0naHR0cDovL2RpZ25hbjo0NDQwL2V4ZWN1dGlvbi9mb2xsb3cvOTQ1JyBzdGF0dXM9J3N1Y2NlZWRlZCcgcHJvamVjdD0ndGVzdCc+CiAgICA8dXNlcj5hZG1pbjwvdXNlcj4KICAgIDxkYXRlLXN0YXJ0ZWQgdW5peHRpbWU9JzE0MTU2NDcxMTY3MzknPjIwMTQtMTEtMTBUMTk6MTg6MzZaPC9kYXRlLXN0YXJ0ZWQ+CiAgICA8ZGF0ZS1lbmRlZCB1bml4dGltZT0nMTQxNTY0NzExODkzMSc+MjAxNC0xMS0xMFQxOToxODozOFo8L2RhdGUtZW5kZWQ+CiAgICA8ZGVzY3JpcHRpb24+ZWNobyB0ZXN0IHRyaWdnZXJfYWRob2NfY29tbWFuZDwvZGVzY3JpcHRpb24+CiAgICA8YXJnc3RyaW5nIC8+CiAgICA8c3VjY2Vzc2Z1bE5vZGVzPgogICAgICA8bm9kZSBuYW1lPSdkaWduYW4nIC8+CiAgICA8L3N1Y2Nlc3NmdWxOb2Rlcz4KICA8L2V4ZWN1dGlvbj4KPC9leGVjdXRpb25zPg==
|
|
@ -0,0 +1,24 @@
|
||||||
|
!tape
|
||||||
|
name: get_execution_v11_buggy
|
||||||
|
interactions:
|
||||||
|
- recorded: 2014-11-10T19:47:33.973Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/execution/945
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
Set-Cookie: JSESSIONID=prilmlypvi8r14cvs72xu9865;Path=/
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='1'>\n <execution id='945' href='http://dignan:4440/execution/follow/945' status='succeeded' project='test'>\n <user>admin</user>\n <date-started unixtime='1415647116739'>2014-11-10T19:18:36Z</date-started>\n\
|
||||||
|
\ <date-ended unixtime='1415647118931'>2014-11-10T19:18:38Z</date-ended>\n <description>echo test trigger_adhoc_command</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n \
|
||||||
|
\ </execution>\n </executions>\n</result>"
|
419
src/test/resources/betamax/tapes/get_executions_v11.yaml
Normal file
419
src/test/resources/betamax/tapes/get_executions_v11.yaml
Normal file
|
@ -0,0 +1,419 @@
|
||||||
|
!tape
|
||||||
|
name: get_executions_v11
|
||||||
|
interactions:
|
||||||
|
- recorded: 2014-11-07T23:18:13.076Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?jobFilter=test+job&project=blah&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
Set-Cookie: JSESSIONID=1jt4f1ctz8i6rfsou34u5suz2;Path=/
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='937' href='http://dignan:4440/execution/follow/937' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386304167'>2014-11-07T18:51:44Z</date-started>\n <date-ended unixtime='1415386309757'>2014-11-07T18:51:49Z</date-ended>\n <job id='5985a8cb-d155-4585-9fe0-c2342e07c999' averageDuration='5590'>\n <name>test job</name>\n\
|
||||||
|
\ <group></group>\n <project>blah</project>\n <description>a description</description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='936' href='http://dignan:4440/execution/follow/936' status='aborted' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386292080'>2014-11-07T18:51:32Z</date-started>\n <date-ended unixtime='1415386299535'>2014-11-07T18:51:39Z</date-ended>\n\
|
||||||
|
\ <abortedby>admin</abortedby>\n <job id='5985a8cb-d155-4585-9fe0-c2342e07c999' averageDuration='5590'>\n <name>test job</name>\n <group></group>\n <project>blah</project>\n <description>a description</description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <failedNodes>\n <node name='dignan' />\n </failedNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:18:13.426Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?jobExactFilter=test+job&project=blah&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='937' href='http://dignan:4440/execution/follow/937' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386304167'>2014-11-07T18:51:44Z</date-started>\n <date-ended unixtime='1415386309757'>2014-11-07T18:51:49Z</date-ended>\n <job id='5985a8cb-d155-4585-9fe0-c2342e07c999' averageDuration='5590'>\n <name>test job</name>\n\
|
||||||
|
\ <group></group>\n <project>blah</project>\n <description>a description</description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='936' href='http://dignan:4440/execution/follow/936' status='aborted' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386292080'>2014-11-07T18:51:32Z</date-started>\n <date-ended unixtime='1415386299535'>2014-11-07T18:51:39Z</date-ended>\n\
|
||||||
|
\ <abortedby>admin</abortedby>\n <job id='5985a8cb-d155-4585-9fe0-c2342e07c999' averageDuration='5590'>\n <name>test job</name>\n <group></group>\n <project>blah</project>\n <description>a description</description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <failedNodes>\n <node name='dignan' />\n </failedNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:18:13.591Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?excludeJobFilter=test+job&project=blah&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='939' href='http://dignan:4440/execution/follow/939' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386450856'>2014-11-07T18:54:10Z</date-started>\n <date-ended unixtime='1415386456531'>2014-11-07T18:54:16Z</date-ended>\n <job id='2dd94199-00c4-4690-9b4d-beda4812bed0' averageDuration='5675'>\n <name>mango</name>\n \
|
||||||
|
\ <group>fruit</group>\n <project>blah</project>\n <description></description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='938' href='http://dignan:4440/execution/follow/938' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386448511'>2014-11-07T18:54:08Z</date-started>\n <date-ended\
|
||||||
|
\ unixtime='1415386454083'>2014-11-07T18:54:14Z</date-ended>\n <job id='9aa33253-17a3-4dce-890c-e5f10f9f00d6' averageDuration='5572'>\n <name>lemon</name>\n <group>fruit</group>\n <project>blah</project>\n <description></description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:18:13.748Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?excludeJobExactFilter=test+job&project=blah&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='939' href='http://dignan:4440/execution/follow/939' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386450856'>2014-11-07T18:54:10Z</date-started>\n <date-ended unixtime='1415386456531'>2014-11-07T18:54:16Z</date-ended>\n <job id='2dd94199-00c4-4690-9b4d-beda4812bed0' averageDuration='5675'>\n <name>mango</name>\n \
|
||||||
|
\ <group>fruit</group>\n <project>blah</project>\n <description></description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='938' href='http://dignan:4440/execution/follow/938' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386448511'>2014-11-07T18:54:08Z</date-started>\n <date-ended\
|
||||||
|
\ unixtime='1415386454083'>2014-11-07T18:54:14Z</date-ended>\n <job id='9aa33253-17a3-4dce-890c-e5f10f9f00d6' averageDuration='5572'>\n <name>lemon</name>\n <group>fruit</group>\n <project>blah</project>\n <description></description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:18:13.897Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&descFilter=a+description&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='937' href='http://dignan:4440/execution/follow/937' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386304167'>2014-11-07T18:51:44Z</date-started>\n <date-ended unixtime='1415386309757'>2014-11-07T18:51:49Z</date-ended>\n <job id='5985a8cb-d155-4585-9fe0-c2342e07c999' averageDuration='5590'>\n <name>test job</name>\n\
|
||||||
|
\ <group></group>\n <project>blah</project>\n <description>a description</description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='936' href='http://dignan:4440/execution/follow/936' status='aborted' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386292080'>2014-11-07T18:51:32Z</date-started>\n <date-ended unixtime='1415386299535'>2014-11-07T18:51:39Z</date-ended>\n\
|
||||||
|
\ <abortedby>admin</abortedby>\n <job id='5985a8cb-d155-4585-9fe0-c2342e07c999' averageDuration='5590'>\n <name>test job</name>\n <group></group>\n <project>blah</project>\n <description>a description</description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <failedNodes>\n <node name='dignan' />\n </failedNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:18:14.025Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&abortedbyFilter=admin&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='1' total='1' offset='0' max='2'>\n <execution id='936' href='http://dignan:4440/execution/follow/936' status='aborted' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386292080'>2014-11-07T18:51:32Z</date-started>\n <date-ended unixtime='1415386299535'>2014-11-07T18:51:39Z</date-ended>\n <abortedby>admin</abortedby>\n <job id='5985a8cb-d155-4585-9fe0-c2342e07c999' averageDuration='5590'>\n\
|
||||||
|
\ <name>test job</name>\n <group></group>\n <project>blah</project>\n <description>a description</description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <failedNodes>\n <node\
|
||||||
|
\ name='dignan' />\n </failedNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:18:14.155Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&begin=2012-09-14T00%3A06%3A18Z&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='6' offset='0' max='2'>\n <execution id='941' href='http://dignan:4440/execution/follow/941' status='failed' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415402275736'>2014-11-07T23:17:55Z</date-started>\n\
|
||||||
|
\ <date-ended unixtime='1415402276329'>2014-11-07T23:17:56Z</date-ended>\n <description>echo bye ; false</description>\n <argstring />\n <failedNodes>\n <node name='dignan' />\n </failedNodes>\n </execution>\n <execution\
|
||||||
|
\ id='940' href='http://dignan:4440/execution/follow/940' status='failed' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415402267951'>2014-11-07T23:17:47Z</date-started>\n <date-ended unixtime='1415402270687'>2014-11-07T23:17:50Z</date-ended>\n\
|
||||||
|
\ <description>echo hi ; false</description>\n <argstring />\n <failedNodes>\n <node name='dignan' />\n </failedNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:19:50.560Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&end=2014-11-07T19%3A22%3A36Z&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
Set-Cookie: JSESSIONID=1olgmevldd8n2d4lib3pzifep;Path=/
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='4' offset='0' max='2'>\n <execution id='939' href='http://dignan:4440/execution/follow/939' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386450856'>2014-11-07T18:54:10Z</date-started>\n <date-ended unixtime='1415386456531'>2014-11-07T18:54:16Z</date-ended>\n <job id='2dd94199-00c4-4690-9b4d-beda4812bed0' averageDuration='5675'>\n <name>mango</name>\n \
|
||||||
|
\ <group>fruit</group>\n <project>blah</project>\n <description></description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='938' href='http://dignan:4440/execution/follow/938' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386448511'>2014-11-07T18:54:08Z</date-started>\n <date-ended\
|
||||||
|
\ unixtime='1415386454083'>2014-11-07T18:54:14Z</date-ended>\n <job id='9aa33253-17a3-4dce-890c-e5f10f9f00d6' averageDuration='5572'>\n <name>lemon</name>\n <group>fruit</group>\n <project>blah</project>\n <description></description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:19:50.701Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&excludeJobIdListFilter=123&excludeJobIdListFilter=456&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='4' offset='0' max='2'>\n <execution id='939' href='http://dignan:4440/execution/follow/939' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386450856'>2014-11-07T18:54:10Z</date-started>\n <date-ended unixtime='1415386456531'>2014-11-07T18:54:16Z</date-ended>\n <job id='2dd94199-00c4-4690-9b4d-beda4812bed0' averageDuration='5675'>\n <name>mango</name>\n \
|
||||||
|
\ <group>fruit</group>\n <project>blah</project>\n <description></description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='938' href='http://dignan:4440/execution/follow/938' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386448511'>2014-11-07T18:54:08Z</date-started>\n <date-ended\
|
||||||
|
\ unixtime='1415386454083'>2014-11-07T18:54:14Z</date-ended>\n <job id='9aa33253-17a3-4dce-890c-e5f10f9f00d6' averageDuration='5572'>\n <name>lemon</name>\n <group>fruit</group>\n <project>blah</project>\n <description></description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:19:50.837Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&jobListFilter=fruit%2Fmango&jobListFilter=fruit%2Flemon&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='939' href='http://dignan:4440/execution/follow/939' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386450856'>2014-11-07T18:54:10Z</date-started>\n <date-ended unixtime='1415386456531'>2014-11-07T18:54:16Z</date-ended>\n <job id='2dd94199-00c4-4690-9b4d-beda4812bed0' averageDuration='5675'>\n <name>mango</name>\n \
|
||||||
|
\ <group>fruit</group>\n <project>blah</project>\n <description></description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='938' href='http://dignan:4440/execution/follow/938' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386448511'>2014-11-07T18:54:08Z</date-started>\n <date-ended\
|
||||||
|
\ unixtime='1415386454083'>2014-11-07T18:54:14Z</date-ended>\n <job id='9aa33253-17a3-4dce-890c-e5f10f9f00d6' averageDuration='5572'>\n <name>lemon</name>\n <group>fruit</group>\n <project>blah</project>\n <description></description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:19:50.966Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&excludeJobListFilter=a%2Fpath%2Fjob1&excludeJobListFilter=path%2Fto%2Fjob2&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='4' offset='0' max='2'>\n <execution id='939' href='http://dignan:4440/execution/follow/939' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386450856'>2014-11-07T18:54:10Z</date-started>\n <date-ended unixtime='1415386456531'>2014-11-07T18:54:16Z</date-ended>\n <job id='2dd94199-00c4-4690-9b4d-beda4812bed0' averageDuration='5675'>\n <name>mango</name>\n \
|
||||||
|
\ <group>fruit</group>\n <project>blah</project>\n <description></description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='938' href='http://dignan:4440/execution/follow/938' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386448511'>2014-11-07T18:54:08Z</date-started>\n <date-ended\
|
||||||
|
\ unixtime='1415386454083'>2014-11-07T18:54:14Z</date-ended>\n <job id='9aa33253-17a3-4dce-890c-e5f10f9f00d6' averageDuration='5572'>\n <name>lemon</name>\n <group>fruit</group>\n <project>blah</project>\n <description></description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:19:51.097Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&jobIdListFilter=9aa33253-17a3-4dce-890c-e5f10f9f00d6&jobIdListFilter=2dd94199-00c4-4690-9b4d-beda4812bed0&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='939' href='http://dignan:4440/execution/follow/939' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386450856'>2014-11-07T18:54:10Z</date-started>\n <date-ended unixtime='1415386456531'>2014-11-07T18:54:16Z</date-ended>\n <job id='2dd94199-00c4-4690-9b4d-beda4812bed0' averageDuration='5675'>\n <name>mango</name>\n \
|
||||||
|
\ <group>fruit</group>\n <project>blah</project>\n <description></description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='938' href='http://dignan:4440/execution/follow/938' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386448511'>2014-11-07T18:54:08Z</date-started>\n <date-ended\
|
||||||
|
\ unixtime='1415386454083'>2014-11-07T18:54:14Z</date-ended>\n <job id='9aa33253-17a3-4dce-890c-e5f10f9f00d6' averageDuration='5572'>\n <name>lemon</name>\n <group>fruit</group>\n <project>blah</project>\n <description></description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:19:51.229Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&groupPath=fruit&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='939' href='http://dignan:4440/execution/follow/939' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386450856'>2014-11-07T18:54:10Z</date-started>\n <date-ended unixtime='1415386456531'>2014-11-07T18:54:16Z</date-ended>\n <job id='2dd94199-00c4-4690-9b4d-beda4812bed0' averageDuration='5675'>\n <name>mango</name>\n \
|
||||||
|
\ <group>fruit</group>\n <project>blah</project>\n <description></description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='938' href='http://dignan:4440/execution/follow/938' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386448511'>2014-11-07T18:54:08Z</date-started>\n <date-ended\
|
||||||
|
\ unixtime='1415386454083'>2014-11-07T18:54:14Z</date-ended>\n <job id='9aa33253-17a3-4dce-890c-e5f10f9f00d6' averageDuration='5572'>\n <name>lemon</name>\n <group>fruit</group>\n <project>blah</project>\n <description></description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:19:51.358Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&groupPathExact=fruit&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='939' href='http://dignan:4440/execution/follow/939' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386450856'>2014-11-07T18:54:10Z</date-started>\n <date-ended unixtime='1415386456531'>2014-11-07T18:54:16Z</date-ended>\n <job id='2dd94199-00c4-4690-9b4d-beda4812bed0' averageDuration='5675'>\n <name>mango</name>\n \
|
||||||
|
\ <group>fruit</group>\n <project>blah</project>\n <description></description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='938' href='http://dignan:4440/execution/follow/938' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386448511'>2014-11-07T18:54:08Z</date-started>\n <date-ended\
|
||||||
|
\ unixtime='1415386454083'>2014-11-07T18:54:14Z</date-ended>\n <job id='9aa33253-17a3-4dce-890c-e5f10f9f00d6' averageDuration='5572'>\n <name>lemon</name>\n <group>fruit</group>\n <project>blah</project>\n <description></description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:19:51.483Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&excludeGroupPath=fruit&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='937' href='http://dignan:4440/execution/follow/937' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386304167'>2014-11-07T18:51:44Z</date-started>\n <date-ended unixtime='1415386309757'>2014-11-07T18:51:49Z</date-ended>\n <job id='5985a8cb-d155-4585-9fe0-c2342e07c999' averageDuration='5590'>\n <name>test job</name>\n\
|
||||||
|
\ <group></group>\n <project>blah</project>\n <description>a description</description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='936' href='http://dignan:4440/execution/follow/936' status='aborted' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386292080'>2014-11-07T18:51:32Z</date-started>\n <date-ended unixtime='1415386299535'>2014-11-07T18:51:39Z</date-ended>\n\
|
||||||
|
\ <abortedby>admin</abortedby>\n <job id='5985a8cb-d155-4585-9fe0-c2342e07c999' averageDuration='5590'>\n <name>test job</name>\n <group></group>\n <project>blah</project>\n <description>a description</description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <failedNodes>\n <node name='dignan' />\n </failedNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:19:51.607Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&excludeGroupPathExact=fruit&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='937' href='http://dignan:4440/execution/follow/937' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386304167'>2014-11-07T18:51:44Z</date-started>\n <date-ended unixtime='1415386309757'>2014-11-07T18:51:49Z</date-ended>\n <job id='5985a8cb-d155-4585-9fe0-c2342e07c999' averageDuration='5590'>\n <name>test job</name>\n\
|
||||||
|
\ <group></group>\n <project>blah</project>\n <description>a description</description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='936' href='http://dignan:4440/execution/follow/936' status='aborted' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386292080'>2014-11-07T18:51:32Z</date-started>\n <date-ended unixtime='1415386299535'>2014-11-07T18:51:39Z</date-ended>\n\
|
||||||
|
\ <abortedby>admin</abortedby>\n <job id='5985a8cb-d155-4585-9fe0-c2342e07c999' averageDuration='5590'>\n <name>test job</name>\n <group></group>\n <project>blah</project>\n <description>a description</description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <failedNodes>\n <node name='dignan' />\n </failedNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:19:51.724Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&recentFilter=1h&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='941' href='http://dignan:4440/execution/follow/941' status='failed' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415402275736'>2014-11-07T23:17:55Z</date-started>\n\
|
||||||
|
\ <date-ended unixtime='1415402276329'>2014-11-07T23:17:56Z</date-ended>\n <description>echo bye ; false</description>\n <argstring />\n <failedNodes>\n <node name='dignan' />\n </failedNodes>\n </execution>\n <execution\
|
||||||
|
\ id='940' href='http://dignan:4440/execution/follow/940' status='failed' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415402267951'>2014-11-07T23:17:47Z</date-started>\n <date-ended unixtime='1415402270687'>2014-11-07T23:17:50Z</date-ended>\n\
|
||||||
|
\ <description>echo hi ; false</description>\n <argstring />\n <failedNodes>\n <node name='dignan' />\n </failedNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:19:51.845Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&statusFilter=succeeded&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='3' offset='0' max='2'>\n <execution id='939' href='http://dignan:4440/execution/follow/939' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started\
|
||||||
|
\ unixtime='1415386450856'>2014-11-07T18:54:10Z</date-started>\n <date-ended unixtime='1415386456531'>2014-11-07T18:54:16Z</date-ended>\n <job id='2dd94199-00c4-4690-9b4d-beda4812bed0' averageDuration='5675'>\n <name>mango</name>\n \
|
||||||
|
\ <group>fruit</group>\n <project>blah</project>\n <description></description>\n </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n\
|
||||||
|
\ </execution>\n <execution id='938' href='http://dignan:4440/execution/follow/938' status='succeeded' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415386448511'>2014-11-07T18:54:08Z</date-started>\n <date-ended\
|
||||||
|
\ unixtime='1415386454083'>2014-11-07T18:54:14Z</date-ended>\n <job id='9aa33253-17a3-4dce-890c-e5f10f9f00d6' averageDuration='5572'>\n <name>lemon</name>\n <group>fruit</group>\n <project>blah</project>\n <description></description>\n\
|
||||||
|
\ </job>\n <description>sleep 5</description>\n <argstring />\n <successfulNodes>\n <node name='dignan' />\n </successfulNodes>\n </execution>\n </executions>\n</result>"
|
||||||
|
- recorded: 2014-11-07T23:20:12.975Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/executions?project=blah&adhoc=true&max=2&offset=0
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
Set-Cookie: JSESSIONID=11ubcx5ejb1sr6nycorkmdrg3;Path=/
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='2' total='2' offset='0' max='2'>\n <execution id='941' href='http://dignan:4440/execution/follow/941' status='failed' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415402275736'>2014-11-07T23:17:55Z</date-started>\n\
|
||||||
|
\ <date-ended unixtime='1415402276329'>2014-11-07T23:17:56Z</date-ended>\n <description>echo bye ; false</description>\n <argstring />\n <failedNodes>\n <node name='dignan' />\n </failedNodes>\n </execution>\n <execution\
|
||||||
|
\ id='940' href='http://dignan:4440/execution/follow/940' status='failed' project='blah'>\n <user>admin</user>\n <date-started unixtime='1415402267951'>2014-11-07T23:17:47Z</date-started>\n <date-ended unixtime='1415402270687'>2014-11-07T23:17:50Z</date-ended>\n\
|
||||||
|
\ <description>echo hi ; false</description>\n <argstring />\n <failedNodes>\n <node name='dignan' />\n </failedNodes>\n </execution>\n </executions>\n</result>"
|
|
@ -0,0 +1,43 @@
|
||||||
|
!tape
|
||||||
|
name: trigger_adhoc_command_v11
|
||||||
|
interactions:
|
||||||
|
- recorded: 2014-11-10T19:37:31.471Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/run/command?project=test&exec=echo+test+trigger_adhoc_command
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: application/xml;charset=UTF-8
|
||||||
|
Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
Set-Cookie: JSESSIONID=1lzqzroq2oz9d1oiwcyb9qjsk8;Path=/
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
X-Rundeck-API-XML-Response-Wrapper: 'false'
|
||||||
|
body: !!binary |-
|
||||||
|
PGV4ZWN1dGlvbiBpZD0nOTQ2JyAvPg==
|
||||||
|
- recorded: 2014-11-10T19:37:31.807Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/execution/946
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: application/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
X-Rundeck-API-XML-Response-Wrapper: 'false'
|
||||||
|
body: !!binary |-
|
||||||
|
PGV4ZWN1dGlvbnMgY291bnQ9JzEnPgogIDxleGVjdXRpb24gaWQ9Jzk0NicgaHJlZj0naHR0cDovL2RpZ25hbjo0NDQwL2V4ZWN1dGlvbi9mb2xsb3cvOTQ2JyBzdGF0dXM9J3J1bm5pbmcnIHByb2plY3Q9J3Rlc3QnPgogICAgPHVzZXI+YWRtaW48L3VzZXI+CiAgICA8ZGF0ZS1zdGFydGVkIHVuaXh0aW1lPScxNDE1NjQ4MjUxMTg0Jz4yMDE0LTExLTEwVDE5OjM3OjMxWjwvZGF0ZS1zdGFydGVkPgogICAgPGRlc2NyaXB0aW9uPmVjaG8gdGVzdCB0cmlnZ2VyX2FkaG9jX2NvbW1hbmQ8L2Rlc2NyaXB0aW9uPgogICAgPGFyZ3N0cmluZyAvPgogIDwvZXhlY3V0aW9uPgo8L2V4ZWN1dGlvbnM+
|
|
@ -0,0 +1,42 @@
|
||||||
|
!tape
|
||||||
|
name: trigger_adhoc_command_v11_buggy
|
||||||
|
interactions:
|
||||||
|
- recorded: 2014-11-10T19:18:37.071Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/run/command?project=test&exec=echo+test+trigger_adhoc_command
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: application/xml;charset=UTF-8
|
||||||
|
Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
Set-Cookie: JSESSIONID=jjryjdfuxtdw1808gclmb7uuj;Path=/
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
X-Rundeck-API-XML-Response-Wrapper: 'false'
|
||||||
|
body: !!binary |-
|
||||||
|
PGV4ZWN1dGlvbiBpZD0nOTQ1JyAvPg==
|
||||||
|
- recorded: 2014-11-10T19:18:37.444Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/execution/945
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='1'>\n <execution id='945' href='http://dignan:4440/execution/follow/945' status='running' project='test'>\n <user>admin</user>\n <date-started unixtime='1415647116739'>2014-11-10T19:18:36Z</date-started>\n\
|
||||||
|
\ <description>echo test trigger_adhoc_command</description>\n <argstring />\n </execution>\n </executions>\n</result>"
|
|
@ -0,0 +1,45 @@
|
||||||
|
!tape
|
||||||
|
name: trigger_adhoc_script_v11
|
||||||
|
interactions:
|
||||||
|
- recorded: 2014-11-10T20:04:36.573Z
|
||||||
|
request:
|
||||||
|
method: POST
|
||||||
|
uri: http://rundeck.local:4440/api/11/run/script?project=test
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Content-Type: multipart/form-data; boundary=W2S1I8XOmvOWsdnLEHprcw3N6cQveJEm_aV17Oz
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
Transfer-Encoding: chunked
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: application/xml;charset=UTF-8
|
||||||
|
Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
Set-Cookie: JSESSIONID=18uoooauscne2eqtuq466djm;Path=/
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
X-Rundeck-API-XML-Response-Wrapper: 'false'
|
||||||
|
body: !!binary |-
|
||||||
|
PGV4ZWN1dGlvbiBpZD0nOTQ4JyAvPg==
|
||||||
|
- recorded: 2014-11-10T20:04:36.876Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/execution/948
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: application/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
X-Rundeck-API-XML-Response-Wrapper: 'false'
|
||||||
|
body: !!binary |-
|
||||||
|
PGV4ZWN1dGlvbnMgY291bnQ9JzEnPgogIDxleGVjdXRpb24gaWQ9Jzk0OCcgaHJlZj0naHR0cDovL2RpZ25hbjo0NDQwL2V4ZWN1dGlvbi9mb2xsb3cvOTQ4JyBzdGF0dXM9J3J1bm5pbmcnIHByb2plY3Q9J3Rlc3QnPgogICAgPHVzZXI+YWRtaW48L3VzZXI+CiAgICA8ZGF0ZS1zdGFydGVkIHVuaXh0aW1lPScxNDE1NjQ5ODc2MzA1Jz4yMDE0LTExLTEwVDIwOjA0OjM2WjwvZGF0ZS1zdGFydGVkPgogICAgPGRlc2NyaXB0aW9uPiMhL2Jpbi9iYXNoCmVjaG8gdGVzdCB0cmlnZ2VyX2FkaG9jX3NjcmlwdAo8L2Rlc2NyaXB0aW9uPgogICAgPGFyZ3N0cmluZyAvPgogIDwvZXhlY3V0aW9uPgo8L2V4ZWN1dGlvbnM+
|
|
@ -0,0 +1,44 @@
|
||||||
|
!tape
|
||||||
|
name: trigger_adhoc_script_v11_buggy
|
||||||
|
interactions:
|
||||||
|
- recorded: 2014-11-10T19:54:03.631Z
|
||||||
|
request:
|
||||||
|
method: POST
|
||||||
|
uri: http://rundeck.local:4440/api/11/run/script?project=test
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Content-Type: multipart/form-data; boundary=7ijcD_EYqXFXKLau3Bg9Oy0PIqf37Vn
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
Transfer-Encoding: chunked
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: application/xml;charset=UTF-8
|
||||||
|
Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
Set-Cookie: JSESSIONID=z5e76c45acya1h081pryh4avz;Path=/
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
X-Rundeck-API-XML-Response-Wrapper: 'false'
|
||||||
|
body: !!binary |-
|
||||||
|
PGV4ZWN1dGlvbiBpZD0nOTQ3JyAvPg==
|
||||||
|
- recorded: 2014-11-10T19:54:03.770Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/execution/947
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='1'>\n <execution id='947' href='http://dignan:4440/execution/follow/947' status='running' project='test'>\n <user>admin</user>\n <date-started unixtime='1415649243468'>2014-11-10T19:54:03Z</date-started>\n\
|
||||||
|
\ <description>#!/bin/bash\necho test trigger_adhoc_script\n</description>\n <argstring />\n </execution>\n </executions>\n</result>"
|
24
src/test/resources/betamax/tapes/trigger_job_basic_v11.yaml
Normal file
24
src/test/resources/betamax/tapes/trigger_job_basic_v11.yaml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
!tape
|
||||||
|
name: trigger_job_basic_v11
|
||||||
|
interactions:
|
||||||
|
- recorded: 2014-11-08T00:00:58.749Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/job/bda8b956-43a5-4eef-9c67-3f27cc0ee1a5/run
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: application/xml;charset=UTF-8
|
||||||
|
Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
Set-Cookie: JSESSIONID=19ui1v6otua3h1714jv2zbkbid;Path=/
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
X-Rundeck-API-XML-Response-Wrapper: 'false'
|
||||||
|
body: !!binary |-
|
||||||
|
PGV4ZWN1dGlvbnMgY291bnQ9JzEnPgogIDxleGVjdXRpb24gaWQ9Jzk0MycgaHJlZj0naHR0cDovL2RpZ25hbjo0NDQwL2V4ZWN1dGlvbi9mb2xsb3cvOTQzJyBzdGF0dXM9J3J1bm5pbmcnIHByb2plY3Q9J2RlbW8nPgogICAgPHVzZXI+YWRtaW48L3VzZXI+CiAgICA8ZGF0ZS1zdGFydGVkIHVuaXh0aW1lPScxNDE1NDA0ODU4NTE4Jz4yMDE0LTExLTA4VDAwOjAwOjU4WjwvZGF0ZS1zdGFydGVkPgogICAgPGpvYiBpZD0nYmRhOGI5NTYtNDNhNS00ZWVmLTljNjctM2YyN2NjMGVlMWE1Jz4KICAgICAgPG5hbWU+YSBqb2I8L25hbWU+CiAgICAgIDxncm91cD48L2dyb3VwPgogICAgICA8cHJvamVjdD5kZW1vPC9wcm9qZWN0PgogICAgICA8ZGVzY3JpcHRpb24+PC9kZXNjcmlwdGlvbj4KICAgIDwvam9iPgogICAgPGRlc2NyaXB0aW9uPmVjaG8gaGkgdGhlcmUgJHtqb2IudXNlcm5hbWV9IDsgc2xlZXAgOTA8L2Rlc2NyaXB0aW9uPgogICAgPGFyZ3N0cmluZyAvPgogIDwvZXhlY3V0aW9uPgo8L2V4ZWN1dGlvbnM+
|
|
@ -0,0 +1,24 @@
|
||||||
|
!tape
|
||||||
|
name: trigger_job_basic_v11_patch
|
||||||
|
interactions:
|
||||||
|
- recorded: 2014-11-08T00:05:15.235Z
|
||||||
|
request:
|
||||||
|
method: GET
|
||||||
|
uri: http://rundeck.local:4440/api/11/job/bda8b956-43a5-4eef-9c67-3f27cc0ee1a5/run
|
||||||
|
headers:
|
||||||
|
Accept: text/xml
|
||||||
|
Host: rundeck.local:4440
|
||||||
|
Proxy-Connection: Keep-Alive
|
||||||
|
User-Agent: RunDeck API Java Client 11
|
||||||
|
X-RunDeck-Auth-Token: 8Dp9op111ER6opsDRkddvE86K9sE499s
|
||||||
|
response:
|
||||||
|
status: 200
|
||||||
|
headers:
|
||||||
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
||||||
|
Server: Jetty(7.6.0.v20120127)
|
||||||
|
Set-Cookie: JSESSIONID=1dfooymrwshimhr8fe4ncoc93;Path=/
|
||||||
|
X-Rundeck-API-Version: '12'
|
||||||
|
body: "<result success='true' apiversion='12'>\n <executions count='1'>\n <execution id='944' href='http://dignan:4440/execution/follow/944' status='running' project='demo'>\n <user>admin</user>\n <date-started unixtime='1415405114785'>2014-11-08T00:05:14Z</date-started>\n\
|
||||||
|
\ <job id='bda8b956-43a5-4eef-9c67-3f27cc0ee1a5' averageDuration='90593'>\n <name>a job</name>\n <group></group>\n <project>demo</project>\n <description></description>\n </job>\n <description>echo hi there ${job.username}\
|
||||||
|
\ ; sleep 90</description>\n <argstring />\n </execution>\n </executions>\n</result>"
|
Loading…
Add table
Add a link
Reference in a new issue