Actions
Bug #37264
closedHammer "job-invocation create" does not produce clean CSV/JSON format if requested
Difficulty:
Triaged:
Yes
Bugzilla link:
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2263041
Description of problem:
hammer --output=csv nor hammer --output=json does not provide valid output in the requested format.
Examples:
- hammer --output=csv job-invocation create --inputs="command=echo tYEzvrxBAG" --job-template="Run Command - Script Default" --search-query="name ~ my.host.com" 2> /dev/null
Message,Id
Job invocation 3 created,3
1 task(s), 0 success, 1 fail
- hammer --output=json job-invocation create --inputs="command=echo tYEzvrxBAG" --job-template="Run Command - Script Default" --search-query="name ~ my.host.com" 2> /dev/null
{
"message": "Job invocation 4 created",
"id": 4
}
1 task(s), 0 success, 1 fail
Version-Release number of selected component (if applicable):
6.12 (or lower) onwards
How reproducible:
always
Steps to Reproduce:
1.Run `hammer --output=csv job-invocation create` or `hammer --output=json job-invocation create`
Actual results:
There is an extra line on STDOUT that shows the result of the task. This prevents STDOUT from being parsed as JSON or CSV.
Expected results:
No extra line in the requested format.
Updated by Oleh Fedorenko 8 months ago
- Status changed from New to Assigned
- Assignee set to Oleh Fedorenko
- Triaged changed from No to Yes
Updated by The Foreman Bot 8 months ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli-foreman-tasks/pull/53 added
Updated by Oleh Fedorenko 8 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset hammer-cli-foreman-tasks|4f55a3f9f259bfba6a186e041af014c60fa19e8e.
Updated by Adam Ruzicka 7 months ago
- Fixed in Releases hammer_cli_foreman_tasks-0.0.21 added
Actions