Project

General

Profile

Feature #6754

JSON and/or YAML structured output adapters

Added by Dominic Cleal almost 6 years ago. Updated almost 2 years ago.

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

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1122650
Description of problem:
Hammer has CSV as a structured format output, but it's not a particularly well-defined format. It would be preferable to have JSON and/or YAML structured outputs - probably simply returning the JSON from Foreman's API.

How reproducible:
Always

Steps to Reproduce:
1. hammer --output json domain list

Actual results:
separate lines, base formatter

Expected results:

{
    total: 1
    subtotal: 1
    page: 1
    per_page: 20
    search: null
    sort: {
        by: null
        order: null
    }
    results: [
        {
            id: 1
            name: "example.com" 
            fullname: null
            dns_id: null
            created_at: "2014-07-07T14:50:06Z" 
            updated_at: "2014-07-07T14:50:06Z" 
        }
    ]
}

Associated revisions

Revision 07da5edc (diff)
Added by Adam Ruzicka over 5 years ago

Fixes #6754,BZ1122650 - Adds YAML and JSON output adapters

History

#1 Updated by Dominic Cleal almost 6 years ago

  • Description updated (diff)
  • Category set to Hammer core

#2 Updated by Dominic Cleal almost 6 years ago

  • Tracker changed from Bug to Feature

#3 Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.7.2
  • Pull request https://github.com/theforeman/hammer-cli/pull/145 added
  • Pull request deleted ()

#4 Updated by Adam Ruzicka over 5 years ago

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

Also available in: Atom PDF