Class: Fog::Slicehost::Compute::Mock
- Inherits:
-
Object
- Object
- Fog::Slicehost::Compute::Mock
- Defined in:
- lib/fog/compute/slicehost.rb,
lib/fog/compute/requests/slicehost/get_image.rb,
lib/fog/compute/requests/slicehost/get_slice.rb,
lib/fog/compute/requests/slicehost/get_flavor.rb,
lib/fog/compute/requests/slicehost/get_images.rb,
lib/fog/compute/requests/slicehost/get_slices.rb,
lib/fog/compute/requests/slicehost/get_backups.rb,
lib/fog/compute/requests/slicehost/get_flavors.rb,
lib/fog/compute/requests/slicehost/create_slice.rb,
lib/fog/compute/requests/slicehost/delete_slice.rb,
lib/fog/compute/requests/slicehost/reboot_slice.rb
Class Method Summary collapse
Instance Method Summary collapse
- #create_slice(flavor_id, image_id, name) ⇒ Object
- #delete_slice(slice_id) ⇒ Object
- #get_backups ⇒ Object
- #get_flavor(flavor_id) ⇒ Object
- #get_flavors ⇒ Object
- #get_image(image_id) ⇒ Object
- #get_images ⇒ Object
- #get_slice(id) ⇒ Object
- #get_slices ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #reboot_slice(id) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/fog/compute/slicehost.rb', line 43 def initialize(={}) unless .delete(:provider) location = caller.first warning = "[yellow][WARN] Fog::Slicehost::Compute.new is deprecated, use Fog::Compute.new(:provider => 'Slicehost') instead[/]" warning << " [light_black](" << location << ")[/] " Formatador.display_line(warning) end @slicehost_password = [:slicehost_password] @data = self.class.data[@slicehost_password] end |
Class Method Details
.data ⇒ Object
31 32 33 34 35 |
# File 'lib/fog/compute/slicehost.rb', line 31 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset_data(keys = data.keys) ⇒ Object
37 38 39 40 41 |
# File 'lib/fog/compute/slicehost.rb', line 37 def self.reset_data(keys=data.keys) for key in [*keys] data.delete(key) end end |
Instance Method Details
#create_slice(flavor_id, image_id, name) ⇒ Object
42 43 44 |
# File 'lib/fog/compute/requests/slicehost/create_slice.rb', line 42 def create_slice(flavor_id, image_id, name) Fog::Mock.not_implemented end |
#delete_slice(slice_id) ⇒ Object
24 25 26 |
# File 'lib/fog/compute/requests/slicehost/delete_slice.rb', line 24 def delete_slice(slice_id) Fog::Mock.not_implemented end |
#get_backups ⇒ Object
30 31 32 |
# File 'lib/fog/compute/requests/slicehost/get_backups.rb', line 30 def get_backups Fog::Mock.not_implemented end |
#get_flavor(flavor_id) ⇒ Object
33 34 35 |
# File 'lib/fog/compute/requests/slicehost/get_flavor.rb', line 33 def get_flavor(flavor_id) Fog::Mock.not_implemented end |
#get_flavors ⇒ Object
30 31 32 |
# File 'lib/fog/compute/requests/slicehost/get_flavors.rb', line 30 def get_flavors Fog::Mock.not_implemented end |
#get_image(image_id) ⇒ Object
31 32 33 |
# File 'lib/fog/compute/requests/slicehost/get_image.rb', line 31 def get_image(image_id) Fog::Mock.not_implemented end |
#get_images ⇒ Object
28 29 30 |
# File 'lib/fog/compute/requests/slicehost/get_images.rb', line 28 def get_images Fog::Mock.not_implemented end |
#get_slice(id) ⇒ Object
39 40 41 |
# File 'lib/fog/compute/requests/slicehost/get_slice.rb', line 39 def get_slice(id) Fog::Mock.not_implemented end |
#get_slices ⇒ Object
36 37 38 |
# File 'lib/fog/compute/requests/slicehost/get_slices.rb', line 36 def get_slices Fog::Mock.not_implemented end |
#reboot_slice(id) ⇒ Object
37 38 39 |
# File 'lib/fog/compute/requests/slicehost/reboot_slice.rb', line 37 def reboot_slice(id) Fog::Mock.not_implemented end |