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. -
#numa_tune_mode ⇒ NumaTuneMode
Returns the value of the
numa_tune_mode
attribute. -
#numa_tune_mode=(value) ⇒ Object
Sets the value of the
numa_tune_mode
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.
25453 25454 25455 25456 25457 25458 |
# File 'lib/ovirtsdk4/types.rb', line 25453 def initialize(opts = {}) super(opts) self.numa_node_pins = opts[:numa_node_pins] self.numa_tune_mode = opts[:numa_tune_mode] self.vm = opts[:vm] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
25463 25464 25465 25466 25467 25468 |
# File 'lib/ovirtsdk4/types.rb', line 25463 def ==(other) super && @numa_node_pins == other.numa_node_pins && @numa_tune_mode == other.numa_tune_mode && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment
attribute.
25153 25154 25155 |
# File 'lib/ovirtsdk4/types.rb', line 25153 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
25162 25163 25164 |
# File 'lib/ovirtsdk4/types.rb', line 25162 def comment=(value) @comment = value end |
#cpu ⇒ Cpu
Returns the value of the cpu
attribute.
25171 25172 25173 |
# File 'lib/ovirtsdk4/types.rb', line 25171 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.
25184 25185 25186 25187 25188 25189 |
# File 'lib/ovirtsdk4/types.rb', line 25184 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.
25196 25197 25198 |
# File 'lib/ovirtsdk4/types.rb', line 25196 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
25205 25206 25207 |
# File 'lib/ovirtsdk4/types.rb', line 25205 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
25473 25474 25475 25476 25477 25478 |
# File 'lib/ovirtsdk4/types.rb', line 25473 def hash super + @numa_node_pins.hash + @numa_tune_mode.hash + @vm.hash end |
#host ⇒ Host
Returns the value of the host
attribute.
25214 25215 25216 |
# File 'lib/ovirtsdk4/types.rb', line 25214 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.
25227 25228 25229 25230 25231 25232 |
# File 'lib/ovirtsdk4/types.rb', line 25227 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.
25239 25240 25241 |
# File 'lib/ovirtsdk4/types.rb', line 25239 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
25248 25249 25250 |
# File 'lib/ovirtsdk4/types.rb', line 25248 def id=(value) @id = value end |
#index ⇒ Integer
Returns the value of the index
attribute.
25257 25258 25259 |
# File 'lib/ovirtsdk4/types.rb', line 25257 def index @index end |
#index=(value) ⇒ Object
Sets the value of the index
attribute.
25266 25267 25268 |
# File 'lib/ovirtsdk4/types.rb', line 25266 def index=(value) @index = value end |
#memory ⇒ Integer
Returns the value of the memory
attribute.
25275 25276 25277 |
# File 'lib/ovirtsdk4/types.rb', line 25275 def memory @memory end |
#memory=(value) ⇒ Object
Sets the value of the memory
attribute.
25284 25285 25286 |
# File 'lib/ovirtsdk4/types.rb', line 25284 def memory=(value) @memory = value end |
#name ⇒ String
Returns the value of the name
attribute.
25293 25294 25295 |
# File 'lib/ovirtsdk4/types.rb', line 25293 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
25302 25303 25304 |
# File 'lib/ovirtsdk4/types.rb', line 25302 def name=(value) @name = value end |
#node_distance ⇒ String
Returns the value of the node_distance
attribute.
25311 25312 25313 |
# File 'lib/ovirtsdk4/types.rb', line 25311 def node_distance @node_distance end |
#node_distance=(value) ⇒ Object
Sets the value of the node_distance
attribute.
25320 25321 25322 |
# File 'lib/ovirtsdk4/types.rb', line 25320 def node_distance=(value) @node_distance = value end |
#numa_node_pins ⇒ Array<NumaNodePin>
Returns the value of the numa_node_pins
attribute.
25329 25330 25331 |
# File 'lib/ovirtsdk4/types.rb', line 25329 def numa_node_pins @numa_node_pins end |
#numa_node_pins=(list) ⇒ Object
Sets the value of the numa_node_pins
attribute.
25338 25339 25340 25341 25342 25343 25344 25345 25346 25347 25348 |
# File 'lib/ovirtsdk4/types.rb', line 25338 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 |
#numa_tune_mode ⇒ NumaTuneMode
Returns the value of the numa_tune_mode
attribute.
25355 25356 25357 |
# File 'lib/ovirtsdk4/types.rb', line 25355 def numa_tune_mode @numa_tune_mode end |
#numa_tune_mode=(value) ⇒ Object
Sets the value of the numa_tune_mode
attribute.
25364 25365 25366 |
# File 'lib/ovirtsdk4/types.rb', line 25364 def numa_tune_mode=(value) @numa_tune_mode = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
25373 25374 25375 |
# File 'lib/ovirtsdk4/types.rb', line 25373 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
25382 25383 25384 25385 25386 25387 25388 25389 25390 25391 25392 |
# File 'lib/ovirtsdk4/types.rb', line 25382 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.
25399 25400 25401 |
# File 'lib/ovirtsdk4/types.rb', line 25399 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.
25412 25413 25414 25415 25416 25417 |
# File 'lib/ovirtsdk4/types.rb', line 25412 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |