1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[stormondemand|compute] Add stats graph API

This commit is contained in:
Eric Wong 2013-05-21 21:20:10 +08:00
parent 297d2be06c
commit 71af409b3d
5 changed files with 24 additions and 2 deletions

View file

@ -69,6 +69,8 @@ module Fog
request :restore_image request :restore_image
request :get_stats request :get_stats
request :get_stats_graph
request :list_private_ips request :list_private_ips
class Mock class Mock

View file

@ -7,7 +7,7 @@ module Fog
class Stat < Fog::Model class Stat < Fog::Model
attribute :loadavg attribute :loadavg
attribute :memory attribute :memory
attribute :virtual attribute :proc
attribute :domain attribute :domain
attribute :disk attribute :disk
attribute :uptime attribute :uptime

View file

@ -15,6 +15,10 @@ module Fog
nil nil
end end
def graph(options)
service.get_stats_graph(options).body
end
end end
end end

View file

@ -5,7 +5,7 @@ module Fog
def get_stats(options = {}) def get_stats(options = {})
request( request(
:path => "/monitoring/load/stats", :path => "/Monitoring/Load/stats",
:body => Fog::JSON.encode({:params => options}) :body => Fog::JSON.encode({:params => options})
) )
end end

View file

@ -0,0 +1,16 @@
module Fog
module Compute
class StormOnDemand
class Real
def get_stats_graph(options={})
request(
:path => '/Monitoring/Load/graph',
:body => Fog::JSON.encode(:params => options)
)
end
end
end
end
end