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. -
#synced ⇒ Boolean
Returns the value of the
synced
attribute. -
#synced=(value) ⇒ Object
Sets the value of the
synced
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.
48561 48562 48563 48564 48565 48566 48567 48568 48569 48570 48571 48572 48573 48574 48575 48576 48577 48578 48579 |
# File 'lib/ovirtsdk4/types.rb', line 48561 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.
48584 48585 48586 48587 48588 48589 48590 48591 48592 48593 48594 48595 48596 48597 48598 48599 48600 48601 48602 |
# File 'lib/ovirtsdk4/types.rb', line 48584 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.
47972 47973 47974 |
# File 'lib/ovirtsdk4/types.rb', line 47972 def boot_protocol @boot_protocol end |
#boot_protocol=(value) ⇒ Object
Sets the value of the boot_protocol
attribute.
47981 47982 47983 |
# File 'lib/ovirtsdk4/types.rb', line 47981 def boot_protocol=(value) @boot_protocol = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
47990 47991 47992 |
# File 'lib/ovirtsdk4/types.rb', line 47990 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
47999 48000 48001 |
# File 'lib/ovirtsdk4/types.rb', line 47999 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
48008 48009 48010 |
# File 'lib/ovirtsdk4/types.rb', line 48008 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
48017 48018 48019 |
# File 'lib/ovirtsdk4/types.rb', line 48017 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
48607 48608 48609 48610 48611 48612 48613 48614 48615 48616 48617 48618 48619 48620 48621 48622 48623 48624 48625 |
# File 'lib/ovirtsdk4/types.rb', line 48607 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.
48026 48027 48028 |
# File 'lib/ovirtsdk4/types.rb', line 48026 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
48035 48036 48037 |
# File 'lib/ovirtsdk4/types.rb', line 48035 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type
attribute.
48044 48045 48046 |
# File 'lib/ovirtsdk4/types.rb', line 48044 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.
48057 48058 48059 48060 48061 48062 |
# File 'lib/ovirtsdk4/types.rb', line 48057 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.
48069 48070 48071 |
# File 'lib/ovirtsdk4/types.rb', line 48069 def interface @interface end |
#interface=(value) ⇒ Object
Sets the value of the interface
attribute.
48078 48079 48080 |
# File 'lib/ovirtsdk4/types.rb', line 48078 def interface=(value) @interface = value end |
#linked ⇒ Boolean
Returns the value of the linked
attribute.
48087 48088 48089 |
# File 'lib/ovirtsdk4/types.rb', line 48087 def linked @linked end |
#linked=(value) ⇒ Object
Sets the value of the linked
attribute.
48096 48097 48098 |
# File 'lib/ovirtsdk4/types.rb', line 48096 def linked=(value) @linked = value end |
#mac ⇒ Mac
Returns the value of the mac
attribute.
48105 48106 48107 |
# File 'lib/ovirtsdk4/types.rb', line 48105 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.
48118 48119 48120 48121 48122 48123 |
# File 'lib/ovirtsdk4/types.rb', line 48118 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.
48130 48131 48132 |
# File 'lib/ovirtsdk4/types.rb', line 48130 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
48139 48140 48141 |
# File 'lib/ovirtsdk4/types.rb', line 48139 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network
attribute.
48148 48149 48150 |
# File 'lib/ovirtsdk4/types.rb', line 48148 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.
48161 48162 48163 48164 48165 48166 |
# File 'lib/ovirtsdk4/types.rb', line 48161 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.
48173 48174 48175 |
# File 'lib/ovirtsdk4/types.rb', line 48173 def @network_attachments end |
#network_attachments=(list) ⇒ Object
Sets the value of the network_attachments
attribute.
48182 48183 48184 48185 48186 48187 48188 48189 48190 48191 48192 |
# File 'lib/ovirtsdk4/types.rb', line 48182 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.
48199 48200 48201 |
# File 'lib/ovirtsdk4/types.rb', line 48199 def network_filter_parameters @network_filter_parameters end |
#network_filter_parameters=(list) ⇒ Object
Sets the value of the network_filter_parameters
attribute.
48208 48209 48210 48211 48212 48213 48214 48215 48216 48217 48218 |
# File 'lib/ovirtsdk4/types.rb', line 48208 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.
48225 48226 48227 |
# File 'lib/ovirtsdk4/types.rb', line 48225 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels
attribute.
48234 48235 48236 48237 48238 48239 48240 48241 48242 48243 48244 |
# File 'lib/ovirtsdk4/types.rb', line 48234 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.
48251 48252 48253 |
# File 'lib/ovirtsdk4/types.rb', line 48251 def on_boot @on_boot end |
#on_boot=(value) ⇒ Object
Sets the value of the on_boot
attribute.
48260 48261 48262 |
# File 'lib/ovirtsdk4/types.rb', line 48260 def on_boot=(value) @on_boot = value end |
#plugged ⇒ Boolean
Returns the value of the plugged
attribute.
48269 48270 48271 |
# File 'lib/ovirtsdk4/types.rb', line 48269 def plugged @plugged end |
#plugged=(value) ⇒ Object
Sets the value of the plugged
attribute.
48278 48279 48280 |
# File 'lib/ovirtsdk4/types.rb', line 48278 def plugged=(value) @plugged = value end |
#reported_devices ⇒ Array<ReportedDevice>
Returns the value of the reported_devices
attribute.
48287 48288 48289 |
# File 'lib/ovirtsdk4/types.rb', line 48287 def reported_devices @reported_devices end |
#reported_devices=(list) ⇒ Object
Sets the value of the reported_devices
attribute.
48296 48297 48298 48299 48300 48301 48302 48303 48304 48305 48306 |
# File 'lib/ovirtsdk4/types.rb', line 48296 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.
48313 48314 48315 |
# File 'lib/ovirtsdk4/types.rb', line 48313 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
48322 48323 48324 48325 48326 48327 48328 48329 48330 48331 48332 |
# File 'lib/ovirtsdk4/types.rb', line 48322 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.
48339 48340 48341 |
# File 'lib/ovirtsdk4/types.rb', line 48339 def synced @synced end |
#synced=(value) ⇒ Object
Sets the value of the synced
attribute.
48348 48349 48350 |
# File 'lib/ovirtsdk4/types.rb', line 48348 def synced=(value) @synced = value end |
#template ⇒ Template
Returns the value of the template
attribute.
48357 48358 48359 |
# File 'lib/ovirtsdk4/types.rb', line 48357 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.
48370 48371 48372 48373 48374 48375 |
# File 'lib/ovirtsdk4/types.rb', line 48370 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.
48382 48383 48384 |
# File 'lib/ovirtsdk4/types.rb', line 48382 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.
48391 48392 48393 48394 48395 48396 48397 48398 48399 48400 48401 |
# File 'lib/ovirtsdk4/types.rb', line 48391 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.
48408 48409 48410 |
# File 'lib/ovirtsdk4/types.rb', line 48408 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.
48417 48418 48419 48420 48421 48422 48423 48424 48425 48426 48427 |
# File 'lib/ovirtsdk4/types.rb', line 48417 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.
48434 48435 48436 |
# File 'lib/ovirtsdk4/types.rb', line 48434 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.
48447 48448 48449 48450 48451 48452 |
# File 'lib/ovirtsdk4/types.rb', line 48447 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.
48459 48460 48461 |
# File 'lib/ovirtsdk4/types.rb', line 48459 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
48468 48469 48470 48471 48472 48473 48474 48475 48476 48477 48478 |
# File 'lib/ovirtsdk4/types.rb', line 48468 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.
48485 48486 48487 |
# File 'lib/ovirtsdk4/types.rb', line 48485 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.
48498 48499 48500 48501 48502 48503 |
# File 'lib/ovirtsdk4/types.rb', line 48498 def vnic_profile=(value) if value.is_a?(Hash) value = VnicProfile.new(value) end @vnic_profile = value end |