class OvirtSDK4::HostNic

Public Class Methods

new(opts = {}) click to toggle source

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`.

Calls superclass method OvirtSDK4::Identified.new
# File lib/ovirtsdk4/types.rb, line 40665
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.custom_configuration = opts[:custom_configuration]
  self.host = opts[:host]
  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.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

Public Instance Methods

==(other) click to toggle source

Returns `true` if `self` and `other` have the same attributes and values.

Calls superclass method OvirtSDK4::Identified#==
# File lib/ovirtsdk4/types.rb, line 40696
def ==(other)
  super &&
  @ad_aggregator_id == other.ad_aggregator_id &&
  @base_interface == other.base_interface &&
  @bonding == other.bonding &&
  @boot_protocol == other.boot_protocol &&
  @bridged == other.bridged &&
  @check_connectivity == other.check_connectivity &&
  @custom_configuration == other.custom_configuration &&
  @host == other.host &&
  @ip == other.ip &&
  @ipv6 == other.ipv6 &&
  @ipv6_boot_protocol == other.ipv6_boot_protocol &&
  @mac == other.mac &&
  @mtu == other.mtu &&
  @network == other.network &&
  @network_labels == other.network_labels &&
  @override_configuration == other.override_configuration &&
  @physical_function == other.physical_function &&
  @properties == other.properties &&
  @qos == other.qos &&
  @speed == other.speed &&
  @statistics == other.statistics &&
  @status == other.status &&
  @virtual_functions_configuration == other.virtual_functions_configuration &&
  @vlan == other.vlan
end
ad_aggregator_id() click to toggle source

Returns the value of the `ad_aggregator_id` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 40008
def ad_aggregator_id
  @ad_aggregator_id
end
ad_aggregator_id=(value) click to toggle source

Sets the value of the `ad_aggregator_id` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 40017
def ad_aggregator_id=(value)
  @ad_aggregator_id = value
end
base_interface() click to toggle source

Returns the value of the `base_interface` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 40026
def base_interface
  @base_interface
end
base_interface=(value) click to toggle source

Sets the value of the `base_interface` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 40035
def base_interface=(value)
  @base_interface = value
end
bonding() click to toggle source

Returns the value of the `bonding` attribute.

@return [Bonding]

# File lib/ovirtsdk4/types.rb, line 40044
def bonding
  @bonding
end
bonding=(value) click to toggle source

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 40057
def bonding=(value)
  if value.is_a?(Hash)
    value = Bonding.new(value)
  end
  @bonding = value
end
boot_protocol() click to toggle source

Returns the value of the `boot_protocol` attribute.

@return [BootProtocol]

# File lib/ovirtsdk4/types.rb, line 40069
def boot_protocol
  @boot_protocol
end
boot_protocol=(value) click to toggle source

Sets the value of the `boot_protocol` attribute.

@param value [BootProtocol]

# File lib/ovirtsdk4/types.rb, line 40078
def boot_protocol=(value)
  @boot_protocol = value
end
bridged() click to toggle source

Returns the value of the `bridged` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 40087
def bridged
  @bridged
end
bridged=(value) click to toggle source

Sets the value of the `bridged` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 40096
def bridged=(value)
  @bridged = value
end
check_connectivity() click to toggle source

Returns the value of the `check_connectivity` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 40105
def check_connectivity
  @check_connectivity
end
check_connectivity=(value) click to toggle source

Sets the value of the `check_connectivity` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 40114
def check_connectivity=(value)
  @check_connectivity = value
end
comment() click to toggle source

Returns the value of the `comment` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 40123
def comment
  @comment
end
comment=(value) click to toggle source

Sets the value of the `comment` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 40132
def comment=(value)
  @comment = value
end
custom_configuration() click to toggle source

Returns the value of the `custom_configuration` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 40141
def custom_configuration
  @custom_configuration
end
custom_configuration=(value) click to toggle source

Sets the value of the `custom_configuration` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 40150
def custom_configuration=(value)
  @custom_configuration = value
end
description() click to toggle source

Returns the value of the `description` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 40159
def description
  @description
end
description=(value) click to toggle source

Sets the value of the `description` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 40168
def description=(value)
  @description = value
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 40727
def hash
  super +
  @ad_aggregator_id.hash +
  @base_interface.hash +
  @bonding.hash +
  @boot_protocol.hash +
  @bridged.hash +
  @check_connectivity.hash +
  @custom_configuration.hash +
  @host.hash +
  @ip.hash +
  @ipv6.hash +
  @ipv6_boot_protocol.hash +
  @mac.hash +
  @mtu.hash +
  @network.hash +
  @network_labels.hash +
  @override_configuration.hash +
  @physical_function.hash +
  @properties.hash +
  @qos.hash +
  @speed.hash +
  @statistics.hash +
  @status.hash +
  @virtual_functions_configuration.hash +
  @vlan.hash
end
host() click to toggle source

Returns the value of the `host` attribute.

@return [Host]

# File lib/ovirtsdk4/types.rb, line 40177
def host
  @host
end
host=(value) click to toggle source

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 40190
def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end
id() click to toggle source

Returns the value of the `id` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 40202
def id
  @id
end
id=(value) click to toggle source

Sets the value of the `id` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 40211
def id=(value)
  @id = value
end
ip() click to toggle source

Returns the value of the `ip` attribute.

@return [Ip]

# File lib/ovirtsdk4/types.rb, line 40220
def ip
  @ip
end
ip=(value) click to toggle source

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 40233
def ip=(value)
  if value.is_a?(Hash)
    value = Ip.new(value)
  end
  @ip = value
end
ipv6() click to toggle source

Returns the value of the `ipv6` attribute.

@return [Ip]

# File lib/ovirtsdk4/types.rb, line 40245
def ipv6
  @ipv6
end
ipv6=(value) click to toggle source

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 40258
def ipv6=(value)
  if value.is_a?(Hash)
    value = Ip.new(value)
  end
  @ipv6 = value
end
ipv6_boot_protocol() click to toggle source

Returns the value of the `ipv6_boot_protocol` attribute.

@return [BootProtocol]

# File lib/ovirtsdk4/types.rb, line 40270
def ipv6_boot_protocol
  @ipv6_boot_protocol
end
ipv6_boot_protocol=(value) click to toggle source

Sets the value of the `ipv6_boot_protocol` attribute.

@param value [BootProtocol]

# File lib/ovirtsdk4/types.rb, line 40279
def ipv6_boot_protocol=(value)
  @ipv6_boot_protocol = value
end
mac() click to toggle source

Returns the value of the `mac` attribute.

@return [Mac]

# File lib/ovirtsdk4/types.rb, line 40288
def mac
  @mac
end
mac=(value) click to toggle source

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 40301
def mac=(value)
  if value.is_a?(Hash)
    value = Mac.new(value)
  end
  @mac = value
end
mtu() click to toggle source

Returns the value of the `mtu` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 40313
def mtu
  @mtu
end
mtu=(value) click to toggle source

Sets the value of the `mtu` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 40322
def mtu=(value)
  @mtu = value
end
name() click to toggle source

Returns the value of the `name` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 40331
def name
  @name
end
name=(value) click to toggle source

Sets the value of the `name` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 40340
def name=(value)
  @name = value
end
network() click to toggle source

Returns the value of the `network` attribute.

@return [Network]

# File lib/ovirtsdk4/types.rb, line 40349
def network
  @network
end
network=(value) click to toggle source

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 40362
def network=(value)
  if value.is_a?(Hash)
    value = Network.new(value)
  end
  @network = value
end
network_labels() click to toggle source

Returns the value of the `network_labels` attribute.

@return [Array<NetworkLabel>]

# File lib/ovirtsdk4/types.rb, line 40374
def network_labels
  @network_labels
end
network_labels=(list) click to toggle source

Sets the value of the `network_labels` attribute.

@param list [Array<NetworkLabel>]

# File lib/ovirtsdk4/types.rb, line 40383
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
override_configuration() click to toggle source

Returns the value of the `override_configuration` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 40400
def override_configuration
  @override_configuration
end
override_configuration=(value) click to toggle source

Sets the value of the `override_configuration` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 40409
def override_configuration=(value)
  @override_configuration = value
end
physical_function() click to toggle source

Returns the value of the `physical_function` attribute.

@return [HostNic]

# File lib/ovirtsdk4/types.rb, line 40418
def physical_function
  @physical_function
end
physical_function=(value) click to toggle source

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 40431
def physical_function=(value)
  if value.is_a?(Hash)
    value = HostNic.new(value)
  end
  @physical_function = value
end
properties() click to toggle source

Returns the value of the `properties` attribute.

@return [Array<Property>]

# File lib/ovirtsdk4/types.rb, line 40443
def properties
  @properties
end
properties=(list) click to toggle source

Sets the value of the `properties` attribute.

@param list [Array<Property>]

# File lib/ovirtsdk4/types.rb, line 40452
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() click to toggle source

Returns the value of the `qos` attribute.

@return [Qos]

# File lib/ovirtsdk4/types.rb, line 40469
def qos
  @qos
end
qos=(value) click to toggle source

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 40482
def qos=(value)
  if value.is_a?(Hash)
    value = Qos.new(value)
  end
  @qos = value
end
speed() click to toggle source

Returns the value of the `speed` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 40494
def speed
  @speed
end
speed=(value) click to toggle source

Sets the value of the `speed` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 40503
def speed=(value)
  @speed = value
end
statistics() click to toggle source

Returns the value of the `statistics` attribute.

@return [Array<Statistic>]

# File lib/ovirtsdk4/types.rb, line 40512
def statistics
  @statistics
end
statistics=(list) click to toggle source

Sets the value of the `statistics` attribute.

@param list [Array<Statistic>]

# File lib/ovirtsdk4/types.rb, line 40521
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
status() click to toggle source

Returns the value of the `status` attribute.

@return [NicStatus]

# File lib/ovirtsdk4/types.rb, line 40538
def status
  @status
end
status=(value) click to toggle source

Sets the value of the `status` attribute.

@param value [NicStatus]

# File lib/ovirtsdk4/types.rb, line 40547
def status=(value)
  @status = value
end
virtual_functions_configuration() click to toggle source

Returns the value of the `virtual_functions_configuration` attribute.

@return [HostNicVirtualFunctionsConfiguration]

# File lib/ovirtsdk4/types.rb, line 40556
def virtual_functions_configuration
  @virtual_functions_configuration
end
virtual_functions_configuration=(value) click to toggle source

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 40569
def virtual_functions_configuration=(value)
  if value.is_a?(Hash)
    value = HostNicVirtualFunctionsConfiguration.new(value)
  end
  @virtual_functions_configuration = value
end
vlan() click to toggle source

Returns the value of the `vlan` attribute.

@return [Vlan]

# File lib/ovirtsdk4/types.rb, line 40581
def vlan
  @vlan
end
vlan=(value) click to toggle source

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 40594
def vlan=(value)
  if value.is_a?(Hash)
    value = Vlan.new(value)
  end
  @vlan = value
end