Project

General

Profile

Actions

Bug #9227

closed

Remove ip and mac attributes

Added by Daniel Lobato Garcia over 9 years ago. Updated about 9 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Network
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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)


Related issues 1 (1 open0 closed)

Related to Foreman - Tracker #2409: NetworkingNew

Actions
Actions #1

Updated by Daniel Lobato Garcia over 9 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.

Actions #2

Updated by Dominic Cleal over 9 years ago

Actions #3

Updated by Dominic Cleal over 9 years ago

  • Category set to Network
  • Difficulty deleted (trivial)
Actions #4

Updated by Marek Hulán over 9 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?

Actions #5

Updated by Daniel Lobato Garcia about 9 years ago

  • Status changed from New to Duplicate

It is, thanks for noticing.

Actions

Also available in: Atom PDF