class OvirtSDK4::Nic

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {Nic} 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 [BootProtocol] :boot_protocol The value of attribute ‘boot_protocol`.

@option opts [String] :comment The value of attribute ‘comment`.

@option opts [String] :description The value of attribute ‘description`.

@option opts [String] :id The value of attribute ‘id`.

@option opts [InstanceType, Hash] :instance_type The value of attribute ‘instance_type`.

@option opts [NicInterface] :interface The value of attribute ‘interface`.

@option opts [Boolean] :linked The value of attribute ‘linked`.

@option opts [Mac, Hash] :mac The value of attribute ‘mac`.

@option opts [String] :name The value of attribute ‘name`.

@option opts [Network, Hash] :network The value of attribute ‘network`.

@option opts [Array<NetworkAttachment>, Array<Hash>] :network_attachments The values of attribute ‘network_attachments`.

@option opts [Array<NetworkFilterParameter>, Array<Hash>] :network_filter_parameters The values of attribute ‘network_filter_parameters`.

@option opts [Array<NetworkLabel>, Array<Hash>] :network_labels The values of attribute ‘network_labels`.

@option opts [Boolean] :on_boot The value of attribute ‘on_boot`.

@option opts [Boolean] :plugged The value of attribute ‘plugged`.

@option opts [Array<ReportedDevice>, Array<Hash>] :reported_devices The values of attribute ‘reported_devices`.

@option opts [Array<Statistic>, Array<Hash>] :statistics The values of attribute ‘statistics`.

@option opts [Boolean] :synced The value of attribute ‘synced`.

@option opts [Template, Hash] :template The value of attribute ‘template`.

@option opts [Array<NetworkLabel>, Array<Hash>] :virtual_function_allowed_labels The values of attribute ‘virtual_function_allowed_labels`.

@option opts [Array<Network>, Array<Hash>] :virtual_function_allowed_networks The values of attribute ‘virtual_function_allowed_networks`.

@option opts [Vm, Hash] :vm The value of attribute ‘vm`.

@option opts [Array<Vm>, Array<Hash>] :vms The values of attribute ‘vms`.

@option opts [VnicProfile, Hash] :vnic_profile The value of attribute ‘vnic_profile`.

Calls superclass method OvirtSDK4::Device::new
# File lib/ovirtsdk4/types.rb, line 48854
def initialize(opts = {})
  super(opts)
  self.boot_protocol = opts[:boot_protocol]
  self.interface = opts[:interface]
  self.linked = opts[:linked]
  self.mac = opts[:mac]
  self.network = opts[:network]
  self.network_attachments = opts[:network_attachments]
  self.network_filter_parameters = opts[:network_filter_parameters]
  self.network_labels = opts[:network_labels]
  self.on_boot = opts[:on_boot]
  self.plugged = opts[:plugged]
  self.reported_devices = opts[:reported_devices]
  self.statistics = opts[:statistics]
  self.synced = opts[:synced]
  self.virtual_function_allowed_labels = opts[:virtual_function_allowed_labels]
  self.virtual_function_allowed_networks = opts[:virtual_function_allowed_networks]
  self.vnic_profile = opts[:vnic_profile]
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::Device#==
# File lib/ovirtsdk4/types.rb, line 48877
def ==(other)
  super &&
  @boot_protocol == other.boot_protocol &&
  @interface == other.interface &&
  @linked == other.linked &&
  @mac == other.mac &&
  @network == other.network &&
  @network_attachments == other.network_attachments &&
  @network_filter_parameters == other.network_filter_parameters &&
  @network_labels == other.network_labels &&
  @on_boot == other.on_boot &&
  @plugged == other.plugged &&
  @reported_devices == other.reported_devices &&
  @statistics == other.statistics &&
  @synced == other.synced &&
  @virtual_function_allowed_labels == other.virtual_function_allowed_labels &&
  @virtual_function_allowed_networks == other.virtual_function_allowed_networks &&
  @vnic_profile == other.vnic_profile
end
boot_protocol() click to toggle source

Returns the value of the ‘boot_protocol` attribute.

@return [BootProtocol]

# File lib/ovirtsdk4/types.rb, line 48265
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 48274
def boot_protocol=(value)
  @boot_protocol = value
end
comment() click to toggle source

Returns the value of the ‘comment` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 48283
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 48292
def comment=(value)
  @comment = value
end
description() click to toggle source

Returns the value of the ‘description` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 48301
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 48310
def description=(value)
  @description = value
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Device#hash
# File lib/ovirtsdk4/types.rb, line 48900
def hash
  super +
  @boot_protocol.hash +
  @interface.hash +
  @linked.hash +
  @mac.hash +
  @network.hash +
  @network_attachments.hash +
  @network_filter_parameters.hash +
  @network_labels.hash +
  @on_boot.hash +
  @plugged.hash +
  @reported_devices.hash +
  @statistics.hash +
  @synced.hash +
  @virtual_function_allowed_labels.hash +
  @virtual_function_allowed_networks.hash +
  @vnic_profile.hash
end
id() click to toggle source

Returns the value of the ‘id` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 48319
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 48328
def id=(value)
  @id = value
end
instance_type() click to toggle source

Returns the value of the ‘instance_type` attribute.

@return [InstanceType]

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

Sets the value of the ‘instance_type` attribute.

