Class: Pangea::HostMetrics

Inherits:
XObject
  • Object
show all
Defined in:
lib/pangea/objects.rb

Overview

The metrics associated with a host

xen-api: Class host_metrics

Instance Method Summary collapse

Methods inherited from XObject

#ref_call, #uuid

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_freeObject



249
250
251
# File 'lib/pangea/objects.rb', line 249

def memory_free
  ref_call :get_memory_free
end

#memory_totalObject



245
246
247
# File 'lib/pangea/objects.rb', line 245

def memory_total
  ref_call :get_memory_total
end

#to_sObject



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