Class: Bosh::Clouds::PluginCloudProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/cloud/provider.rb

Class Method Summary collapse

Class Method Details

.create(plugin, options) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/cloud/provider.rb', line 15

def self.create(plugin, options)
  begin
    require "cloud/#{plugin}"
  rescue LoadError => error
    raise CloudError, "Could not load Cloud Provider Plugin: #{plugin}"
  end

  Bosh::Clouds.const_get(plugin.capitalize).new(options)
end