Class: OvirtSDK4::VirtualNumaNode
- Inherits:
-
NumaNode
- Object
- Struct
- Identified
- NumaNode
- OvirtSDK4::VirtualNumaNode
- 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. -
#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 = {}) ⇒ VirtualNumaNode
constructor
Creates a new instance of the VirtualNumaNode 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. -
#numa_node_pins ⇒ Array<NumaNodePin>
Returns the value of the
numa_node_pins
attribute. -
#numa_node_pins=(list) ⇒ Object
Sets the value of the
numa_node_pins
attribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statistics
attribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statistics
attribute. -
#vm ⇒ Vm
Returns the value of the
vm
attribute. -
#vm=(value) ⇒ Object
Sets the value of the
vm
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ VirtualNumaNode
Creates a new instance of the OvirtSDK4::VirtualNumaNode class.
24455 24456 24457 24458 24459 |
# File 'lib/ovirtsdk4/types.rb', line 24455 def initialize(opts = {}) super(opts) self.numa_node_pins = opts[:numa_node_pins] self.vm = opts[:vm] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
24464 24465 24466 24467 24468 |
# File 'lib/ovirtsdk4/types.rb', line 24464 def ==(other) super && @numa_node_pins == other.numa_node_pins && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment
attribute.
24175 24176 24177 |
# File 'lib/ovirtsdk4/types.rb', line 24175 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
24184 24185 24186 |
# File 'lib/ovirtsdk4/types.rb', line 24184 def comment=(value) @comment = value end |
#cpu ⇒ Cpu
Returns the value of the cpu
attribute.
24193 24194 24195 |
# File 'lib/ovirtsdk4/types.rb', line 24193 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.
24206 24207 24208 24209 24210 24211 |
# File 'lib/ovirtsdk4/types.rb', line 24206 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.
24218 24219 24220 |
# File 'lib/ovirtsdk4/types.rb', line 24218 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
24227 24228 24229 |
# File 'lib/ovirtsdk4/types.rb', line 24227 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
24473 24474 24475 24476 24477 |
# File 'lib/ovirtsdk4/types.rb', line 24473 def hash super + @numa_node_pins.hash + @vm.hash end |
#host ⇒ Host
Returns the value of the host
attribute.
24236 24237 24238 |
# File 'lib/ovirtsdk4/types.rb', line 24236 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.
24249 24250 24251 24252 24253 24254 |
# File 'lib/ovirtsdk4/types.rb', line 24249 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.
24261 24262 24263 |
# File 'lib/ovirtsdk4/types.rb', line 24261 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
24270 24271 24272 |
# File 'lib/ovirtsdk4/types.rb', line 24270 def id=(value) @id = value end |
#index ⇒ Integer
Returns the value of the index
attribute.
24279 24280 24281 |
# File 'lib/ovirtsdk4/types.rb', line 24279 def index @index end |
#index=(value) ⇒ Object
Sets the value of the index
attribute.
24288 24289 24290 |
# File 'lib/ovirtsdk4/types.rb', line 24288 def index=(value) @index = value end |
#memory ⇒ Integer
Returns the value of the memory
attribute.
24297 24298 24299 |
# File 'lib/ovirtsdk4/types.rb', line 24297 def memory @memory end |
#memory=(value) ⇒ Object
Sets the value of the memory
attribute.
24306 24307 24308 |
# File 'lib/ovirtsdk4/types.rb', line 24306 def memory=(value) @memory = value end |
#name ⇒ String
Returns the value of the name
attribute.
24315 24316 24317 |
# File 'lib/ovirtsdk4/types.rb', line 24315 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
24324 24325 24326 |
# File 'lib/ovirtsdk4/types.rb', line 24324 def name=(value) @name = value end |
#node_distance ⇒ String
Returns the value of the node_distance
attribute.
24333 24334 24335 |
# File 'lib/ovirtsdk4/types.rb', line 24333 def node_distance @node_distance end |
#node_distance=(value) ⇒ Object
Sets the value of the node_distance
attribute.
24342 24343 24344 |
# File 'lib/ovirtsdk4/types.rb', line 24342 def node_distance=(value) @node_distance = value end |
#numa_node_pins ⇒ Array<NumaNodePin>
Returns the value of the numa_node_pins
attribute.
24351 24352 24353 |
# File 'lib/ovirtsdk4/types.rb', line 24351 def numa_node_pins @numa_node_pins end |
#numa_node_pins=(list) ⇒ Object
Sets the value of the numa_node_pins
attribute.
24360 24361 24362 24363 24364 24365 24366 24367 24368 24369 24370 |
# File 'lib/ovirtsdk4/types.rb', line 24360 def numa_node_pins=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = NumaNodePin.new(value) end end end @numa_node_pins = list end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
24377 24378 24379 |
# File 'lib/ovirtsdk4/types.rb', line 24377 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
24386 24387 24388 24389 24390 24391 24392 24393 24394 24395 24396 |
# File 'lib/ovirtsdk4/types.rb', line 24386 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 |
#vm ⇒ Vm
Returns the value of the vm
attribute.
24403 24404 24405 |
# File 'lib/ovirtsdk4/types.rb', line 24403 def vm @vm end |
#vm=(value) ⇒ Object
Sets the value of the vm
attribute.
The value
parameter can be an instance of OvirtSDK4::Vm 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.
24416 24417 24418 24419 24420 24421 |
# File 'lib/ovirtsdk4/types.rb', line 24416 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |