Project

General

Profile

Bug #3583

"os set_parameter" fails with undefined method `[]' for nil:NilClass

Added by Dominic Cleal over 5 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Category:
Foreman commands (obsolete)
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When setting a parameter on an OS you get the following error:

[root@foreman ~]# hammer os set_parameter --os-id 1 --name foo --value bar
Could not set operating system parameter:
Error: undefined method `[]' for nil:NilClass

rubygem-hammer_cli-0.0.8-1.el6.noarch
rubygem-hammer_cli_foreman-0.0.9-2.el6.noarch
rubygem-foreman_api-0.1.8-1.el6.noarch

Hammer seems to be making a strange request to Foreman compared to the exact same command for domains:

Started GET "/api/domains/1/parameters" for 127.0.0.1 at 2013-11-05 15:55:04 +0000
Processing by Api::V2::ParametersController#index as JSON
  Parameters: {"domain_id"=>"1", "parameter"=>{}}
Authorized user admin(Dominic Cleal)
  Rendered api/v2/parameters/index.json.rabl (5.0ms)
Completed 200 OK in 39ms (Views: 5.3ms | ActiveRecord: 10.6ms)

Started GET "/api/operatingsystems?operatingsystem_id=1" for 127.0.0.1 at 2013-11-05 15:55:39 +0000
Processing by Api::V1::OperatingsystemsController#index as JSON
  Parameters: {"operatingsystem_id"=>"1", "operatingsystem"=>{}}
Authorized user admin(Dominic Cleal)
  Rendered api/v1/operatingsystems/index.json.rabl (258.0ms)
Completed 200 OK in 276ms (Views: 251.2ms | ActiveRecord: 14.2ms)

(https://bugzilla.redhat.com/show_bug.cgi?id=1026803)

Associated revisions

Revision 92eee5b6 (diff)
Added by Martin Bacovsky over 5 years ago

Fixed #3583 - set_parameter commands are failing

Revision eb06d2e4
Added by mbacovsky over 5 years ago

Merge pull request #53 from mbacovsky/3583_set_parameter

Fixed #3583 - set_parameter commands are failing

History

#1 Updated by Martin Bacovsky over 5 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Martin Bacovsky
  • Target version set to 1.9.3
  • Legacy Backlogs Release (now unused) set to 2

#2 Updated by Martin Bacovsky over 5 years ago

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

Applied in changeset foreman:hammer-cli-foreman|commit:92eee5b62360668691beb6f37384f1645f2e6b1d.

Also available in: Atom PDF