Actions
Bug #13928
closedInterface attributes are not parsed correctly
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Foreman commands (obsolete)
Target version:
-
Description
I'm trying to create unmanaged host, when I try to specify some interface attributes as suggested at https://github.com/theforeman/hammer-cli-foreman/blob/master/doc/host_create.md I recieve ugly error. Note that I have to specify primary flag (#13927).
example call
bundle exec bin/hammer -v host create --managed false --name chef --domain "abcde.example.tst" --subnet 'vlan' --ip "192.168.0.1" --organization "Abcde" --location "Brq" --interface="primary=true"
result with the trace
[ERROR 2016-02-27T19:52:21 Exception] Error: ApipieBindings::InvalidArgumentTypesError: host[interfaces_attributes][0] - Hash was expected Could not create the host: Error: ApipieBindings::InvalidArgumentTypesError: host[interfaces_attributes][0] - Hash was expected [ERROR 2016-02-27T19:52:21 Exception] ApipieBindings::InvalidArgumentTypesError (ApipieBindings::InvalidArgumentTypesError: host[interfaces_attributes][0] - Hash was expected): /home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/apipie-bindings-0.0.15/lib/apipie_bindings/action.rb:67:in `validate!' /home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/apipie-bindings-0.0.15/lib/apipie_bindings/api.rb:159:in `call' /home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/apipie-bindings-0.0.15/lib/apipie_bindings/resource.rb:14:in `call' /home/ares/Projekty/Zdrojaky/hammer-cli/lib/hammer_cli/apipie/command.rb:43:in `send_request' /home/ares/Projekty/Zdrojaky/hammer-cli-foreman/lib/hammer_cli_foreman/commands.rb:189:in `send_request' /home/ares/Projekty/Zdrojaky/hammer-cli/lib/hammer_cli/apipie/command.rb:34:in `execute' /home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /home/ares/Projekty/Zdrojaky/hammer-cli/lib/hammer_cli/abstract.rb:22:in `run' /home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /home/ares/Projekty/Zdrojaky/hammer-cli/lib/hammer_cli/abstract.rb:22:in `run' /home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /home/ares/Projekty/Zdrojaky/hammer-cli/lib/hammer_cli/abstract.rb:22:in `run' /home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run' bin/hammer:125:in `<main>'
Please ask for any info that would help to fix it.
Actions