Bug 1272980

Summary: Can't set array parameters to hosts
Product: Red Hat Satellite Reporter: Tomas Strachota <tstrachota>
Component: HammerAssignee: Tomas Strachota <tstrachota>
Status: CLOSED ERRATA QA Contact: Jitendra Yejare <jyejare>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: bbuckingham, cwelton, jyejare, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/10547
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:17:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1272979    
Attachments:
Description Flags
[Verified] Screenshot Attached none

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

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