Module: Fog::Slicehost

Defined in:
lib/fog/slicehost.rb,
lib/fog/slicehost/models/image.rb,
lib/fog/slicehost/models/flavor.rb,
lib/fog/slicehost/models/images.rb,
lib/fog/slicehost/models/server.rb,
lib/fog/slicehost/models/flavors.rb,
lib/fog/slicehost/models/servers.rb,
lib/fog/slicehost/requests/get_image.rb,
lib/fog/slicehost/requests/get_slice.rb,
lib/fog/slicehost/requests/get_flavor.rb,
lib/fog/slicehost/requests/get_images.rb,
lib/fog/slicehost/requests/get_slices.rb,
lib/fog/slicehost/requests/get_backups.rb,
lib/fog/slicehost/requests/get_flavors.rb,
lib/fog/slicehost/requests/create_slice.rb,
lib/fog/slicehost/requests/delete_slice.rb,
lib/fog/slicehost/requests/reboot_slice.rb

Defined Under Namespace

Classes: Flavor, Flavors, Image, Images, Mock, Real, Server, Servers

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(options = {}) ⇒ Object



21
22
23
24
25
26
27
28
29
30
# File 'lib/fog/slicehost.rb', line 21

def self.new(options={})
  unless options[:slicehost_password]
    raise ArgumentError.new('slicehost_password is required to access slicehost')
  end
  if Fog.mocking?
    Fog::Slicehost::Mock.new(options)
  else
    Fog::Slicehost::Real.new(options)
  end
end

.reset_data(keys = Mock.data.keys) ⇒ Object



32
33
34
# File 'lib/fog/slicehost.rb', line 32

def self.reset_data(keys=Mock.data.keys)
  Mock.reset_data(keys)
end

Instance Method Details

#flavorsObject



7
8
9
# File 'lib/fog/slicehost/models/flavors.rb', line 7

def flavors
  Fog::Slicehost::Flavors.new(:connection => self)
end

#images(attributes = {}) ⇒ Object



7
8
9
10
11
# File 'lib/fog/slicehost/models/images.rb', line 7

def images(attributes = {})
  Fog::Slicehost::Images.new({
    :connection => self
  }.merge!(attributes))
end

#serversObject



7
8
9
# File 'lib/fog/slicehost/models/servers.rb', line 7

def servers
  Fog::Slicehost::Servers.new(:connection => self)
end