Bug 1272980 - Can't set array parameters to hosts
Summary: Can't set array parameters to hosts
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Tomas Strachota
QA Contact: Jitendra Yejare
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1272979
TreeView+ depends on / blocked
 
Reported: 2015-10-19 10:46 UTC by Tomas Strachota
Modified: 2019-09-25 21:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:17:50 UTC
Target Upstream Version:


Attachments (Terms of Use)
[Verified] Screenshot Attached (125.40 KB, image/png)
2016-04-25 13:00 UTC, Jitendra Yejare
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 10547 0 None None None 2016-04-22 16:05:56 UTC

Description Tomas Strachota 2015-10-19 10:46:44 UTC
<pre>
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
</pre>

The error happens on api side because hammer sends array object in value of the parameter instead of expected string.

Comment 1 Tomas Strachota 2015-10-19 10:46:45 UTC
Created from redmine issue http://projects.theforeman.org/issues/10547

Comment 2 Tomas Strachota 2015-10-19 10:46:50 UTC
Upstream bug assigned to tstrachota@redhat.com

Comment 4 Bryan Kearney 2015-10-19 12:01:59 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/10547 has been closed
-------------
Anonymous
Applied in changeset commit:hammer-cli-foreman|1a31a19778c3d687aee0f387691305c3afca5c58.

Comment 8 Jitendra Yejare 2016-04-25 13:00:39 UTC
Created attachment 1150462 [details]
[Verified] Screenshot Attached

Comment 9 Jitendra Yejare 2016-04-25 13:00:54 UTC
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"]'
Host updated

# hammer host update --id 5 --parameters 'targets=[5,6]'
Host updated


Verified from UI as well. [Screenshot Attached]

Moving to Verified.

Comment 10 Bryan Kearney 2016-07-27 11:17:50 UTC
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.

https://access.redhat.com/errata/RHBA-2016:1501


Note You need to log in before you can comment on or make changes to this bug.