Actions
Bug #12516
closedPUT request for discovered_hosts/[id] fails with "unknown attribute: nested"
Description
Request which used to work in Satellite 6.1 for provisioning new discovered host fails with the following error:
| Started PUT "/api/v2/discovered_hosts/mac525400452ffc" for 192.168.122.1 at 2015-11-12 04:30:01 -0500
2015-11-12 04:30:01 [app] [I] Processing by Api::V2::DiscoveredHostsController#update as JSON
2015-11-12 04:30:01 [app] [I] Parameters: {"discovered_host"=>{"name"=>"mac525400452ffc", "hostgroup_id"=>"1", "environment_id"=>"0", "mac"=>"52:54:00:45:2f:fc", "domain_id"=>"2", "subnet_
id"=>"1", "ip"=>"192.168.105.30", "architecture_id"=>"1", "operatingsystem_id"=>"1", "medium_id"=>"8", "ptable_id"=>"67", "root_pass"=>"[FILTERED]", "host_parameters_attributes"=>[{"name"=>"
host_ovirt_id", "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>""}, {"name"=>"compute_resource_id", "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>""}, {"name"=>"pass", "value"
=>"[FILTERED]", "_destroy"=>"false", "nested"=>""}, {"name"=>"management", "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>""}]}, "apiv"=>"v2", "id"=>"mac525400452ffc"}
2015-11-12 04:30:01 [app] [I] Authorized user admin(Admin User)
2015-11-12 04:30:02 [app] [W] Action failed
| ActiveRecord::UnknownAttributeError: unknown attribute: nested
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_assignment.rb:88:in `block in assign_attributes'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_assignment.rb:78:in `each'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_assignment.rb:78:in `assign_attributes'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/base.rb:498:in `initialize'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/reflection.rb:183:in `new'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/reflection.rb:183:in `build_association'
After removing "nested" from all parameters in array I get:
|
| Started PUT "/api/v2/discovered_hosts/mac525400452ffc" for 192.168.122.1 at 2015-11-12 04:58:25 -0500
2015-11-12 04:58:27 [app] [I]
Actions