Bug 862809 - Product name is not unique
Summary: Product name is not unique
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Mike McCune
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-03 15:23 UTC by Mike McCune
Modified: 2014-09-18 15:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-09 19:38:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike McCune 2012-10-03 15:23:33 UTC
You can create duplicate products based on name within an individual provider.  This breaks CLI and API tools that require you to look up the product based on name.  The CLI and API allow you to do the following:


katello product create --name product-one --provider test_prov --label=product-one1
katello product create --name product-one --provider test_prov --label=product-one2
katello product create --name product-one --provider test_prov --label=product-one3
katello product create --name product-one --provider test_prov --label=product-one4

this means that you can't reference the product in subsequent calls:

katello repo create --name repo-one --product product-one --url http://something/test

Lets check to see if in 1.0 product names were required to be unique and if so lets re-enforce this restriction.

Comment 1 Mike McCune 2012-10-08 18:34:18 UTC
Note, with 1.0.1 you can't do the above:


# katello product create --name product-one --provider test_prov  --org ACME_Corporation
Successfully created product [ product-one ]
# katello product create --name product-one --provider test_prov  --org ACME_Corporation
Validation failed: Products within an organization must have unique name.

definite a regression

Comment 3 Mike McCune 2012-10-09 19:38:55 UTC
found out we have to make product name *not* unique because of BZ:

commit a87bd08016ce785999159b2f44aae39ef5059aae
Author: Adam Price <adprice>
Date:   Tue Aug 21 09:31:26 2012 -0400

    844806 - katello incorrectly prevents products with the same name in an organization
    
    removes the uniqueness validation for product names


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