Creates a new instance of the {HostNic} class.
@param opts [Hash] A hash containing the attributes of the object. The keys of the hash
should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.
@option opts [Integer] :ad_aggregator_id The value of attribute `ad_aggregator_id`.
@option opts [String] :base_interface The value of attribute `base_interface`.
@option opts [Bonding, Hash] :bonding The value of attribute `bonding`.
@option opts [BootProtocol] :boot_protocol The value of attribute `boot_protocol`.
@option opts [Boolean] :bridged The value of attribute `bridged`.
@option opts [Boolean] :check_connectivity The value of attribute `check_connectivity`.
@option opts [String] :comment The value of attribute `comment`.
@option opts [Boolean] :custom_configuration The value of attribute `custom_configuration`.
@option opts [String] :description The value of attribute `description`.
@option opts [Host, Hash] :host The value of attribute `host`.
@option opts [String] :id The value of attribute `id`.
@option opts [Ip, Hash] :ip The value of attribute `ip`.
@option opts [Ip, Hash] :ipv6 The value of attribute `ipv6`.
@option opts [BootProtocol] :ipv6_boot_protocol The value of attribute `ipv6_boot_protocol`.
@option opts [Mac, Hash] :mac The value of attribute `mac`.
@option opts [Integer] :mtu The value of attribute `mtu`.
@option opts [String] :name The value of attribute `name`.
@option opts [Network, Hash] :network The value of attribute `network`.
@option opts [Array<NetworkLabel>, Array<Hash>] :network_labels The values of attribute `network_labels`.
@option opts [Boolean] :override_configuration The value of attribute `override_configuration`.
@option opts [HostNic, Hash] :physical_function The value of attribute `physical_function`.
@option opts [Array<Property>, Array<Hash>] :properties The values of attribute `properties`.
@option opts [Qos, Hash] :qos The value of attribute `qos`.
@option opts [Integer] :speed The value of attribute `speed`.
@option opts [Array<Statistic>, Array<Hash>] :statistics The values of attribute `statistics`.
@option opts [NicStatus] :status The value of attribute `status`.
@option opts [HostNicVirtualFunctionsConfiguration, Hash] :virtual_functions_configuration The value of attribute `virtual_functions_configuration`.
@option opts [Vlan, Hash] :vlan The value of attribute `vlan`.
# File lib/ovirtsdk4/types.rb, line 35242 def initialize(opts = {}) super(opts) self.ad_aggregator_id = opts[:ad_aggregator_id] self.base_interface = opts[:base_interface] self.bonding = opts[:bonding] self.boot_protocol = opts[:boot_protocol] self.bridged = opts[:bridged] self.check_connectivity = opts[:check_connectivity] self.comment = opts[:comment] self.custom_configuration = opts[:custom_configuration] self.description = opts[:description] self.host = opts[:host] self.id = opts[:id] self.ip = opts[:ip] self.ipv6 = opts[:ipv6] self.ipv6_boot_protocol = opts[:ipv6_boot_protocol] self.mac = opts[:mac] self.mtu = opts[:mtu] self.name = opts[:name] self.network = opts[:network] self.network_labels = opts[:network_labels] self.override_configuration = opts[:override_configuration] self.physical_function = opts[:physical_function] self.properties = opts[:properties] self.qos = opts[:qos] self.speed = opts[:speed] self.statistics = opts[:statistics] self.status = opts[:status] self.virtual_functions_configuration = opts[:virtual_functions_configuration] self.vlan = opts[:vlan] end
Returns the value of the `ad_aggregator_id` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 34588 def ad_aggregator_id return @ad_aggregator_id end
Sets the value of the `ad_aggregator_id` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 34597 def ad_aggregator_id=(value) @ad_aggregator_id = value end
Returns the value of the `base_interface` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 34606 def base_interface return @base_interface end
Sets the value of the `base_interface` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 34615 def base_interface=(value) @base_interface = value end
Returns the value of the `bonding` attribute.
@return [Bonding]
# File lib/ovirtsdk4/types.rb, line 34624 def bonding return @bonding end
Sets the value of the `bonding` attribute.
@param value [Bonding, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Bonding} 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.
# File lib/ovirtsdk4/types.rb, line 34637 def bonding=(value) if value.is_a?(Hash) value = Bonding.new(value) end @bonding = value end
Returns the value of the `boot_protocol` attribute.
@return [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 34649 def boot_protocol return @boot_protocol end
Sets the value of the `boot_protocol` attribute.
@param value [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 34658 def boot_protocol=(value) @boot_protocol = value end
Returns the value of the `bridged` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 34667 def bridged return @bridged end
Sets the value of the `bridged` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 34676 def bridged=(value) @bridged = value end
Returns the value of the `check_connectivity` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 34685 def check_connectivity return @check_connectivity end
Sets the value of the `check_connectivity` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 34694 def check_connectivity=(value) @check_connectivity = value end
Returns the value of the `comment` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 34703 def comment return @comment end
Sets the value of the `comment` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 34712 def comment=(value) @comment = value end
Returns the value of the `custom_configuration` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 34721 def custom_configuration return @custom_configuration end
Sets the value of the `custom_configuration` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 34730 def custom_configuration=(value) @custom_configuration = value end
Returns the value of the `description` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 34739 def description return @description end
Sets the value of the `description` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 34748 def description=(value) @description = value end
Returns the value of the `host` attribute.
@return [Host]
# File lib/ovirtsdk4/types.rb, line 34757 def host return @host end
Sets the value of the `host` attribute.
@param value [Host, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 34770 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end
Returns the value of the `id` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 34782 def id return @id end
Sets the value of the `id` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 34791 def id=(value) @id = value end
Returns the value of the `ip` attribute.
@return [Ip]
# File lib/ovirtsdk4/types.rb, line 34800 def ip return @ip end
Sets the value of the `ip` attribute.
@param value [Ip, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Ip} 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.
# File lib/ovirtsdk4/types.rb, line 34813 def ip=(value) if value.is_a?(Hash) value = Ip.new(value) end @ip = value end
Returns the value of the `ipv6` attribute.
@return [Ip]
# File lib/ovirtsdk4/types.rb, line 34825 def ipv6 return @ipv6 end
Sets the value of the `ipv6` attribute.
@param value [Ip, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Ip} 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.
# File lib/ovirtsdk4/types.rb, line 34838 def ipv6=(value) if value.is_a?(Hash) value = Ip.new(value) end @ipv6 = value end
Returns the value of the `ipv6_boot_protocol` attribute.
@return [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 34850 def ipv6_boot_protocol return @ipv6_boot_protocol end
Sets the value of the `ipv6_boot_protocol` attribute.
@param value [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 34859 def ipv6_boot_protocol=(value) @ipv6_boot_protocol = value end
Returns the value of the `mac` attribute.
@return [Mac]
# File lib/ovirtsdk4/types.rb, line 34868 def mac return @mac end
Sets the value of the `mac` attribute.
@param value [Mac, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Mac} 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.
# File lib/ovirtsdk4/types.rb, line 34881 def mac=(value) if value.is_a?(Hash) value = Mac.new(value) end @mac = value end
Returns the value of the `mtu` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 34893 def mtu return @mtu end
Sets the value of the `mtu` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 34902 def mtu=(value) @mtu = value end
Returns the value of the `name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 34911 def name return @name end
Sets the value of the `name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 34920 def name=(value) @name = value end
Returns the value of the `network` attribute.
@return [Network]
# File lib/ovirtsdk4/types.rb, line 34929 def network return @network end
Sets the value of the `network` attribute.
@param value [Network, Hash]
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.
# File lib/ovirtsdk4/types.rb, line 34942 def network=(value) if value.is_a?(Hash) value = Network.new(value) end @network = value end
Returns the value of the `network_labels` attribute.
@return [Array<NetworkLabel>]
# File lib/ovirtsdk4/types.rb, line 34954 def network_labels return @network_labels end
Sets the value of the `network_labels` attribute.
@param list [Array<NetworkLabel>]
# File lib/ovirtsdk4/types.rb, line 34962 def network_labels=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = NetworkLabel.new(value) end end end @network_labels = list end
Returns the value of the `override_configuration` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 34979 def override_configuration return @override_configuration end
Sets the value of the `override_configuration` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 34988 def override_configuration=(value) @override_configuration = value end
Returns the value of the `physical_function` attribute.
@return [HostNic]
# File lib/ovirtsdk4/types.rb, line 34997 def physical_function return @physical_function end
Sets the value of the `physical_function` attribute.
@param value [HostNic, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 35010 def physical_function=(value) if value.is_a?(Hash) value = HostNic.new(value) end @physical_function = value end
Returns the value of the `properties` attribute.
@return [Array<Property>]
# File lib/ovirtsdk4/types.rb, line 35022 def properties return @properties end
Sets the value of the `properties` attribute.
@param list [Array<Property>]
# File lib/ovirtsdk4/types.rb, line 35030 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
Returns the value of the `qos` attribute.
@return [Qos]
# File lib/ovirtsdk4/types.rb, line 35047 def qos return @qos end
Sets the value of the `qos` attribute.
@param value [Qos, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 35060 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end
Returns the value of the `speed` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 35072 def speed return @speed end
Sets the value of the `speed` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 35081 def speed=(value) @speed = value end
Returns the value of the `statistics` attribute.
@return [Array<Statistic>]
# File lib/ovirtsdk4/types.rb, line 35090 def statistics return @statistics end
Sets the value of the `statistics` attribute.
@param list [Array<Statistic>]
# File lib/ovirtsdk4/types.rb, line 35098 def statistics=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Statistic.new(value) end end end @statistics = list end
Returns the value of the `status` attribute.
@return [NicStatus]
# File lib/ovirtsdk4/types.rb, line 35115 def status return @status end
Sets the value of the `status` attribute.
@param value [NicStatus]
# File lib/ovirtsdk4/types.rb, line 35124 def status=(value) @status = value end
Returns the value of the `virtual_functions_configuration` attribute.
@return [HostNicVirtualFunctionsConfiguration]
# File lib/ovirtsdk4/types.rb, line 35133 def virtual_functions_configuration return @virtual_functions_configuration end
Sets the value of the `virtual_functions_configuration` attribute.
@param value [HostNicVirtualFunctionsConfiguration, Hash]
The `value` parameter can be an instance of {OvirtSDK4::HostNicVirtualFunctionsConfiguration} 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.
# File lib/ovirtsdk4/types.rb, line 35146 def virtual_functions_configuration=(value) if value.is_a?(Hash) value = HostNicVirtualFunctionsConfiguration.new(value) end @virtual_functions_configuration = value end
Returns the value of the `vlan` attribute.
@return [Vlan]
# File lib/ovirtsdk4/types.rb, line 35158 def vlan return @vlan end
Sets the value of the `vlan` attribute.
@param value [Vlan, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Vlan} 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.
# File lib/ovirtsdk4/types.rb, line 35171 def vlan=(value) if value.is_a?(Hash) value = Vlan.new(value) end @vlan = value end