@param value [InstanceType, Hash]

The ‘value` parameter can be an instance of {OvirtSDK4::InstanceType} 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 48350
def instance_type=(value)
  if value.is_a?(Hash)
    value = InstanceType.new(value)
  end
  @instance_type = value
end
interface() click to toggle source

Returns the value of the ‘interface` attribute.

@return [NicInterface]

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

Sets the value of the ‘interface` attribute.

@param value [NicInterface]

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

Returns the value of the ‘linked` attribute.

@return [Boolean]

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

Sets the value of the ‘linked` attribute.

@param value [Boolean]

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

Returns the value of the ‘mac` attribute.

@return [Mac]

# File lib/ovirtsdk4/types.rb, line 48398
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 48411
def mac=(value)
  if value.is_a?(Hash)
    value = Mac.new(value)
  end
  @mac = value
end
name() click to toggle source

Returns the value of the ‘name` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 48423
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 48432
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 48441
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 48454
def network=(value)
  if value.is_a?(Hash)
    value = Network.new(value)
  end
  @network = value
end
network_attachments() click to toggle source

Returns the value of the ‘network_attachments` attribute.

@return [Array<NetworkAttachment>]

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

Sets the value of the ‘network_attachments` attribute.

@param list [Array<NetworkAttachment>]

# File lib/ovirtsdk4/types.rb, line 48475
def network_attachments=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = NetworkAttachment.new(value)
      end
    end
  end
  @network_attachments = list
end
network_filter_parameters() click to toggle source

Returns the value of the ‘network_filter_parameters` attribute.

@return [Array<NetworkFilterParameter>]

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

Sets the value of the ‘network_filter_parameters` attribute.

@param list [Array<NetworkFilterParameter>]

# File lib/ovirtsdk4/types.rb, line 48501
def network_filter_parameters=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = NetworkFilterParameter.new(value)
      end
    end
  end
  @network_filter_parameters = list
end
network_labels() click to toggle source

Returns the value of the ‘network_labels` attribute.

@return [Array<NetworkLabel>]

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

Returns the value of the ‘on_boot` attribute.

@return [Boolean]

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

Sets the value of the ‘on_boot` attribute.

@param value [Boolean]

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

Returns the value of the ‘plugged` attribute.

@return [Boolean]

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

Sets the value of the ‘plugged` attribute.

@param value [Boolean]

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

Returns the value of the ‘reported_devices` attribute.

@return [Array<ReportedDevice>]

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

Sets the value of the ‘reported_devices` attribute.

@param list [Array<ReportedDevice>]

# File lib/ovirtsdk4/types.rb, line 48589
def reported_devices=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = ReportedDevice.new(value)
      end
    end
  end
  @reported_devices = list
end
statistics() click to toggle source

Returns the value of the ‘statistics` attribute.

@return [Array<Statistic>]

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

Returns the value of the ‘synced` attribute.

@return [Boolean]

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

Sets the value of the ‘synced` attribute.

@param value [Boolean]

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

Returns the value of the ‘template` attribute.

@return [Template]

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

Sets the value of the ‘template` attribute.

@param value [Template, Hash]

The ‘value` parameter can be an instance of {OvirtSDK4::Template} 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 48663
def template=(value)
  if value.is_a?(Hash)
    value = Template.new(value)
  end
  @template = value
end
virtual_function_allowed_labels() click to toggle source

Returns the value of the ‘virtual_function_allowed_labels` attribute.

@return [Array<NetworkLabel>]

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

Sets the value of the ‘virtual_function_allowed_labels` attribute.

@param list [Array<NetworkLabel>]

# File lib/ovirtsdk4/types.rb, line 48684
def virtual_function_allowed_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
  @virtual_function_allowed_labels = list
end
virtual_function_allowed_networks() click to toggle source

Returns the value of the ‘virtual_function_allowed_networks` attribute.

@return [Array<Network>]

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

Sets the value of the ‘virtual_function_allowed_networks` attribute.

@param list [Array<Network>]

# File lib/ovirtsdk4/types.rb, line 48710
def virtual_function_allowed_networks=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Network.new(value)
      end
    end
  end
  @virtual_function_allowed_networks = list
end
vm() click to toggle source

Returns the value of the ‘vm` attribute.

@return [Vm]

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

Sets the value of the ‘vm` attribute.

@param value [Vm, Hash]

The ‘value` parameter can be an instance of {OvirtSDK4::Vm} 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 48740
def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end
vms() click to toggle source

Returns the value of the ‘vms` attribute.

@return [Array<Vm>]

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

Sets the value of the ‘vms` attribute.

@param list [Array<Vm>]

# File lib/ovirtsdk4/types.rb, line 48761
def vms=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Vm.new(value)
      end
    end
  end
  @vms = list
end
vnic_profile() click to toggle source

Returns the value of the ‘vnic_profile` attribute.

@return [VnicProfile]

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

Sets the value of the ‘vnic_profile` attribute.

@param value [VnicProfile, Hash]

The ‘value` parameter can be an instance of {OvirtSDK4::VnicProfile} 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 48791
def vnic_profile=(value)
  if value.is_a?(Hash)
    value = VnicProfile.new(value)
  end
  @vnic_profile = value
end