Bug #4572

Setting domain parameter ends up with error

Added by Tomáš Strachota over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Tomáš Strachota
Category:Foreman commands
Target version:Foreman - Sprint 21
Difficulty: Bugzilla link:
Found in release: Pull request:
Story points-
Velocity based estimate-

Description

hammer domain set_parameter --domain-name domain82 --name param_a --value A
Could not set domain parameter:
  Error: undefined method `+' for nil:NilClass

Hammer log:

[ INFO 2014-03-06 10:29:15 Init] Initialization of Hammer CLI (0.0.18) has started...
[ INFO 2014-03-06 10:29:15 Init] Configuration from the file /root/.foreman/cli_config.yml has been loaded
[ INFO 2014-03-06 10:29:16 Modules] Extension module hammer_cli_foreman (0.0.18) loaded
[ INFO 2014-03-06 10:29:16 HammerCLI::MainCommand] Called with options: {}
[ INFO 2014-03-06 10:29:16 HammerCLIForeman::Domain] Called with options: {}
[ INFO 2014-03-06 10:29:16 HammerCLIForeman::Domain::SetParameterCommand] Called with options: {"option_domain_name"=>"domain82", "option_name"=>"param_a", "option_value"=>"A"}
[DEBUG 2014-03-06 10:29:16 Connection] Registered: Parameter
[DEBUG 2014-03-06 10:29:16 ForemanApi::Resources::Parameter] Calling 'index' with params {
    "domain_id" => "domain82" 
}
[ERROR 2014-03-06 10:29:16 Exception] Error: undefined method `+' for nil:NilClass
[ERROR 2014-03-06 10:29:16 Exception] 

NoMethodError (undefined method `+' for nil:NilClass):
    /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/http.rb:1405:in `addr_port'
    /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/http.rb:1340:in `begin_transport'
    /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
    /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/http.rb:1294:in `request'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rest-client-1.6.7/lib/restclient/request.rb:176:in `block in transmit'
    /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/http.rb:746:in `start'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rest-client-1.6.7/lib/restclient/resource.rb:51:in `get'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/foreman_api-0.1.11/lib/foreman_api/base.rb:78:in `http_call'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/foreman_api-0.1.11/lib/foreman_api/base.rb:61:in `perform_call'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/foreman_api-0.1.11/lib/foreman_api/resources/parameter.rb:21:in `index'
    /root/hammer/hammer-cli/lib/hammer_cli/apipie/resource.rb:53:in `call'
    /root/hammer/hammer-cli-foreman/lib/hammer_cli_foreman/parameter.rb:57:in `parameter_exist?'
    /root/hammer/hammer-cli-foreman/lib/hammer_cli_foreman/parameter.rb:42:in `execute'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:22:in `run'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/clamp-0.6.3/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:22:in `run'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/clamp-0.6.3/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:22:in `run'
    /usr/local/rvm/gems/ruby-1.9.3-p484/gems/clamp-0.6.3/lib/clamp/command.rb:125:in `run'
    ./bin/hammer:77:in `<main>'

Associated revisions

Revision 1c121d2d
Added by Tomas Strachota over 3 years ago

fixes #4572 - unable to set parameter

Revision d0ea188a
Added by Tomas Strachota over 3 years ago

Merge pull request #104 from tstrachota/set_param

fixes #4572 - unable to set parameter

Revision fa088c7d
Added by Tomas Strachota over 3 years ago

refs #4572 - unable to delete parameter

Revision 442c97a6
Added by Tomas Strachota over 3 years ago

Merge pull request #106 from tstrachota/set_param

refs #4572 - unable to delete parameter

History

#1 Updated by Tomáš Strachota over 3 years ago

  • Status changed from New to Assigned
  • Assigned To set to Tomáš Strachota
  • Target version set to Sprint 21

#2 Updated by Tomáš Strachota over 3 years ago

  • Status changed from Assigned to Ready For Testing

#3 Updated by Anonymous over 3 years ago

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

Applied in changeset foreman:hammer-cli-foreman|commit:1c121d2da2a95d47568bde278e4838b2938c5446.

Also available in: Atom PDF