Project

General

Profile

Actions

Bug #13928

closed

Interface attributes are not parsed correctly

Added by Marek Hulán about 8 years ago. Updated about 8 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Foreman commands (obsolete)
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

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.


Related issues 1 (0 open1 closed)

Is duplicate of Hammer CLI - Bug #13966: Host creation error: ApipieBindings::InvalidArgumentTypesError: host[interfaces_attributes][0] - Hash was expectedClosedTomáš Strachota03/01/2016Actions
Actions #1

Updated by Tomáš Strachota about 8 years ago

  • Is duplicate of Bug #13966: Host creation error: ApipieBindings::InvalidArgumentTypesError: host[interfaces_attributes][0] - Hash was expected added
Actions #2

Updated by Tomáš Strachota about 8 years ago

  • Status changed from New to Duplicate
Actions #3

Updated by Marek Hulán about 8 years ago

That's not fair, mine was opened earlier :-) #kidding

Actions

Also available in: Atom PDF