Class: OvirtSDK4::NumaNode

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Direct Known Subclasses

VirtualNumaNode

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (NumaNode) initialize(opts = {})

Creates a new instance of the OvirtSDK4::NumaNode class.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :comment (String)

    The value of attribute comment.

  • :cpu (Cpu, Hash)

    The value of attribute cpu.

  • :description (String)

    The value of attribute description.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :index (Integer)

    The value of attribute index.

  • :memory (Integer)

    The value of attribute memory.

  • :name (String)

    The value of attribute name.

  • :node_distance (String)

    The value of attribute node_distance.

  • :statistics (Array<Statistic>, Array<Hash>)

    The values of attribute statistics.



8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
# File 'lib/ovirtsdk4/types.rb', line 8358

def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.cpu = opts[:cpu]
  self.description = opts[:description]
  self.host = opts[:host]
  self.id = opts[:id]
  self.index = opts[:index]
  self.memory = opts[:memory]
  self.name = opts[:name]
  self.node_distance = opts[:node_distance]
  self.statistics = opts[:statistics]
end

Instance Method Details

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


8134
8135
8136
# File 'lib/ovirtsdk4/types.rb', line 8134

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


8143
8144
8145
# File 'lib/ovirtsdk4/types.rb', line 8143

def comment=(value)
  @comment = value
end

- (Cpu) cpu

Returns the value of the cpu attribute.

Returns:



8152
8153
8154
# File 'lib/ovirtsdk4/types.rb', line 8152

def cpu
  return @cpu
end

- (Object) cpu=(value)

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.

Parameters:

  • value (Cpu, Hash)


8165
8166
8167
8168
8169
8170
# File 'lib/ovirtsdk4/types.rb', line 8165

def cpu=(value)
  if value.is_a?(Hash)
    value = Cpu.new(value)
  end
  @cpu = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


8177
8178
8179
# File 'lib/ovirtsdk4/types.rb', line 8177

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


8186
8187
8188
# File 'lib/ovirtsdk4/types.rb', line 8186

def description=(value)
  @description = value
end

- (Host) host

Returns the value of the host attribute.

Returns:



8195
8196
8197
# File 'lib/ovirtsdk4/types.rb', line 8195

def host
  return @host
end

- (Object) host=(value)

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.

Parameters:

  • value (Host, Hash)


8208
8209
8210
8211
8212
8213
# File 'lib/ovirtsdk4/types.rb', line 8208

def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


8220
8221
8222
# File 'lib/ovirtsdk4/types.rb', line 8220

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


8229
8230
8231
# File 'lib/ovirtsdk4/types.rb', line 8229

def id=(value)
  @id = value
end

- (Integer) index

Returns the value of the index attribute.

Returns:

  • (Integer)


8238
8239
8240
# File 'lib/ovirtsdk4/types.rb', line 8238

def index
  return @index
end

- (Object) index=(value)

Sets the value of the index attribute.

Parameters:

  • value (Integer)


8247
8248
8249
# File 'lib/ovirtsdk4/types.rb', line 8247

def index=(value)
  @index = value
end

- (Integer) memory

Returns the value of the memory attribute.

Returns:

  • (Integer)


8256
8257
8258
# File 'lib/ovirtsdk4/types.rb', line 8256

def memory
  return @memory
end

- (Object) memory=(value)

Sets the value of the memory attribute.

Parameters:

  • value (Integer)


8265
8266
8267
# File 'lib/ovirtsdk4/types.rb', line 8265

def memory=(value)
  @memory = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


8274
8275
8276
# File 'lib/ovirtsdk4/types.rb', line 8274

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


8283
8284
8285
# File 'lib/ovirtsdk4/types.rb', line 8283

def name=(value)
  @name = value
end

- (String) node_distance

Returns the value of the node_distance attribute.

Returns:

  • (String)


8292
8293
8294
# File 'lib/ovirtsdk4/types.rb', line 8292

def node_distance
  return @node_distance
end

- (Object) node_distance=(value)

Sets the value of the node_distance attribute.

Parameters:

  • value (String)


8301
8302
8303
# File 'lib/ovirtsdk4/types.rb', line 8301

def node_distance=(value)
  @node_distance = value
end

- (Array<Statistic>) statistics

Returns the value of the statistics attribute.

Returns:



8310
8311
8312
# File 'lib/ovirtsdk4/types.rb', line 8310

def statistics
  return @statistics
end

- (Object) statistics=(list)

Sets the value of the statistics attribute.

Parameters:



8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
# File 'lib/ovirtsdk4/types.rb', line 8318

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