Actions
Refactor #18176
closedReplace call to private clear_association_cache in Subnet#known_ips
Description
The method clear_association_cache
on models has been made private in Rails 5.0, it should be replaced where it's used in Subnet#known_ips:
NoMethodError: private method `clear_association_cache' called for #<Subnet::Ipv4:0x0000000b9d15d8>
Did you mean? clear_transaction_record_state
app/models/subnet.rb:190:in `known_ips'
app/services/ipam/db.rb:11:in `block in suggest_ip'
app/services/ipam/db.rb:9:in `suggest_ip'
test/unit/nic_test.rb:220:in `block (2 levels) in <class:NicTest>' (NoMethodError)
activemodel-5.0.0/lib/active_model/attribute_methods.rb:430
The method was public, but undocumented - for use only by Rails. It is now private (https://github.com/rails/rails/commit/9d56958).
The purpose appears to be to ensure known_ips always returns up to date lists of IPs when used for IPAM. e.g. if an interface is created with a given subnet and allocated an IP, a second interface created with the same subnet object won't be allocated the same IP.
Updated by The Foreman Bot almost 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4212 added
Updated by Dominic Cleal almost 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 6a3b4abc519aaf417e45dcc8e5901faa68f9a689.
Updated by Dominic Cleal almost 8 years ago
- Translation missing: en.field_release set to 209
Actions