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
trueifselfandotherhave the same attributes and values. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#cpu ⇒ Cpu
Returns the value of the
cpuattribute. -
#cpu=(value) ⇒ Object
Sets the value of the
cpuattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
hostattribute. -
#host=(value) ⇒ Object
Sets the value of the
hostattribute. -
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#index ⇒ Integer
Returns the value of the
indexattribute. -
#index=(value) ⇒ Object
Sets the value of the
indexattribute. -
#initialize(opts = {}) ⇒ NumaNode
constructor
Creates a new instance of the NumaNode class.
-
#memory ⇒ Integer
Returns the value of the
memoryattribute. -
#memory=(value) ⇒ Object
Sets the value of the
memoryattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#node_distance ⇒ String
Returns the value of the
node_distanceattribute. -
#node_distance=(value) ⇒ Object
Sets the value of the
node_distanceattribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statisticsattribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statisticsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ NumaNode
Creates a new instance of the OvirtSDK4::NumaNode class.
12560 12561 12562 12563 12564 12565 12566 12567 12568 |
# File 'lib/ovirtsdk4/types.rb', line 12560 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.
12573 12574 12575 12576 12577 12578 12579 12580 12581 |
# File 'lib/ovirtsdk4/types.rb', line 12573 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.
12335 12336 12337 |
# File 'lib/ovirtsdk4/types.rb', line 12335 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
12344 12345 12346 |
# File 'lib/ovirtsdk4/types.rb', line 12344 def comment=(value) @comment = value end |
#cpu ⇒ Cpu
Returns the value of the cpu attribute.
12353 12354 12355 |
# File 'lib/ovirtsdk4/types.rb', line 12353 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.
12366 12367 12368 12369 12370 12371 |
# File 'lib/ovirtsdk4/types.rb', line 12366 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.
12378 12379 12380 |
# File 'lib/ovirtsdk4/types.rb', line 12378 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
12387 12388 12389 |
# File 'lib/ovirtsdk4/types.rb', line 12387 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
12586 12587 12588 12589 12590 12591 12592 12593 12594 |
# File 'lib/ovirtsdk4/types.rb', line 12586 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.
12396 12397 12398 |
# File 'lib/ovirtsdk4/types.rb', line 12396 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.
12409 12410 12411 12412 12413 12414 |
# File 'lib/ovirtsdk4/types.rb', line 12409 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.
12421 12422 12423 |
# File 'lib/ovirtsdk4/types.rb', line 12421 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
12430 12431 12432 |
# File 'lib/ovirtsdk4/types.rb', line 12430 def id=(value) @id = value end |
#index ⇒ Integer
Returns the value of the index attribute.
12439 12440 12441 |
# File 'lib/ovirtsdk4/types.rb', line 12439 def index @index end |
#index=(value) ⇒ Object
Sets the value of the index attribute.
12448 12449 12450 |
# File 'lib/ovirtsdk4/types.rb', line 12448 def index=(value) @index = value end |
#memory ⇒ Integer
Returns the value of the memory attribute.
12457 12458 12459 |
# File 'lib/ovirtsdk4/types.rb', line 12457 def memory @memory end |
#memory=(value) ⇒ Object
Sets the value of the memory attribute.
12466 12467 12468 |
# File 'lib/ovirtsdk4/types.rb', line 12466 def memory=(value) @memory = value end |
#name ⇒ String
Returns the value of the name attribute.
12475 12476 12477 |
# File 'lib/ovirtsdk4/types.rb', line 12475 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
12484 12485 12486 |
# File 'lib/ovirtsdk4/types.rb', line 12484 def name=(value) @name = value end |
#node_distance ⇒ String
Returns the value of the node_distance attribute.
12493 12494 12495 |
# File 'lib/ovirtsdk4/types.rb', line 12493 def node_distance @node_distance end |
#node_distance=(value) ⇒ Object
Sets the value of the node_distance attribute.
12502 12503 12504 |
# File 'lib/ovirtsdk4/types.rb', line 12502 def node_distance=(value) @node_distance = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics attribute.
12511 12512 12513 |
# File 'lib/ovirtsdk4/types.rb', line 12511 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics attribute.
12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 |
# File 'lib/ovirtsdk4/types.rb', line 12520 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 |