Class: OvirtSDK4::HostCpuUnit
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::HostCpuUnit
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#core_id ⇒ Integer
Returns the value of the
core_id
attribute. -
#core_id=(value) ⇒ Object
Sets the value of the
core_id
attribute. -
#cpu_id ⇒ Integer
Returns the value of the
cpu_id
attribute. -
#cpu_id=(value) ⇒ Object
Sets the value of the
cpu_id
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ HostCpuUnit
constructor
Creates a new instance of the HostCpuUnit class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#runs_vdsm ⇒ Boolean
Returns the value of the
runs_vdsm
attribute. -
#runs_vdsm=(value) ⇒ Object
Sets the value of the
runs_vdsm
attribute. -
#socket_id ⇒ Integer
Returns the value of the
socket_id
attribute. -
#socket_id=(value) ⇒ Object
Sets the value of the
socket_id
attribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vms
attribute. -
#vms=(list) ⇒ Object
Sets the value of the
vms
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ HostCpuUnit
Creates a new instance of the OvirtSDK4::HostCpuUnit class.
45997 45998 45999 46000 46001 46002 46003 46004 |
# 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 |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
46009 46010 46011 46012 46013 46014 46015 46016 |
# 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 |
#comment ⇒ String
Returns the value of the comment
attribute.
45806 45807 45808 |
# File 'lib/ovirtsdk4/types.rb', line 45806 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
45815 45816 45817 |
# File 'lib/ovirtsdk4/types.rb', line 45815 def comment=(value) @comment = value end |
#core_id ⇒ Integer
Returns the value of the core_id
attribute.
45824 45825 45826 |
# File 'lib/ovirtsdk4/types.rb', line 45824 def core_id @core_id end |
#core_id=(value) ⇒ Object
Sets the value of the core_id
attribute.
45833 45834 45835 |
# File 'lib/ovirtsdk4/types.rb', line 45833 def core_id=(value) @core_id = value end |
#cpu_id ⇒ Integer
Returns the value of the cpu_id
attribute.
45842 45843 45844 |
# File 'lib/ovirtsdk4/types.rb', line 45842 def cpu_id @cpu_id end |
#cpu_id=(value) ⇒ Object
Sets the value of the cpu_id
attribute.
45851 45852 45853 |
# File 'lib/ovirtsdk4/types.rb', line 45851 def cpu_id=(value) @cpu_id = value end |
#description ⇒ String
Returns the value of the description
attribute.
45860 45861 45862 |
# File 'lib/ovirtsdk4/types.rb', line 45860 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
45869 45870 45871 |
# File 'lib/ovirtsdk4/types.rb', line 45869 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
46021 46022 46023 46024 46025 46026 46027 46028 |
# 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 |
#id ⇒ String
Returns the value of the id
attribute.
45878 45879 45880 |
# File 'lib/ovirtsdk4/types.rb', line 45878 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
45887 45888 45889 |
# File 'lib/ovirtsdk4/types.rb', line 45887 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
45896 45897 45898 |
# File 'lib/ovirtsdk4/types.rb', line 45896 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
45905 45906 45907 |
# File 'lib/ovirtsdk4/types.rb', line 45905 def name=(value) @name = value end |
#runs_vdsm ⇒ Boolean
Returns the value of the runs_vdsm
attribute.
45914 45915 45916 |
# File 'lib/ovirtsdk4/types.rb', line 45914 def runs_vdsm @runs_vdsm end |
#runs_vdsm=(value) ⇒ Object
Sets the value of the runs_vdsm
attribute.
45923 45924 45925 |
# File 'lib/ovirtsdk4/types.rb', line 45923 def runs_vdsm=(value) @runs_vdsm = value end |
#socket_id ⇒ Integer
Returns the value of the socket_id
attribute.
45932 45933 45934 |
# File 'lib/ovirtsdk4/types.rb', line 45932 def socket_id @socket_id end |
#socket_id=(value) ⇒ Object
Sets the value of the socket_id
attribute.
45941 45942 45943 |
# File 'lib/ovirtsdk4/types.rb', line 45941 def socket_id=(value) @socket_id = value end |
#vms ⇒ Array<Vm>
Returns the value of the vms
attribute.
45950 45951 45952 |
# File 'lib/ovirtsdk4/types.rb', line 45950 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
45959 45960 45961 45962 45963 45964 45965 45966 45967 45968 45969 |
# 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 |