Project

General

Profile

Bug #6842

confusing content host identifiers

Added by dustin tsang about 5 years ago. Updated about 1 year ago.

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

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1122938
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):
Satellite-6.0.4-RHEL-6-20140716.0-Satellite-x86_64

How reproducible:
always

Steps to Reproduce:
1. Compare various content host identifiers

Actual results:
1. hammer interprets uuid as id
  1. 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", ...}


Related issues

Related to Katello - Bug #6917: system/host-collection API should take database id rather than the uuidRejected

Associated revisions

Revision 95ac2fdf (diff)
Added by dustin tsang about 5 years ago

Fixes #6842 - system uuid as id bz1122938

In the Api, display uuid as the id in both the system show and index actions.

Revision 167b2f6e
Added by dustin tsang about 5 years ago

Merge pull request #4504 from dustint-rh/system_present_uuid_as_id

Fixes #6842 - system uuid as id bz1122938

History

#1 Updated by dustin tsang about 5 years ago

  • Related to Bug #6917: system/host-collection API should take database id rather than the uuid added

#2 Updated by dustin tsang about 5 years ago

created issue #6917.
in the long term, the API should only accept db ids for the content host

#3 Updated by Eric Helms about 5 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 54
  • Difficulty set to easy
  • Triaged changed from No to Yes

#4 Updated by The Foreman Bot about 5 years ago

  • Pull request https://github.com/Katello/katello/pull/4504 added
  • Pull request deleted ()

#5 Updated by dustin tsang about 5 years ago

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

#6 Updated by Eric Helms about 5 years ago

  • Legacy Backlogs Release (now unused) set to 13

Also available in: Atom PDF