Class: Fog::Slicehost::Compute::Mock

Inherits:
Object
  • Object
show all
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

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(options={})
  unless options.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 = options[:slicehost_password]
  @data = self.class.data[@slicehost_password]
end

Class Method Details

.dataObject



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_backupsObject



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_flavorsObject



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_imagesObject



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_slicesObject



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