Bug #21768

Support NIL values in searchable options

Added by Martin Bacovsky 5 months ago. Updated 3 months ago.

Status:Closed
Priority:Normal
Assigned To:Martin Bacovsky
Category:Foreman commands
Target version:Team Ivan - Iteration 25
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/hammer-cli-foreman/pull/346, https://github.com/theforeman/hammer-cli/pull/264
Story points-
Velocity based estimate-

Description

Currently setting the NIL (unset) values is supported only for common options. The searchable options won't resolve properly:

hammer host update --id 83 --domain NIL
Could not update the host:
  Error: domain not found

Requested result is the domain_id to be unset


Related issues

Related to Hammer CLI - Bug #17252: Unable to set empty parameter via hammer Closed 11/07/2016
Related to Katello - Bug #22824: Resolving content_view_version_ids is broken Closed 03/08/2018
Related to Hammer CLI - Bug #22879: HammerCLIKatello::ContentViewPuppetModule::CreateCommand.... Duplicate 03/13/2018

Associated revisions

Revision 4928d442
Added by Martin Bacovsky 4 months ago

Refs #21768 - Make option sources overridable

Revision c61d1365
Added by Martin Bacovsky 3 months ago

Fixes #21768 - Allow nil searchables

Adds ability to correctly resolve name params set to NIL.

For better coexistence with hammer defaults the logic
was moved to option sources which is now preferred place
for manipulation with options. As a result when options
or all_options is called anywhere in the code it should
return fully resolved options in final state.

History

#1 Updated by Martin Bacovsky 5 months ago

  • Related to Bug #17252: Unable to set empty parameter via hammer added

#2 Updated by Martin Bacovsky 5 months ago

  • Tracker changed from Feature to Bug

#3 Updated by Martin Bacovsky 4 months ago

  • Target version set to Team Ivan - Iteration 25
  • Assigned To set to Martin Bacovsky
  • Status changed from New to Assigned

#4 Updated by The Foreman Bot 4 months ago

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

#5 Updated by The Foreman Bot 4 months ago

  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/346 added

#6 Updated by Martin Bacovsky 3 months ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#7 Updated by Andrew Kofink about 1 month ago

  • Related to Bug #22824: Resolving content_view_version_ids is broken added

#8 Updated by Ales Dujicek about 1 month ago

  • Related to Bug #22879: HammerCLIKatello::ContentViewPuppetModule::CreateCommand.get_identifier wrong numer of arguments added

Also available in: Atom PDF