Bug 1122938 - confusing content host identifiers
Summary: confusing content host identifiers
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: Unspecified
Assignee: Dustin Tsang
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-24 12:52 UTC by Tomas Lestach
Modified: 2017-02-23 21:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-08-07 12:20:00 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6842 0 None None None 2016-04-22 16:54:32 UTC

Description Tomas Lestach 2014-07-24 12:52:49 UTC
Description of problem:
content host id and uuid are both used as content host identifiers, what is quite confusing

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Compare various content host identifiers

Actual results:
1. hammer interprets uuid as id
# hammer content-host list --organization-id 1
ID                                   | NAME                              
49eb6336-03cf-4396-8302-67d3cff2c24e | vmware194.englab.brq.redhat.com   

2. api documentation for "PUT /katello/api/systems/:id" says:
id /required/ UUID of the content host /Value: String

so, uuid is used as content host id

3. but the return hash of "PUT /katello/api/systems/:id" API with 'id' set to 'b7dbf416-dd8d-4ab5-95ed-ffe51100ce2c' contains:
{..., "id"=>2, ...}
it contains uuid as well: "uuid"=>"b7dbf416-dd8d-4ab5-95ed-ffe51100ce2c",
but it's confusing to update an object with a specific *id* and getting another *id* in the response

Expected results:
Hide the 'real' content host id ("id"=>2) from the user as it isn't used anywhere and is only confusing (or drop it completely)

Additional info:
What about returning both - id and uuid keys - with the same value?
{..., "id"=>"b7dbf416-dd8d-4ab5-95ed-ffe51100ce2c", "uuid"=>"b7dbf416-dd8d-4ab5-95ed-ffe51100ce2c", ...}

Comment 2 Dustin Tsang 2014-07-30 14:56:32 UTC
Created redmine issue http://projects.theforeman.org/issues/6842 from this bug

Comment 3 Bryan Kearney 2014-08-05 20:05:05 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6842 has been closed
dustin tsang
Applied in changeset commit:katello|95ac2fdf4b16d70f8f4853fbeb7d57b3616ee8bf.

Comment 4 Bryan Kearney 2014-08-07 12:20:00 UTC
These have been closd upstream. You will see these delivered with Satellite 6.1.

Note You need to log in before you can comment on or make changes to this bug.