Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1111310

Summary: Hammer product set-sync-plan provides both --sync_plan_id and --sync-plan-id options
Product: Red Hat Satellite Reporter: Rich Jerrido <rjerrido>
Component: HammerAssignee: Mike McCune <mmccune>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: unspecified    
Version: NightlyCC: bbuckingham, bkearney, cwelton, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/7076
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:09:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rich Jerrido 2014-06-19 17:29:41 UTC
Description of problem:
hammer provides both --sync_plan_id and --sync-plan-id options when running 'hammer product set-sync-plan'. Only one of the two should be provided. Both currently work, and will allow the end user to set a sync plan. 

Version-Release number of selected component (if applicable):
rubygem-hammer_cli-0.1.1-3.el6sat.noarch
rubygem-hammer_cli_foreman-0.1.1-8.el6sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-2.el6sat.noarch
rubygem-hammer_cli_katello-0.0.4-5.el6sat.noarch


How reproducible:
100%

Steps to Reproduce:
1. Install Sat6 beta
2. Invoke hammer as such

# hammer product set-sync-plan --help
Usage:
    hammer product set-sync-plan [OPTIONS]

Options:
    --gpg-key GPG_KEY_NAME         
    --gpg-key-id GPG_KEY_ID        
    --id ID                       product numeric identifier
    --name NAME                   Name to search by
    --new-name NEW_NAME            
    --organization ORGANIZATION_NAME  
    --organization-id ORGANIZATION_ID  
    --organization-label ORGANIZATION_LABEL  
    --sync-plan SYNC_PLAN_NAME     
    --sync-plan-id SYNC_PLAN_ID   Plan numeric identifier
    --sync_plan_id SYNC_PLAN_ID   plan numeric identifier
    -h, --help                    print help



Or by either of
hammer -u admin product set-sync-plan --sync-plan-id 1 --organization ACME_Corporation --id 2

or 
hammer -u admin product set-sync-plan --sync_plan_id 1 --organization ACME_Corporation --id 2

Comment 1 RHEL Program Management 2014-06-19 17:34:50 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 3 Dustin Tsang 2014-08-13 19:36:16 UTC
Created redmine issue http://projects.theforeman.org/issues/7076 from this bug

Comment 4 Bryan Kearney 2014-08-18 18:02:48 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/7076 has been closed
-------------
dustin tsang
Applied in changeset commit:hammer-cli-katello|50f96bd577cfc5b2a15f01745431ecc23b0d7039.

Comment 5 Christine Fouant 2014-08-27 20:33:19 UTC
*** Bug 1132175 has been marked as a duplicate of this bug. ***

Comment 6 jcallaha 2014-10-10 15:40:48 UTC
*** This bug is verified in upstream.  This fix should eventually land in future downstream builds ***

Verified in RHEL6/RHEL7

* candlepin-0.9.32-1.el7.noarch
* candlepin-common-1.0.8-1.el7.noarch
* candlepin-selinux-0.9.32-1.el7.noarch
* candlepin-tomcat-0.9.32-1.el7.noarch
* elasticsearch-0.90.10-7.el7.noarch
* foreman-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch
* foreman-compute-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch
* foreman-gce-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch
* foreman-libvirt-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch
* foreman-ovirt-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch
* foreman-postgresql-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch
* foreman-proxy-1.7.0-0.develop.201410081229git52f0bac.el7.noarch
* foreman-release-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch
* foreman-selinux-1.7.0-0.develop.201409301113git2f345de.el7.noarch
* foreman-vmware-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch
* katello-2.1.0-1.201410091752gitc9c45c1.el7.noarch
* katello-certs-tools-2.0.1-1.el7.noarch
* katello-default-ca-1.0-1.noarch
* katello-installer-2.1.0-1.201410021645git304e036.el7.noarch
* katello-repos-2.1.1-1.el7.noarch
* katello-server-ca-1.0-1.noarch
* openldap-2.4.39-3.el7.x86_64
* pulp-docker-plugins-0.2.1-0.2.beta.el7.noarch
* pulp-katello-0.3-3.el7.noarch
* pulp-nodes-common-2.5.0-0.7.beta.el7.noarch
* pulp-nodes-parent-2.5.0-0.7.beta.el7.noarch
* pulp-puppet-plugins-2.5.0-0.7.beta.el7.noarch
* pulp-puppet-tools-2.5.0-0.7.beta.el7.noarch
* pulp-rpm-plugins-2.5.0-0.7.beta.el7.noarch
* pulp-selinux-2.5.0-0.7.beta.el7.noarch
* pulp-server-2.5.0-0.7.beta.el7.noarch
* python-ldap-2.4.6-6.el7.x86_64
* ruby193-rubygem-ldap_fluff-0.3.1-1.el7.noarch
* ruby193-rubygem-net-ldap-0.3.1-2.el7.noarch
* ruby193-rubygem-runcible-1.2.0-1.el7.noarch
* rubygem-hammer_cli-0.1.3-1.201409240954gitf3c47c7.el7.noarch
* rubygem-hammer_cli_foreman-0.1.3-1.201409191432gitc38f9c8.el7.noarch
* rubygem-hammer_cli_foreman_tasks-0.0.3-2.201409091410git163c264.git.0.988ca80.el7.noarch
* rubygem-hammer_cli_import-0.10.4-1.el7.noarch
* rubygem-hammer_cli_katello-0.0.6-1.201410091836gitf7ca881.git.0.4d3b99d.el7.noarch

Comment 8 Bryan Kearney 2015-08-11 13:33:52 UTC
This bug is slated to be released with Satellite 6.1.

Comment 9 errata-xmlrpc 2015-08-12 05:09:38 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.

https://access.redhat.com/errata/RHSA-2015:1592