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.
7506 7507 7508 7509 7510 7511 |
# File 'lib/ovirtsdk4/types.rb', line 7506 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.
7516 7517 7518 7519 7520 7521 |
# File 'lib/ovirtsdk4/types.rb', line 7516 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.
7340 7341 7342 |
# File 'lib/ovirtsdk4/types.rb', line 7340 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
7349 7350 7351 |
# File 'lib/ovirtsdk4/types.rb', line 7349 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center attribute.
7358 7359 7360 |
# File 'lib/ovirtsdk4/types.rb', line 7358 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.
7371 7372 7373 7374 7375 7376 |
# File 'lib/ovirtsdk4/types.rb', line 7371 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.
7383 7384 7385 |
# File 'lib/ovirtsdk4/types.rb', line 7383 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
7392 7393 7394 |
# File 'lib/ovirtsdk4/types.rb', line 7392 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
7526 7527 7528 7529 7530 7531 |
# File 'lib/ovirtsdk4/types.rb', line 7526 def hash super + @data_center.hash + @networks.hash + @storage_connections.hash end |
#id ⇒ String
Returns the value of the id attribute.
7401 7402 7403 |
# File 'lib/ovirtsdk4/types.rb', line 7401 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
7410 7411 7412 |
# File 'lib/ovirtsdk4/types.rb', line 7410 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
7419 7420 7421 |
# File 'lib/ovirtsdk4/types.rb', line 7419 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
7428 7429 7430 |
# File 'lib/ovirtsdk4/types.rb', line 7428 def name=(value) @name = value end |
#networks ⇒ Array<Network>
Returns the value of the networks attribute.
7437 7438 7439 |
# File 'lib/ovirtsdk4/types.rb', line 7437 def networks @networks end |
#networks=(list) ⇒ Object
Sets the value of the networks attribute.
7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 |
# File 'lib/ovirtsdk4/types.rb', line 7446 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.
7463 7464 7465 |
# File 'lib/ovirtsdk4/types.rb', line 7463 def storage_connections @storage_connections end |
#storage_connections=(list) ⇒ Object
Sets the value of the storage_connections attribute.
7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 |
# File 'lib/ovirtsdk4/types.rb', line 7472 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 |