class OvirtSDK4::HostCpuUnit
Public Class Methods
Creates a new instance of the {HostCpuUnit} class.
@param opts [Hash] A hash containing the attributes of the object. The keys of the hash
should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.
@option opts [String] :comment The value of attribute `comment`.
@option opts [Integer] :core_id The value of attribute `core_id`.
@option opts [Integer] :cpu_id The value of attribute `cpu_id`.
@option opts [String] :description The value of attribute `description`.
@option opts [String] :id The value of attribute `id`.
@option opts [String] :name The value of attribute `name`.
@option opts [Boolean] :runs_vdsm The value of attribute `runs_vdsm`.
@option opts [Integer] :socket_id The value of attribute `socket_id`.
@option opts [Array<Vm>, Array<Hash>] :vms The values of attribute `vms`.
OvirtSDK4::Identified::new
# File lib/ovirtsdk4/types.rb, line 45997 def initialize(opts = {}) super(opts) self.core_id = opts[:core_id] self.cpu_id = opts[:cpu_id] self.runs_vdsm = opts[:runs_vdsm] self.socket_id = opts[:socket_id] self.vms = opts[:vms] end
Public Instance Methods
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 46009 def ==(other) super && @core_id == other.core_id && @cpu_id == other.cpu_id && @runs_vdsm == other.runs_vdsm && @socket_id == other.socket_id && @vms == other.vms end
Returns the value of the `comment` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 45806 def comment @comment end
Sets the value of the `comment` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 45815 def comment=(value) @comment = value end
Returns the value of the `core_id` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 45824 def core_id @core_id end
Sets the value of the `core_id` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 45833 def core_id=(value) @core_id = value end
Returns the value of the `cpu_id` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 45842 def cpu_id @cpu_id end
Sets the value of the `cpu_id` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 45851 def cpu_id=(value) @cpu_id = value end
Returns the value of the `description` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 45860 def description @description end
Sets the value of the `description` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 45869 def description=(value) @description = value end
Generates a hash value for this object.
OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 46021 def hash super + @core_id.hash + @cpu_id.hash + @runs_vdsm.hash + @socket_id.hash + @vms.hash end
Returns the value of the `id` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 45878 def id @id end
Sets the value of the `id` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 45887 def id=(value) @id = value end
Returns the value of the `name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 45896 def name @name end
Sets the value of the `name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 45905 def name=(value) @name = value end
Returns the value of the `runs_vdsm` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 45914 def runs_vdsm @runs_vdsm end
Sets the value of the `runs_vdsm` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 45923 def runs_vdsm=(value) @runs_vdsm = value end
Returns the value of the `socket_id` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 45932 def socket_id @socket_id end
Sets the value of the `socket_id` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 45941 def socket_id=(value) @socket_id = value end
Returns the value of the `vms` attribute.
@return [Array<Vm>]
# File lib/ovirtsdk4/types.rb, line 45950 def vms @vms end
Sets the value of the `vms` attribute.
@param list [Array<Vm>]
# File lib/ovirtsdk4/types.rb, line 45959 def vms=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Vm.new(value) end end end @vms = list end