Description of problem: this is a regression from 6.4 $ curl -sku admin:changeme -H "Content-Type: application/json" -d '{"name": "foo4", "organization_id": 3}' https://$(hostname)/katello/api/v2/host_collections { "name":"foo4", "organization_id":3, "max_hosts":null, "description":null, "total_hosts":0, "unlimited_hosts":true, "created_at":"2018-11-01 10:36:31 UTC", "updated_at":"2018-11-01 10:36:31 UTC", "id":6, "permissions":{ "deletable":true, "editable":true } } Version-Release number of selected component (if applicable): # rpm -qa katello katello-3.9.0-0.1.rc1.el7sat.noarch satellite6.5.0-1 Steps to Reproduce: 1. create host_collection using api (POST to katello/api/v2/host_collections) 2. observe the returned json Actual results: no host_ids key Expected results: host_id key should be returned even with an empty list Additional info:
Created redmine issue https://projects.theforeman.org/issues/25420 from this bug
Upstream bug assigned to cfouant
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25420 has been resolved.
*** Bug 1654383 has been marked as a duplicate of this bug. ***
VERIFIED # curl -sku admin:changeme -H "Content-Type: application/json" -d '{"name": "foo4", "organization_id": 3}' https://$(hostname)/katello/api/v2/host_collections {"host_ids":[],"name":"foo4","organization_id":3,"max_hosts":null,"description":null,"total_hosts":0,"unlimited_hosts":true,"created_at":"2018-12-10 14:02:59 UTC","updated_at":"2018-12-10 14:02:59 UTC","id":1,"permissions":{"deletable":true,"editable":true}} # rpm -qa | grep satellite satellite-6.5.0-5.beta.el7sat.noarch
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-2019:1222