Unable to set empty parameter via hammer
|Status:||Ready For Testing|
|Assigned To:||Martin Bacovsky|
|Target version:||Foreman - Team Ivan - Iteration 23|
|Found in release:||Pull request:||https://github.com/theforeman/hammer-cli/pull/260|
|Velocity based estimate||-|
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.
hammer domain update --name test --dns nil HAMMER_NIL=None hammer domain update --name test --dns None