Actions
Bug #11258
closedCan't update BMC through API without specifying provider
Description
When trying to update or create BMC interface through API I get the following response
{ "error": {"message":"undefined method `upcase!' for nil:NilClass"} }
looking at production log I found following trace
2015-07-30T14:40:01 [app] [W] Action failed | NoMethodError: undefined method `upcase!' for nil:NilClass | /home/ares/Projekty/Zdrojaky/foreman/app/models/nic/bmc.rb:5:in `block in <class:BMC>' | /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:473:in `_run__1304768842026040595__validation__60779692721052316__callbacks' | /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback' | /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_validation_callbacks' | /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks' | /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activemodel-3.2.21/lib/active_model/validations/callbacks.rb:53:in `run_validations!' | /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activemodel-3.2.21/lib/active_model/validations.rb:195:in `valid?' | /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-3.2.21/lib/active_record/validations.rb:69:in `valid?' | /home/ares/Projekty/Zdrojaky/foreman/app/models/concerns/orchestration.rb:59:in `valid?'
To reproduce:
curl -k -uadmin:changeme https://localhost:443/api/hosts/bmcipmi.example.com/interfaces/ -X POST -d '{"identifier": "ipmi2", "username": "root", "mac": "aa:bb:cc:dd:aa:bb", "type":"bmc"}' -H 'Content-Type: application/json'
Updated by The Foreman Bot over 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2587 added
- Pull request deleted (
)
Updated by Marek Hulán over 9 years ago
- Related to Bug #11244: MAC taken error when updating NIC IPMI details through API added
Updated by Marek Hulán over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 3b27c173467c3ab4b53e844913cfd559b78d44ac.
Updated by Dominic Cleal over 9 years ago
- Translation missing: en.field_release set to 72
Actions