Bug 1265585 - API Content host has inconsistent field release vs. release_version
API Content host has inconsistent field release vs. release_version
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
Katello QA List
: Triaged
Depends On:
Blocks: 1122832
  Show dependency treegraph
Reported: 2015-09-23 05:52 EDT by Peter Vreman
Modified: 2017-02-15 04:01 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-02-15 03:34:22 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Peter Vreman 2015-09-23 05:52:33 EDT
Description of problem:
The content hosts API has field name 'release'. In the activation keys the field is called 'release_version'. This is inconsistent and not intuitive for end-users of the API

# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"name\":\"li-lc-1589.hag.hilti.com\"}" -XGET https://localhost/katello/api/v2/organizations/3/systems | jq . | grep release
      "release": "6.7",
# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"name\":\"hg-crash::CITest::CITest-6.6.0\"}" -XGET https://localhost/katello/api/v2/organizations/3/activation_keys | jq . | grep release
      "release_version": "6.6",

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

How reproducible:

Steps to Reproduce:
1. Use API to get activation key details, list release version field
2. Use API to get content host details, list release version field

Actual results:
Different field names used

Expected results:
Consistent field name 'release_version'

Additional info:
Comment 2 Bryan Kearney 2016-08-04 16:10:02 EDT
Moving 6.2 bugs out to sat-backlog.
Comment 4 Ondřej Pražák 2017-02-15 03:34:22 EST
Closing, this is not relevant any more because endpoints for systems are deprecated in 6.2 and will be removed in a future version.
Comment 5 Peter Vreman 2017-02-15 04:01:05 EST
Confirmed it is fixed in the subcription_facet_attributes

[crash] root@li-lc-1578:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"search\":\"name = li-lc-1589.hag.hilti.com\"}" -XGET https://localhost/api/v2/organizations/3/hosts | jq .results[0].subscription_facet_attributes | grep release
  "release_version": "7Server",

Note You need to log in before you can comment on or make changes to this bug.