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.
11504 11505 11506 11507 11508 11509 11510 11511 11512 |
# File 'lib/ovirtsdk4/types.rb', line 11504 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.
11517 11518 11519 11520 11521 11522 11523 11524 11525 |
# File 'lib/ovirtsdk4/types.rb', line 11517 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.
11279 11280 11281 |
# File 'lib/ovirtsdk4/types.rb', line 11279 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
11288 11289 11290 |
# File 'lib/ovirtsdk4/types.rb', line 11288 def comment=(value) @comment = value end |
#cpu ⇒ Cpu
Returns the value of the cpu
attribute.
11297 11298 11299 |
# File 'lib/ovirtsdk4/types.rb', line 11297 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.
11310 11311 11312 11313 11314 11315 |
# File 'lib/ovirtsdk4/types.rb', line 11310 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.
11322 11323 11324 |
# File 'lib/ovirtsdk4/types.rb', line 11322 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
11331 11332 11333 |
# File 'lib/ovirtsdk4/types.rb', line 11331 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
11530 11531 11532 11533 11534 11535 11536 11537 11538 |
# File 'lib/ovirtsdk4/types.rb', line 11530 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.
11340 11341 11342 |
# File 'lib/ovirtsdk4/types.rb', line 11340 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.
11353 11354 11355 11356 11357 11358 |
# File 'lib/ovirtsdk4/types.rb', line 11353 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.
11365 11366 11367 |
# File 'lib/ovirtsdk4/types.rb', line 11365 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
11374 11375 11376 |
# File 'lib/ovirtsdk4/types.rb', line 11374 def id=(value) @id = value end |
#index ⇒ Integer
Returns the value of the index
attribute.
11383 11384 11385 |
# File 'lib/ovirtsdk4/types.rb', line 11383 def index @index end |
#index=(value) ⇒ Object
Sets the value of the index
attribute.
11392 11393 11394 |
# File 'lib/ovirtsdk4/types.rb', line 11392 def index=(value) @index = value end |
#memory ⇒ Integer
Returns the value of the memory
attribute.
11401 11402 11403 |
# File 'lib/ovirtsdk4/types.rb', line 11401 def memory @memory end |
#memory=(value) ⇒ Object
Sets the value of the memory
attribute.
11410 11411 11412 |
# File 'lib/ovirtsdk4/types.rb', line 11410 def memory=(value) @memory = value end |
#name ⇒ String
Returns the value of the name
attribute.
11419 11420 11421 |
# File 'lib/ovirtsdk4/types.rb', line 11419 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
11428 11429 11430 |
# File 'lib/ovirtsdk4/types.rb', line 11428 def name=(value) @name = value end |
#node_distance ⇒ String
Returns the value of the node_distance
attribute.
11437 11438 11439 |
# File 'lib/ovirtsdk4/types.rb', line 11437 def node_distance @node_distance end |
#node_distance=(value) ⇒ Object
Sets the value of the node_distance
attribute.
11446 11447 11448 |
# File 'lib/ovirtsdk4/types.rb', line 11446 def node_distance=(value) @node_distance = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
11455 11456 11457 |
# File 'lib/ovirtsdk4/types.rb', line 11455 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 |
# File 'lib/ovirtsdk4/types.rb', line 11464 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 |