1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/openstack/requests/compute/list_usage.rb
2012-04-30 10:34:59 +08:00

25 lines
542 B
Ruby

module Fog
module Compute
class OpenStack
class Real
def list_usage(date_start, date_end, detailed=false)
# TODO: Handle nasty date formats
detailed = (detailed ? "1" : "0")
request(
:expects => [200, 203],
:method => 'GET',
:path => "os-simple-tenant-usage?start=#{date_start.iso8601}&end=#{date_end.iso8601}&detailed=#{detailed}"
)
end
end
class Mock
# TODO: Mocks to go here
end
end
end
end