Module: Fog::Orchestration
- Defined in:
- lib/fog/orchestration.rb
Class Method Summary collapse
Class Method Details
.[](provider) ⇒ Object
4 5 6 |
# File 'lib/fog/orchestration.rb', line 4 def self.[](provider) self.new(:provider => provider) end |
.new(attributes) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/fog/orchestration.rb', line 8 def self.new(attributes) attributes = attributes.dup # Prevent delete from having side effects provider = attributes.delete(:provider).to_s.downcase.to_sym if self.providers.include?(provider) require "fog/#{provider}/network" return Fog::Orchestration.const_get(Fog.providers[provider]).new(attributes) end raise ArgumentError.new("#{provider} has no orchestration service") end |
.providers ⇒ Object
20 21 22 |
# File 'lib/fog/orchestration.rb', line 20 def self.providers Fog.services[:orchestration] end |