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.
24254 24255 24256 24257 24258 |
# File 'lib/ovirtsdk4/types.rb', line 24254 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.
24263 24264 24265 24266 24267 |
# File 'lib/ovirtsdk4/types.rb', line 24263 def ==(other) super && @numa_node_pins == other.numa_node_pins && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment
attribute.
23974 23975 23976 |
# File 'lib/ovirtsdk4/types.rb', line 23974 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
23983 23984 23985 |
# File 'lib/ovirtsdk4/types.rb', line 23983 def comment=(value) @comment = value end |
#cpu ⇒ Cpu
Returns the value of the cpu
attribute.
23992 23993 23994 |
# File 'lib/ovirtsdk4/types.rb', line 23992 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.
24005 24006 24007 24008 24009 24010 |
# File 'lib/ovirtsdk4/types.rb', line 24005 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.
24017 24018 24019 |
# File 'lib/ovirtsdk4/types.rb', line 24017 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
24026 24027 24028 |
# File 'lib/ovirtsdk4/types.rb', line 24026 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
24272 24273 24274 24275 24276 |
# File 'lib/ovirtsdk4/types.rb', line 24272 def hash super + @numa_node_pins.hash + @vm.hash end |
#host ⇒ Host
Returns the value of the host
attribute.
24035 24036 24037 |
# File 'lib/ovirtsdk4/types.rb', line 24035 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.
24048 24049 24050 24051 24052 24053 |
# File 'lib/ovirtsdk4/types.rb', line 24048 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.
24060 24061 24062 |
# File 'lib/ovirtsdk4/types.rb', line 24060 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
24069 24070 24071 |
# File 'lib/ovirtsdk4/types.rb', line 24069 def id=(value) @id = value end |
#index ⇒ Integer
Returns the value of the index
attribute.
24078 24079 24080 |
# File 'lib/ovirtsdk4/types.rb', line 24078 def index @index end |
#index=(value) ⇒ Object
Sets the value of the index
attribute.
24087 24088 24089 |
# File 'lib/ovirtsdk4/types.rb', line 24087 def index=(value) @index = value end |
#memory ⇒ Integer
Returns the value of the memory
attribute.
24096 24097 24098 |
# File 'lib/ovirtsdk4/types.rb', line 24096 def memory @memory end |
#memory=(value) ⇒ Object
Sets the value of the memory
attribute.
24105 24106 24107 |
# File 'lib/ovirtsdk4/types.rb', line 24105 def memory=(value) @memory = value end |
#name ⇒ String
Returns the value of the name
attribute.
24114 24115 24116 |
# File 'lib/ovirtsdk4/types.rb', line 24114 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
24123 24124 24125 |
# File 'lib/ovirtsdk4/types.rb', line 24123 def name=(value) @name = value end |
#node_distance ⇒ String
Returns the value of the node_distance
attribute.
24132 24133 24134 |
# File 'lib/ovirtsdk4/types.rb', line 24132 def node_distance @node_distance end |
#node_distance=(value) ⇒ Object
Sets the value of the node_distance
attribute.
24141 24142 24143 |
# File 'lib/ovirtsdk4/types.rb', line 24141 def node_distance=(value) @node_distance = value end |
#numa_node_pins ⇒ Array<NumaNodePin>
Returns the value of the numa_node_pins
attribute.
24150 24151 24152 |
# File 'lib/ovirtsdk4/types.rb', line 24150 def numa_node_pins @numa_node_pins end |
#numa_node_pins=(list) ⇒ Object
Sets the value of the numa_node_pins
attribute.
24159 24160 24161 24162 24163 24164 24165 24166 24167 24168 24169 |
# File 'lib/ovirtsdk4/types.rb', line 24159 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.
24176 24177 24178 |
# File 'lib/ovirtsdk4/types.rb', line 24176 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
24185 24186 24187 24188 24189 24190 24191 24192 24193 24194 24195 |
# File 'lib/ovirtsdk4/types.rb', line 24185 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.
24202 24203 24204 |
# File 'lib/ovirtsdk4/types.rb', line 24202 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.
24215 24216 24217 24218 24219 24220 |
# File 'lib/ovirtsdk4/types.rb', line 24215 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |