Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 994404 - [RFE] generate unique labels for all katello objects
Summary: [RFE] generate unique labels for all katello objects
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-07 08:28 UTC by Ales Dujicek
Modified: 2019-09-26 13:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-18 15:27:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ales Dujicek 2013-08-07 08:28:57 UTC
Description of problem:

Labels are generated from name replacing /[^A-Za-z0-9-]/ with underscores.

But for both "bang!" and "bang?" you get "bang_":

> org create --name bang!
Successfully created org [ bang! ]
> org create --name bang?
Validation failed: Label already exists (including organizations being deleted)

I think unique label could be generated automatically. Products already have this:

> product create --org org --name product! --provider provider
Successfully created product [ product! ]
> product create --org org --name product? --provider provider
Successfully created product [ product? ]
> product list --org org -v
...
Name           : product!
Label          : product_
...
Name           : product?
Label          : product__1375862610930
...


It would by nice to have unique labels for content definitions, content views, repositories, environments and organizations too.


Version-Release number of selected component (if applicable):
katello-all-1.4.3-1.git.22.0cc1a3a.el6.noarch

Comment 1 Og Maciel 2013-08-12 21:03:14 UTC
Lovely idea! +100

Comment 2 RHEL Program Management 2013-09-17 04:20:43 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 5 Brad Buckingham 2016-08-18 15:27:39 UTC
For those resources that have a label, Satellite will ensure that the label is unique.  This includes resources such as: organization, product, repository & content view.

Using the example from the initial description, the following would be generated:

hammer> organization create --name bang!
Organization created
hammer> organization create --name bang?
Organization created
hammer> organization list
---|----------------------|--------------------------------------|------------
ID | NAME                 | LABEL                                | DESCRIPTION
---|----------------------|--------------------------------------|------------
4  | bang!                | bang_                                |            
5  | bang?                | 3f9937a7-6919-41ea-a0e0-4ef1f6d4ee89 |



This behavior has been in place since Satellite 6.1 (and possibly before); therefore, going to close this bugzilla.  If there are any concerns, please feel free to re-open.  Thanks!


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