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
trueifselfandotherhave the same attributes and values. -
#boot_protocol ⇒ BootProtocol
Returns the value of the
boot_protocolattribute. -
#boot_protocol=(value) ⇒ Object
Sets the value of the
boot_protocolattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ Nic
constructor
Creates a new instance of the Nic class.
-
#instance_type ⇒ InstanceType
Returns the value of the
instance_typeattribute. -
#instance_type=(value) ⇒ Object
Sets the value of the
instance_typeattribute. -
#interface ⇒ NicInterface
Returns the value of the
interfaceattribute. -
#interface=(value) ⇒ Object
Sets the value of the
interfaceattribute. -
#linked ⇒ Boolean
Returns the value of the
linkedattribute. -
#linked=(value) ⇒ Object
Sets the value of the
linkedattribute. -
#mac ⇒ Mac
Returns the value of the
macattribute. -
#mac=(value) ⇒ Object
Sets the value of the
macattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#network ⇒ Network
Returns the value of the
networkattribute. -
#network=(value) ⇒ Object
Sets the value of the
networkattribute. -
#network_attachments ⇒ Array<NetworkAttachment>
Returns the value of the
network_attachmentsattribute. -
#network_attachments=(list) ⇒ Object
Sets the value of the
network_attachmentsattribute. -
#network_filter_parameters ⇒ Array<NetworkFilterParameter>
Returns the value of the
network_filter_parametersattribute. -
#network_filter_parameters=(list) ⇒ Object
Sets the value of the
network_filter_parametersattribute. -
#network_labels ⇒ Array<NetworkLabel>
Returns the value of the
network_labelsattribute. -
#network_labels=(list) ⇒ Object
Sets the value of the
network_labelsattribute. -
#on_boot ⇒ Boolean
Returns the value of the
on_bootattribute. -
#on_boot=(value) ⇒ Object
Sets the value of the
on_bootattribute. -
#plugged ⇒ Boolean
Returns the value of the
pluggedattribute. -
#plugged=(value) ⇒ Object
Sets the value of the
pluggedattribute. -
#reported_devices ⇒ Array<ReportedDevice>
Returns the value of the
reported_devicesattribute. -
#reported_devices=(list) ⇒ Object
Sets the value of the
reported_devicesattribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statisticsattribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statisticsattribute. -
#template ⇒ Template
Returns the value of the
templateattribute. -
#template=(value) ⇒ Object
Sets the value of the
templateattribute. -
#virtual_function_allowed_labels ⇒ Array<NetworkLabel>
Returns the value of the
virtual_function_allowed_labelsattribute. -
#virtual_function_allowed_labels=(list) ⇒ Object
Sets the value of the
virtual_function_allowed_labelsattribute. -
#virtual_function_allowed_networks ⇒ Array<Network>
Returns the value of the
virtual_function_allowed_networksattribute. -
#virtual_function_allowed_networks=(list) ⇒ Object
Sets the value of the
virtual_function_allowed_networksattribute. -
#vm ⇒ Vm
Returns the value of the
vmattribute. -
#vm=(value) ⇒ Object
Sets the value of the
vmattribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vmsattribute. -
#vms=(list) ⇒ Object
Sets the value of the
vmsattribute. -
#vnic_profile ⇒ VnicProfile
Returns the value of the
vnic_profileattribute. -
#vnic_profile=(value) ⇒ Object
Sets the value of the
vnic_profileattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Nic
Creates a new instance of the OvirtSDK4::Nic class.
44996 44997 44998 44999 45000 45001 45002 45003 45004 45005 45006 45007 45008 45009 45010 45011 45012 45013 |
# File 'lib/ovirtsdk4/types.rb', line 44996 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.
45018 45019 45020 45021 45022 45023 45024 45025 45026 45027 45028 45029 45030 45031 45032 45033 45034 45035 |
# File 'lib/ovirtsdk4/types.rb', line 45018 def ==(other) super && @boot_protocol == other.boot_protocol && @interface == other.interface && @linked == other.linked && @mac == other.mac && @network == other.network && == 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.
44427 44428 44429 |
# File 'lib/ovirtsdk4/types.rb', line 44427 def boot_protocol @boot_protocol end |
#boot_protocol=(value) ⇒ Object
Sets the value of the boot_protocol attribute.
44436 44437 44438 |
# File 'lib/ovirtsdk4/types.rb', line 44436 def boot_protocol=(value) @boot_protocol = value end |
#comment ⇒ String
Returns the value of the comment attribute.
44445 44446 44447 |
# File 'lib/ovirtsdk4/types.rb', line 44445 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
44454 44455 44456 |
# File 'lib/ovirtsdk4/types.rb', line 44454 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
44463 44464 44465 |
# File 'lib/ovirtsdk4/types.rb', line 44463 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
44472 44473 44474 |
# File 'lib/ovirtsdk4/types.rb', line 44472 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
45040 45041 45042 45043 45044 45045 45046 45047 45048 45049 45050 45051 45052 45053 45054 45055 45056 45057 |
# File 'lib/ovirtsdk4/types.rb', line 45040 def hash super + @boot_protocol.hash + @interface.hash + @linked.hash + @mac.hash + @network.hash + .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.
44481 44482 44483 |
# File 'lib/ovirtsdk4/types.rb', line 44481 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
44490 44491 44492 |
# File 'lib/ovirtsdk4/types.rb', line 44490 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type attribute.
44499 44500 44501 |
# File 'lib/ovirtsdk4/types.rb', line 44499 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.
44512 44513 44514 44515 44516 44517 |
# File 'lib/ovirtsdk4/types.rb', line 44512 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.
44524 44525 44526 |
# File 'lib/ovirtsdk4/types.rb', line 44524 def interface @interface end |
#interface=(value) ⇒ Object
Sets the value of the interface attribute.
44533 44534 44535 |
# File 'lib/ovirtsdk4/types.rb', line 44533 def interface=(value) @interface = value end |
#linked ⇒ Boolean
Returns the value of the linked attribute.
44542 44543 44544 |
# File 'lib/ovirtsdk4/types.rb', line 44542 def linked @linked end |
#linked=(value) ⇒ Object
Sets the value of the linked attribute.
44551 44552 44553 |
# File 'lib/ovirtsdk4/types.rb', line 44551 def linked=(value) @linked = value end |
#mac ⇒ Mac
Returns the value of the mac attribute.
44560 44561 44562 |
# File 'lib/ovirtsdk4/types.rb', line 44560 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.
44573 44574 44575 44576 44577 44578 |
# File 'lib/ovirtsdk4/types.rb', line 44573 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.
44585 44586 44587 |
# File 'lib/ovirtsdk4/types.rb', line 44585 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
44594 44595 44596 |
# File 'lib/ovirtsdk4/types.rb', line 44594 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network attribute.
44603 44604 44605 |
# File 'lib/ovirtsdk4/types.rb', line 44603 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.
44616 44617 44618 44619 44620 44621 |
# File 'lib/ovirtsdk4/types.rb', line 44616 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.
44628 44629 44630 |
# File 'lib/ovirtsdk4/types.rb', line 44628 def end |
#network_attachments=(list) ⇒ Object
Sets the value of the network_attachments attribute.
44637 44638 44639 44640 44641 44642 44643 44644 44645 44646 44647 |
# File 'lib/ovirtsdk4/types.rb', line 44637 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 = list end |
#network_filter_parameters ⇒ Array<NetworkFilterParameter>
Returns the value of the network_filter_parameters attribute.
44654 44655 44656 |
# File 'lib/ovirtsdk4/types.rb', line 44654 def network_filter_parameters @network_filter_parameters end |
#network_filter_parameters=(list) ⇒ Object
Sets the value of the network_filter_parameters attribute.
44663 44664 44665 44666 44667 44668 44669 44670 44671 44672 44673 |
# File 'lib/ovirtsdk4/types.rb', line 44663 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.
44680 44681 44682 |
# File 'lib/ovirtsdk4/types.rb', line 44680 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels attribute.
44689 44690 44691 44692 44693 44694 44695 44696 44697 44698 44699 |
# File 'lib/ovirtsdk4/types.rb', line 44689 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.
44706 44707 44708 |
# File 'lib/ovirtsdk4/types.rb', line 44706 def on_boot @on_boot end |
#on_boot=(value) ⇒ Object
Sets the value of the on_boot attribute.
44715 44716 44717 |
# File 'lib/ovirtsdk4/types.rb', line 44715 def on_boot=(value) @on_boot = value end |
#plugged ⇒ Boolean
Returns the value of the plugged attribute.
44724 44725 44726 |
# File 'lib/ovirtsdk4/types.rb', line 44724 def plugged @plugged end |
#plugged=(value) ⇒ Object
Sets the value of the plugged attribute.
44733 44734 44735 |
# File 'lib/ovirtsdk4/types.rb', line 44733 def plugged=(value) @plugged = value end |
#reported_devices ⇒ Array<ReportedDevice>
Returns the value of the reported_devices attribute.
44742 44743 44744 |
# File 'lib/ovirtsdk4/types.rb', line 44742 def reported_devices @reported_devices end |
#reported_devices=(list) ⇒ Object
Sets the value of the reported_devices attribute.
44751 44752 44753 44754 44755 44756 44757 44758 44759 44760 44761 |
# File 'lib/ovirtsdk4/types.rb', line 44751 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.
44768 44769 44770 |
# File 'lib/ovirtsdk4/types.rb', line 44768 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics attribute.
44777 44778 44779 44780 44781 44782 44783 44784 44785 44786 44787 |
# File 'lib/ovirtsdk4/types.rb', line 44777 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.
44794 44795 44796 |
# File 'lib/ovirtsdk4/types.rb', line 44794 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.
44807 44808 44809 44810 44811 44812 |
# File 'lib/ovirtsdk4/types.rb', line 44807 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.
44819 44820 44821 |
# File 'lib/ovirtsdk4/types.rb', line 44819 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.
44828 44829 44830 44831 44832 44833 44834 44835 44836 44837 44838 |
# File 'lib/ovirtsdk4/types.rb', line 44828 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.
44845 44846 44847 |
# File 'lib/ovirtsdk4/types.rb', line 44845 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.
44854 44855 44856 44857 44858 44859 44860 44861 44862 44863 44864 |
# File 'lib/ovirtsdk4/types.rb', line 44854 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.
44871 44872 44873 |
# File 'lib/ovirtsdk4/types.rb', line 44871 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.
44884 44885 44886 44887 44888 44889 |
# File 'lib/ovirtsdk4/types.rb', line 44884 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.
44896 44897 44898 |
# File 'lib/ovirtsdk4/types.rb', line 44896 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms attribute.
44905 44906 44907 44908 44909 44910 44911 44912 44913 44914 44915 |
# File 'lib/ovirtsdk4/types.rb', line 44905 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.
44922 44923 44924 |
# File 'lib/ovirtsdk4/types.rb', line 44922 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.
44935 44936 44937 44938 44939 44940 |
# File 'lib/ovirtsdk4/types.rb', line 44935 def vnic_profile=(value) if value.is_a?(Hash) value = VnicProfile.new(value) end @vnic_profile = value end |