Bug 1503704
Summary: | hammer host-collection list requires organization parameter with host-id provided | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Roman Plevka <rplevka> |
Component: | Hammer | Assignee: | Andrew Kofink <akofink> |
Status: | CLOSED ERRATA | QA Contact: | Nikhil Kathole <nkathole> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.3.0 | CC: | akarsale, akofink, bbuckingham, dhlavacd, ehelms, kgaikwad, mhulan, nkathole, rabajaj, sabnave, tstrachota |
Target Milestone: | Unspecified | Keywords: | Regression, Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-02-21 17:30:57 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
Roman Plevka
2017-10-18 14:54:45 UTC
This is caused by BZ #1480508 what is the expected behavior? as in 6.3.0, the org paramaeter is now required even for a simple GET /host_collections call. From the BZ #1480508 i can see, this should not be required. Will the fix for this BZ address this issue as well? thanks organization_id should not be required in host_collections#index. I will investigate if BZ #1480508 is reproducible after making the change. Created redmine issue http://projects.theforeman.org/issues/21435 from this bug Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21435 has been resolved. VERIFIED Version Tested: Satellite-6.3 Snap 22 steps: # hammer host-collection list ---|------------------------------|-------|------------ ID | NAME | LIMIT | DESCRIPTION ---|------------------------------|-------|------------ 3 | hostcollectionin another org | None | 2 | host_collection_test1 | None | 1 | RHEL 7 Host collection | None | ---|------------------------------|-------|------------ # hammer host-collection list --host-id 15 ---|------------------------|-------|------------ ID | NAME | LIMIT | DESCRIPTION ---|------------------------|-------|------------ 1 | RHEL 7 Host collection | None | ---|------------------------|-------|------------ # hammer host-collection list --organization-id 1 ---|------------------------|-------|------------ ID | NAME | LIMIT | DESCRIPTION ---|------------------------|-------|------------ 2 | host_collection_test1 | None | 1 | RHEL 7 Host collection | None | ---|------------------------|-------|------------ # hammer host-collection list --organization-id 1 --host-id 15 ---|------------------------|-------|------------ ID | NAME | LIMIT | DESCRIPTION ---|------------------------|-------|------------ 1 | RHEL 7 Host collection | None | ---|------------------------|-------|------------ Also verified BZ #1480508 , # curl -s -X GET -k -u admin:<passwd> 'https://<satellite>/katello/api/v2/host_collections'| json_reformat { "total": 3, "subtotal": 3, "page": 1, "per_page": 20, "error": null, "search": null, "sort": { "by": "name", "order": "asc" }, "results": [ { "name": "hostcollectionin another org", "organization_id": 8, "max_hosts": null, "description": null, "total_hosts": 0, "unlimited_hosts": true, "created_at": "2017-10-31 06:53:59 UTC", "updated_at": "2017-10-31 06:53:59 UTC", "id": 3, "permissions": { "deletable": true, "editable": true } }, { "name": "host_collection_test1", "organization_id": 1, "max_hosts": null, "description": null, "total_hosts": 0, "unlimited_hosts": true, "created_at": "2017-10-31 06:52:20 UTC", "updated_at": "2017-10-31 06:52:20 UTC", "id": 2, "permissions": { "deletable": true, "editable": true } }, { "name": "RHEL 7 Host collection", "organization_id": 1, "max_hosts": null, "description": null, "total_hosts": 1, "unlimited_hosts": true, "created_at": "2017-10-31 06:51:49 UTC", "updated_at": "2017-10-31 06:51:49 UTC", "id": 1, "permissions": { "deletable": true, "editable": true } } ] } # curl -s -X GET -k -u admin:<passwd> 'https://<satellite>/katello/api/v2/host_collections?organization_id=1'| json_reformat { "total": 2, "subtotal": 2, "page": 1, "per_page": 20, "error": null, "search": null, "sort": { "by": "name", "order": "asc" }, "results": [ { "name": "host_collection_test1", "organization_id": 1, "max_hosts": null, "description": null, "total_hosts": 0, "unlimited_hosts": true, "created_at": "2017-10-31 06:52:20 UTC", "updated_at": "2017-10-31 06:52:20 UTC", "id": 2, "permissions": { "deletable": true, "editable": true } }, { "name": "RHEL 7 Host collection", "organization_id": 1, "max_hosts": null, "description": null, "total_hosts": 1, "unlimited_hosts": true, "created_at": "2017-10-31 06:51:49 UTC", "updated_at": "2017-10-31 06:51:49 UTC", "id": 1, "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/RHSA-2018:0336 |