Bug 1478849 - [RFE] API Hosts GET returning also owner_name
[RFE] API Hosts GET returning also owner_name
Status: POST
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hosts (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
Peter Ondrejka
: FutureFeature, Triaged, VerifiedUpstream
Depends On:
Blocks: 1122832
  Show dependency treegraph
Reported: 2017-08-07 06:22 EDT by Peter Vreman
Modified: 2018-04-06 02:07 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 20516 None None None 2017-08-07 10:40 EDT

  None (edit)
Description Peter Vreman 2017-08-07 06:22:31 EDT
Description of problem:
Currently GET of hosts returns only owner_id and owner_type. As an API user i would like to have also the owner_name for presentation and easier verification. The missing owner_name is also inconsistent with almost all other fields that have a _name variant available

[crash/LI] root@li-lc-1578:~# time curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/api/v2/hosts/7 | jq . | grep owner_
  "owner_id": 1,
  "owner_type": "User",

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

How reproducible:

Steps to Reproduce:
1. API GET hosts/x

Actual results:
There is no owner_name field returned

Expected results:
An owner_name with the login name of the owner is returned-

Additional info:
Comment 1 Ivan Necas 2017-08-07 10:40:21 EDT
Created redmine issue http://projects.theforeman.org/issues/20516 from this bug
Comment 3 pm-sat@redhat.com 2017-09-07 06:10:57 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20516 has been resolved.
Comment 4 Peter Ondrejka 2018-03-27 04:42:07 EDT
Verified upstream manually +  by running test "should show host owner name" from test/controllers/api/v2/hosts_controller_test.rb

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