Class: OvirtSDK4::IscsiBond
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::IscsiBond
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#data_center ⇒ DataCenter
Returns the value of the
data_centerattribute. -
#data_center=(value) ⇒ Object
Sets the value of the
data_centerattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ IscsiBond
constructor
Creates a new instance of the IscsiBond class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#networks ⇒ Array<Network>
Returns the value of the
networksattribute. -
#networks=(list) ⇒ Object
Sets the value of the
networksattribute. -
#storage_connections ⇒ Array<StorageConnection>
Returns the value of the
storage_connectionsattribute. -
#storage_connections=(list) ⇒ Object
Sets the value of the
storage_connectionsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ IscsiBond
Creates a new instance of the OvirtSDK4::IscsiBond class.
6741 6742 6743 6744 6745 6746 |
# File 'lib/ovirtsdk4/types.rb', line 6741 def initialize(opts = {}) super(opts) self.data_center = opts[:data_center] self.networks = opts[:networks] self.storage_connections = opts[:storage_connections] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
6751 6752 6753 6754 6755 6756 |
# File 'lib/ovirtsdk4/types.rb', line 6751 def ==(other) super && @data_center == other.data_center && @networks == other.networks && @storage_connections == other.storage_connections end |
#comment ⇒ String
Returns the value of the comment attribute.
6575 6576 6577 |
# File 'lib/ovirtsdk4/types.rb', line 6575 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
6584 6585 6586 |
# File 'lib/ovirtsdk4/types.rb', line 6584 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center attribute.
6593 6594 6595 |
# File 'lib/ovirtsdk4/types.rb', line 6593 def data_center @data_center end |
#data_center=(value) ⇒ Object
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.
6606 6607 6608 6609 6610 6611 |
# File 'lib/ovirtsdk4/types.rb', line 6606 def data_center=(value) if value.is_a?(Hash) value = DataCenter.new(value) end @data_center = value end |
#description ⇒ String
Returns the value of the description attribute.
6618 6619 6620 |
# File 'lib/ovirtsdk4/types.rb', line 6618 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
6627 6628 6629 |
# File 'lib/ovirtsdk4/types.rb', line 6627 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
6761 6762 6763 6764 6765 6766 |
# File 'lib/ovirtsdk4/types.rb', line 6761 def hash super + @data_center.hash + @networks.hash + @storage_connections.hash end |
#id ⇒ String
Returns the value of the id attribute.
6636 6637 6638 |
# File 'lib/ovirtsdk4/types.rb', line 6636 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
6645 6646 6647 |
# File 'lib/ovirtsdk4/types.rb', line 6645 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
6654 6655 6656 |
# File 'lib/ovirtsdk4/types.rb', line 6654 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
6663 6664 6665 |
# File 'lib/ovirtsdk4/types.rb', line 6663 def name=(value) @name = value end |
#networks ⇒ Array<Network>
Returns the value of the networks attribute.
6672 6673 6674 |
# File 'lib/ovirtsdk4/types.rb', line 6672 def networks @networks end |
#networks=(list) ⇒ Object
Sets the value of the networks attribute.
6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 |
# File 'lib/ovirtsdk4/types.rb', line 6681 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 |
#storage_connections ⇒ Array<StorageConnection>
Returns the value of the storage_connections attribute.
6698 6699 6700 |
# File 'lib/ovirtsdk4/types.rb', line 6698 def storage_connections @storage_connections end |
#storage_connections=(list) ⇒ Object
Sets the value of the storage_connections attribute.
6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 |
# File 'lib/ovirtsdk4/types.rb', line 6707 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 |