Bug #13966

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

Added by Alexandre Barth about 1 year ago. Updated about 1 year ago.

Status:Closed
Priority:Normal
Assigned To:Tomáš Strachota
Category:Foreman commands
Target version:hammer-cli 0.6.1
Difficulty: Bugzilla link:1319079
Found in release:1.11.0 Pull request:https://github.com/theforeman/hammer-cli-foreman/pull/221
Story points-
Velocity based estimate-
Release1.11.0Release relationshipAuto

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-bind... Closed 03/22/2016
Duplicated by Hammer CLI - Bug #13928: Interface attributes are not parsed correctly Duplicate 02/27/2016

Associated revisions

Revision 14756817
Added by Tomas Strachota about 1 year 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 about 1 year 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 about 1 year ago

  • Project changed from Foreman to Hammer CLI
  • Category set to Foreman commands
  • Release set to 1.11.0

#2 Updated by Dominic Cleal about 1 year 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 about 1 year ago

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

#4 Updated by Tomáš Strachota about 1 year ago

  • Duplicated by Bug #13928: Interface attributes are not parsed correctly added

#5 Updated by Tomáš Strachota about 1 year ago

  • Target version set to hammer-cli 0.6.1

#6 Updated by Dominic Cleal about 1 year 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 about 1 year ago

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

#8 Updated by Alexandre Barth about 1 year 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 about 1 year 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 about 1 year 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 about 1 year ago

  • Bugzilla link set to 1319079

Also available in: Atom PDF