Class: OvirtSDK4::NetworkAttachment
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::NetworkAttachment
- 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. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the
dns_resolver_configurationattribute. -
#dns_resolver_configuration=(value) ⇒ Object
Sets the value of the
dns_resolver_configurationattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
hostattribute. -
#host=(value) ⇒ Object
Sets the value of the
hostattribute. -
#host_nic ⇒ HostNic
Returns the value of the
host_nicattribute. -
#host_nic=(value) ⇒ Object
Sets the value of the
host_nicattribute. -
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#in_sync ⇒ Boolean
Returns the value of the
in_syncattribute. -
#in_sync=(value) ⇒ Object
Sets the value of the
in_syncattribute. -
#initialize(opts = {}) ⇒ NetworkAttachment
constructor
Creates a new instance of the NetworkAttachment class.
-
#ip_address_assignments ⇒ Array<IpAddressAssignment>
Returns the value of the
ip_address_assignmentsattribute. -
#ip_address_assignments=(list) ⇒ Object
Sets the value of the
ip_address_assignmentsattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#network ⇒ Network
Returns the value of the
networkattribute. -
#network=(value) ⇒ Object
Sets the value of the
networkattribute. -
#properties ⇒ Array<Property>
Returns the value of the
propertiesattribute. -
#properties=(list) ⇒ Object
Sets the value of the
propertiesattribute. -
#qos ⇒ Qos
Returns the value of the
qosattribute. -
#qos=(value) ⇒ Object
Sets the value of the
qosattribute. -
#reported_configurations ⇒ Array<ReportedConfiguration>
Returns the value of the
reported_configurationsattribute. -
#reported_configurations=(list) ⇒ Object
Sets the value of the
reported_configurationsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ NetworkAttachment
Creates a new instance of the OvirtSDK4::NetworkAttachment class.
11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 |
# File 'lib/ovirtsdk4/types.rb', line 11454 def initialize(opts = {}) super(opts) self.dns_resolver_configuration = opts[:dns_resolver_configuration] self.host = opts[:host] self.host_nic = opts[:host_nic] self.in_sync = opts[:in_sync] self.ip_address_assignments = opts[:ip_address_assignments] self.network = opts[:network] self.properties = opts[:properties] self.qos = opts[:qos] self.reported_configurations = opts[:reported_configurations] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 |
# File 'lib/ovirtsdk4/types.rb', line 11470 def ==(other) super && @dns_resolver_configuration == other.dns_resolver_configuration && @host == other.host && @host_nic == other.host_nic && @in_sync == other.in_sync && @ip_address_assignments == other.ip_address_assignments && @network == other.network && @properties == other.properties && @qos == other.qos && @reported_configurations == other.reported_configurations end |
#comment ⇒ String
Returns the value of the comment attribute.
11132 11133 11134 |
# File 'lib/ovirtsdk4/types.rb', line 11132 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
11141 11142 11143 |
# File 'lib/ovirtsdk4/types.rb', line 11141 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
11150 11151 11152 |
# File 'lib/ovirtsdk4/types.rb', line 11150 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
11159 11160 11161 |
# File 'lib/ovirtsdk4/types.rb', line 11159 def description=(value) @description = value end |
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the dns_resolver_configuration attribute.
11168 11169 11170 |
# File 'lib/ovirtsdk4/types.rb', line 11168 def dns_resolver_configuration @dns_resolver_configuration end |
#dns_resolver_configuration=(value) ⇒ Object
Sets the value of the dns_resolver_configuration attribute.
The value parameter can be an instance of DnsResolverConfiguration 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.
11181 11182 11183 11184 11185 11186 |
# File 'lib/ovirtsdk4/types.rb', line 11181 def dns_resolver_configuration=(value) if value.is_a?(Hash) value = DnsResolverConfiguration.new(value) end @dns_resolver_configuration = value end |
#hash ⇒ Object
Generates a hash value for this object.
11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 |
# File 'lib/ovirtsdk4/types.rb', line 11486 def hash super + @dns_resolver_configuration.hash + @host.hash + @host_nic.hash + @in_sync.hash + @ip_address_assignments.hash + @network.hash + @properties.hash + @qos.hash + @reported_configurations.hash end |
#host ⇒ Host
Returns the value of the host attribute.
11193 11194 11195 |
# File 'lib/ovirtsdk4/types.rb', line 11193 def host @host end |
#host=(value) ⇒ Object
Sets the value of the host attribute.
The value parameter can be an instance of Host 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.
11206 11207 11208 11209 11210 11211 |
# File 'lib/ovirtsdk4/types.rb', line 11206 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end |
#host_nic ⇒ HostNic
Returns the value of the host_nic attribute.
11218 11219 11220 |
# File 'lib/ovirtsdk4/types.rb', line 11218 def host_nic @host_nic end |
#host_nic=(value) ⇒ Object
Sets the value of the host_nic attribute.
The value parameter can be an instance of HostNic 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.
11231 11232 11233 11234 11235 11236 |
# File 'lib/ovirtsdk4/types.rb', line 11231 def host_nic=(value) if value.is_a?(Hash) value = HostNic.new(value) end @host_nic = value end |
#id ⇒ String
Returns the value of the id attribute.
11243 11244 11245 |
# File 'lib/ovirtsdk4/types.rb', line 11243 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
11252 11253 11254 |
# File 'lib/ovirtsdk4/types.rb', line 11252 def id=(value) @id = value end |
#in_sync ⇒ Boolean
Returns the value of the in_sync attribute.
11261 11262 11263 |
# File 'lib/ovirtsdk4/types.rb', line 11261 def in_sync @in_sync end |
#in_sync=(value) ⇒ Object
Sets the value of the in_sync attribute.
11270 11271 11272 |
# File 'lib/ovirtsdk4/types.rb', line 11270 def in_sync=(value) @in_sync = value end |
#ip_address_assignments ⇒ Array<IpAddressAssignment>
Returns the value of the ip_address_assignments attribute.
11279 11280 11281 |
# File 'lib/ovirtsdk4/types.rb', line 11279 def ip_address_assignments @ip_address_assignments end |
#ip_address_assignments=(list) ⇒ Object
Sets the value of the ip_address_assignments attribute.
11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 |
# File 'lib/ovirtsdk4/types.rb', line 11288 def ip_address_assignments=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = IpAddressAssignment.new(value) end end end @ip_address_assignments = list end |
#name ⇒ String
Returns the value of the name attribute.
11305 11306 11307 |
# File 'lib/ovirtsdk4/types.rb', line 11305 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
11314 11315 11316 |
# File 'lib/ovirtsdk4/types.rb', line 11314 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network attribute.
11323 11324 11325 |
# File 'lib/ovirtsdk4/types.rb', line 11323 def network @network end |
#network=(value) ⇒ Object
Sets the value of the network attribute.
The value parameter can be an instance of OvirtSDK4::Network 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.
11336 11337 11338 11339 11340 11341 |
# File 'lib/ovirtsdk4/types.rb', line 11336 def network=(value) if value.is_a?(Hash) value = Network.new(value) end @network = value end |
#properties ⇒ Array<Property>
Returns the value of the properties attribute.
11348 11349 11350 |
# File 'lib/ovirtsdk4/types.rb', line 11348 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties attribute.
11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 |
# File 'lib/ovirtsdk4/types.rb', line 11357 def properties=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Property.new(value) end end end @properties = list end |
#qos ⇒ Qos
Returns the value of the qos attribute.
11374 11375 11376 |
# File 'lib/ovirtsdk4/types.rb', line 11374 def qos @qos end |
#qos=(value) ⇒ Object
Sets the value of the qos attribute.
The value parameter can be an instance of Qos 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.
11387 11388 11389 11390 11391 11392 |
# File 'lib/ovirtsdk4/types.rb', line 11387 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end |
#reported_configurations ⇒ Array<ReportedConfiguration>
Returns the value of the reported_configurations attribute.
11399 11400 11401 |
# File 'lib/ovirtsdk4/types.rb', line 11399 def reported_configurations @reported_configurations end |
#reported_configurations=(list) ⇒ Object
Sets the value of the reported_configurations attribute.
11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 |
# File 'lib/ovirtsdk4/types.rb', line 11408 def reported_configurations=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = ReportedConfiguration.new(value) end end end @reported_configurations = list end |