Bug 1325989
Summary: | GET/POST/PUT /api/v2/host_collections/ do not return 'host_ids' attribute | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Andrii Balakhtar <abalakht> |
Component: | API | Assignee: | Brad Buckingham <bbuckingham> |
Status: | CLOSED ERRATA | QA Contact: | jcallaha |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.2.0 | CC: | bbuckingham, jcallaha, sthirugn, will_darton |
Target Milestone: | Unspecified | Keywords: | Regression, Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | rubygem-katello-3.0.0.74-1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-09-14 21:00:04 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Andrii Balakhtar
2016-04-11 14:14:16 UTC
Created redmine issue http://projects.theforeman.org/issues/14712 from this bug Upstream katello PR: https://github.com/Katello/katello/pull/5983 FailedQA in Satellite 6.2.0 GA Snap 10.0 GET and POST now have `host_ids` attribute, but PUT is still missing it. >>> # GET ... >>> entities.HostCollection(id=1).read() 2016-05-06 17:14:46 - nailgun.client - DEBUG - Making HTTP GET request to https://example.com/katello/api/v2/host_collections/1 with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}} and no data. 2016-05-06 17:14:47 - nailgun.client - DEBUG - Received HTTP 200 response: {"host_ids":[],"name":"𪦱𥄆䇁𣛤쐥𝗭쵶콹씉秚𩪵𤤯寇𤱂𢪧츜鉿𨛨铽눵𤓦𓇸쨅𣎔𦴻휵","organization_id":130,"max_hosts":null,"description":"kmBvKnosCRqiipfXsmzizZRYblVYPplBFV","total_hosts":0,"unlimited_hosts":true,"created_at":"2016-05-06 03:02:28 UTC","updated_at":"2016-05-06 03:02:28 UTC","id":1,"permissions":{"deletable":true,"editable":true}} >>> # POST ... >>> entities.HostCollection().create() 2016-05-06 17:15:59 - nailgun.client - DEBUG - Making HTTP POST request to https://example.com/katello/api/v2/host_collections with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}} and data {"organization_id": 1387, "name": "\u60ca\u8d36\u7bc4\ud84a\udce2\ud851\udef8\uac1d\ud800\udf0f\ud843\udc63\ud86d\udeb3\ud843\uddc5\ud86a\udd8c\ud864\udd8f\ud85d\udc79\ubd35\u8cff\ud84f\ude17\ua13a"}. 2016-05-06 17:16:00 - nailgun.client - DEBUG - Received HTTP 200 response: {"host_ids":[],"name":"惊贶範𢣢𤛸객𐌏𠱣𫚳𠷅𪦌𩆏𧑹봵賿𣸗ꄺ","organization_id":1387,"max_hosts":null,"description":null,"total_hosts":0,"unlimited_hosts":true,"created_at":"2016-05-06 14:16:00 UTC","updated_at":"2016-05-06 14:16:00 UTC","id":100,"permissions":{"deletable":true,"editable":true}} >>> # PUT ... >>> entities.HostCollection(id=1).update() 2016-05-06 17:17:49 - nailgun.client - DEBUG - Making HTTP PUT request to https://example.com/katello/api/v2/host_collections/1 with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}} and data {"id": 1}. 2016-05-06 17:17:50 - nailgun.client - DEBUG - Received HTTP 200 response: {"name":"𪦱𥄆䇁𣛤쐥𝗭쵶콹씉秚𩪵𤤯寇𤱂𢪧츜鉿𨛨铽눵𤓦𓇸쨅𣎔𦴻휵","organization_id":130,"max_hosts":null,"description":"kmBvKnosCRqiipfXsmzizZRYblVYPplBFV","total_hosts":0,"unlimited_hosts":true,"created_at":"2016-05-06 03:02:28 UTC","updated_at":"2016-05-06 03:02:28 UTC","id":1,"permissions":{"deletable":true,"editable":true}} Upstream katello PR to address comment 5: https://github.com/Katello/katello/pull/6141 Good catch Andrii! GET https://<sat host>.redhat.com/katello/api/host_collections/1 { "host_ids": [ 2, 35, 26, 27, 30, 31, 29, 33, 32, 34, 28 ], "name": "docker", "organization_id": 1, "max_hosts": null, "description": null, "total_hosts": 11, "unlimited_hosts": true, "created_at": "2016-09-01 18:51:36 UTC", "updated_at": "2016-09-01 18:51:36 UTC", "id": 1, "permissions": { "deletable": true, "editable": true } } POST https://<sat host>.redhat.com/katello/api/host_collections/ {"organization_id": 1, "host_ids": [4, 5], "name": "test_host_collection"} { "host_ids": [ 4, 5 ], "name": "test_host_collection", "organization_id": 1, "max_hosts": null, "description": null, "total_hosts": 2, "unlimited_hosts": true, "created_at": "2016-09-07 18:47:21 UTC", "updated_at": "2016-09-07 18:47:21 UTC", "id": 2, "permissions": { "deletable": true, "editable": true } } PUT https://<sat host>.redhat.com/katello/api/host_collections/2 {"name": "changed_host_collection"} { "host_ids": [ 4, 5 ], "name": "changed_host_collection", "organization_id": 1, "max_hosts": null, "description": null, "total_hosts": 2, "unlimited_hosts": true, "created_at": "2016-09-07 18:47:21 UTC", "updated_at": "2016-09-07 18:49:18 UTC", "id": 2, "permissions": { "deletable": true, "editable": true } } 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/RHBA-2016:1885 |