Project

General

Profile

Feature #25307

Add switch to hammer CLI to disable the defaults

Added by Martin Bacovsky 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Category:
Hammer core
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Ivan
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1640644

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

Associated revisions

Revision f9b27dc1 (diff)
Added by Martin Bacovsky 6 months ago

Fixes #25307 - Add ability to disable defaults (#293)

Fixes #25307 - Add ability to disable defaults

Processing of defaults can be altered in cli_config.yml with
:use_defaults: true/false or on CLI with --use-defaults
--no-use-defaults respectively. both ways can be combined.
The value is propagated in the context as :use_defaults.
The defaults are enabled by default.

Hammer settings class was changed so that it can be the single
source of default values which has three benefits
- we don't have to fallback to default with every use of the value
- we can keep the values commented out in config which makes it easier
to change later
- there is single place to look for the default setting

History

#1 Updated by Martin Bacovsky 6 months ago

  • Assignee set to Martin Bacovsky
  • Status changed from New to Assigned
  • Category changed from Other commands to Hammer core
  • Team Backlog Ivan added

#2 Updated by The Foreman Bot 6 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli/pull/293 added

#3 Updated by Martin Bacovsky 6 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Martin Bacovsky 6 months ago

  • Fixed in Releases hammer-cli-0.15.1, hammer-cli-0.16.0 added

Also available in: Atom PDF