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.
7282 7283 7284 7285 7286 7287 |
# File 'lib/ovirtsdk4/types.rb', line 7282 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.
7292 7293 7294 7295 7296 7297 |
# File 'lib/ovirtsdk4/types.rb', line 7292 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.
7116 7117 7118 |
# File 'lib/ovirtsdk4/types.rb', line 7116 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
7125 7126 7127 |
# File 'lib/ovirtsdk4/types.rb', line 7125 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center
attribute.
7134 7135 7136 |
# File 'lib/ovirtsdk4/types.rb', line 7134 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.
7147 7148 7149 7150 7151 7152 |
# File 'lib/ovirtsdk4/types.rb', line 7147 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.
7159 7160 7161 |
# File 'lib/ovirtsdk4/types.rb', line 7159 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
7168 7169 7170 |
# File 'lib/ovirtsdk4/types.rb', line 7168 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
7302 7303 7304 7305 7306 7307 |
# File 'lib/ovirtsdk4/types.rb', line 7302 def hash super + @data_center.hash + @networks.hash + @storage_connections.hash end |
#id ⇒ String
Returns the value of the id
attribute.
7177 7178 7179 |
# File 'lib/ovirtsdk4/types.rb', line 7177 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
7186 7187 7188 |
# File 'lib/ovirtsdk4/types.rb', line 7186 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
7195 7196 7197 |
# File 'lib/ovirtsdk4/types.rb', line 7195 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
7204 7205 7206 |
# File 'lib/ovirtsdk4/types.rb', line 7204 def name=(value) @name = value end |
#networks ⇒ Array<Network>
Returns the value of the networks
attribute.
7213 7214 7215 |
# File 'lib/ovirtsdk4/types.rb', line 7213 def networks @networks end |
#networks=(list) ⇒ Object
Sets the value of the networks
attribute.
7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 |
# File 'lib/ovirtsdk4/types.rb', line 7222 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.
7239 7240 7241 |
# File 'lib/ovirtsdk4/types.rb', line 7239 def storage_connections @storage_connections end |
#storage_connections=(list) ⇒ Object
Sets the value of the storage_connections
attribute.
7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 |
# File 'lib/ovirtsdk4/types.rb', line 7248 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 |