Actions
Bug #3875
closedCan't create smart proxy using the CLI
Description
Description of problem:
When running hammer proxy create
the smart proxy is not created and returns a random error message.
Version-Release number of selected component (if applicable):
$ hammer --version
hammer-0.0.12
$ rpm -qa | grep hammer
rubygem-hammer_cli_foreman-0.0.12-1.el6.noarch
rubygem-hammer_cli-0.0.12-1.el6.noarch
How reproducible:
Aways
Steps to Reproduce:
Try to create a proxy, console session below:
[root@myhost ~]# hammer -u admin -p changeme proxy create --url='http://server:8443' --name='1c4q9xf' Could not create the proxy [root@myhost ~]# hammer -u admin -p changeme proxy create --url='http://server:8443' --name='1c4q9xf' Error: can't convert String into Integer [root@myhost ~]# hammer -u admin -p changeme proxy create --url='http://server:8443' --name='1c4q9xf' Error: can't convert String into Integer [root@myhost ~]# hammer -u admin -p changeme proxy create --url='http://server:8443' --name='1c4q9xf' Could not create the proxy [root@myhost ~]# hammer -u admin -p changeme proxy create --url='http://server:8443' --name='proxy_name' Could not create the proxy [root@myhost ~]# hammer -u admin -p changeme proxy create --url='http://server:8443' --name='proxy_name' Could not create the proxy [root@myhost ~]# hammer -u admin -p changeme proxy create --url='http://server:8443' --name='proxy_name' Error: undefined method `[]' for nil:NilClass [root@myhost ~]# hammer -u admin -p changeme proxy create --url='http://server:8443' --name='proxy_name' Error: can't convert String into Integer
Actual results:
The smart proxy was not created
Expected results:
Have a smart proxy created
Additional info:
Console session with the command executer with hammer -v
:
[root@myhost ~]# hammer -v -u admin -p changeme proxy create --url='http://server:8443' --name='asd6k23' [ERROR 2013-12-13 15:29:20 Exception] Error: can't convert String into Integer Error: can't convert String into Integer [ERROR 2013-12-13 15:29:20 Exception] TypeError (can't convert String into Integer): /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.12/lib/hammer_cli_foreman/exception_handler.rb:22:in `[]' /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 [root@myhost ~]# hammer -v -u admin -p changeme proxy create --url='http://server:8443' --name='asd6k23' [ERROR 2013-12-13 15:29:24 Exception] Error: can't convert String into Integer Error: can't convert String into Integer [ERROR 2013-12-13 15:29:24 Exception] TypeError (can't convert String into Integer): /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.12/lib/hammer_cli_foreman/exception_handler.rb:22:in `[]' /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 [root@myhost ~]# hammer -v -u admin -p changeme proxy create --url='http://server:8443' --name='asd6k23' [ERROR 2013-12-13 15:29:26 Exception] Error: undefined method `[]' for nil:NilClass Error: undefined method `[]' for nil:NilClass [ERROR 2013-12-13 15:29:26 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 [root@myhost ~]# hammer -v -u admin -p changeme proxy create --url='http://server:8443' --name='asd6k23' [ERROR 2013-12-13 15:29:28 Exception] Error: can't convert String into Integer Error: can't convert String into Integer [ERROR 2013-12-13 15:29:28 Exception] TypeError (can't convert String into Integer): /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.12/lib/hammer_cli_foreman/exception_handler.rb:22:in `[]' /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 [root@myhost ~]# hammer -v -u admin -p changeme proxy create --url='http://server:8443' --name='asd6k23' [ERROR 2013-12-13 15:29:31 Exception] Error: undefined method `[]' for nil:NilClass Error: undefined method `[]' for nil:NilClass [ERROR 2013-12-13 15:29:31 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
Files
Actions