Bug 1235379 - GET /api/v2/hostgroups/:id returns misnamed attribute
Summary: GET /api/v2/hostgroups/:id returns misnamed attribute
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-24 16:19 UTC by jaudet
Modified: 2019-02-25 21:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-12 15:23:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Output of foreman-debug from a Satellite 6.1.0 system running RHEL 6.6. (1.60 MB, application/x-xz)
2015-06-24 16:19 UTC, jaudet
no flags Details

Description jaudet 2015-06-24 16:19:01 UTC
Created attachment 1042787 [details]
Output of foreman-debug from a Satellite 6.1.0 system running RHEL 6.6.

Description of problem:
A hostgroup has an attribute named "parent". I know this because:

* The API documentation states that one can issue an HTTP POST request to
  `/api/v2/hostgroups` and provide a `hostgroup[parent_id]` attribute.
  Hands-on experience shows that this works.
* The API documentation states that one can issue an HTTP PUT request to
  `/api/v2/hostgroups/:id` and provide a `hostgroup[parent_id]` attribute.
  Hands-on experience shows that this works.

The server responds to HTTP GET requests to `/api/v2/hostgroups/:id` with a JSON
payload that does not include a "parent" attribute. However, this payload
includes a semantically identical attribute named "ancestors". This mismatch is
disorienting and makes using the API harder.

Version-Release number of selected component (if applicable):
Satellite 6.1.0. Foreman-debug is attached.

How reproductible:
100%

Steps to Reproduce:
1. Issue an HTTP GET request to `/api/v2/hostgroups/:id`.
2. Capture the response and examine the keys in the JSON payload.
3. Discover that "parent" is missing, but an equivalent attribute named
   "ancestors" is returned.

Actual results:
See above.

Expected results:
See above

Additional info:

Comment 1 RHEL Program Management 2015-06-24 16:22:38 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 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 4 Bryan Kearney 2016-07-26 15:43:48 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 6 Bryan Kearney 2017-01-12 15:23:03 UTC
This is an older bug which I do not envision being fixed in the near term. I am closing this out. If you believe doing so is an issue, please feel free to re-open and provide additional business information. Thank you.


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