Bug #12353
closedAPI GET hostgroup does not return content_view_id and lifecycle_environment_id
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1267629
Description of problem:
You can set the content_view_id and lifecycle_environment_id using PUT:
PUT /api/hostgroups/:id
...
hostgroup[content_view_id]
optional , nil allowed
Value: Must be a number.
hostgroup[lifecycle_environment_id]
optional , nil allowed
Value: Must be a number.
But the GET /api/hostgroups/:id does not return those values. For scripts this makes it impossible to verify the current values
- curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/api/v2/hostgroups/24 | jq . | egrep '(content_view|lifecycle_environment)' #
In the WebUI those fields are visible as well as in object printed foreman-rake console.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. See curl command
2.
3.
Actual results:
fields are not returned
Expected results:
All additional Katello fields, including content_view_id,content_view_name,lifecycle_environment_id,lifecycle_environment_name are returned
Additional info: