class OvirtSDK4::Nic
Public Class Methods
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 [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 [Template, Hash] :template The value of attribute `template`.
@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`.
# File lib/ovirtsdk4/types.rb, line 33871 def initialize(opts = {}) super(opts) self.boot_protocol = opts[:boot_protocol] self.comment = opts[:comment] self.description = opts[:description] self.id = opts[:id] self.instance_type = opts[:instance_type] self.interface = opts[:interface] self.linked = opts[:linked] self.mac = opts[:mac] self.name = opts[:name] self.network = opts[:network] self.on_boot = opts[:on_boot] self.plugged = opts[:plugged] self.reported_devices = opts[:reported_devices] self.statistics = opts[:statistics] self.template = opts[:template] self.vm = opts[:vm] self.vms = opts[:vms] self.vnic_profile = opts[:vnic_profile] end
Public Instance Methods
Returns the value of the `boot_protocol` attribute.
@return [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 33445 def boot_protocol return @boot_protocol end
Sets the value of the `boot_protocol` attribute.
@param value [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 33454 def boot_protocol=(value) @boot_protocol = value end
Returns the value of the `comment` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 33463 def comment return @comment end
Sets the value of the `comment` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 33472 def comment=(value) @comment = value end
Returns the value of the `description` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 33481 def description return @description end
Sets the value of the `description` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 33490 def description=(value) @description = value end
Returns the value of the `id` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 33499 def id return @id end
Sets the value of the `id` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 33508 def id=(value) @id = value end
Returns the value of the `instance_type` attribute.
@return [InstanceType]
# File lib/ovirtsdk4/types.rb, line 33517 def instance_type return @instance_type end
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 33530 def instance_type=(value) if value.is_a?(Hash) value = InstanceType.new(value) end @instance_type = value end
Returns the value of the `interface` attribute.
@return [NicInterface]
# File lib/ovirtsdk4/types.rb, line 33542 def interface return @interface end
Sets the value of the `interface` attribute.
@param value [NicInterface]
# File lib/ovirtsdk4/types.rb, line 33551 def interface=(value) @interface = value end
Returns the value of the `linked` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 33560 def linked return @linked end
Sets the value of the `linked` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 33569 def linked=(value) @linked = value end
Returns the value of the `mac` attribute.
@return [Mac]
# File lib/ovirtsdk4/types.rb, line 33578 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 33591 def mac=(value) if value.is_a?(Hash) value = Mac.new(value) end @mac = value end
Returns the value of the `name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 33603 def name return @name end
Sets the value of the `name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 33612 def name=(value) @name = value end
Returns the value of the `network` attribute.
@return [Network]
# File lib/ovirtsdk4/types.rb, line 33621 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 33634 def network=(value) if value.is_a?(Hash) value = Network.new(value) end @network = value end
Returns the value of the `on_boot` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 33646 def on_boot return @on_boot end
Sets the value of the `on_boot` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 33655 def on_boot=(value) @on_boot = value end
Returns the value of the `plugged` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 33664 def plugged return @plugged end
Sets the value of the `plugged` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 33673 def plugged=(value) @plugged = value end
Returns the value of the `reported_devices` attribute.
@return [Array<ReportedDevice>]
# File lib/ovirtsdk4/types.rb, line 33682 def reported_devices return @reported_devices end
Sets the value of the `reported_devices` attribute.
@param list [Array<ReportedDevice>]
# File lib/ovirtsdk4/types.rb, line 33690 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
Returns the value of the `statistics` attribute.
@return [Array<Statistic>]
# File lib/ovirtsdk4/types.rb, line 33707 def statistics return @statistics end
Sets the value of the `statistics` attribute.
@param list [Array<Statistic>]
# File lib/ovirtsdk4/types.rb, line 33715 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 `template` attribute.
@return [Template]
# File lib/ovirtsdk4/types.rb, line 33732 def template return @template end
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 33745 def template=(value) if value.is_a?(Hash) value = Template.new(value) end @template = value end
Returns the value of the `vm` attribute.
@return [Vm]
# File lib/ovirtsdk4/types.rb, line 33757 def vm return @vm end
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 33770 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end
Returns the value of the `vms` attribute.
@return [Array<Vm>]
# File lib/ovirtsdk4/types.rb, line 33782 def vms return @vms end
Sets the value of the `vms` attribute.
@param list [Array<Vm>]
# File lib/ovirtsdk4/types.rb, line 33790 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
Returns the value of the `vnic_profile` attribute.
@return [VnicProfile]
# File lib/ovirtsdk4/types.rb, line 33807 def vnic_profile return @vnic_profile end
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 33820 def vnic_profile=(value) if value.is_a?(Hash) value = VnicProfile.new(value) end @vnic_profile = value end