Module: Bluebox

Defined in:
lib/fog/bluebox/bin.rb

Instance Method Summary collapse

Instance Method Details

#[](service) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/fog/bluebox/bin.rb', line 10

def [](service)
  @@connections ||= Hash.new do |hash, key|
    credentials = Fog.credentials.reject do |k,v|
      ![:bluebox_api_key, :bluebox_customer_id].include?(k)
    end
    hash[key] = case key
    when :blocks
      Fog::Bluebox.new(credentials)
    end
  end
  @@connections[service]
end

#flavorsObject



23
24
25
# File 'lib/fog/bluebox/bin.rb', line 23

def flavors
  self[:blocks].flavors
end

#imagesObject



27
28
29
# File 'lib/fog/bluebox/bin.rb', line 27

def images
  self[:blocks].images
end

#initialized?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/fog/bluebox/bin.rb', line 6

def initialized?
  true
end

#serversObject



31
32
33
# File 'lib/fog/bluebox/bin.rb', line 31

def servers
  self[:blocks].servers
end