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.
24300 24301 24302 24303 24304 |
# File 'lib/ovirtsdk4/types.rb', line 24300 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.
24309 24310 24311 24312 24313 |
# File 'lib/ovirtsdk4/types.rb', line 24309 def ==(other) super && @numa_node_pins == other.numa_node_pins && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment
attribute.
24020 24021 24022 |
# File 'lib/ovirtsdk4/types.rb', line 24020 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
24029 24030 24031 |
# File 'lib/ovirtsdk4/types.rb', line 24029 def comment=(value) @comment = value end |
#cpu ⇒ Cpu
Returns the value of the cpu
attribute.
24038 24039 24040 |
# File 'lib/ovirtsdk4/types.rb', line 24038 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.
24051 24052 24053 24054 24055 24056 |
# File 'lib/ovirtsdk4/types.rb', line 24051 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.
24063 24064 24065 |
# File 'lib/ovirtsdk4/types.rb', line 24063 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
24072 24073 24074 |
# File 'lib/ovirtsdk4/types.rb', line 24072 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
24318 24319 24320 24321 24322 |
# File 'lib/ovirtsdk4/types.rb', line 24318 def hash super + @numa_node_pins.hash + @vm.hash end |
#host ⇒ Host
Returns the value of the host
attribute.
24081 24082 24083 |
# File 'lib/ovirtsdk4/types.rb', line 24081 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.
24094 24095 24096 24097 24098 24099 |
# File 'lib/ovirtsdk4/types.rb', line 24094 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.
24106 24107 24108 |
# File 'lib/ovirtsdk4/types.rb', line 24106 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
24115 24116 24117 |
# File 'lib/ovirtsdk4/types.rb', line 24115 def id=(value) @id = value end |
#index ⇒ Integer
Returns the value of the index
attribute.
24124 24125 24126 |
# File 'lib/ovirtsdk4/types.rb', line 24124 def index @index end |
#index=(value) ⇒ Object
Sets the value of the index
attribute.
24133 24134 24135 |
# File 'lib/ovirtsdk4/types.rb', line 24133 def index=(value) @index = value end |
#memory ⇒ Integer
Returns the value of the memory
attribute.
24142 24143 24144 |
# File 'lib/ovirtsdk4/types.rb', line 24142 def memory @memory end |
#memory=(value) ⇒ Object
Sets the value of the memory
attribute.
24151 24152 24153 |
# File 'lib/ovirtsdk4/types.rb', line 24151 def memory=(value) @memory = value end |
#name ⇒ String
Returns the value of the name
attribute.
24160 24161 24162 |
# File 'lib/ovirtsdk4/types.rb', line 24160 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
24169 24170 24171 |
# File 'lib/ovirtsdk4/types.rb', line 24169 def name=(value) @name = value end |
#node_distance ⇒ String
Returns the value of the node_distance
attribute.
24178 24179 24180 |
# File 'lib/ovirtsdk4/types.rb', line 24178 def node_distance @node_distance end |
#node_distance=(value) ⇒ Object
Sets the value of the node_distance
attribute.
24187 24188 24189 |
# File 'lib/ovirtsdk4/types.rb', line 24187 def node_distance=(value) @node_distance = value end |
#numa_node_pins ⇒ Array<NumaNodePin>
Returns the value of the numa_node_pins
attribute.
24196 24197 24198 |
# File 'lib/ovirtsdk4/types.rb', line 24196 def numa_node_pins @numa_node_pins end |
#numa_node_pins=(list) ⇒ Object
Sets the value of the numa_node_pins
attribute.
24205 24206 24207 24208 24209 24210 24211 24212 24213 24214 24215 |
# File 'lib/ovirtsdk4/types.rb', line 24205 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.
24222 24223 24224 |
# File 'lib/ovirtsdk4/types.rb', line 24222 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
24231 24232 24233 24234 24235 24236 24237 24238 24239 24240 24241 |
# File 'lib/ovirtsdk4/types.rb', line 24231 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.
24248 24249 24250 |
# File 'lib/ovirtsdk4/types.rb', line 24248 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.
24261 24262 24263 24264 24265 24266 |
# File 'lib/ovirtsdk4/types.rb', line 24261 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |