Bug 1272979

Summary: when creating a new host and specifying parameters, they get double-quoted
Product: Red Hat Satellite Reporter: Tomas Strachota <tstrachota>
Component: HammerAssignee: Tomas Strachota <tstrachota>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: bbuckingham, cwelton, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/12202
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:18:34 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: 1272980    
Bug Blocks: 1141671, 1201364    
Attachments:
Description Flags
parameters are correctly displayed in webUI none

Description Tomas Strachota 2015-10-19 10:45:02 UTC
example:

<pre>
"host_parameters_attributes" => [
       [ 0] {
            "name" => "raidstyle",
            "value" => "\"none\""
</pre>

This is my verbatim command parameter:
--parameters=raidstyle=none

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

Comment 2 Tomas Strachota 2015-10-19 10:45:08 UTC
Upstream bug assigned to tstrachota

Comment 4 Bryan Kearney 2015-10-20 14:01:24 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/12202 has been closed
-------------
Anonymous
Applied in changeset commit:hammer-cli-foreman|5e1b0ed4f2da41e05ebb9538a36f507b3bc681ed.

Comment 9 Sachin Ghai 2016-05-31 10:31:20 UTC
Verified with sat6.2 snap13.1

Now I see parameters gets quoted as below.

hammer -v -d -u admin -p changeme  host update --id 2 --parameters=timeserver=ntp.redhat.com


   [1] {
               "id" => 4,
             "name" => "timeserver",
            "value" => "ntp.redhat.com"
        }
    ],


If I see webUI -> edit host -> parameters -> I can see parameter without quotes and in "yaml" file too, its displayed correctly without quotes.

Comment 10 Sachin Ghai 2016-05-31 10:32:21 UTC
Created attachment 1163171 [details]
parameters are correctly displayed in webUI

Comment 11 Sachin Ghai 2016-05-31 10:34:38 UTC
Looks good to me.

        "host_parameters_attributes" => [
            [0] {
                 "name" => "timeserver",
                "value" => "ntp.redhat.com"
            }
        ],

Comment 12 Bryan Kearney 2016-07-27 11:18:34 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