Class: Pangea::VM
Overview
A Virtual Machine or Guest (DomU)
xen-api: VM
Instance Method Summary collapse
-
#actions_after_crash ⇒ Object
xen-api: VM.get_actions_after_crash.
-
#actions_after_reboot ⇒ Object
xen-api: VM.get_actions_after_reboot.
-
#actions_after_shutdown ⇒ Object
xen-api: VM.get_actions_after_shutdown.
-
#domid ⇒ Object
xen-api: VM.get_domid.
- #dyn_max_mem ⇒ Object
- #dyn_min_mem ⇒ Object
-
#guest_metrics ⇒ Object
xen-api: VM.get_guest_metrics.
-
#initialize(link, ref) ⇒ VM
constructor
:nodoc:.
-
#is_control_domain? ⇒ Boolean
xen-api: VM.get_is_control_domain.
-
#label ⇒ Object
VM Label (same one you see when you run ‘xm list’).
-
#max_mem ⇒ Object
xen-api: VM.get_memory_static_max.
-
#metrics ⇒ Object
xen-api: VM.get_metrics.
-
#min_mem ⇒ Object
xen-api: VM.get_memory_static_min.
-
#power_state ⇒ Object
xen-api: VM.get_power_state.
-
#pv_kernel ⇒ Object
xen-api: VM.get_pv_kernel.
-
#resident_on ⇒ Object
xen-api: VM.get_resident_on.
- #to_s ⇒ Object
-
#vifs ⇒ Object
xen-api: VM.get_VIFs.
Methods inherited from XObject
Constructor Details
#initialize(link, ref) ⇒ VM
:nodoc:
323 324 325 326 |
# File 'lib/pangea/objects.rb', line 323 def initialize(link, ref) #:nodoc: super(link, ref) @proxy_name = 'VM' end |
Instance Method Details
#actions_after_crash ⇒ Object
xen-api: VM.get_actions_after_crash
444 445 446 |
# File 'lib/pangea/objects.rb', line 444 def actions_after_crash ref_call :get_actions_after_crash end |
#actions_after_reboot ⇒ Object
xen-api: VM.get_actions_after_reboot
437 438 439 |
# File 'lib/pangea/objects.rb', line 437 def actions_after_reboot ref_call :get_actions_after_reboot end |
#actions_after_shutdown ⇒ Object
xen-api: VM.get_actions_after_shutdown
423 424 425 |
# File 'lib/pangea/objects.rb', line 423 def actions_after_shutdown ref_call :get_actions_after_shutdown end |
#domid ⇒ Object
xen-api: VM.get_domid
402 403 404 |
# File 'lib/pangea/objects.rb', line 402 def domid (ref = ref_call :get_domid).to_i end |
#dyn_max_mem ⇒ Object
376 377 378 |
# File 'lib/pangea/objects.rb', line 376 def dyn_max_mem ref_call :get_memory_dynamic_max end |
#dyn_min_mem ⇒ Object
380 381 382 |
# File 'lib/pangea/objects.rb', line 380 def dyn_min_mem ref_call :get_memory_dynamic_min end |
#guest_metrics ⇒ Object
xen-api: VM.get_guest_metrics
347 348 349 |
# File 'lib/pangea/objects.rb', line 347 def guest_metrics VMGuestMetrics.new(@link, ref_call(:get_guest_metrics)) end |
#is_control_domain? ⇒ Boolean
xen-api: VM.get_is_control_domain
409 410 411 |
# File 'lib/pangea/objects.rb', line 409 def is_control_domain? ref_call :get_is_control_domain end |
#label ⇒ Object
VM Label (same one you see when you run ‘xm list’)
xen-api: VM.get_name_label
333 334 335 |
# File 'lib/pangea/objects.rb', line 333 def label ref_call :get_name_label end |
#max_mem ⇒ Object
xen-api: VM.get_memory_static_max
372 373 374 |
# File 'lib/pangea/objects.rb', line 372 def max_mem ref_call :get_memory_static_max end |
#metrics ⇒ Object
xen-api: VM.get_metrics
340 341 342 |
# File 'lib/pangea/objects.rb', line 340 def metrics VMMetrics.new(@link, ref_call(:get_metrics)) end |
#min_mem ⇒ Object
xen-api: VM.get_memory_static_min
387 388 389 |
# File 'lib/pangea/objects.rb', line 387 def min_mem ref_call :get_memory_static_min end |
#power_state ⇒ Object
xen-api: VM.get_power_state
365 366 367 |
# File 'lib/pangea/objects.rb', line 365 def power_state ref_call :get_power_state end |
#pv_kernel ⇒ Object
xen-api: VM.get_pv_kernel
430 431 432 |
# File 'lib/pangea/objects.rb', line 430 def pv_kernel ref_call :get_PV_kernel end |
#resident_on ⇒ Object
xen-api: VM.get_resident_on
394 395 396 397 |
# File 'lib/pangea/objects.rb', line 394 def resident_on ref = ref_call(:get_resident_on) Host.new(@link, ref) end |
#to_s ⇒ Object
448 449 450 451 452 453 454 455 |
# File 'lib/pangea/objects.rb', line 448 def to_s eol = "\n" "Label: #{label}" + eol + "UUID: #{uuid}" + eol + "Power State: #{power_state}" + eol + "Mem: #{Util::humanize_bytes(dyn_min_mem)}" + eol + "Max Mem: #{Util::humanize_bytes(max_mem)}" + eol end |