Class: OvirtSDK4::AffinityGroup

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

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (AffinityGroup) initialize(opts = {})

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

  • :cluster (Cluster, Hash)

    The value of attribute cluster.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :enforcing (Boolean)

    The value of attribute enforcing.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :positive (Boolean)

    The value of attribute positive.

  • :vms (Array<Vm>, Array<Hash>)

    The values of attribute vms.



22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
# File 'lib/ovirtsdk4/types.rb', line 22553

def initialize(opts = {})
  super(opts)
  self.cluster = opts[:cluster]
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.enforcing = opts[:enforcing]
  self.id = opts[:id]
  self.name = opts[:name]
  self.positive = opts[:positive]
  self.vms = opts[:vms]
end

Instance Method Details

- (Cluster) cluster

Returns the value of the cluster attribute.

Returns:



22376
22377
22378
# File 'lib/ovirtsdk4/types.rb', line 22376

def cluster
  return @cluster
end

- (Object) cluster=(value)

Sets the value of the cluster attribute.

The value parameter can be an instance of Cluster 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:



22389
22390
22391
22392
22393
22394
# File 'lib/ovirtsdk4/types.rb', line 22389

def cluster=(value)
  if value.is_a?(Hash)
    value = Cluster.new(value)
  end
  @cluster = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


22401
22402
22403
# File 'lib/ovirtsdk4/types.rb', line 22401

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


22410
22411
22412
# File 'lib/ovirtsdk4/types.rb', line 22410

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


22419
22420
22421
# File 'lib/ovirtsdk4/types.rb', line 22419

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


22428
22429
22430
# File 'lib/ovirtsdk4/types.rb', line 22428

def description=(value)
  @description = value
end

- (Boolean) enforcing

Returns the value of the enforcing attribute.

Returns:

  • (Boolean)


22437
22438
22439
# File 'lib/ovirtsdk4/types.rb', line 22437

def enforcing
  return @enforcing
end

- (Object) enforcing=(value)

Sets the value of the enforcing attribute.

Parameters:

  • value (Boolean)


22446
22447
22448
# File 'lib/ovirtsdk4/types.rb', line 22446

def enforcing=(value)
  @enforcing = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


22455
22456
22457
# File 'lib/ovirtsdk4/types.rb', line 22455

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


22464
22465
22466
# File 'lib/ovirtsdk4/types.rb', line 22464

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


22473
22474
22475
# File 'lib/ovirtsdk4/types.rb', line 22473

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


22482
22483
22484
# File 'lib/ovirtsdk4/types.rb', line 22482

def name=(value)
  @name = value
end

- (Boolean) positive

Returns the value of the positive attribute.

Returns:

  • (Boolean)


22491
22492
22493
# File 'lib/ovirtsdk4/types.rb', line 22491

def positive
  return @positive
end

- (Object) positive=(value)

Sets the value of the positive attribute.

Parameters:

  • value (Boolean)


22500
22501
22502
# File 'lib/ovirtsdk4/types.rb', line 22500

def positive=(value)
  @positive = value
end

- (Array<Vm>) vms

Returns the value of the vms attribute.

Returns:

  • (Array<Vm>)


22509
22510
22511
# File 'lib/ovirtsdk4/types.rb', line 22509

def vms
  return @vms
end

- (Object) vms=(list)

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
# File 'lib/ovirtsdk4/types.rb', line 22517

def vms=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Vm.new(value)
      end
    end
  end
  @vms = list
end