Class: Fog::Bluebox::Mock

Inherits:
Object
  • Object
show all
Includes:
Collections
Defined in:
lib/fog/bluebox.rb,
lib/fog/bluebox/requests/get_block.rb,
lib/fog/bluebox/requests/get_blocks.rb,
lib/fog/bluebox/requests/get_product.rb,
lib/fog/bluebox/requests/create_block.rb,
lib/fog/bluebox/requests/get_products.rb,
lib/fog/bluebox/requests/get_template.rb,
lib/fog/bluebox/requests/reboot_block.rb,
lib/fog/bluebox/requests/destroy_block.rb,
lib/fog/bluebox/requests/get_templates.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Collections

#flavors, #images, #servers

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



40
41
42
43
# File 'lib/fog/bluebox.rb', line 40

def initialize(options={})
  @bluebox_api_key = options[:bluebox_api_key]
  @data = self.class.data[@bluebox_api_key]
end

Class Method Details

.dataObject



28
29
30
31
32
# File 'lib/fog/bluebox.rb', line 28

def self.data
  @data ||= Hash.new do |hash, key|
    hash[key] = {}
  end
end

.reset_data(keys = data.keys) ⇒ Object



34
35
36
37
38
# File 'lib/fog/bluebox.rb', line 34

def self.reset_data(keys=data.keys)
  for key in [*keys]
    data.delete(key)
  end
end

Instance Method Details

#create_block(product_id, template_id, name, password) ⇒ Object



33
34
35
# File 'lib/fog/bluebox/requests/create_block.rb', line 33

def create_block(product_id, template_id, name, password)
  Fog::Mock.not_implemented
end

#destroy_block(block_id) ⇒ Object



26
27
28
# File 'lib/fog/bluebox/requests/destroy_block.rb', line 26

def destroy_block(block_id)
  Fog::Mock.not_implemented
end

#get_product(product_id) ⇒ Object



26
27
28
# File 'lib/fog/bluebox/requests/get_product.rb', line 26

def get_product(product_id)
  Fog::Mock.not_implemented
end

#get_productsObject



25
26
27
# File 'lib/fog/bluebox/requests/get_products.rb', line 25

def get_products
  Fog::Mock.not_implemented
end

#get_slice(id) ⇒ Object



26
27
28
# File 'lib/fog/bluebox/requests/get_block.rb', line 26

def get_slice(id)
  Fog::Mock.not_implemented
end

#get_slicesObject



28
29
30
# File 'lib/fog/bluebox/requests/get_blocks.rb', line 28

def get_slices
  Fog::Mock.not_implemented
end

#get_template(template_id) ⇒ Object



26
27
28
# File 'lib/fog/bluebox/requests/get_template.rb', line 26

def get_template(template_id)
  Fog::Mock.not_implemented
end

#get_templatesObject



26
27
28
# File 'lib/fog/bluebox/requests/get_templates.rb', line 26

def get_templates
  Fog::Mock.not_implemented
end

#reboot_block(block_id, type = 'SOFT') ⇒ Object



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

def reboot_block(block_id, type = 'SOFT')
  Fog::Mock.not_implemented
end