Bug 994404 - [RFE] generate unique labels for all katello objects
[RFE] generate unique labels for all katello objects
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
Katello QA List
: FutureFeature, Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-08-07 04:28 EDT by Ales Dujicek
Modified: 2016-08-18 11:27 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-08-18 11:27:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ales Dujicek 2013-08-07 04:28:57 EDT
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):
Comment 1 Og Maciel 2013-08-12 17:03:14 EDT
Lovely idea! +100
Comment 2 RHEL Product and Program Management 2013-09-17 00:20:43 EDT
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 11:27:39 EDT
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.