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 [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 34832
def initialize(opts = {})
  super(opts)
  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

Public Instance Methods

base_interface() click to toggle source

Returns the value of the `base_interface` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 34198
def base_interface
  return @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 34207
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 34216
def bonding
  return @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 34229
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 34241
def boot_protocol
  return @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 34250
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 34259
def bridged
  return @bridged
end
bridged=(value) click to toggle source

Sets the value of the `bridged` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 34268
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 34277
def check_connectivity
  return @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 34286
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 34295
def comment
  return @comment
end
comment=(value) click to toggle source

Sets the value of the `comment` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 34304
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 34313
def custom_configuration
  return @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 34322
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 34331
def description
  return @description
end
description=(value) click to toggle source

Sets the value of the `description` attribute.

@param value [String]

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

Returns the value of the `host` attribute.

@return [Host]

# File lib/ovirtsdk4/types.rb, line 34349
def host
  return @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 34362
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 34374
def id
  return @id
end
id=(value) click to toggle source

Sets the value of the `id` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 34383
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 34392
def ip
  return @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 34405
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 34417
def ipv6
  return @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 34430
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 34442
def ipv6_boot_protocol
  return @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 34451
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 34460
def mac
  return @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 34473
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 34485
def mtu
  return @mtu
end
mtu=(value) click to toggle source

Sets the value of the `mtu` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 34494
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 34503
def name
  return @name
end
name=(value) click to toggle source

Sets the value of the `name` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 34512
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 34521
def network
  return @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 34534
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 34546
def network_labels
  return @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 34554
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 34571
def override_configuration
  return @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 34580
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 34589
def physical_function
  return @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 34602
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 34614
def properties
  return @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 34622
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 34639
def qos
  return @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 34652
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 34664
def speed
  return @speed
end
speed=(value) click to toggle source

Sets the value of the `speed` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 34673
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 34682
def statistics
  return @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 34690
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 34707
def status
  return @status
end
status=(value) click to toggle source

Sets the value of the `status` attribute.

@param value [NicStatus]

# File lib/ovirtsdk4/types.rb, line 34716
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 34725
def virtual_functions_configuration
  return @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 34738
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 34750
def vlan
  return @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 34763
def vlan=(value)
  if value.is_a?(Hash)
    value = Vlan.new(value)
  end
  @vlan = value
end