Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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
Classification: Red Hat
Component: Hosts
Version: 6.2.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium
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:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20516 0 None None None 2017-08-07 14:40:23 UTC
Red Hat Product Errata RHSA-2018:2927 0 None None None 2018-10-16 15:30:14 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 Satellite Program 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.