Bug 1640644 - [RFE] Add switch to hammer CLI to disable the defaults
Summary: [RFE] Add switch to hammer CLI to disable the defaults
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: 6.5.0
Assignee: Martin Bacovsky
QA Contact: Sachin Ghai
URL:
Whiteboard:
Keywords: FutureFeature, Triaged
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-18 13:30 UTC by Martin Bacovsky
Modified: 2019-05-14 12:38 UTC (History)
11 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2019-05-14 12:38:16 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:38 UTC
Foreman Issue Tracker 25307 None None None 2018-10-25 13:16 UTC

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 pm-sat@redhat.com 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


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