Project

General

Profile

« Previous | Next » 

Revision 132a991c

Added by Ohad Levy almost 12 years ago

  • ID 132a991c8c441c86864a35c666dd41748213bdaf

basic openstack support

View differences:

app/models/compute_resource.rb
require 'fog_extensions'
class ComputeResource < ActiveRecord::Base
PROVIDERS = %w[ Libvirt Ovirt EC2 Vmware ].delete_if{|p| p == "Libvirt" && !SETTINGS[:libvirt]}
PROVIDERS = %w[ Libvirt Ovirt EC2 Vmware Openstack].delete_if{|p| p == "Libvirt" && !SETTINGS[:libvirt]}
audited :except => [:password, :attrs]
serialize :attrs, Hash
......
def provider_friendly_name
list = SETTINGS[:libvirt] ? ["Libvirt"] : []
list += %w[ oVirt EC2 VMWare ]
list += %w[ oVirt EC2 VMWare OpenStack ]
list[PROVIDERS.index(provider)] rescue ""
end

Also available in: Unified diff