Actions
Bug #8651
closedHost to Puppet class association isn't actually sending puppetclass_ids
Status:
Closed
Priority:
High
Assignee:
-
Category:
Foreman commands (obsolete)
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Description
Sorry, looks like I didn't test #8642 correctly. The list of puppetclass_ids in the API request is actually nil:
[root@foreman6 hammer_cli_foreman-0.1.3]# hammer -d host update --puppet-class-ids 1 --id 1 [ INFO 2014-12-10 17:06:08 Init] Initialization of Hammer CLI (0.1.3) has started... [DEBUG 2014-12-10 17:06:08 Init] Running at ruby 1.8.7-p352 [ INFO 2014-12-10 17:06:08 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded [ INFO 2014-12-10 17:06:08 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded [ INFO 2014-12-10 17:06:08 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/./apipie/../abstract.rb:68: warning: already initialized constant DEFAULT_LABEL_INDENT [DEBUG 2014-12-10 17:06:08 Connection] Registered: foreman [DEBUG 2014-12-10 17:06:08 API] Global headers: { "Accept-Language" => "en_GB", :accept => "application/json;version=2", :content_type => "application/json" } [ INFO 2014-12-10 17:06:08 Modules] Extension module hammer_cli_foreman (0.1.3) loaded [DEBUG 2014-12-10 17:06:08 Init] Using locale 'en_GB' [DEBUG 2014-12-10 17:06:08 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/locale' [DEBUG 2014-12-10 17:06:08 Init] 'mo' files for locale domain 'hammer-cli@system' loaded from '/usr/share/locale' [DEBUG 2014-12-10 17:06:08 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.3/locale' [DEBUG 2014-12-10 17:06:08 Init] 'mo' files for locale domain 'hammer-cli-foreman@system' loaded from '/usr/share/locale' [ INFO 2014-12-10 17:06:08 HammerCLI::MainCommand] Called with options: {"option_debug"=>true} [ INFO 2014-12-10 17:06:08 HammerCLIForeman::Host] Called with options: {} [ INFO 2014-12-10 17:06:08 HammerCLIForeman::Host::UpdateCommand] Called with options: {"option_interface_list"=>[], "option_puppetclass_ids"=>["1"], "option_volume_list"=>[], "option_id"=>"1"} [ INFO 2014-12-10 17:06:08 API] PUT /api/hosts/1 [DEBUG 2014-12-10 17:06:08 API] Params: { "host" => { "puppetclass_ids" => nil, "owner_id" => nil, "compute_attributes" => { "volumes_attributes" => {} }, "interfaces_attributes" => {}, "puppet_ca_proxy_id" => nil, "puppet_proxy_id" => nil, "host_parameters_attributes" => {} } }
No change is made on the server side in response:
Started PUT "/foreman/api/hosts/1" for 127.0.0.1 at 2014-12-10 17:06:08 +0000 Processing by Api::V2::HostsController#update as JSON Parameters: {"host"=>{"puppetclass_ids"=>nil, "owner_id"=>nil, "compute_attributes"=>{"volumes_attributes"=>{}}, "interfaces_attributes"=>{}, "puppet_ca_proxy_id"=>nil, "puppet_proxy_id"=>nil, "host_parameters_attributes"=>{}}, "apiv"=>"v2", "id"=>"1"}
Updated by Dominic Cleal about 10 years ago
- Related to Bug #8642: Host to Puppet class association throws: unknown attribute: puppet_class_ids added
Updated by The Foreman Bot about 10 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli-foreman/pull/162 added
- Pull request deleted (
)
Updated by Anonymous about 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset hammer-cli-foreman|a08b9c211f3d17c3cee199cca3b37dfe6f87e704.
Actions