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 1312946

Summary: hammer content-view version incremental-update doesn't recognize listed --environments option
Product: Red Hat Satellite Reporter: Eric Lavarde <elavarde>
Component: HammerAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.1.7CC: bbuckingham, ehelms, jcallaha, jsherril, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.15-1,gofer-2.7.6-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:21:59 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 Eric Lavarde 2016-02-29 15:23:59 UTC
Description of problem:
hammer complains about missing --environment-ids parameters whereas the help states that --environments is also valid.

Version-Release number of selected component (if applicable):
6.1.7
$ rpm -qa | grep hammer
rubygem-hammer_cli_foreman_tasks-0.0.3.5-1.el7sat.noarch
rubygem-hammer_cli_foreman_docker-0.0.3.10-1.el7sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el7sat.noarch
rubygem-hammer_cli_katello-0.0.7.21-1.el7sat.noarch
rubygem-hammer_cli-0.1.4.13-1.el7sat.noarch
rubygem-hammer_cli_gutterball-0.0.1.3-1.el7sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el7sat.noarch
rubygem-hammer_cli_import-0.10.20-1.el7sat.noarch
rubygem-hammer_cli_foreman-0.1.4.15-1.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. $ hammer content-view version incremental-update --content-view-version "xxx" --errata-ids yyy --environments lce-dev
An error occurred incrementally updating the content view:
  Error: option '--environment-ids' is required
  
  See: 'hammer content-view version incremental-update --help'
2.$ hammer content-view version incremental-update --help
[...]
 --environment-ids ENVIRONMENTS                      list of environment IDs to update the content view version in
                                                     Comma separated list of values.
 --environments ENVIRONMENT_NAMES                    Comma separated list of values.
[...]

Actual results:
--environments isn't recognized though it should be valid.

Expected results:
both --environments and --environment-ids can be similarly used.

Additional info:

Comment 1 Justin Sherrill 2016-03-31 15:43:00 UTC
This is going to be fixed as part of https://bugzilla.redhat.com/show_bug.cgi?id=1315278

Comment 3 Justin Sherrill 2016-04-01 16:18:39 UTC
Moving to POST for QA to test, no change needed for this bz

Comment 4 jcallaha 2016-06-20 15:39:31 UTC
Verified in Satellite 6.2 Beta Snap 16.

you can use the lifecycle-environments flag to specify the environment you want to target.

[root@rhsm-qe-1 ~]# hammer content-view version incremental-update --content-view-version-id 2 --errata-ids RHSA-2016:1139 --lifecycle-environments Dev --organization-id 1
[....................................................................................................................................................................................] [100%]
Content View: rhel7 capsule version 1.1
Added Content:
  Errata:
        RHSA-2016:1139
  Packages:
        squid-3.3.8-26.el7_2.3.x86_64

Comment 5 Bryan Kearney 2016-07-27 11:21:59 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/RHBA-2016:1501