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.
47399 47400 47401 47402 47403 47404 47405 47406 47407 47408 47409 47410 47411 47412 47413 47414 47415 47416 |
# File 'lib/ovirtsdk4/types.rb', line 47399 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.
47421 47422 47423 47424 47425 47426 47427 47428 47429 47430 47431 47432 47433 47434 47435 47436 47437 47438 |
# File 'lib/ovirtsdk4/types.rb', line 47421 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.
46830 46831 46832 |
# File 'lib/ovirtsdk4/types.rb', line 46830 def boot_protocol @boot_protocol end |
#boot_protocol=(value) ⇒ Object
Sets the value of the boot_protocol
attribute.
46839 46840 46841 |
# File 'lib/ovirtsdk4/types.rb', line 46839 def boot_protocol=(value) @boot_protocol = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
46848 46849 46850 |
# File 'lib/ovirtsdk4/types.rb', line 46848 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
46857 46858 46859 |
# File 'lib/ovirtsdk4/types.rb', line 46857 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
46866 46867 46868 |
# File 'lib/ovirtsdk4/types.rb', line 46866 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
46875 46876 46877 |
# File 'lib/ovirtsdk4/types.rb', line 46875 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
47443 47444 47445 47446 47447 47448 47449 47450 47451 47452 47453 47454 47455 47456 47457 47458 47459 47460 |
# File 'lib/ovirtsdk4/types.rb', line 47443 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.
46884 46885 46886 |
# File 'lib/ovirtsdk4/types.rb', line 46884 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
46893 46894 46895 |
# File 'lib/ovirtsdk4/types.rb', line 46893 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type
attribute.
46902 46903 46904 |
# File 'lib/ovirtsdk4/types.rb', line 46902 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.
46915 46916 46917 46918 46919 46920 |
# File 'lib/ovirtsdk4/types.rb', line 46915 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.
46927 46928 46929 |
# File 'lib/ovirtsdk4/types.rb', line 46927 def interface @interface end |
#interface=(value) ⇒ Object
Sets the value of the interface
attribute.
46936 46937 46938 |
# File 'lib/ovirtsdk4/types.rb', line 46936 def interface=(value) @interface = value end |
#linked ⇒ Boolean
Returns the value of the linked
attribute.
46945 46946 46947 |
# File 'lib/ovirtsdk4/types.rb', line 46945 def linked @linked end |
#linked=(value) ⇒ Object
Sets the value of the linked
attribute.
46954 46955 46956 |
# File 'lib/ovirtsdk4/types.rb', line 46954 def linked=(value) @linked = value end |
#mac ⇒ Mac
Returns the value of the mac
attribute.
46963 46964 46965 |
# File 'lib/ovirtsdk4/types.rb', line 46963 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.
46976 46977 46978 46979 46980 46981 |
# File 'lib/ovirtsdk4/types.rb', line 46976 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.
46988 46989 46990 |
# File 'lib/ovirtsdk4/types.rb', line 46988 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
46997 46998 46999 |
# File 'lib/ovirtsdk4/types.rb', line 46997 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network
attribute.
47006 47007 47008 |
# File 'lib/ovirtsdk4/types.rb', line 47006 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.
47019 47020 47021 47022 47023 47024 |
# File 'lib/ovirtsdk4/types.rb', line 47019 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.
47031 47032 47033 |
# File 'lib/ovirtsdk4/types.rb', line 47031 def @network_attachments end |
#network_attachments=(list) ⇒ Object
Sets the value of the network_attachments
attribute.
47040 47041 47042 47043 47044 47045 47046 47047 47048 47049 47050 |
# File 'lib/ovirtsdk4/types.rb', line 47040 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.
47057 47058 47059 |
# File 'lib/ovirtsdk4/types.rb', line 47057 def network_filter_parameters @network_filter_parameters end |
#network_filter_parameters=(list) ⇒ Object
Sets the value of the network_filter_parameters
attribute.
47066 47067 47068 47069 47070 47071 47072 47073 47074 47075 47076 |
# File 'lib/ovirtsdk4/types.rb', line 47066 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.
47083 47084 47085 |
# File 'lib/ovirtsdk4/types.rb', line 47083 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels
attribute.
47092 47093 47094 47095 47096 47097 47098 47099 47100 47101 47102 |
# File 'lib/ovirtsdk4/types.rb', line 47092 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.
47109 47110 47111 |
# File 'lib/ovirtsdk4/types.rb', line 47109 def on_boot @on_boot end |
#on_boot=(value) ⇒ Object
Sets the value of the on_boot
attribute.
47118 47119 47120 |
# File 'lib/ovirtsdk4/types.rb', line 47118 def on_boot=(value) @on_boot = value end |
#plugged ⇒ Boolean
Returns the value of the plugged
attribute.
47127 47128 47129 |
# File 'lib/ovirtsdk4/types.rb', line 47127 def plugged @plugged end |
#plugged=(value) ⇒ Object
Sets the value of the plugged
attribute.
47136 47137 47138 |
# File 'lib/ovirtsdk4/types.rb', line 47136 def plugged=(value) @plugged = value end |
#reported_devices ⇒ Array<ReportedDevice>
Returns the value of the reported_devices
attribute.
47145 47146 47147 |
# File 'lib/ovirtsdk4/types.rb', line 47145 def reported_devices @reported_devices end |
#reported_devices=(list) ⇒ Object
Sets the value of the reported_devices
attribute.
47154 47155 47156 47157 47158 47159 47160 47161 47162 47163 47164 |
# File 'lib/ovirtsdk4/types.rb', line 47154 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.
47171 47172 47173 |
# File 'lib/ovirtsdk4/types.rb', line 47171 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
47180 47181 47182 47183 47184 47185 47186 47187 47188 47189 47190 |
# File 'lib/ovirtsdk4/types.rb', line 47180 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.
47197 47198 47199 |
# File 'lib/ovirtsdk4/types.rb', line 47197 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.
47210 47211 47212 47213 47214 47215 |
# File 'lib/ovirtsdk4/types.rb', line 47210 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.
47222 47223 47224 |
# File 'lib/ovirtsdk4/types.rb', line 47222 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.
47231 47232 47233 47234 47235 47236 47237 47238 47239 47240 47241 |
# File 'lib/ovirtsdk4/types.rb', line 47231 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.
47248 47249 47250 |
# File 'lib/ovirtsdk4/types.rb', line 47248 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.
47257 47258 47259 47260 47261 47262 47263 47264 47265 47266 47267 |
# File 'lib/ovirtsdk4/types.rb', line 47257 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.
47274 47275 47276 |
# File 'lib/ovirtsdk4/types.rb', line 47274 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.
47287 47288 47289 47290 47291 47292 |
# File 'lib/ovirtsdk4/types.rb', line 47287 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.
47299 47300 47301 |
# File 'lib/ovirtsdk4/types.rb', line 47299 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
47308 47309 47310 47311 47312 47313 47314 47315 47316 47317 47318 |
# File 'lib/ovirtsdk4/types.rb', line 47308 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.
47325 47326 47327 |
# File 'lib/ovirtsdk4/types.rb', line 47325 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.
47338 47339 47340 47341 47342 47343 |
# File 'lib/ovirtsdk4/types.rb', line 47338 def vnic_profile=(value) if value.is_a?(Hash) value = VnicProfile.new(value) end @vnic_profile = value end |