Class: OvirtSDK4::NumaNode
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::NumaNode
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Direct Known Subclasses
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. -
#cpu ⇒ Cpu
Returns the value of the
cpu
attribute. -
#cpu=(value) ⇒ Object
Sets the value of the
cpu
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.
-
#host ⇒ Host
Returns the value of the
host
attribute. -
#host=(value) ⇒ Object
Sets the value of the
host
attribute. -
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#index ⇒ Integer
Returns the value of the
index
attribute. -
#index=(value) ⇒ Object
Sets the value of the
index
attribute. -
#initialize(opts = {}) ⇒ NumaNode
constructor
Creates a new instance of the NumaNode class.
-
#memory ⇒ Integer
Returns the value of the
memory
attribute. -
#memory=(value) ⇒ Object
Sets the value of the
memory
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#node_distance ⇒ String
Returns the value of the
node_distance
attribute. -
#node_distance=(value) ⇒ Object
Sets the value of the
node_distance
attribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statistics
attribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statistics
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ NumaNode
Creates a new instance of the OvirtSDK4::NumaNode class.
12313 12314 12315 12316 12317 12318 12319 12320 12321 |
# File 'lib/ovirtsdk4/types.rb', line 12313 def initialize(opts = {}) super(opts) self.cpu = opts[:cpu] self.host = opts[:host] self.index = opts[:index] self.memory = opts[:memory] self.node_distance = opts[:node_distance] self.statistics = opts[:statistics] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
12326 12327 12328 12329 12330 12331 12332 12333 12334 |
# File 'lib/ovirtsdk4/types.rb', line 12326 def ==(other) super && @cpu == other.cpu && @host == other.host && @index == other.index && @memory == other.memory && @node_distance == other.node_distance && @statistics == other.statistics end |
#comment ⇒ String
Returns the value of the comment
attribute.
12088 12089 12090 |
# File 'lib/ovirtsdk4/types.rb', line 12088 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
12097 12098 12099 |
# File 'lib/ovirtsdk4/types.rb', line 12097 def comment=(value) @comment = value end |
#cpu ⇒ Cpu
Returns the value of the cpu
attribute.
12106 12107 12108 |
# File 'lib/ovirtsdk4/types.rb', line 12106 def cpu @cpu end |
#cpu=(value) ⇒ Object
Sets the value of the cpu
attribute.
The value
parameter can be an instance of Cpu or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts
parameter to the constructor.
12119 12120 12121 12122 12123 12124 |
# File 'lib/ovirtsdk4/types.rb', line 12119 def cpu=(value) if value.is_a?(Hash) value = Cpu.new(value) end @cpu = value end |
#description ⇒ String
Returns the value of the description
attribute.
12131 12132 12133 |
# File 'lib/ovirtsdk4/types.rb', line 12131 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
12140 12141 12142 |
# File 'lib/ovirtsdk4/types.rb', line 12140 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
12339 12340 12341 12342 12343 12344 12345 12346 12347 |
# File 'lib/ovirtsdk4/types.rb', line 12339 def hash super + @cpu.hash + @host.hash + @index.hash + @memory.hash + @node_distance.hash + @statistics.hash end |
#host ⇒ Host
Returns the value of the host
attribute.
12149 12150 12151 |
# File 'lib/ovirtsdk4/types.rb', line 12149 def host @host end |
#host=(value) ⇒ Object
Sets the value of the host
attribute.
The value
parameter can be an instance of Host or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts
parameter to the constructor.
12162 12163 12164 12165 12166 12167 |
# File 'lib/ovirtsdk4/types.rb', line 12162 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end |
#id ⇒ String
Returns the value of the id
attribute.
12174 12175 12176 |
# File 'lib/ovirtsdk4/types.rb', line 12174 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
12183 12184 12185 |
# File 'lib/ovirtsdk4/types.rb', line 12183 def id=(value) @id = value end |
#index ⇒ Integer
Returns the value of the index
attribute.
12192 12193 12194 |
# File 'lib/ovirtsdk4/types.rb', line 12192 def index @index end |
#index=(value) ⇒ Object
Sets the value of the index
attribute.
12201 12202 12203 |
# File 'lib/ovirtsdk4/types.rb', line 12201 def index=(value) @index = value end |
#memory ⇒ Integer
Returns the value of the memory
attribute.
12210 12211 12212 |
# File 'lib/ovirtsdk4/types.rb', line 12210 def memory @memory end |
#memory=(value) ⇒ Object
Sets the value of the memory
attribute.
12219 12220 12221 |
# File 'lib/ovirtsdk4/types.rb', line 12219 def memory=(value) @memory = value end |
#name ⇒ String
Returns the value of the name
attribute.
12228 12229 12230 |
# File 'lib/ovirtsdk4/types.rb', line 12228 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
12237 12238 12239 |
# File 'lib/ovirtsdk4/types.rb', line 12237 def name=(value) @name = value end |
#node_distance ⇒ String
Returns the value of the node_distance
attribute.
12246 12247 12248 |
# File 'lib/ovirtsdk4/types.rb', line 12246 def node_distance @node_distance end |
#node_distance=(value) ⇒ Object
Sets the value of the node_distance
attribute.
12255 12256 12257 |
# File 'lib/ovirtsdk4/types.rb', line 12255 def node_distance=(value) @node_distance = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
12264 12265 12266 |
# File 'lib/ovirtsdk4/types.rb', line 12264 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 |
# File 'lib/ovirtsdk4/types.rb', line 12273 def statistics=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Statistic.new(value) end end end @statistics = list end |