Bug #9227
closedRemove ip and mac attributes
Description
Currently we are adding ip and mac as 'fake' empty attributes when cloning a host, since these attributes are in interfaces now already. We should just not take them into account for deep_cloning at all
DEPRECATION WARNING: You're trying to create an attribute `mac'. Writing arbitrary attributes on a model is deprecated. Please just use `attr_writer` etc. (called from clone at /home/daniel/workspace/cleanforeman/app/models/host/managed.rb:623)
DEPRECATION WARNING: You're trying to create an attribute `ip'. Writing arbitrary attributes on a model is deprecated. Please just use `attr_writer` etc. (called from clone at /home/daniel/workspace/cleanforeman/app/models/host/managed.rb:623)
Updated by Daniel Lobato Garcia almost 10 years ago
- Tracker changed from Refactor to Bug
- Subject changed from Remove ip and mac attributes from deep clone to Remove ip and mac attributes
There are a bunch of tests where .ip and .mac are used, also these are the methods used in the jail to get the IP and MAC instead of primary_interface.ip and primary_interface.mac . Almost certainly there'll be broken things there, to be inspected closely.
Updated by Dominic Cleal almost 10 years ago
- Related to Tracker #2409: Networking added
Updated by Dominic Cleal almost 10 years ago
- Category set to Network
- Difficulty deleted (
trivial)
Updated by Marek Hulán almost 10 years ago
Isn't this a duplicate of #9047? We would like to remove all assigning methods that are delegated to primary_interface. Readers should remain. Or is there some issue with deep_clone already?
Updated by Daniel Lobato Garcia almost 10 years ago
- Status changed from New to Duplicate
It is, thanks for noticing.