Bug 1216234

Summary: GET /api/v2/locations/:id does not return information about realms
Product: Red Hat Satellite Reporter: jaudet
Component: Organizations and LocationsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Chris Duryee <cduryee>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: bbuckingham, cduryee, jmagen
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/10357
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 08:50:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jaudet 2015-04-28 20:19:17 UTC
Description of problem:
A location can be associated with zero or more realms. The API documentation makes mention of this in the documentation for POST /api/v2/locations and PUT /api/v2/locations/:id, and the UI exposes this capability too. (See the relevant API documentation page at https://sat.example.com/apidoc/v2/locations.html and search for "realm".) However, a GET request to /api/v2/locations/:id will return information about associated realms.

Version-Release number of selected component (if applicable):
Tested against Satellite-6.1.0-RHEL-6-20150424.0 and Satellite-6.1.0-RHEL-7-20150424.0.

How reproducible:
100%

Steps to Reproduce:
1. Issue an HTTP GET request to https://sat.example.com/api/v2/locations/:id
2. Examine the response.
3. Discover that realms are not mentioned.

Actual results:

    [
        u'compute_resources',
        u'config_templates',
        u'created_at',
        u'description',
        u'domains',
        u'environments',
        u'hostgroups',
        u'id',
        u'media',
        u'name',
        u'organizations',
        u'parameters',
        u'select_all_types',
        u'smart_proxies',
        u'subnets',
        u'title',
        u'updated_at',
        u'users',
    ]

Expected results:
Same as above, but with realms mentioned.

Additional info:

Comment 1 RHEL Program Management 2015-04-28 20:33:21 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 jmagen@redhat.com 2015-05-03 12:53:33 UTC
Yes, bug. Realms should have been added to API response for locs/orgs when introduced

Comment 4 Bryan Kearney 2015-05-04 13:40:27 UTC
Created redmine issue http://projects.theforeman.org/issues/10357 from this bug

Comment 5 Bryan Kearney 2015-08-25 18:35:20 UTC
Upstream bug component is Multi Org

Comment 6 Bryan Kearney 2015-12-02 20:07:00 UTC
*** Bug 1230873 has been marked as a duplicate of this bug. ***

Comment 7 Bryan Kearney 2016-01-12 09:10:08 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/10357 has been closed
-------------
Ondřej Pražák
Applied in changeset commit:502feabe1259186625453a9dcc2165ccd0292741.

Comment 12 errata-xmlrpc 2016-07-27 08:50:41 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/RHBA-2016:1500