mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
3f08cbf399
Add list_usages, get_console_output, live_migrate_server, migrate_server
29 lines
683 B
Ruby
29 lines
683 B
Ruby
module Fog
|
|
module Compute
|
|
class OpenStack
|
|
class Real
|
|
|
|
def list_usages(date_start = nil, date_end = nil, detailed=false)
|
|
params = Hash.new
|
|
params[:start] = date_start.iso8601.gsub(/\+.*/, '') if date_start
|
|
params[:end] = date_end.iso8601.gsub(/\+.*/, '') if date_end
|
|
params[:detailed] = (detailed ? '1' : '0') if detailed
|
|
|
|
request(
|
|
:expects => [200, 203],
|
|
:method => 'GET',
|
|
:path => 'os-simple-tenant-usage',
|
|
:query => params
|
|
)
|
|
end
|
|
|
|
end
|
|
|
|
class Mock
|
|
|
|
# TODO: Mocks to go here
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|