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.
45065 45066 45067 45068 45069 45070 45071 45072 45073 45074 45075 45076 45077 45078 45079 45080 45081 45082 |
# File 'lib/ovirtsdk4/types.rb', line 45065 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.
45087 45088 45089 45090 45091 45092 45093 45094 45095 45096 45097 45098 45099 45100 45101 45102 45103 45104 |
# File 'lib/ovirtsdk4/types.rb', line 45087 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.
44496 44497 44498 |
# File 'lib/ovirtsdk4/types.rb', line 44496 def boot_protocol @boot_protocol end |
#boot_protocol=(value) ⇒ Object
Sets the value of the boot_protocol
attribute.
44505 44506 44507 |
# File 'lib/ovirtsdk4/types.rb', line 44505 def boot_protocol=(value) @boot_protocol = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
44514 44515 44516 |
# File 'lib/ovirtsdk4/types.rb', line 44514 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
44523 44524 44525 |
# File 'lib/ovirtsdk4/types.rb', line 44523 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
44532 44533 44534 |
# File 'lib/ovirtsdk4/types.rb', line 44532 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
44541 44542 44543 |
# File 'lib/ovirtsdk4/types.rb', line 44541 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
45109 45110 45111 45112 45113 45114 45115 45116 45117 45118 45119 45120 45121 45122 45123 45124 45125 45126 |
# File 'lib/ovirtsdk4/types.rb', line 45109 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.
44550 44551 44552 |
# File 'lib/ovirtsdk4/types.rb', line 44550 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
44559 44560 44561 |
# File 'lib/ovirtsdk4/types.rb', line 44559 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type
attribute.
44568 44569 44570 |
# File 'lib/ovirtsdk4/types.rb', line 44568 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.
44581 44582 44583 44584 44585 44586 |
# File 'lib/ovirtsdk4/types.rb', line 44581 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.
44593 44594 44595 |
# File 'lib/ovirtsdk4/types.rb', line 44593 def interface @interface end |
#interface=(value) ⇒ Object
Sets the value of the interface
attribute.
44602 44603 44604 |
# File 'lib/ovirtsdk4/types.rb', line 44602 def interface=(value) @interface = value end |
#linked ⇒ Boolean
Returns the value of the linked
attribute.
44611 44612 44613 |
# File 'lib/ovirtsdk4/types.rb', line 44611 def linked @linked end |
#linked=(value) ⇒ Object
Sets the value of the linked
attribute.
44620 44621 44622 |
# File 'lib/ovirtsdk4/types.rb', line 44620 def linked=(value) @linked = value end |
#mac ⇒ Mac
Returns the value of the mac
attribute.
44629 44630 44631 |
# File 'lib/ovirtsdk4/types.rb', line 44629 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.
44642 44643 44644 44645 44646 44647 |
# File 'lib/ovirtsdk4/types.rb', line 44642 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.
44654 44655 44656 |
# File 'lib/ovirtsdk4/types.rb', line 44654 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
44663 44664 44665 |
# File 'lib/ovirtsdk4/types.rb', line 44663 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network
attribute.
44672 44673 44674 |
# File 'lib/ovirtsdk4/types.rb', line 44672 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.
44685 44686 44687 44688 44689 44690 |
# File 'lib/ovirtsdk4/types.rb', line 44685 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.
44697 44698 44699 |
# File 'lib/ovirtsdk4/types.rb', line 44697 def @network_attachments end |
#network_attachments=(list) ⇒ Object
Sets the value of the network_attachments
attribute.
44706 44707 44708 44709 44710 44711 44712 44713 44714 44715 44716 |
# File 'lib/ovirtsdk4/types.rb', line 44706 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.
44723 44724 44725 |
# File 'lib/ovirtsdk4/types.rb', line 44723 def network_filter_parameters @network_filter_parameters end |
#network_filter_parameters=(list) ⇒ Object
Sets the value of the network_filter_parameters
attribute.
44732 44733 44734 44735 44736 44737 44738 44739 44740 44741 44742 |
# File 'lib/ovirtsdk4/types.rb', line 44732 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.
44749 44750 44751 |
# File 'lib/ovirtsdk4/types.rb', line 44749 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels
attribute.
44758 44759 44760 44761 44762 44763 44764 44765 44766 44767 44768 |
# File 'lib/ovirtsdk4/types.rb', line 44758 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.
44775 44776 44777 |
# File 'lib/ovirtsdk4/types.rb', line 44775 def on_boot @on_boot end |
#on_boot=(value) ⇒ Object
Sets the value of the on_boot
attribute.
44784 44785 44786 |
# File 'lib/ovirtsdk4/types.rb', line 44784 def on_boot=(value) @on_boot = value end |
#plugged ⇒ Boolean
Returns the value of the plugged
attribute.
44793 44794 44795 |
# File 'lib/ovirtsdk4/types.rb', line 44793 def plugged @plugged end |
#plugged=(value) ⇒ Object
Sets the value of the plugged
attribute.
44802 44803 44804 |
# File 'lib/ovirtsdk4/types.rb', line 44802 def plugged=(value) @plugged = value end |
#reported_devices ⇒ Array<ReportedDevice>
Returns the value of the reported_devices
attribute.
44811 44812 44813 |
# File 'lib/ovirtsdk4/types.rb', line 44811 def reported_devices @reported_devices end |
#reported_devices=(list) ⇒ Object
Sets the value of the reported_devices
attribute.
44820 44821 44822 44823 44824 44825 44826 44827 44828 44829 44830 |
# File 'lib/ovirtsdk4/types.rb', line 44820 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.
44837 44838 44839 |
# File 'lib/ovirtsdk4/types.rb', line 44837 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
44846 44847 44848 44849 44850 44851 44852 44853 44854 44855 44856 |
# File 'lib/ovirtsdk4/types.rb', line 44846 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.
44863 44864 44865 |
# File 'lib/ovirtsdk4/types.rb', line 44863 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.
44876 44877 44878 44879 44880 44881 |
# File 'lib/ovirtsdk4/types.rb', line 44876 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.
44888 44889 44890 |
# File 'lib/ovirtsdk4/types.rb', line 44888 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.
44897 44898 44899 44900 44901 44902 44903 44904 44905 44906 44907 |
# File 'lib/ovirtsdk4/types.rb', line 44897 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.
44914 44915 44916 |
# File 'lib/ovirtsdk4/types.rb', line 44914 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.
44923 44924 44925 44926 44927 44928 44929 44930 44931 44932 44933 |
# File 'lib/ovirtsdk4/types.rb', line 44923 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.
44940 44941 44942 |
# File 'lib/ovirtsdk4/types.rb', line 44940 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.
44953 44954 44955 44956 44957 44958 |
# File 'lib/ovirtsdk4/types.rb', line 44953 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.
44965 44966 44967 |
# File 'lib/ovirtsdk4/types.rb', line 44965 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
44974 44975 44976 44977 44978 44979 44980 44981 44982 44983 44984 |
# File 'lib/ovirtsdk4/types.rb', line 44974 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.
44991 44992 44993 |
# File 'lib/ovirtsdk4/types.rb', line 44991 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.
45004 45005 45006 45007 45008 45009 |
# File 'lib/ovirtsdk4/types.rb', line 45004 def vnic_profile=(value) if value.is_a?(Hash) value = VnicProfile.new(value) end @vnic_profile = value end |