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:
parent
297d2be06c
commit
71af409b3d
5 changed files with 24 additions and 2 deletions
|
@ -69,6 +69,8 @@ module Fog
|
|||
request :restore_image
|
||||
|
||||
request :get_stats
|
||||
request :get_stats_graph
|
||||
|
||||
request :list_private_ips
|
||||
|
||||
class Mock
|
||||
|
|
|
@ -7,7 +7,7 @@ module Fog
|
|||
class Stat < Fog::Model
|
||||
attribute :loadavg
|
||||
attribute :memory
|
||||
attribute :virtual
|
||||
attribute :proc
|
||||
attribute :domain
|
||||
attribute :disk
|
||||
attribute :uptime
|
||||
|
|
|
@ -15,6 +15,10 @@ module Fog
|
|||
nil
|
||||
end
|
||||
|
||||
def graph(options)
|
||||
service.get_stats_graph(options).body
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@ module Fog
|
|||
|
||||
def get_stats(options = {})
|
||||
request(
|
||||
:path => "/monitoring/load/stats",
|
||||
:path => "/Monitoring/Load/stats",
|
||||
:body => Fog::JSON.encode({:params => options})
|
||||
)
|
||||
end
|
||||
|
|
16
lib/fog/storm_on_demand/requests/compute/get_stats_graph.rb
Normal file
16
lib/fog/storm_on_demand/requests/compute/get_stats_graph.rb
Normal 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
|
Loading…
Add table
Reference in a new issue