It should no longer be necessary as dbomatic now does the right
thing by updating all of the instances every time.
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
---
src/app/models/instance.rb | 15 ---------------
1 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/src/app/models/instance.rb b/src/app/models/instance.rb
index 55237c8..9ee073d 100644
--- a/src/app/models/instance.rb
+++ b/src/app/models/instance.rb
@@ -335,21 +335,6 @@ class Instance < ActiveRecord::Base
[matched, errors]
end
- def public_addresses
- # FIXME: detect MAC format properly
- addr = read_attribute(:public_addresses)
- if addr and addr =~ /\w\w:\w\w:\w\w:\w\w:\w\w:\w\w/
- begin
- client = provider_account.connect
- self.public_addresses =
client.instance(provider_instance_id).public_addresses.first
- save!
- rescue
- logger.error "failed to fetch public address for #{self.name}:
#{$!.message}"
- end
- end
- read_attribute(:public_addresses)
- end
-
def self.csv_export(instances)
csv_string = FasterCSV.generate(:col_sep => ";", :row_sep =>
"\r\n") do |csv|
event_attributes = Event.new.attributes.keys.reject {|key| key if key ==
"created_at" || key == "updated_at"}
--
1.7.4.4