Bug #6343

Parameters not wrapped when resolved from names

Added by Dominic Cleal about 4 years ago. Updated 7 days ago.

Status:Closed
Priority:Normal
Assignee:Martin Bacovsky
Category:Foreman commands (obsolete)
Target version:1.8.0
Difficulty: Team Backlog:
Triaged: Fixed in Releases:
Bugzilla link: Found in Releases:
Pull request:https://github.com/theforeman/hammer-cli/pull/122

Description

When running something like:

hammer --debug host create --hostgroup libvirt --name hammer2 --compute-resource localhost

The parameters that are passed in and resolved by name aren't nested within the "host" hash that's POSTed to /api/hosts:

[ INFO 2014-06-23 16:25:03 API] POST /api/hosts
[DEBUG 2014-06-23 16:25:03 API] Params: {
                   "host" => {
                              "name" => "hammer2",
                             "build" => true,
                           "enabled" => true,
                           "managed" => true,
                "compute_profile_id" => "2",
                "compute_attributes" => {
            "volumes_attributes" => {}
        },
        "host_parameters_attributes" => {},
             "interfaces_attributes" => {}
    },
    "compute_resource_id" => 1,
           "hostgroup_id" => 6,
     "compute_profile_id" => "2" 
}

This prevents Foreman from using them, so in this case, errors are given by Foreman that the attributes provided via the host group are missing.


Related issues

Related to Hammer CLI - Bug #7188: Unable to create libvirt VM with hammer and compute profiles New 08/21/2014

Associated revisions

Revision 3ade7117
Added by Martin Bačovský almost 4 years ago

Refs #6343 - parameters are not wrapped

Revision 5b6806ca
Added by Martin Bačovský almost 4 years ago

Fixes #6343 - params from searchables are not wrapped

Revision a8a8b551
Added by mbacovsky almost 4 years ago

Merge pull request #122 from mbacovsky/6343_wrapped_params

Refs #6343 - parameters are not wrapped

History

#1 Updated by Dominic Cleal about 4 years ago

  • Status changed from Assigned to Ready For Testing

#3 Updated by Dmitri Dolguikh about 4 years ago

  • Target version changed from 1.8.1 to 1.8.0

#4 Updated by The Foreman Bot about 4 years ago

  • Pull request https://github.com/theforeman/hammer-cli/pull/122 added

#5 Updated by Anonymous almost 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#6 Updated by Michael Moll about 2 years ago

  • Related to Bug #7188: Unable to create libvirt VM with hammer and compute profiles added

Also available in: Atom PDF