Class: Fog::Bluebox::Mock
- Inherits:
-
Object
- Object
- Fog::Bluebox::Mock
- Defined in:
- lib/fog/bluebox.rb,
lib/fog/bluebox/models/images.rb,
lib/fog/bluebox/models/flavors.rb,
lib/fog/bluebox/models/servers.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
- #create_block(product_id, template_id, name, password) ⇒ Object
- #destroy_block(block_id) ⇒ Object
- #flavors ⇒ Object
- #get_product(product_id) ⇒ Object
- #get_products ⇒ Object
- #get_slice(id) ⇒ Object
- #get_slices ⇒ Object
- #get_template(template_id) ⇒ Object
- #get_templates ⇒ Object
- #images(attributes = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #reboot_block(block_id, type = 'SOFT') ⇒ Object
- #servers ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
58 59 60 61 |
# File 'lib/fog/bluebox.rb', line 58 def initialize(={}) @bluebox_api_key = [:bluebox_api_key] @data = self.class.data[@bluebox_api_key] end |
Class Method Details
.data ⇒ Object
46 47 48 49 50 |
# File 'lib/fog/bluebox.rb', line 46 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset_data(keys = data.keys) ⇒ Object
52 53 54 55 56 |
# File 'lib/fog/bluebox.rb', line 52 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 |
#flavors ⇒ Object
8 9 10 |
# File 'lib/fog/bluebox/models/flavors.rb', line 8 def flavors Fog::Bluebox::Flavors.new(:connection => self) 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_products ⇒ Object
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_slices ⇒ Object
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_templates ⇒ Object
26 27 28 |
# File 'lib/fog/bluebox/requests/get_templates.rb', line 26 def get_templates Fog::Mock.not_implemented end |
#images(attributes = {}) ⇒ Object
8 9 10 11 12 |
# File 'lib/fog/bluebox/models/images.rb', line 8 def images(attributes = {}) Fog::Bluebox::Images.new({ :connection => self }.merge!(attributes)) 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 |