Project

General

Profile

Bug #13966

Host creation error: ApipieBindings::InvalidArgumentTypesError: host[interfaces_attributes][0] - Hash was expected

Added by Alexandre Barth over 4 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Foreman commands (obsolete)
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

hammer -u admin -p changeme host create --build false --enabled false --hostgroup ESXi-Prod --model 'IBM 3650 M4' --interface='primary=true,provision=true,ip=192.168.0.1,mac=34:40:b5:9f:fe:64' --parameters ipvmotion1=192.168.0.2,ipvmotion2=192.168.0.3,ipft=192.168.0.4 --name esxi1
Could not create the host:
Error: ApipieBindings::InvalidArgumentTypesError: host[interfaces_attributes][0] - Hash was expected

This command used to work in Foreman 1.10 and previsous releases.


Related issues

Related to Hammer CLI - Bug #14312: hammer-cli-foreman-0.6.1 misses dependency on apipie-bindings >=0.0.16Closed2016-03-22
Has duplicate Hammer CLI - Bug #13928: Interface attributes are not parsed correctlyDuplicate2016-02-27

Associated revisions

Revision 14756817 (diff)
Added by Tomas Strachota over 4 years ago

Fixes #13966 - newer version of apipie validates types for arrays

Therefore we no longer can send network interfaces in hashes even though
the server would cope with it.

Revision a5d864a3
Added by Tomas Strachota over 4 years ago

Merge pull request #221 from tstrachota/host_interfaces_format_13966

fixes #13966 - newer version of apipie validates types for arrays

History

#1 Updated by Dominic Cleal over 4 years ago

  • Project changed from Foreman to Hammer CLI
  • Category set to Foreman commands (obsolete)
  • Legacy Backlogs Release (now unused) set to 71

#2 Updated by Dominic Cleal over 4 years ago

  • Subject changed from Host creation error to Host creation error: ApipieBindings::InvalidArgumentTypesError: host[interfaces_attributes][0] - Hash was expected

#3 Updated by Tomáš Strachota over 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Tomáš Strachota

#4 Updated by Tomáš Strachota over 4 years ago

  • Has duplicate Bug #13928: Interface attributes are not parsed correctly added

#5 Updated by Tomáš Strachota over 4 years ago

  • Target version set to hammer-cli 0.6.1

#6 Updated by Dominic Cleal over 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/221 added

#7 Updated by Anonymous over 4 years ago

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

#8 Updated by Alexandre Barth over 4 years ago

Using foreman 1.11RC2 with hammer cli 0.6.1 now i get this error for the same command :

Could not create the host:
Error: undefined method `[]' for nil:NilClass

#9 Updated by Dominic Cleal over 4 years ago

Could you file a new bug report please with debug output (hammer -d [..]) and the server-side production.log for the request? Thanks!

#10 Updated by Dominic Cleal over 4 years ago

  • Related to Bug #14312: hammer-cli-foreman-0.6.1 misses dependency on apipie-bindings >=0.0.16 added

#11 Updated by Marek Hulán over 4 years ago

  • Bugzilla link set to 1319079

Also available in: Atom PDF