Bug 1235377 - GET /api/v2/hostgroups/:id returns an incomplete set of attributes
Summary: GET /api/v2/hostgroups/:id returns an incomplete set of attributes
Keywords:
Status: CLOSED WORKSFORME
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: 1262029 1262037
TreeView+ depends on / blocked
 
Reported: 2015-06-24 16:18 UTC by jaudet
Modified: 2019-02-25 21:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1262029 (view as bug list)
Environment:
Last Closed: 2016-03-07 13:50:16 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:18 UTC, jaudet
no flags Details

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

Description of problem:
A hostgroup has at least the following attributes:

* architecture
* content_view
* domain
* environment
* id
* lifecycle_environment
* location
* medium
* name
* operatingsystem
* organization
* parent
* ptable
* realm
* subnet

GET /api/v2/hostgroups/:id returns the following attributes:

* all_puppetclasses
* ancestry
* architecture_id
* architecture_name
* compute_profile_id
* compute_profile_name
* config_groups
* created_at
* domain_id
* domain_name
* environment_id
* environment_name
* id
* locations
* medium_id
* medium_name
* name
* operatingsystem_id
* operatingsystem_name
* organizations
* parameters
* ptable_id
* ptable_name
* puppet_ca_proxy_id
* puppet_proxy_id
* puppetclasses
* realm_id
* realm_name
* subnet_id
* subnet_name
* template_combinations
* title
* updated_at

The following attributes are not mentioned in the response:

* content_view
* lifecycle_environment

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

Steps to Reproduce:
1. Issue an HTTP GET request to `/api/v2/hostgroups/:id`.
2. Capture the response and examine the JSON contents.
3. Discover that several attributes are missing.

Actual results:
See above.

Expected results:
See above.

Additional info:

Comment 1 RHEL Program Management 2015-06-24 16:22:42 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 jaudet 2015-09-09 18:25:18 UTC
The `content_source` attribute should also be returned. This means that the following attributes are not returned but should be returned:

* content_source
* content_view
* lifecycle_environment

Comment 5 Elyézer Rezende 2016-03-07 13:50:16 UTC
This was tested on a Satellite 6.2 build and it is working as expected. Closing as works for me since we have tests to avoid any regression in order to ensure that it is going to land in good state on 6.2.


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