Project

General

Profile

Actions

Feature #6754

closed

JSON and/or YAML structured output adapters

Added by Dominic Cleal over 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Hammer core
Target version:
Difficulty:
Triaged:
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" 
        }
    ]
}

Actions #1

Updated by Dominic Cleal over 9 years ago

  • Description updated (diff)
  • Category set to Hammer core
Actions #2

Updated by Dominic Cleal over 9 years ago

  • Tracker changed from Bug to Feature
Actions #3

Updated by The Foreman Bot over 9 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 ()
Actions #4

Updated by Adam Ruzicka over 9 years ago

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

Also available in: Atom PDF