Class: OvirtSDK4::IscsiBond

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

- (IscsiBond) initialize(opts = {})

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

  • :data_center (DataCenter, Hash)

    The value of attribute data_center.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :networks (Array<Network>, Array<Hash>)

    The values of attribute networks.

  • :storage_connections (Array<StorageConnection>, Array<Hash>)

    The values of attribute storage_connections.



4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
# File 'lib/ovirtsdk4/types.rb', line 4692

def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.data_center = opts[:data_center]
  self.description = opts[:description]
  self.id = opts[:id]
  self.name = opts[:name]
  self.networks = opts[:networks]
  self.storage_connections = opts[:storage_connections]
end

Instance Method Details

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


4528
4529
4530
# File 'lib/ovirtsdk4/types.rb', line 4528

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


4537
4538
4539
# File 'lib/ovirtsdk4/types.rb', line 4537

def comment=(value)
  @comment = value
end

- (DataCenter) data_center

Returns the value of the data_center attribute.

Returns:



4546
4547
4548
# File 'lib/ovirtsdk4/types.rb', line 4546

def data_center
  return @data_center
end

- (Object) data_center=(value)

Sets the value of the data_center attribute.

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



4559
4560
4561
4562
4563
4564
# File 'lib/ovirtsdk4/types.rb', line 4559

def data_center=(value)
  if value.is_a?(Hash)
    value = DataCenter.new(value)
  end
  @data_center = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


4571
4572
4573
# File 'lib/ovirtsdk4/types.rb', line 4571

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


4580
4581
4582
# File 'lib/ovirtsdk4/types.rb', line 4580

def description=(value)
  @description = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


4589
4590
4591
# File 'lib/ovirtsdk4/types.rb', line 4589

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


4598
4599
4600
# File 'lib/ovirtsdk4/types.rb', line 4598

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


4607
4608
4609
# File 'lib/ovirtsdk4/types.rb', line 4607

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


4616
4617
4618
# File 'lib/ovirtsdk4/types.rb', line 4616

def name=(value)
  @name = value
end

- (Array<Network>) networks

Returns the value of the networks attribute.

Returns:



4625
4626
4627
# File 'lib/ovirtsdk4/types.rb', line 4625

def networks
  return @networks
end

- (Object) networks=(list)

Sets the value of the networks attribute.

Parameters:



4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
# File 'lib/ovirtsdk4/types.rb', line 4633

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

- (Array<StorageConnection>) storage_connections

Returns the value of the storage_connections attribute.

Returns:



4650
4651
4652
# File 'lib/ovirtsdk4/types.rb', line 4650

def storage_connections
  return @storage_connections
end

- (Object) storage_connections=(list)

Sets the value of the storage_connections attribute.

Parameters:



4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
# File 'lib/ovirtsdk4/types.rb', line 4658

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