Project

General

Profile

Bug #3839

Getting error while creating environments

Added by Og Maciel over 9 years ago. Updated over 4 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:
Red Hat JIRA:

Description

  1. LANG=en_US hammer -u admin -p changeme --csv environment create --name='om7k09j8'
    Could not create the environment:
    Error: can't convert String into Integer
  1. LANG=en_US hammer -v -u admin -p changeme --csv environment create --name='om7k09j8'
    [ERROR 2013-12-09 16:08:41 Exception] Error: undefined method `[]' for nil:NilClass
    Error: undefined method `[]' for nil:NilClass
    [ERROR 2013-12-09 16:08:41 Exception]

NoMethodError (undefined method `[]' for nil:NilClass):
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.12/lib/hammer_cli_foreman/exception_handler.rb:22:in `handle_unprocessable_entity'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/lib/hammer_cli/exception_handler.rb:23:in `send'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/lib/hammer_cli/exception_handler.rb:23:in `handle_exception'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/lib/hammer_cli/messages.rb:26:in `handle_exception'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/lib/hammer_cli/abstract.rb:30: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.12/lib/hammer_cli/abstract.rb:24: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.12/lib/hammer_cli/abstract.rb:24:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/lib/hammer_cli/main.rb:43: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.12/bin/hammer:62
/usr/bin/hammer:19:in `load'
/usr/bin/hammer:19

  1. rpm -qa | grep hammer
    rubygem-hammer_cli_foreman-0.0.12-1.el6.noarch
    rubygem-hammer_cli-0.0.12-1.el6.noarch

Associated revisions

Revision 38d6d266 (diff)
Added by Martin Bacovsky over 9 years ago

Fixed #3839 - error while creating resources with --csv

Revision bfba416f
Added by mbacovsky over 9 years ago

Merge pull request #57 from mbacovsky/3839_csv_mesage_create

Fixed #3839 - error while creating resources with --csv

History

#1 Updated by Og Maciel over 9 years ago

[root@qetello02 ~]# LANG=en_US hammer -u admin -p changeme --csv environment create --name='om7k09j8'
Could not create the environment
[root@qetello02 ~]# LANG=en_US hammer -u admin -p changeme --csv environment create --name='om7k09j8'
Error: can't convert String into Integer

#2 Updated by Martin Bacovsky over 9 years ago

  • Category set to Foreman commands (obsolete)
  • Status changed from New to Assigned
  • Assignee set to Martin Bacovsky
  • Target version set to 1.9.3

This is present just with --csv and seems to be caused by faulty conversion between API responses formats for Foreman 1.3 and 1.4. PR will follow.

#3 Updated by Martin Bacovsky over 9 years ago

  • Status changed from Assigned to Ready For Testing

#4 Updated by Martin Bacovsky over 9 years ago

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

Applied in changeset foreman:hammer-cli-foreman|commit:38d6d2660521dd4a33caeec9ee926929401f4960.

Also available in: Atom PDF