Class: OvirtSDK4::Nic
- Inherits:
-
Device
- Object
- Struct
- Identified
- Device
- OvirtSDK4::Nic
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#boot_protocol ⇒ BootProtocol
Returns the value of the
boot_protocol
attribute. -
#boot_protocol=(value) ⇒ Object
Sets the value of the
boot_protocol
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ Nic
constructor
Creates a new instance of the Nic class.
-
#instance_type ⇒ InstanceType
Returns the value of the
instance_type
attribute. -
#instance_type=(value) ⇒ Object
Sets the value of the
instance_type
attribute. -
#interface ⇒ NicInterface
Returns the value of the
interface
attribute. -
#interface=(value) ⇒ Object
Sets the value of the
interface
attribute. -
#linked ⇒ Boolean
Returns the value of the
linked
attribute. -
#linked=(value) ⇒ Object
Sets the value of the
linked
attribute. -
#mac ⇒ Mac
Returns the value of the
mac
attribute. -
#mac=(value) ⇒ Object
Sets the value of the
mac
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#network ⇒ Network
Returns the value of the
network
attribute. -
#network=(value) ⇒ Object
Sets the value of the
network
attribute. -
#network_attachments ⇒ Array<NetworkAttachment>
Returns the value of the
network_attachments
attribute. -
#network_attachments=(list) ⇒ Object
Sets the value of the
network_attachments
attribute. -
#network_filter_parameters ⇒ Array<NetworkFilterParameter>
Returns the value of the
network_filter_parameters
attribute. -
#network_filter_parameters=(list) ⇒ Object
Sets the value of the
network_filter_parameters
attribute. -
#network_labels ⇒ Array<NetworkLabel>
Returns the value of the
network_labels
attribute. -
#network_labels=(list) ⇒ Object
Sets the value of the
network_labels
attribute. -
#on_boot ⇒ Boolean
Returns the value of the
on_boot
attribute. -
#on_boot=(value) ⇒ Object
Sets the value of the
on_boot
attribute. -
#plugged ⇒ Boolean
Returns the value of the
plugged
attribute. -
#plugged=(value) ⇒ Object
Sets the value of the
plugged
attribute. -
#reported_devices ⇒ Array<ReportedDevice>
Returns the value of the
reported_devices
attribute. -
#reported_devices=(list) ⇒ Object
Sets the value of the
reported_devices
attribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statistics
attribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statistics
attribute. -
#template ⇒ Template
Returns the value of the
template
attribute. -
#template=(value) ⇒ Object
Sets the value of the
template
attribute. -
#virtual_function_allowed_labels ⇒ Array<NetworkLabel>
Returns the value of the
virtual_function_allowed_labels
attribute. -
#virtual_function_allowed_labels=(list) ⇒ Object
Sets the value of the
virtual_function_allowed_labels
attribute. -
#virtual_function_allowed_networks ⇒ Array<Network>
Returns the value of the
virtual_function_allowed_networks
attribute. -
#virtual_function_allowed_networks=(list) ⇒ Object
Sets the value of the
virtual_function_allowed_networks
attribute. -
#vm ⇒ Vm
Returns the value of the
vm
attribute. -
#vm=(value) ⇒ Object
Sets the value of the
vm
attribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vms
attribute. -
#vms=(list) ⇒ Object
Sets the value of the
vms
attribute. -
#vnic_profile ⇒ VnicProfile
Returns the value of the
vnic_profile
attribute. -
#vnic_profile=(value) ⇒ Object
Sets the value of the
vnic_profile
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Nic
Creates a new instance of the OvirtSDK4::Nic class.
44936 44937 44938 44939 44940 44941 44942 44943 44944 44945 44946 44947 44948 44949 44950 44951 44952 44953 |
# File 'lib/ovirtsdk4/types.rb', line 44936 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. = 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.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 |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
44958 44959 44960 44961 44962 44963 44964 44965 44966 44967 44968 44969 44970 44971 44972 44973 44974 44975 |
# File 'lib/ovirtsdk4/types.rb', line 44958 def ==(other) super && @boot_protocol == other.boot_protocol && @interface == other.interface && @linked == other.linked && @mac == other.mac && @network == other.network && @network_attachments == other. && @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 && @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 ⇒ BootProtocol
Returns the value of the boot_protocol
attribute.
44367 44368 44369 |
# File 'lib/ovirtsdk4/types.rb', line 44367 def boot_protocol @boot_protocol end |
#boot_protocol=(value) ⇒ Object
Sets the value of the boot_protocol
attribute.
44376 44377 44378 |
# File 'lib/ovirtsdk4/types.rb', line 44376 def boot_protocol=(value) @boot_protocol = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
44385 44386 44387 |
# File 'lib/ovirtsdk4/types.rb', line 44385 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
44394 44395 44396 |
# File 'lib/ovirtsdk4/types.rb', line 44394 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
44403 44404 44405 |
# File 'lib/ovirtsdk4/types.rb', line 44403 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
44412 44413 44414 |
# File 'lib/ovirtsdk4/types.rb', line 44412 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
44980 44981 44982 44983 44984 44985 44986 44987 44988 44989 44990 44991 44992 44993 44994 44995 44996 44997 |
# File 'lib/ovirtsdk4/types.rb', line 44980 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 + @virtual_function_allowed_labels.hash + @virtual_function_allowed_networks.hash + @vnic_profile.hash end |
#id ⇒ String
Returns the value of the id
attribute.
44421 44422 44423 |
# File 'lib/ovirtsdk4/types.rb', line 44421 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
44430 44431 44432 |
# File 'lib/ovirtsdk4/types.rb', line 44430 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type
attribute.
44439 44440 44441 |
# File 'lib/ovirtsdk4/types.rb', line 44439 def instance_type @instance_type end |
#instance_type=(value) ⇒ Object
Sets the value of the instance_type
attribute.
The value
parameter can be an instance of 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.
44452 44453 44454 44455 44456 44457 |
# File 'lib/ovirtsdk4/types.rb', line 44452 def instance_type=(value) if value.is_a?(Hash) value = InstanceType.new(value) end @instance_type = value end |
#interface ⇒ NicInterface
Returns the value of the interface
attribute.
44464 44465 44466 |
# File 'lib/ovirtsdk4/types.rb', line 44464 def interface @interface end |
#interface=(value) ⇒ Object
Sets the value of the interface
attribute.
44473 44474 44475 |
# File 'lib/ovirtsdk4/types.rb', line 44473 def interface=(value) @interface = value end |
#linked ⇒ Boolean
Returns the value of the linked
attribute.
44482 44483 44484 |
# File 'lib/ovirtsdk4/types.rb', line 44482 def linked @linked end |
#linked=(value) ⇒ Object
Sets the value of the linked
attribute.
44491 44492 44493 |
# File 'lib/ovirtsdk4/types.rb', line 44491 def linked=(value) @linked = value end |
#mac ⇒ Mac
Returns the value of the mac
attribute.
44500 44501 44502 |
# File 'lib/ovirtsdk4/types.rb', line 44500 def mac @mac end |
#mac=(value) ⇒ Object
Sets the value of the mac
attribute.
The value
parameter can be an instance of 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.
44513 44514 44515 44516 44517 44518 |
# File 'lib/ovirtsdk4/types.rb', line 44513 def mac=(value) if value.is_a?(Hash) value = Mac.new(value) end @mac = value end |
#name ⇒ String
Returns the value of the name
attribute.
44525 44526 44527 |
# File 'lib/ovirtsdk4/types.rb', line 44525 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
44534 44535 44536 |
# File 'lib/ovirtsdk4/types.rb', line 44534 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network
attribute.
44543 44544 44545 |
# File 'lib/ovirtsdk4/types.rb', line 44543 def network @network end |
#network=(value) ⇒ Object
Sets the value of the network
attribute.
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.
44556 44557 44558 44559 44560 44561 |
# File 'lib/ovirtsdk4/types.rb', line 44556 def network=(value) if value.is_a?(Hash) value = Network.new(value) end @network = value end |
#network_attachments ⇒ Array<NetworkAttachment>
Returns the value of the network_attachments
attribute.
44568 44569 44570 |
# File 'lib/ovirtsdk4/types.rb', line 44568 def @network_attachments end |
#network_attachments=(list) ⇒ Object
Sets the value of the network_attachments
attribute.
44577 44578 44579 44580 44581 44582 44583 44584 44585 44586 44587 |
# File 'lib/ovirtsdk4/types.rb', line 44577 def (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 ⇒ Array<NetworkFilterParameter>
Returns the value of the network_filter_parameters
attribute.
44594 44595 44596 |
# File 'lib/ovirtsdk4/types.rb', line 44594 def network_filter_parameters @network_filter_parameters end |
#network_filter_parameters=(list) ⇒ Object
Sets the value of the network_filter_parameters
attribute.
44603 44604 44605 44606 44607 44608 44609 44610 44611 44612 44613 |
# File 'lib/ovirtsdk4/types.rb', line 44603 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 ⇒ Array<NetworkLabel>
Returns the value of the network_labels
attribute.
44620 44621 44622 |
# File 'lib/ovirtsdk4/types.rb', line 44620 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels
attribute.
44629 44630 44631 44632 44633 44634 44635 44636 44637 44638 44639 |
# File 'lib/ovirtsdk4/types.rb', line 44629 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 ⇒ Boolean
Returns the value of the on_boot
attribute.
44646 44647 44648 |
# File 'lib/ovirtsdk4/types.rb', line 44646 def on_boot @on_boot end |
#on_boot=(value) ⇒ Object
Sets the value of the on_boot
attribute.
44655 44656 44657 |
# File 'lib/ovirtsdk4/types.rb', line 44655 def on_boot=(value) @on_boot = value end |
#plugged ⇒ Boolean
Returns the value of the plugged
attribute.
44664 44665 44666 |
# File 'lib/ovirtsdk4/types.rb', line 44664 def plugged @plugged end |
#plugged=(value) ⇒ Object
Sets the value of the plugged
attribute.
44673 44674 44675 |
# File 'lib/ovirtsdk4/types.rb', line 44673 def plugged=(value) @plugged = value end |
#reported_devices ⇒ Array<ReportedDevice>
Returns the value of the reported_devices
attribute.
44682 44683 44684 |
# File 'lib/ovirtsdk4/types.rb', line 44682 def reported_devices @reported_devices end |
#reported_devices=(list) ⇒ Object
Sets the value of the reported_devices
attribute.
44691 44692 44693 44694 44695 44696 44697 44698 44699 44700 44701 |
# File 'lib/ovirtsdk4/types.rb', line 44691 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 ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
44708 44709 44710 |
# File 'lib/ovirtsdk4/types.rb', line 44708 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
44717 44718 44719 44720 44721 44722 44723 44724 44725 44726 44727 |
# File 'lib/ovirtsdk4/types.rb', line 44717 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 |
#template ⇒ Template
Returns the value of the template
attribute.
44734 44735 44736 |
# File 'lib/ovirtsdk4/types.rb', line 44734 def template @template end |
#template=(value) ⇒ Object
Sets the value of the template
attribute.
The value
parameter can be an instance of 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.
44747 44748 44749 44750 44751 44752 |
# File 'lib/ovirtsdk4/types.rb', line 44747 def template=(value) if value.is_a?(Hash) value = Template.new(value) end @template = value end |
#virtual_function_allowed_labels ⇒ Array<NetworkLabel>
Returns the value of the virtual_function_allowed_labels
attribute.
44759 44760 44761 |
# File 'lib/ovirtsdk4/types.rb', line 44759 def virtual_function_allowed_labels @virtual_function_allowed_labels end |
#virtual_function_allowed_labels=(list) ⇒ Object
Sets the value of the virtual_function_allowed_labels
attribute.
44768 44769 44770 44771 44772 44773 44774 44775 44776 44777 44778 |
# File 'lib/ovirtsdk4/types.rb', line 44768 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 ⇒ Array<Network>
Returns the value of the virtual_function_allowed_networks
attribute.
44785 44786 44787 |
# File 'lib/ovirtsdk4/types.rb', line 44785 def virtual_function_allowed_networks @virtual_function_allowed_networks end |
#virtual_function_allowed_networks=(list) ⇒ Object
Sets the value of the virtual_function_allowed_networks
attribute.
44794 44795 44796 44797 44798 44799 44800 44801 44802 44803 44804 |
# File 'lib/ovirtsdk4/types.rb', line 44794 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 ⇒ Vm
Returns the value of the vm
attribute.
44811 44812 44813 |
# File 'lib/ovirtsdk4/types.rb', line 44811 def vm @vm end |
#vm=(value) ⇒ Object
Sets the value of the vm
attribute.
The value
parameter can be an instance of 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.
44824 44825 44826 44827 44828 44829 |
# File 'lib/ovirtsdk4/types.rb', line 44824 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |
#vms ⇒ Array<Vm>
Returns the value of the vms
attribute.
44836 44837 44838 |
# File 'lib/ovirtsdk4/types.rb', line 44836 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
44845 44846 44847 44848 44849 44850 44851 44852 44853 44854 44855 |
# File 'lib/ovirtsdk4/types.rb', line 44845 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 ⇒ VnicProfile
Returns the value of the vnic_profile
attribute.
44862 44863 44864 |
# File 'lib/ovirtsdk4/types.rb', line 44862 def vnic_profile @vnic_profile end |
#vnic_profile=(value) ⇒ Object
Sets the value of the vnic_profile
attribute.
The value
parameter can be an instance of 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.
44875 44876 44877 44878 44879 44880 |
# File 'lib/ovirtsdk4/types.rb', line 44875 def vnic_profile=(value) if value.is_a?(Hash) value = VnicProfile.new(value) end @vnic_profile = value end |