Bug 1478849 - [RFE] API Hosts GET returning also owner_name
Summary: [RFE] API Hosts GET returning also owner_name
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hosts
Version: 6.2.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: 6.4.0
Assignee: satellite6-bugs
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2017-08-07 10:22 UTC by Peter Vreman
Modified: 2019-11-05 23:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 15:28:38 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2927 None None None 2018-10-16 15:30:14 UTC
Foreman Issue Tracker 20516 None None None 2017-08-07 14:40:23 UTC

Description Peter Vreman 2017-08-07 10:22:31 UTC
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
2. 
3.

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 14:40:21 UTC
Created redmine issue http://projects.theforeman.org/issues/20516 from this bug

Comment 3 pm-sat@redhat.com 2017-09-07 10:10:57 UTC
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 08:42:07 UTC
Verified upstream manually +  by running test "should show host owner name" from test/controllers/api/v2/hosts_controller_test.rb

Comment 5 Peter Ondrejka 2018-07-02 11:13:47 UTC
Verified in Sat 6.4 snap 10, owner_name is now being included in the host outpu

Comment 7 errata-xmlrpc 2018-10-16 15:28:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2927


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