Red Hat Bugzilla – Bug 1272980
Can't set array parameters to hosts
Last modified: 2016-07-27 07:17:50 EDT
hammer host update --id 26 --parameters 'servers=["time.apple.com","pool.ntp.org"]'
Could not update the host:
undefined method `strip!' for ["a", "b"]:Array
The error happens on api side because hammer sends array object in value of the parameter instead of expected string.
Created from redmine issue http://projects.theforeman.org/issues/10547
Upstream bug assigned to firstname.lastname@example.org
Moving to POST since upstream bug http://projects.theforeman.org/issues/10547 has been closed
Applied in changeset commit:hammer-cli-foreman|1a31a19778c3d687aee0f387691305c3afca5c58.
Created attachment 1150462 [details]
[Verified] Screenshot Attached
Verified in Sat 6.2 snap 9.2
The issue is not repro and so fixed. No error is thrown as mentioned in Description.
# hammer host update --id 5 --parameters 'servers=["time.apple.com","pool.ntp.org"]'
# hammer host update --id 5 --parameters 'targets=[5,6]'
Verified from UI as well. [Screenshot Attached]
Moving to Verified.
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.