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.
45749 45750 45751 45752 45753 45754 45755 45756 45757 45758 45759 45760 45761 45762 45763 45764 45765 45766 |
# File 'lib/ovirtsdk4/types.rb', line 45749 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.
45771 45772 45773 45774 45775 45776 45777 45778 45779 45780 45781 45782 45783 45784 45785 45786 45787 45788 |
# File 'lib/ovirtsdk4/types.rb', line 45771 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.
45180 45181 45182 |
# File 'lib/ovirtsdk4/types.rb', line 45180 def boot_protocol @boot_protocol end |
#boot_protocol=(value) ⇒ Object
Sets the value of the boot_protocol
attribute.
45189 45190 45191 |
# File 'lib/ovirtsdk4/types.rb', line 45189 def boot_protocol=(value) @boot_protocol = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
45198 45199 45200 |
# File 'lib/ovirtsdk4/types.rb', line 45198 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
45207 45208 45209 |
# File 'lib/ovirtsdk4/types.rb', line 45207 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
45216 45217 45218 |
# File 'lib/ovirtsdk4/types.rb', line 45216 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
45225 45226 45227 |
# File 'lib/ovirtsdk4/types.rb', line 45225 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
45793 45794 45795 45796 45797 45798 45799 45800 45801 45802 45803 45804 45805 45806 45807 45808 45809 45810 |
# File 'lib/ovirtsdk4/types.rb', line 45793 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.
45234 45235 45236 |
# File 'lib/ovirtsdk4/types.rb', line 45234 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
45243 45244 45245 |
# File 'lib/ovirtsdk4/types.rb', line 45243 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type
attribute.
45252 45253 45254 |
# File 'lib/ovirtsdk4/types.rb', line 45252 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.
45265 45266 45267 45268 45269 45270 |
# File 'lib/ovirtsdk4/types.rb', line 45265 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.
45277 45278 45279 |
# File 'lib/ovirtsdk4/types.rb', line 45277 def interface @interface end |
#interface=(value) ⇒ Object
Sets the value of the interface
attribute.
45286 45287 45288 |
# File 'lib/ovirtsdk4/types.rb', line 45286 def interface=(value) @interface = value end |
#linked ⇒ Boolean
Returns the value of the linked
attribute.
45295 45296 45297 |
# File 'lib/ovirtsdk4/types.rb', line 45295 def linked @linked end |
#linked=(value) ⇒ Object
Sets the value of the linked
attribute.
45304 45305 45306 |
# File 'lib/ovirtsdk4/types.rb', line 45304 def linked=(value) @linked = value end |
#mac ⇒ Mac
Returns the value of the mac
attribute.
45313 45314 45315 |
# File 'lib/ovirtsdk4/types.rb', line 45313 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.
45326 45327 45328 45329 45330 45331 |
# File 'lib/ovirtsdk4/types.rb', line 45326 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.
45338 45339 45340 |
# File 'lib/ovirtsdk4/types.rb', line 45338 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
45347 45348 45349 |
# File 'lib/ovirtsdk4/types.rb', line 45347 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network
attribute.
45356 45357 45358 |
# File 'lib/ovirtsdk4/types.rb', line 45356 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.
45369 45370 45371 45372 45373 45374 |
# File 'lib/ovirtsdk4/types.rb', line 45369 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.
45381 45382 45383 |
# File 'lib/ovirtsdk4/types.rb', line 45381 def @network_attachments end |
#network_attachments=(list) ⇒ Object
Sets the value of the network_attachments
attribute.
45390 45391 45392 45393 45394 45395 45396 45397 45398 45399 45400 |
# File 'lib/ovirtsdk4/types.rb', line 45390 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.
45407 45408 45409 |
# File 'lib/ovirtsdk4/types.rb', line 45407 def network_filter_parameters @network_filter_parameters end |
#network_filter_parameters=(list) ⇒ Object
Sets the value of the network_filter_parameters
attribute.
45416 45417 45418 45419 45420 45421 45422 45423 45424 45425 45426 |
# File 'lib/ovirtsdk4/types.rb', line 45416 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.
45433 45434 45435 |
# File 'lib/ovirtsdk4/types.rb', line 45433 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels
attribute.
45442 45443 45444 45445 45446 45447 45448 45449 45450 45451 45452 |
# File 'lib/ovirtsdk4/types.rb', line 45442 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.
45459 45460 45461 |
# File 'lib/ovirtsdk4/types.rb', line 45459 def on_boot @on_boot end |
#on_boot=(value) ⇒ Object
Sets the value of the on_boot
attribute.
45468 45469 45470 |
# File 'lib/ovirtsdk4/types.rb', line 45468 def on_boot=(value) @on_boot = value end |
#plugged ⇒ Boolean
Returns the value of the plugged
attribute.
45477 45478 45479 |
# File 'lib/ovirtsdk4/types.rb', line 45477 def plugged @plugged end |
#plugged=(value) ⇒ Object
Sets the value of the plugged
attribute.
45486 45487 45488 |
# File 'lib/ovirtsdk4/types.rb', line 45486 def plugged=(value) @plugged = value end |
#reported_devices ⇒ Array<ReportedDevice>
Returns the value of the reported_devices
attribute.
45495 45496 45497 |
# File 'lib/ovirtsdk4/types.rb', line 45495 def reported_devices @reported_devices end |
#reported_devices=(list) ⇒ Object
Sets the value of the reported_devices
attribute.
45504 45505 45506 45507 45508 45509 45510 45511 45512 45513 45514 |
# File 'lib/ovirtsdk4/types.rb', line 45504 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.
45521 45522 45523 |
# File 'lib/ovirtsdk4/types.rb', line 45521 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
45530 45531 45532 45533 45534 45535 45536 45537 45538 45539 45540 |
# File 'lib/ovirtsdk4/types.rb', line 45530 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.
45547 45548 45549 |
# File 'lib/ovirtsdk4/types.rb', line 45547 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.
45560 45561 45562 45563 45564 45565 |
# File 'lib/ovirtsdk4/types.rb', line 45560 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.
45572 45573 45574 |
# File 'lib/ovirtsdk4/types.rb', line 45572 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.
45581 45582 45583 45584 45585 45586 45587 45588 45589 45590 45591 |
# File 'lib/ovirtsdk4/types.rb', line 45581 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.
45598 45599 45600 |
# File 'lib/ovirtsdk4/types.rb', line 45598 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.
45607 45608 45609 45610 45611 45612 45613 45614 45615 45616 45617 |
# File 'lib/ovirtsdk4/types.rb', line 45607 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.
45624 45625 45626 |
# File 'lib/ovirtsdk4/types.rb', line 45624 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.
45637 45638 45639 45640 45641 45642 |
# File 'lib/ovirtsdk4/types.rb', line 45637 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.
45649 45650 45651 |
# File 'lib/ovirtsdk4/types.rb', line 45649 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
45658 45659 45660 45661 45662 45663 45664 45665 45666 45667 45668 |
# File 'lib/ovirtsdk4/types.rb', line 45658 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.
45675 45676 45677 |
# File 'lib/ovirtsdk4/types.rb', line 45675 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.
45688 45689 45690 45691 45692 45693 |
# File 'lib/ovirtsdk4/types.rb', line 45688 def vnic_profile=(value) if value.is_a?(Hash) value = VnicProfile.new(value) end @vnic_profile = value end |