lib/yao/resources/hypervisor.rb in yao-0.3.6 vs lib/yao/resources/hypervisor.rb in yao-0.3.7

- old
+ new

@@ -1,13 +1,17 @@ module Yao::Resources class Hypervisor < Base friendly_attributes :hypervisor_hostname, :hypervisor_type, :hypervisor_version, :running_vms, :current_workload, :vcpus, :vcpus_used, :memory_mb, :memory_mb_used, :free_disk_gb, - :local_gb, :local_gb_used, :free_disk_gb + :local_gb, :local_gb_used, :free_disk_gb, :status def cpu_info JSON.parse self["cpu_info"] + end + + def enabled? + self['status'] == 'enabled' end alias hostname hypervisor_hostname alias type hypervisor_hostname alias version hypervisor_version