2010-03-17 23:51:55 -04:00
|
|
|
module Fog
|
|
|
|
module Slicehost
|
|
|
|
class Real
|
2009-11-27 00:04:49 -05:00
|
|
|
|
2010-03-17 23:51:55 -04:00
|
|
|
require 'fog/slicehost/parsers/get_backups'
|
2009-11-27 00:04:49 -05:00
|
|
|
|
|
|
|
# Get list of backups
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Array>:
|
|
|
|
# * 'date'<~Time> - Timestamp of backup creation
|
|
|
|
# * 'id'<~Integer> - Id of the backup
|
|
|
|
# * 'name'<~String> - Name of the backup
|
2009-11-28 16:16:00 -05:00
|
|
|
# * 'slice-id'<~Integer> - Id of slice the backup was made from
|
2009-11-27 00:04:49 -05:00
|
|
|
def get_backups
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'GET',
|
|
|
|
:parser => Fog::Parsers::Slicehost::GetBackups.new,
|
|
|
|
:path => 'backups.xml'
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2010-03-17 23:51:55 -04:00
|
|
|
class Mock
|
2009-11-27 00:04:49 -05:00
|
|
|
|
|
|
|
def get_backups
|
2010-05-26 20:38:23 -04:00
|
|
|
Fog::Mock.not_implemented
|
2009-11-27 00:04:49 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|