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. -
#synced ⇒ Boolean
Returns the value of the
syncedattribute. -
#synced=(value) ⇒ Object
Sets the value of the
syncedattribute. -
#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.
48854 48855 48856 48857 48858 48859 48860 48861 48862 48863 48864 48865 48866 48867 48868 48869 48870 48871 48872 |
# 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. = 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 |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
48877 48878 48879 48880 48881 48882 48883 48884 48885 48886 48887 48888 48889 48890 48891 48892 48893 48894 48895 |
# 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_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 ⇒ BootProtocol
Returns the value of the boot_protocol attribute.
48265 48266 48267 |
# File 'lib/ovirtsdk4/types.rb', line 48265 def boot_protocol @boot_protocol end |
#boot_protocol=(value) ⇒ Object
Sets the value of the boot_protocol attribute.
48274 48275 48276 |
# File 'lib/ovirtsdk4/types.rb', line 48274 def boot_protocol=(value) @boot_protocol = value end |
#comment ⇒ String
Returns the value of the comment attribute.
48283 48284 48285 |
# File 'lib/ovirtsdk4/types.rb', line 48283 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
48292 48293 48294 |
# File 'lib/ovirtsdk4/types.rb', line 48292 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
48301 48302 48303 |
# File 'lib/ovirtsdk4/types.rb', line 48301 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
48310 48311 48312 |
# File 'lib/ovirtsdk4/types.rb', line 48310 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
48900 48901 48902 48903 48904 48905 48906 48907 48908 48909 48910 48911 48912 48913 48914 48915 48916 48917 48918 |
# 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 ⇒ String
Returns the value of the id attribute.
48319 48320 48321 |
# File 'lib/ovirtsdk4/types.rb', line 48319 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
48328 48329 48330 |
# File 'lib/ovirtsdk4/types.rb', line 48328 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type attribute.
48337 48338 48339 |
# File 'lib/ovirtsdk4/types.rb', line 48337 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.
48350 48351 48352 48353 48354 48355 |
# 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 ⇒ NicInterface
Returns the value of the interface attribute.
48362 48363 48364 |
# File 'lib/ovirtsdk4/types.rb', line 48362 def interface @interface end |
#interface=(value) ⇒ Object
Sets the value of the interface attribute.
48371 48372 48373 |
# File 'lib/ovirtsdk4/types.rb', line 48371 def interface=(value) @interface = value end |
#linked ⇒ Boolean
Returns the value of the linked attribute.
48380 48381 48382 |
# File 'lib/ovirtsdk4/types.rb', line 48380 def linked @linked end |
#linked=(value) ⇒ Object
Sets the value of the linked attribute.
48389 48390 48391 |
# File 'lib/ovirtsdk4/types.rb', line 48389 def linked=(value) @linked = value end |
#mac ⇒ Mac
Returns the value of the mac attribute.
48398 48399 48400 |
# File 'lib/ovirtsdk4/types.rb', line 48398 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.
48411 48412 48413 48414 48415 48416 |
# File 'lib/ovirtsdk4/types.rb', line 48411 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.
48423 48424 48425 |
# File 'lib/ovirtsdk4/types.rb', line 48423 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
48432 48433 48434 |
# File 'lib/ovirtsdk4/types.rb', line 48432 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network attribute.
48441 48442 48443 |
# File 'lib/ovirtsdk4/types.rb', line 48441 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.
48454 48455 48456 48457 48458 48459 |
# 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 ⇒ Array<NetworkAttachment>
Returns the value of the network_attachments attribute.
48466 48467 48468 |
# File 'lib/ovirtsdk4/types.rb', line 48466 def @network_attachments end |
#network_attachments=(list) ⇒ Object
Sets the value of the network_attachments attribute.
48475 48476 48477 48478 48479 48480 48481 48482 48483 48484 48485 |
# File 'lib/ovirtsdk4/types.rb', line 48475 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.
48492 48493 48494 |
# File 'lib/ovirtsdk4/types.rb', line 48492 def network_filter_parameters @network_filter_parameters end |
#network_filter_parameters=(list) ⇒ Object
Sets the value of the network_filter_parameters attribute.
48501 48502 48503 48504 48505 48506 48507 48508 48509 48510 48511 |
# 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 ⇒ Array<NetworkLabel>
Returns the value of the network_labels attribute.
48518 48519 48520 |
# File 'lib/ovirtsdk4/types.rb', line 48518 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels attribute.
48527 48528 48529 48530 48531 48532 48533 48534 48535 48536 48537 |
# 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 ⇒ Boolean
Returns the value of the on_boot attribute.
48544 48545 48546 |
# File 'lib/ovirtsdk4/types.rb', line 48544 def on_boot @on_boot end |
#on_boot=(value) ⇒ Object
Sets the value of the on_boot attribute.
48553 48554 48555 |
# File 'lib/ovirtsdk4/types.rb', line 48553 def on_boot=(value) @on_boot = value end |
#plugged ⇒ Boolean
Returns the value of the plugged attribute.
48562 48563 48564 |
# File 'lib/ovirtsdk4/types.rb', line 48562 def plugged @plugged end |
#plugged=(value) ⇒ Object
Sets the value of the plugged attribute.
48571 48572 48573 |
# File 'lib/ovirtsdk4/types.rb', line 48571 def plugged=(value) @plugged = value end |
#reported_devices ⇒ Array<ReportedDevice>
Returns the value of the reported_devices attribute.
48580 48581 48582 |
# File 'lib/ovirtsdk4/types.rb', line 48580 def reported_devices @reported_devices end |
#reported_devices=(list) ⇒ Object
Sets the value of the reported_devices attribute.
48589 48590 48591 48592 48593 48594 48595 48596 48597 48598 48599 |
# 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 ⇒ Array<Statistic>
Returns the value of the statistics attribute.
48606 48607 48608 |
# File 'lib/ovirtsdk4/types.rb', line 48606 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics attribute.
48615 48616 48617 48618 48619 48620 48621 48622 48623 48624 48625 |
# 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 ⇒ Boolean
Returns the value of the synced attribute.
48632 48633 48634 |
# File 'lib/ovirtsdk4/types.rb', line 48632 def synced @synced end |
#synced=(value) ⇒ Object
Sets the value of the synced attribute.
48641 48642 48643 |
# File 'lib/ovirtsdk4/types.rb', line 48641 def synced=(value) @synced = value end |
#template ⇒ Template
Returns the value of the template attribute.
48650 48651 48652 |
# File 'lib/ovirtsdk4/types.rb', line 48650 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.
48663 48664 48665 48666 48667 48668 |
# 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 ⇒ Array<NetworkLabel>
Returns the value of the virtual_function_allowed_labels attribute.
48675 48676 48677 |
# File 'lib/ovirtsdk4/types.rb', line 48675 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.
48684 48685 48686 48687 48688 48689 48690 48691 48692 48693 48694 |
# 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 ⇒ Array<Network>
Returns the value of the virtual_function_allowed_networks attribute.
48701 48702 48703 |
# File 'lib/ovirtsdk4/types.rb', line 48701 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.
48710 48711 48712 48713 48714 48715 48716 48717 48718 48719 48720 |
# 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 ⇒ Vm
Returns the value of the vm attribute.
48727 48728 48729 |
# File 'lib/ovirtsdk4/types.rb', line 48727 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.
48740 48741 48742 48743 48744 48745 |
# File 'lib/ovirtsdk4/types.rb', line 48740 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.
48752 48753 48754 |
# File 'lib/ovirtsdk4/types.rb', line 48752 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms attribute.
48761 48762 48763 48764 48765 48766 48767 48768 48769 48770 48771 |
# 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 ⇒ VnicProfile
Returns the value of the vnic_profile attribute.
48778 48779 48780 |
# File 'lib/ovirtsdk4/types.rb', line 48778 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.
48791 48792 48793 48794 48795 48796 |
# 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 |