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
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. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the
dns_resolver_configuration
attribute. -
#dns_resolver_configuration=(value) ⇒ Object
Sets the value of the
dns_resolver_configuration
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
host
attribute. -
#host=(value) ⇒ Object
Sets the value of the
host
attribute. -
#host_nic ⇒ HostNic
Returns the value of the
host_nic
attribute. -
#host_nic=(value) ⇒ Object
Sets the value of the
host_nic
attribute. -
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#in_sync ⇒ Boolean
Returns the value of the
in_sync
attribute. -
#in_sync=(value) ⇒ Object
Sets the value of the
in_sync
attribute. -
#initialize(opts = {}) ⇒ NetworkAttachment
constructor
Creates a new instance of the NetworkAttachment class.
-
#ip_address_assignments ⇒ Array<IpAddressAssignment>
Returns the value of the
ip_address_assignments
attribute. -
#ip_address_assignments=(list) ⇒ Object
Sets the value of the
ip_address_assignments
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#network ⇒ Network
Returns the value of the
network
attribute. -
#network=(value) ⇒ Object
Sets the value of the
network
attribute. -
#properties ⇒ Array<Property>
Returns the value of the
properties
attribute. -
#properties=(list) ⇒ Object
Sets the value of the
properties
attribute. -
#qos ⇒ Qos
Returns the value of the
qos
attribute. -
#qos=(value) ⇒ Object
Sets the value of the
qos
attribute. -
#reported_configurations ⇒ Array<ReportedConfiguration>
Returns the value of the
reported_configurations
attribute. -
#reported_configurations=(list) ⇒ Object
Sets the value of the
reported_configurations
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ NetworkAttachment
Creates a new instance of the OvirtSDK4::NetworkAttachment class.
10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 |
# File 'lib/ovirtsdk4/types.rb', line 10757 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.
10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 |
# File 'lib/ovirtsdk4/types.rb', line 10773 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.
10435 10436 10437 |
# File 'lib/ovirtsdk4/types.rb', line 10435 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
10444 10445 10446 |
# File 'lib/ovirtsdk4/types.rb', line 10444 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
10453 10454 10455 |
# File 'lib/ovirtsdk4/types.rb', line 10453 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
10462 10463 10464 |
# File 'lib/ovirtsdk4/types.rb', line 10462 def description=(value) @description = value end |
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the dns_resolver_configuration
attribute.
10471 10472 10473 |
# File 'lib/ovirtsdk4/types.rb', line 10471 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.
10484 10485 10486 10487 10488 10489 |
# File 'lib/ovirtsdk4/types.rb', line 10484 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.
10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 |
# File 'lib/ovirtsdk4/types.rb', line 10789 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.
10496 10497 10498 |
# File 'lib/ovirtsdk4/types.rb', line 10496 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.
10509 10510 10511 10512 10513 10514 |
# File 'lib/ovirtsdk4/types.rb', line 10509 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.
10521 10522 10523 |
# File 'lib/ovirtsdk4/types.rb', line 10521 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.
10534 10535 10536 10537 10538 10539 |
# File 'lib/ovirtsdk4/types.rb', line 10534 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.
10546 10547 10548 |
# File 'lib/ovirtsdk4/types.rb', line 10546 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
10555 10556 10557 |
# File 'lib/ovirtsdk4/types.rb', line 10555 def id=(value) @id = value end |
#in_sync ⇒ Boolean
Returns the value of the in_sync
attribute.
10564 10565 10566 |
# File 'lib/ovirtsdk4/types.rb', line 10564 def in_sync @in_sync end |
#in_sync=(value) ⇒ Object
Sets the value of the in_sync
attribute.
10573 10574 10575 |
# File 'lib/ovirtsdk4/types.rb', line 10573 def in_sync=(value) @in_sync = value end |
#ip_address_assignments ⇒ Array<IpAddressAssignment>
Returns the value of the ip_address_assignments
attribute.
10582 10583 10584 |
# File 'lib/ovirtsdk4/types.rb', line 10582 def ip_address_assignments @ip_address_assignments end |
#ip_address_assignments=(list) ⇒ Object
Sets the value of the ip_address_assignments
attribute.
10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 |
# File 'lib/ovirtsdk4/types.rb', line 10591 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.
10608 10609 10610 |
# File 'lib/ovirtsdk4/types.rb', line 10608 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
10617 10618 10619 |
# File 'lib/ovirtsdk4/types.rb', line 10617 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network
attribute.
10626 10627 10628 |
# File 'lib/ovirtsdk4/types.rb', line 10626 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.
10639 10640 10641 10642 10643 10644 |
# File 'lib/ovirtsdk4/types.rb', line 10639 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.
10651 10652 10653 |
# File 'lib/ovirtsdk4/types.rb', line 10651 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties
attribute.
10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 |
# File 'lib/ovirtsdk4/types.rb', line 10660 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.
10677 10678 10679 |
# File 'lib/ovirtsdk4/types.rb', line 10677 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.
10690 10691 10692 10693 10694 10695 |
# File 'lib/ovirtsdk4/types.rb', line 10690 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.
10702 10703 10704 |
# File 'lib/ovirtsdk4/types.rb', line 10702 def reported_configurations @reported_configurations end |
#reported_configurations=(list) ⇒ Object
Sets the value of the reported_configurations
attribute.
10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 |
# File 'lib/ovirtsdk4/types.rb', line 10711 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 |