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 1640644

Summary: [RFE] Add switch to hammer CLI to disable the defaults
Product: Red Hat Satellite Reporter: Martin Bacovsky <mbacovsk>
Component: HammerAssignee: Martin Bacovsky <mbacovsk>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: akarsale, apatel, bkearney, dhlavacd, ehelms, kgaikwad, mbacovsk, mhulan, mshira, nkathole, rabajaj, rjerrido
Target Milestone: 6.5.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:38:16 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 Martin Bacovsky 2018-10-18 13:30:25 UTC
Description of problem:
While using Hammer we sometimes don't want the values in defaults to step in and it would be helpful to have a switch to disable the defaults


Actual results:
There is no way how to disable the defaults from applying

Expected results:
There is a switch such as:

hammer --no-defaults user list

Comment 1 Martin Bacovsky 2018-10-25 13:16:16 UTC
Created redmine issue https://projects.theforeman.org/issues/25307 from this bug

Comment 3 Martin Bacovsky 2018-11-02 12:14:47 UTC
Bryan, yes, it most probably will go to hammer 0.15.1 which will be in Foreman 1.20

Comment 4 Satellite Program 2018-11-02 16:03:39 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25307 has been resolved.

Comment 5 Brad Buckingham 2018-12-11 16:40:40 UTC
The fix for this one is already in the 6.5 SNAP.

Comment 6 Suraj Bora 2018-12-17 10:17:24 UTC
Hi,

Can you please provide following information
1. Significance and expected behaviour of no-default flag.
2. Does default here implies to default user or also to other default setting of hammer.
3. Exact steps to reproduce/verify this.

Comment 7 Martin Bacovsky 2018-12-17 16:53:40 UTC
Hi Suraj,
first of all I should have explained what I mean by the "defaults".
The defaults is a feature of Hammer CLI allowing user to set default values for certain CLI options. E.g. If I use only a single organization in Satellite i can do

   hammer defaults add --param-name organization-id --param-value 1

and from now on hammer automatically adds --organization-id=1 to each command that has the option.

Sometimes this behavior is not wanted and --no-use-defaults will make hammer to ignore the set defaults. You can also turn off the defaults in cli config (permanent -no-use-defaults) in which case you may use --use-defaults on CLI to temporarily override and enable defaults.


HTH, 
Martin

Comment 8 Suraj Bora 2018-12-18 08:34:53 UTC
Hi Martin,

Thanks for information I am able to verify this with snap 8.

Comment 10 Suraj Bora 2018-12-18 08:42:40 UTC
Verified build: satellite-6.5.0 snap 8

Comment 13 errata-xmlrpc 2019-05-14 12:38:16 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-2019:1222