Class: OvirtSDK4::VirtualNumaNode

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

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (VirtualNumaNode) initialize(opts = {})

Creates a new instance of the OvirtSDK4::VirtualNumaNode 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.

  • :numa_node_pins (Array<NumaNodePin>, Array<Hash>)

    The values of attribute numa_node_pins.

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

    The values of attribute statistics.

  • :vm (Vm, Hash)

    The value of attribute vm.



18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
# File 'lib/ovirtsdk4/types.rb', line 18517

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.numa_node_pins = opts[:numa_node_pins]
  self.statistics = opts[:statistics]
  self.vm = opts[:vm]
end

Instance Method Details

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


18239
18240
18241
# File 'lib/ovirtsdk4/types.rb', line 18239

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


18248
18249
18250
# File 'lib/ovirtsdk4/types.rb', line 18248

def comment=(value)
  @comment = value
end

- (Cpu) cpu

Returns the value of the cpu attribute.

Returns:



18257
18258
18259
# File 'lib/ovirtsdk4/types.rb', line 18257

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)


18270
18271
18272
18273
18274
18275
# File 'lib/ovirtsdk4/types.rb', line 18270

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)


18282
18283
18284
# File 'lib/ovirtsdk4/types.rb', line 18282

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


18291
18292
18293
# File 'lib/ovirtsdk4/types.rb', line 18291

def description=(value)
  @description = value
end

- (Host) host

Returns the value of the host attribute.

Returns:



18300
18301
18302
# File 'lib/ovirtsdk4/types.rb', line 18300

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)


18313
18314
18315
18316
18317
18318
# File 'lib/ovirtsdk4/types.rb', line 18313

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)


18325
18326
18327
# File 'lib/ovirtsdk4/types.rb', line 18325

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


18334
18335
18336
# File 'lib/ovirtsdk4/types.rb', line 18334

def id=(value)
  @id = value
end

- (Integer) index

Returns the value of the index attribute.

Returns:

  • (Integer)


18343
18344
18345
# File 'lib/ovirtsdk4/types.rb', line 18343

def index
  return @index
end

- (Object) index=(value)

Sets the value of the index attribute.

Parameters:

  • value (Integer)


18352
18353
18354
# File 'lib/ovirtsdk4/types.rb', line 18352

def index=(value)
  @index = value
end

- (Integer) memory

Returns the value of the memory attribute.

Returns:

  • (Integer)


18361
18362
18363
# File 'lib/ovirtsdk4/types.rb', line 18361

def memory
  return @memory
end

- (Object) memory=(value)

Sets the value of the memory attribute.

Parameters:

  • value (Integer)


18370
18371
18372
# File 'lib/ovirtsdk4/types.rb', line 18370

def memory=(value)
  @memory = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


18379
18380
18381
# File 'lib/ovirtsdk4/types.rb', line 18379

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


18388
18389
18390
# File 'lib/ovirtsdk4/types.rb', line 18388

def name=(value)
  @name = value
end

- (String) node_distance

Returns the value of the node_distance attribute.

Returns:

  • (String)


18397
18398
18399
# File 'lib/ovirtsdk4/types.rb', line 18397

def node_distance
  return @node_distance
end

- (Object) node_distance=(value)

Sets the value of the node_distance attribute.

Parameters:

  • value (String)


18406
18407
18408
# File 'lib/ovirtsdk4/types.rb', line 18406

def node_distance=(value)
  @node_distance = value
end

- (Array<NumaNodePin>) numa_node_pins

Returns the value of the numa_node_pins attribute.

Returns:



18415
18416
18417
# File 'lib/ovirtsdk4/types.rb', line 18415

def numa_node_pins
  return @numa_node_pins
end

- (Object) numa_node_pins=(list)

Sets the value of the numa_node_pins attribute.

Parameters:



18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
# File 'lib/ovirtsdk4/types.rb', line 18423

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

- (Array<Statistic>) statistics

Returns the value of the statistics attribute.

Returns:



18440
18441
18442
# File 'lib/ovirtsdk4/types.rb', line 18440

def statistics
  return @statistics
end

- (Object) statistics=(list)

Sets the value of the statistics attribute.

Parameters:



18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
# File 'lib/ovirtsdk4/types.rb', line 18448

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.

Returns:



18465
18466
18467
# File 'lib/ovirtsdk4/types.rb', line 18465

def vm
  return @vm
end

- (Object) vm=(value)

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.

Parameters:

  • value (Vm, Hash)


18478
18479
18480
18481
18482
18483
# File 'lib/ovirtsdk4/types.rb', line 18478

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end