Project

General

Profile

Bug #11355

Hammer JSON output not returning valid JSON for simple messages

Added by Bryan Kearney about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Hammer core
Target version:
-
Difficulty:
easy
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1253737
Description of problem:
Hammer currently does not return valid json, when requested, if the output is a simple message like "____ deleted" or "Activation key copied".

Version-Release number of selected component (if applicable):
Satellite 6.1 GA

How reproducible:
Always

Steps to Reproduce:
1. Run a command that only returns a message stating that it passed, specifying --output=json
2. View results

Actual results:
hammer --output=json activation-key copy --name=tester --new-name=copykey --organization-id=3
Activation key copied

Expected results:
hammer --output=json activation-key copy --name=tester --new-name=copykey --organization-id=3 {'Message':'Activation key copied'}

Associated revisions

Revision ca96ee11 (diff)
Added by Tomas Strachota almost 4 years ago

Fixes #11355 - json and yaml formatting for messages

Revision 834b0084
Added by Martin Bacovsky almost 4 years ago

Merge pull request #182 from tstrachota/messages

Fixes #11355 - json and yaml formatting for messages

History

#1 Updated by Tomáš Strachota almost 4 years ago

  • Category set to Hammer core
  • Difficulty set to easy

#2 Updated by Tomáš Strachota almost 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Tomáš Strachota

#3 Updated by The Foreman Bot almost 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli/pull/182 added
  • Pull request deleted ()

#4 Updated by Anonymous almost 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF