Project

General

Profile

Bug #17010

Hammer JSON output uses inconsistent capitalization

Added by Adam Ruzicka about 2 years ago. Updated 18 days ago.

Status:
Closed
Priority:
Normal
Category:
Other commands
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Ivan
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1253820

Description of problem:
Hammer returns inconsistent capitalization in its json output. For example, a user trying to parse the id's in an output may have to handle 'ID', 'Id', and 'id'.

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

How reproducible:
Always

Steps to Reproduce:
1. run one of the two commands detailed in Additional Info, or your own choice.
2. run at least one more command
3. Check consistency for returned keys

Actual results:
keys are inconsistently capitalized

Expected results:
keys are inconsistently capitalized. I prefer lowercase for ease

Additional info:

hammer --output=json organization info --id="31" 
{
  "Id": 31,
  "Name": "KVybjk",
  "Users": [

  ],
  "Smart proxies": [
    {
      "name": "rhsm-qe-1.rhq.lab.eng.bos.redhat.com",
      "id": 1,
      "url": "https://rhsm-qe-1.rhq.lab.eng.bos.redhat.com:9090" 
    }
...
  "Templates": [
    {
      "id": 44,
      "name": "Boot disk iPXE - generic host",
      "template_kind_id": 1,
      "template_kind_name": "Bootdisk" 
    },

hammer -v -u --output=json activation-key info --id="57" 
{
  "Name": "rI6jNBJVaR",
  "ID": 57,
  "Description": null,
  "Content Host Limit": "Unlimited",
  "Auto Attach": true,
  "Lifecycle Environment": null,
  "Content View": null,
  "Host Collections": {
  }
}

Related issues

Related to Hammer CLI - Tracker #2823: Tracker for usability issuesNew2013-07-24

Related to Hammer CLI - Tracker #14914: Tracker for output related issuesNew2016-05-03

Has duplicate Hammer CLI - Bug #19996: Keys in JSON output has inconsistent capitalizationDuplicate2017-06-13

Associated revisions

Revision ab81fe49 (diff)
Added by Oleh Fedorenko 3 months ago

Fixes #17010 - Hammer JSON output uses inconsistent capitalization

History

#1 Updated by Adam Ruzicka about 2 years ago

  • Target version set to 113

#2 Updated by Tomáš Strachota about 1 year ago

  • Description updated (diff)

#3 Updated by Tomáš Strachota about 1 year ago

#4 Updated by Tomáš Strachota about 1 year ago

#5 Updated by Tomáš Strachota about 1 year ago

  • Has duplicate Bug #19996: Keys in JSON output has inconsistent capitalization added

#6 Updated by Tomáš Strachota about 1 year ago

See also: http://projects.theforeman.org/issues/19996
It's a duplicate but it contains some information as well.

#7 Updated by Oleh Fedorenko 3 months ago

  • Triaged set to No
  • Assignee set to Oleh Fedorenko
  • Status changed from New to Assigned

#8 Updated by The Foreman Bot 3 months ago

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

#9 Updated by Oleh Fedorenko 3 months ago

  • Status changed from Ready For Testing to Closed

#10 Updated by Martin Bacovsky 18 days ago

  • Fixed in Releases hammer-cli-0.15.0 added

Also available in: Atom PDF