Project

General

Profile

« Previous | Next » 

Revision d8ec1f39

Added by Ohad Levy over 11 years ago

  • ID d8ec1f394d53dd4409d351fe82edd8220d370fd9

fixes wrong method name, #refs 1957

View differences:

db/migrate/20121118120028_migrate_hypervisors_to_compute_resources.rb
Hypervisor.all.each do |hypervisor|
# check if we have the same compute resource already, if we do, skip it.
next if Foreman::Model::Libvirt.find_by_url hypervisor.url
next if Foreman::Model::Libvirt.find_by_url hypervisor.uri
Foreman::Model::Libvirt.create :name => hypervisor.name,
:url => hypervisor.url,
:description => "Automatically migrated from hypervisor #{hypervisor.name} / #{hypervisor.url}"
:url => hypervisor.uri,
:description => "Automatically migrated from hypervisor #{hypervisor.name} / #{hypervisor.uri}"
end
drop_table :hypervisors
end

Also available in: Unified diff