Project

General

Profile

Actions

Bug #17252

closed

Unable to set empty parameter via hammer

Added by Tomáš Strachota over 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Hammer core
Target version:
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Hammer doesn't allow to to send nil values, which prevents users from re-setting attributes to their default values in some cases. The only thing a user can do is to send empty string --param="" but it's not the same as nil.

From the discussions about this topic it seems that one of the solutions could be to use a reserved value, that would be translated to nil internally. Users could override the value using some env variable.
For example:

hammer domain update --name test --dns nil
HAMMER_NIL=None hammer domain update --name test --dns None


Related issues 5 (0 open5 closed)

Related to Hammer CLI - Bug #13994: Cannot dis-associate a Subnet from a Domain using HammerClosedActions
Related to Hammer CLI - Bug #17250: Unable to remove all locations or organizations from a domainClosedActions
Related to Hammer CLI - Tracker #2823: Tracker for usability issuesClosed

Actions
Related to Hammer CLI - Bug #21768: Support NIL values in searchable optionsClosedMartin Bacovsky11/26/2017Actions
Related to Hammer CLI - Bug #22009: Invalid routes with NIL as a route param are selectedClosedMartin Bacovsky12/18/2017Actions
Actions #1

Updated by Tomáš Strachota over 7 years ago

  • Related to Bug #13994: Cannot dis-associate a Subnet from a Domain using Hammer added
Actions #2

Updated by Tomáš Strachota over 7 years ago

  • Related to Bug #17250: Unable to remove all locations or organizations from a domain added
Actions #3

Updated by Tomáš Strachota over 7 years ago

Actions #4

Updated by Martin Bacovsky over 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Martin Bacovsky
  • Target version changed from 115 to 233
Actions #5

Updated by The Foreman Bot over 6 years ago

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

Updated by Martin Bacovsky over 6 years ago

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

Updated by Martin Bacovsky over 6 years ago

  • translation missing: en.field_release set to 289
Actions #8

Updated by Martin Bacovsky over 6 years ago

  • Related to Bug #21768: Support NIL values in searchable options added
Actions #9

Updated by Martin Bacovsky over 6 years ago

  • Related to Bug #22009: Invalid routes with NIL as a route param are selected added
Actions

Also available in: Atom PDF