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.
11527 11528 11529 11530 11531 11532 11533 11534 11535 |
# File 'lib/ovirtsdk4/types.rb', line 11527 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.
11540 11541 11542 11543 11544 11545 11546 11547 11548 |
# File 'lib/ovirtsdk4/types.rb', line 11540 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.
11302 11303 11304 |
# File 'lib/ovirtsdk4/types.rb', line 11302 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
11311 11312 11313 |
# File 'lib/ovirtsdk4/types.rb', line 11311 def comment=(value) @comment = value end |
#cpu ⇒ Cpu
Returns the value of the cpu
attribute.
11320 11321 11322 |
# File 'lib/ovirtsdk4/types.rb', line 11320 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.
11333 11334 11335 11336 11337 11338 |
# File 'lib/ovirtsdk4/types.rb', line 11333 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.
11345 11346 11347 |
# File 'lib/ovirtsdk4/types.rb', line 11345 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
11354 11355 11356 |
# File 'lib/ovirtsdk4/types.rb', line 11354 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
11553 11554 11555 11556 11557 11558 11559 11560 11561 |
# File 'lib/ovirtsdk4/types.rb', line 11553 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.
11363 11364 11365 |
# File 'lib/ovirtsdk4/types.rb', line 11363 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.
11376 11377 11378 11379 11380 11381 |
# File 'lib/ovirtsdk4/types.rb', line 11376 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.
11388 11389 11390 |
# File 'lib/ovirtsdk4/types.rb', line 11388 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
11397 11398 11399 |
# File 'lib/ovirtsdk4/types.rb', line 11397 def id=(value) @id = value end |
#index ⇒ Integer
Returns the value of the index
attribute.
11406 11407 11408 |
# File 'lib/ovirtsdk4/types.rb', line 11406 def index @index end |
#index=(value) ⇒ Object
Sets the value of the index
attribute.
11415 11416 11417 |
# File 'lib/ovirtsdk4/types.rb', line 11415 def index=(value) @index = value end |
#memory ⇒ Integer
Returns the value of the memory
attribute.
11424 11425 11426 |
# File 'lib/ovirtsdk4/types.rb', line 11424 def memory @memory end |
#memory=(value) ⇒ Object
Sets the value of the memory
attribute.
11433 11434 11435 |
# File 'lib/ovirtsdk4/types.rb', line 11433 def memory=(value) @memory = value end |
#name ⇒ String
Returns the value of the name
attribute.
11442 11443 11444 |
# File 'lib/ovirtsdk4/types.rb', line 11442 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
11451 11452 11453 |
# File 'lib/ovirtsdk4/types.rb', line 11451 def name=(value) @name = value end |
#node_distance ⇒ String
Returns the value of the node_distance
attribute.
11460 11461 11462 |
# File 'lib/ovirtsdk4/types.rb', line 11460 def node_distance @node_distance end |
#node_distance=(value) ⇒ Object
Sets the value of the node_distance
attribute.
11469 11470 11471 |
# File 'lib/ovirtsdk4/types.rb', line 11469 def node_distance=(value) @node_distance = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
11478 11479 11480 |
# File 'lib/ovirtsdk4/types.rb', line 11478 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 |
# File 'lib/ovirtsdk4/types.rb', line 11487 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 |