class Yao::Resources::Hypervisor
Public Class Methods
statistics()
click to toggle source
@return [Yao::Resources::Hypervisor::Statistics]
# File lib/yao/resources/hypervisor.rb, line 41 def statistics json = GET([resources_path, "statistics"].join("/")).body Yao::Resources::Hypervisor::Statistics.new(json["hypervisor_statistics"]) end
uptime(id)
click to toggle source
@param id [String] @return [Yao::Resources::Hypervisor::Uptime]
# File lib/yao/resources/hypervisor.rb, line 48 def uptime(id) json = GET([resources_path, id, "uptime"].join("/")).body Yao::Resources::Hypervisor::Uptime.new(json["hypervisor"]) end
Public Instance Methods
cpu_info()
click to toggle source
@return [Hash]
# File lib/yao/resources/hypervisor.rb, line 11 def cpu_info JSON.parse self["cpu_info"] end
disabled?()
click to toggle source
@return [Bool]
# File lib/yao/resources/hypervisor.rb, line 21 def disabled? self['status'] == 'disabled' end
enabled?()
click to toggle source
@return [Bool]
# File lib/yao/resources/hypervisor.rb, line 16 def enabled? self['status'] == 'enabled' end
service()
click to toggle source
@return [Yao::Resources::ComputeServices]
# File lib/yao/resources/hypervisor.rb, line 26 def service Yao::ComputeServices.new(self['service']) end