2009-11-27 00:04:49 -05:00
|
|
|
unless Fog.mocking?
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
class Slicehost
|
|
|
|
|
|
|
|
# Get list of slices
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Array>:
|
|
|
|
# * 'addresses'<~Array> - Ip addresses for the slice
|
2009-11-28 16:16:00 -05:00
|
|
|
# * 'backup-id'<~Integer> - Id of backup slice was booted from
|
|
|
|
# * 'bw-in'<~Float> - Incoming bandwidth total for current billing cycle, in Gigabytes
|
|
|
|
# * 'bw-out'<~Float> - Outgoing bandwidth total for current billing cycle, in Gigabytes
|
2009-11-27 00:04:49 -05:00
|
|
|
# * 'flavor_id'<~Integer> - Id of flavor slice was booted from
|
|
|
|
# * 'id'<~Integer> - Id of the slice
|
2009-11-28 16:16:00 -05:00
|
|
|
# * 'image-id'<~Integer> - Id of image slice was booted from
|
2009-11-27 00:04:49 -05:00
|
|
|
# * 'name'<~String> - Name of the slice
|
|
|
|
# * 'progress'<~Integer> - Progress of current action, in percentage
|
|
|
|
# * 'status'<~String> - Current status of the slice
|
|
|
|
def get_slices
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'GET',
|
|
|
|
:parser => Fog::Parsers::Slicehost::GetSlices.new,
|
|
|
|
:path => 'slices.xml'
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
class Slicehost
|
|
|
|
|
|
|
|
def get_slices
|
2010-02-02 01:53:18 -05:00
|
|
|
raise MockNotImplemented.new("Contributions welcome!")
|
2009-11-27 00:04:49 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|