Project

General

Profile

Bug #3952

hammer proxy info => undefined method `[]' for nil:NilClass

Added by Dominic Cleal over 6 years ago. Updated almost 2 years 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:
In Kanboard:

Description

# hammer -v proxy info --name $(hostname -f)
[ERROR 2014-01-06 23:44:59 Exception] Error: undefined method `[]' for nil:NilClass
Error: undefined method `[]' for nil:NilClass
[ERROR 2014-01-06 23:44:59 Exception] 

NoMethodError (undefined method `[]' for nil:NilClass):
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.15/lib/hammer_cli_foreman/smart_proxy.rb:36:in `extend_data'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.15/lib/hammer_cli_foreman/smart_proxy.rb:36:in `map'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.15/lib/hammer_cli_foreman/smart_proxy.rb:36:in `extend_data'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.15/lib/hammer_cli_foreman/commands.rb:125:in `retrieve_data'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/./apipie/read_command.rb:8:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/bin/hammer:61
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19

Seems to access the API OK:

Started GET "/api/smart_proxies/foreman.example.com" for ::1 at 2014-01-06 23:44:59 +0000
Processing by Api::V2::SmartProxiesController#show as JSON
  Parameters: {"apiv"=>"v2", "id"=>"foreman.example.com", "smart_proxy"=>{}}
Authorized user admin(Admin User)
  Rendered api/v2/smart_proxies/show.json.rabl (2.5ms)
Completed 200 OK in 26ms (Views: 2.8ms | ActiveRecord: 17.0ms)

foreman-1.4.0-0.develop.201401061304gite07a21c.el6.noarch
foreman-cli-1.4.0-0.develop.201401061304gite07a21c.el6.noarch
foreman-installer-1.4.0-0.develop.201312272053gitbc2acd9.el6.noarch
foreman-postgresql-1.4.0-0.develop.201401061304gite07a21c.el6.noarch
foreman-proxy-1.4.0-0.develop.201312091021git42bab91.el6.noarch
foreman-release-1.4.0-0.develop.201401011454git1245d23.el6.noarch
foreman-selinux-1.4.0-0.develop.201311220906gite342a0b.el6.noarch
rubygem-foreman_api-0.1.9-1.el6.noarch
rubygem-hammer_cli-0.0.14-1.el6.noarch
rubygem-hammer_cli_foreman-0.0.15-1.el6.noarch

Associated revisions

Revision f276e12e (diff)
Added by Tomas Strachota over 6 years ago

Fixes #3952 - undefined method on proxy info

Revision 012b7b8f
Added by Tomas Strachota over 6 years ago

Merge pull request #63 from tstrachota/3952_proxy_info

Fixes #3952 - undefined method on proxy info

History

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

  • Status changed from New to Ready For Testing
  • Assignee set to Tomáš Strachota

#2 Updated by Dominic Cleal over 6 years ago

  • Target version set to 1.9.2

#3 Updated by Anonymous over 6 years ago

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

Applied in changeset foreman:hammer-cli-foreman|commit:f276e12ec1b9bd5a861a2f014f8ef17981620505.

Also available in: Atom PDF