Project

General

Profile

Bug #14712

GET/POST/PUT /api/v2/host_collections/ do not return 'host_ids' attribute

Added by Brad Buckingham about 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1325989
Description of problem:
As per 6.2 changes, host_collections now accept host ids instead of system ids. Creation of host collection with hosts associated is successful, however it seems not possible to validate it through API - none of GET/POST/PUT requests return 'host_ids' attribute.

Version-Release number of selected component (if applicable):
Satellite 6.2 Beta Snap7.1

How reproducible:
Always

Steps to Reproduce:
1. Create host collection with hosts specified ('host_ids' attribute). E.g.:
HTTP POST to https://example.com/katello/api/v2/host_collections with data {"organization_id": 6, "host_ids": [4, 5], "name": "test_host_collection"}
2. Capture the response. Examine the JSON payload and discover that the "host_ids" attribute is not mentioned.
3. Issue HTTP GET and HTTP PUT requests to previously created host_collection. Check the "host_ids" attribute presence.

Actual results:
'host_ids' attribute is absent in GET/POST/PUT responses.

Expected results:
'host_ids' attribute is present and contains a list of associated hosts ids.

Additional info:

Associated revisions

Revision 88e2e81e (diff)
Added by Brad Buckingham about 3 years ago

fixes #14712 - host collection api - include the list of host_ids

This change is to add 'host_ids' to the api response used for
create/show/copy.

Revision ec46ddd9
Added by Brad Buckingham about 3 years ago

Merge pull request #5983 from bbuckingham/issue-14712

fixes #14712 - host collection api - include the list of host_ids

History

#1 Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Brad Buckingham
  • Pull request https://github.com/Katello/katello/pull/5983 added

#2 Updated by Brad Buckingham about 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Eric Helms about 3 years ago

  • Legacy Backlogs Release (now unused) set to 86

Also available in: Atom PDF