Class: Fog::Bluebox::Compute::Mock

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



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

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

Class Method Details

.dataObject



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

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

.reset_data(keys = data.keys) ⇒ Object



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

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, options = {}) ⇒ Object



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

def create_block(product_id, template_id, options = {})
  Fog::Mock.not_implemented
end

#destroy_block(block_id) ⇒ Object



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

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

#get_block(block_id) ⇒ Object



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

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

#get_blocksObject



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

def get_blocks
  Fog::Mock.not_implemented
end

#get_product(product_id) ⇒ Object



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

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

#get_productsObject



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

def get_products
  Fog::Mock.not_implemented
end

#get_template(template_id) ⇒ Object



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

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

#get_templatesObject



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

def get_templates
  Fog::Mock.not_implemented
end

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



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

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