Class: Pangea::HostMetrics
Overview
The metrics associated with a host
xen-api: Class host_metrics
Instance Method Summary collapse
-
#initialize(link, ref) ⇒ HostMetrics
constructor
:nodoc:.
- #memory_free ⇒ Object
- #memory_total ⇒ Object
- #to_s ⇒ Object
Methods inherited from XObject
Constructor Details
#initialize(link, ref) ⇒ HostMetrics
:nodoc:
240 241 242 243 |
# File 'lib/pangea/objects.rb', line 240 def initialize(link, ref) #:nodoc: super(link, ref) @proxy_name = 'host_metrics' end |
Instance Method Details
#memory_free ⇒ Object
249 250 251 |
# File 'lib/pangea/objects.rb', line 249 def memory_free ref_call :get_memory_free end |
#memory_total ⇒ Object
245 246 247 |
# File 'lib/pangea/objects.rb', line 245 def memory_total ref_call :get_memory_total end |
#to_s ⇒ Object
253 254 255 256 |
# File 'lib/pangea/objects.rb', line 253 def to_s "Total Memory: #{Pangea::Util.humanize_bytes(memory_total)}\n" + "Free Memory: #{Pangea::Util.humanize_bytes(memory_free)}" end |