Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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