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
true
ifself
andother
have the same attributes and values. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#data_center ⇒ DataCenter
Returns the value of the
data_center
attribute. -
#data_center=(value) ⇒ Object
Sets the value of the
data_center
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ IscsiBond
constructor
Creates a new instance of the IscsiBond class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#networks ⇒ Array<Network>
Returns the value of the
networks
attribute. -
#networks=(list) ⇒ Object
Sets the value of the
networks
attribute. -
#storage_connections ⇒ Array<StorageConnection>
Returns the value of the
storage_connections
attribute. -
#storage_connections=(list) ⇒ Object
Sets the value of the
storage_connections
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ IscsiBond
Creates a new instance of the OvirtSDK4::IscsiBond class.
6764 6765 6766 6767 6768 6769 |
# File 'lib/ovirtsdk4/types.rb', line 6764 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.
6774 6775 6776 6777 6778 6779 |
# File 'lib/ovirtsdk4/types.rb', line 6774 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.
6598 6599 6600 |
# File 'lib/ovirtsdk4/types.rb', line 6598 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
6607 6608 6609 |
# File 'lib/ovirtsdk4/types.rb', line 6607 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center
attribute.
6616 6617 6618 |
# File 'lib/ovirtsdk4/types.rb', line 6616 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.
6629 6630 6631 6632 6633 6634 |
# File 'lib/ovirtsdk4/types.rb', line 6629 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.
6641 6642 6643 |
# File 'lib/ovirtsdk4/types.rb', line 6641 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
6650 6651 6652 |
# File 'lib/ovirtsdk4/types.rb', line 6650 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
6784 6785 6786 6787 6788 6789 |
# File 'lib/ovirtsdk4/types.rb', line 6784 def hash super + @data_center.hash + @networks.hash + @storage_connections.hash end |
#id ⇒ String
Returns the value of the id
attribute.
6659 6660 6661 |
# File 'lib/ovirtsdk4/types.rb', line 6659 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
6668 6669 6670 |
# File 'lib/ovirtsdk4/types.rb', line 6668 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
6677 6678 6679 |
# File 'lib/ovirtsdk4/types.rb', line 6677 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
6686 6687 6688 |
# File 'lib/ovirtsdk4/types.rb', line 6686 def name=(value) @name = value end |
#networks ⇒ Array<Network>
Returns the value of the networks
attribute.
6695 6696 6697 |
# File 'lib/ovirtsdk4/types.rb', line 6695 def networks @networks end |
#networks=(list) ⇒ Object
Sets the value of the networks
attribute.
6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 |
# File 'lib/ovirtsdk4/types.rb', line 6704 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.
6721 6722 6723 |
# File 'lib/ovirtsdk4/types.rb', line 6721 def storage_connections @storage_connections end |
#storage_connections=(list) ⇒ Object
Sets the value of the storage_connections
attribute.
6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 |
# File 'lib/ovirtsdk4/types.rb', line 6730 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 |