Project

General

Profile

Actions

Feature #6754

closed

JSON and/or YAML structured output adapters

Added by Dominic Cleal over 10 years ago. Updated over 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

Also available in: Atom PDF