Actions
Bug #19996
closedKeys in JSON output has inconsistent capitalization
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Hammer core
Target version:
-
Description
Create/update/delete commands print downcase keys (it's how they come from the API) while info/list print use first letter capital (field names from output definition). The capitalization should be consistent to enable easier scripting of "find or create" actions (often used in ansible).
For example:
architecture_json=$(hammer --output=json architecture info --name i386 2>/dev/null || hammer --output=json architecture create --name i386)
Typical current output of a create action:
hammer --output=json architecture create --name i386 { "message": "Architecture created", "id": 3, "name": "i386" }
Typical current output of an info action:
hammer --output=json architecture info --name i386 { "Id": 3, "Name": "i386", "Operating systems": [ ], "Created at": "2017-06-13 13:29:28 UTC", "Updated at": "2017-06-13 13:29:28 UTC" }
Updated by Tomáš Strachota over 7 years ago
- Related to Tracker #2823: Tracker for usability issues added
Updated by Tomáš Strachota over 7 years ago
- Related to Tracker #14914: Tracker for output related issues added
Updated by Tomáš Strachota about 7 years ago
I found out that json output from katello info/index commands return a third form "ID". We should make this consistent as well.
Updated by Tomáš Strachota almost 7 years ago
- Is duplicate of Bug #17010: Hammer JSON output uses inconsistent capitalization added
Updated by Tomáš Strachota almost 7 years ago
- Status changed from New to Duplicate
Actions