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 855267 - [RFE] in "product" CLI commands add new option "product_id"
Summary: [RFE] in "product" CLI commands add new option "product_id"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Hayk Hovsepyan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-07 07:24 UTC by Hayk Hovsepyan
Modified: 2019-09-25 21:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
As product name is no longer unique (i.e. multiple products may have the same name), the user needs to provide a unique identifier for the product when using the command line interface. This update allows users to alternatively provide a product label or ID in place of a product name.
Clone Of:
Environment:
Last Closed: 2012-12-04 19:52:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1543 0 normal SHIPPED_LIVE Important: CloudForms System Engine 1.1 update 2012-12-05 00:39:57 UTC

Description Hayk Hovsepyan 2012-09-07 07:24:11 UTC
Description of problem:
As the name of product is not unique anymore, it does not make sense to do operations with product by it's name in CLI.
It needs new option "product_id" added instead on "name" in product CLI.
Like the "product update --name --org --description" it should be 
"product update --product_id --org --description".
And the same for all product commands.

Comment 1 Mike McCune 2012-10-03 15:24:55 UTC
this will most likely be addressed in the following bug that makes product name unique:

https://bugzilla.redhat.com/show_bug.cgi?id=862809

Comment 2 Mike McCune 2012-10-09 20:05:49 UTC
This is a blocker since the CLI and API will no longer function with non-unique product names.

Comment 3 Brad Buckingham 2012-10-10 14:33:28 UTC
This issue appears to affect the following CLI commands which use product name:

changset: update
errata: list
product: update, delete, synchronize, status, cancel_sync, add_filter, list_filters, remove_filter, promote, set_plan, remove_plan
repo: create, discover, list

Comment 4 Brad Buckingham 2012-10-15 17:17:16 UTC
In order to address this bugzilla, we are adding the ability for the user to specify product name, label or id in the various commands where products are currently specified.  Since the same name may be used for multiple products, users may want to use product id always; however, names remain supported for backward compatability.

That said, if product name or label is provided and multiple products exist with that name/label, the user will receive an error message similar to:

   "More than 1 product found with the name or label provided, recommend 
    using product id.  The product id may be retrieved using the 'product
    list' command."

Prior to the changes, the CLI would always use the 'first' product that matched, which can result in unexpected behaviors.

This bugzilla affects several commands, such as the following:

- product update
- product add_filter
- product list_filters
- product remove_filter
- product set_plan
- product remove_plan
- product synchronize
- product status
- product cancel_sync
- product promote
- product delete

- changeset update (includes --add_product, --remove_product and --from_product)

- errata list
- errata info

- package list
- package info

- repo create
- repo discover
- repo list
- repo status 
- repo info
- repo update
- repo synchronize
- repo cancel_sync
- repo enable
- repo delete
- repo list_filters
- repo add_filter
- repo remove_filter

Comment 5 Brad Buckingham 2012-10-22 14:28:59 UTC
katello github pull request:

https://github.com/Katello/katello/pull/854

Comment 8 Hayk Hovsepyan 2012-10-24 08:41:25 UTC
Verified on revision:
katello-configure-1.1.9-8.el6cf.noarch
katello-common-1.1.12-17.el6cf.noarch
katello-1.1.12-17.el6cf.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-agent-1.1.2-1.el6cf.noarch
katello-selinux-1.1.1-2.el6cf.noarch
katello-glue-candlepin-1.1.12-17.el6cf.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-1.1.8-9.el6cf.noarch
katello-certs-tools-1.1.8-1.el6cf.noarch
katello-glue-pulp-1.1.12-17.el6cf.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-common-1.1.8-9.el6cf.noarch

product_id parameter is added for all mentioned commands and it works correctly.

Comment 10 errata-xmlrpc 2012-12-04 19:52:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1543.html

Comment 11 Mike McCune 2013-08-16 17:54:16 UTC
getting rid of 6.0.0 version since that doesn't exist


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