Class: Fog::Bluebox::Compute::Mock
- Inherits:
-
Object
- Object
- Fog::Bluebox::Compute::Mock
- Defined in:
- lib/fog/compute/bluebox.rb,
lib/fog/compute/requests/bluebox/get_block.rb,
lib/fog/compute/requests/bluebox/get_blocks.rb,
lib/fog/compute/requests/bluebox/get_product.rb,
lib/fog/compute/requests/bluebox/create_block.rb,
lib/fog/compute/requests/bluebox/get_products.rb,
lib/fog/compute/requests/bluebox/get_template.rb,
lib/fog/compute/requests/bluebox/reboot_block.rb,
lib/fog/compute/requests/bluebox/destroy_block.rb,
lib/fog/compute/requests/bluebox/get_templates.rb
Class Method Summary collapse
Instance Method Summary collapse
- #create_block(product_id, template_id, options = {}) ⇒ Object
- #destroy_block(block_id) ⇒ Object
- #get_block(block_id) ⇒ Object
- #get_blocks ⇒ Object
- #get_product(product_id) ⇒ Object
- #get_products ⇒ Object
- #get_template(template_id) ⇒ Object
- #get_templates ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #reboot_block(block_id, type = 'SOFT') ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/fog/compute/bluebox.rb', line 42 def initialize(={}) unless .delete(:provider) location = caller.first warning = "[yellow][WARN] Fog::Bluebox::Compute.new is deprecated, use Fog::Compute.new(:provider => 'Bluebox') instead[/]" warning << " [light_black](" << location << ")[/] " Formatador.display_line(warning) end @bluebox_api_key = [:bluebox_api_key] @data = self.class.data[@bluebox_api_key] end |
Class Method Details
.data ⇒ Object
30 31 32 33 34 |
# File 'lib/fog/compute/bluebox.rb', line 30 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset_data(keys = data.keys) ⇒ Object
36 37 38 39 40 |
# File 'lib/fog/compute/bluebox.rb', line 36 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/compute/requests/bluebox/create_block.rb', line 34 def create_block(product_id, template_id, = {}) Fog::Mock.not_implemented end |
#destroy_block(block_id) ⇒ Object
27 28 29 |
# File 'lib/fog/compute/requests/bluebox/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/compute/requests/bluebox/get_block.rb', line 27 def get_block(block_id) Fog::Mock.not_implemented end |
#get_blocks ⇒ Object
29 30 31 |
# File 'lib/fog/compute/requests/bluebox/get_blocks.rb', line 29 def get_blocks Fog::Mock.not_implemented end |
#get_product(product_id) ⇒ Object
27 28 29 |
# File 'lib/fog/compute/requests/bluebox/get_product.rb', line 27 def get_product(product_id) Fog::Mock.not_implemented end |
#get_products ⇒ Object
26 27 28 |
# File 'lib/fog/compute/requests/bluebox/get_products.rb', line 26 def get_products Fog::Mock.not_implemented end |
#get_template(template_id) ⇒ Object
27 28 29 |
# File 'lib/fog/compute/requests/bluebox/get_template.rb', line 27 def get_template(template_id) Fog::Mock.not_implemented end |
#get_templates ⇒ Object
27 28 29 |
# File 'lib/fog/compute/requests/bluebox/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/compute/requests/bluebox/reboot_block.rb', line 28 def reboot_block(block_id, type = 'SOFT') Fog::Mock.not_implemented end |