Class: OvirtSDK4::HostNic
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::HostNic
- 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. -
#ad_aggregator_id ⇒ Integer
Returns the value of the
ad_aggregator_id
attribute. -
#ad_aggregator_id=(value) ⇒ Object
Sets the value of the
ad_aggregator_id
attribute. -
#base_interface ⇒ String
Returns the value of the
base_interface
attribute. -
#base_interface=(value) ⇒ Object
Sets the value of the
base_interface
attribute. -
#bonding ⇒ Bonding
Returns the value of the
bonding
attribute. -
#bonding=(value) ⇒ Object
Sets the value of the
bonding
attribute. -
#boot_protocol ⇒ BootProtocol
Returns the value of the
boot_protocol
attribute. -
#boot_protocol=(value) ⇒ Object
Sets the value of the
boot_protocol
attribute. -
#bridged ⇒ Boolean
Returns the value of the
bridged
attribute. -
#bridged=(value) ⇒ Object
Sets the value of the
bridged
attribute. -
#check_connectivity ⇒ Boolean
Returns the value of the
check_connectivity
attribute. -
#check_connectivity=(value) ⇒ Object
Sets the value of the
check_connectivity
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#custom_configuration ⇒ Boolean
Returns the value of the
custom_configuration
attribute. -
#custom_configuration=(value) ⇒ Object
Sets the value of the
custom_configuration
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.
-
#host ⇒ Host
Returns the value of the
host
attribute. -
#host=(value) ⇒ Object
Sets the value of the
host
attribute. -
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ HostNic
constructor
Creates a new instance of the HostNic class.
-
#ip ⇒ Ip
Returns the value of the
ip
attribute. -
#ip=(value) ⇒ Object
Sets the value of the
ip
attribute. -
#ipv6 ⇒ Ip
Returns the value of the
ipv6
attribute. -
#ipv6=(value) ⇒ Object
Sets the value of the
ipv6
attribute. -
#ipv6_boot_protocol ⇒ BootProtocol
Returns the value of the
ipv6_boot_protocol
attribute. -
#ipv6_boot_protocol=(value) ⇒ Object
Sets the value of the
ipv6_boot_protocol
attribute. -
#mac ⇒ Mac
Returns the value of the
mac
attribute. -
#mac=(value) ⇒ Object
Sets the value of the
mac
attribute. -
#mtu ⇒ Integer
Returns the value of the
mtu
attribute. -
#mtu=(value) ⇒ Object
Sets the value of the
mtu
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_labels ⇒ Array<NetworkLabel>
Returns the value of the
network_labels
attribute. -
#network_labels=(list) ⇒ Object
Sets the value of the
network_labels
attribute. -
#override_configuration ⇒ Boolean
Returns the value of the
override_configuration
attribute. -
#override_configuration=(value) ⇒ Object
Sets the value of the
override_configuration
attribute. -
#physical_function ⇒ HostNic
Returns the value of the
physical_function
attribute. -
#physical_function=(value) ⇒ Object
Sets the value of the
physical_function
attribute. -
#properties ⇒ Array<Property>
Returns the value of the
properties
attribute. -
#properties=(list) ⇒ Object
Sets the value of the
properties
attribute. -
#qos ⇒ Qos
Returns the value of the
qos
attribute. -
#qos=(value) ⇒ Object
Sets the value of the
qos
attribute. -
#speed ⇒ Integer
Returns the value of the
speed
attribute. -
#speed=(value) ⇒ Object
Sets the value of the
speed
attribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statistics
attribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statistics
attribute. -
#status ⇒ NicStatus
Returns the value of the
status
attribute. -
#status=(value) ⇒ Object
Sets the value of the
status
attribute. -
#virtual_functions_configuration ⇒ HostNicVirtualFunctionsConfiguration
Returns the value of the
virtual_functions_configuration
attribute. -
#virtual_functions_configuration=(value) ⇒ Object
Sets the value of the
virtual_functions_configuration
attribute. -
#vlan ⇒ Vlan
Returns the value of the
vlan
attribute. -
#vlan=(value) ⇒ Object
Sets the value of the
vlan
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ HostNic
Creates a new instance of the OvirtSDK4::HostNic class.
43718 43719 43720 43721 43722 43723 43724 43725 43726 43727 43728 43729 43730 43731 43732 43733 43734 43735 43736 43737 43738 43739 43740 43741 43742 43743 43744 |
# File 'lib/ovirtsdk4/types.rb', line 43718 def initialize(opts = {}) super(opts) self.ad_aggregator_id = opts[:ad_aggregator_id] self.base_interface = opts[:base_interface] self.bonding = opts[:bonding] self.boot_protocol = opts[:boot_protocol] self.bridged = opts[:bridged] self.check_connectivity = opts[:check_connectivity] self.custom_configuration = opts[:custom_configuration] self.host = opts[:host] self.ip = opts[:ip] self.ipv6 = opts[:ipv6] self.ipv6_boot_protocol = opts[:ipv6_boot_protocol] self.mac = opts[:mac] self.mtu = opts[:mtu] self.network = opts[:network] self.network_labels = opts[:network_labels] self.override_configuration = opts[:override_configuration] self.physical_function = opts[:physical_function] self.properties = opts[:properties] self.qos = opts[:qos] self.speed = opts[:speed] self.statistics = opts[:statistics] self.status = opts[:status] self.virtual_functions_configuration = opts[:virtual_functions_configuration] self.vlan = opts[:vlan] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
43749 43750 43751 43752 43753 43754 43755 43756 43757 43758 43759 43760 43761 43762 43763 43764 43765 43766 43767 43768 43769 43770 43771 43772 43773 43774 43775 |
# File 'lib/ovirtsdk4/types.rb', line 43749 def ==(other) super && @ad_aggregator_id == other.ad_aggregator_id && @base_interface == other.base_interface && @bonding == other.bonding && @boot_protocol == other.boot_protocol && @bridged == other.bridged && @check_connectivity == other.check_connectivity && @custom_configuration == other.custom_configuration && @host == other.host && @ip == other.ip && @ipv6 == other.ipv6 && @ipv6_boot_protocol == other.ipv6_boot_protocol && @mac == other.mac && @mtu == other.mtu && @network == other.network && @network_labels == other.network_labels && @override_configuration == other.override_configuration && @physical_function == other.physical_function && @properties == other.properties && @qos == other.qos && @speed == other.speed && @statistics == other.statistics && @status == other.status && @virtual_functions_configuration == other.virtual_functions_configuration && @vlan == other.vlan end |
#ad_aggregator_id ⇒ Integer
Returns the value of the ad_aggregator_id
attribute.
43061 43062 43063 |
# File 'lib/ovirtsdk4/types.rb', line 43061 def ad_aggregator_id @ad_aggregator_id end |
#ad_aggregator_id=(value) ⇒ Object
Sets the value of the ad_aggregator_id
attribute.
43070 43071 43072 |
# File 'lib/ovirtsdk4/types.rb', line 43070 def ad_aggregator_id=(value) @ad_aggregator_id = value end |
#base_interface ⇒ String
Returns the value of the base_interface
attribute.
43079 43080 43081 |
# File 'lib/ovirtsdk4/types.rb', line 43079 def base_interface @base_interface end |
#base_interface=(value) ⇒ Object
Sets the value of the base_interface
attribute.
43088 43089 43090 |
# File 'lib/ovirtsdk4/types.rb', line 43088 def base_interface=(value) @base_interface = value end |
#bonding ⇒ Bonding
Returns the value of the bonding
attribute.
43097 43098 43099 |
# File 'lib/ovirtsdk4/types.rb', line 43097 def bonding @bonding end |
#bonding=(value) ⇒ Object
Sets the value of the bonding
attribute.
The value
parameter can be an instance of Bonding 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.
43110 43111 43112 43113 43114 43115 |
# File 'lib/ovirtsdk4/types.rb', line 43110 def bonding=(value) if value.is_a?(Hash) value = Bonding.new(value) end @bonding = value end |
#boot_protocol ⇒ BootProtocol
Returns the value of the boot_protocol
attribute.
43122 43123 43124 |
# File 'lib/ovirtsdk4/types.rb', line 43122 def boot_protocol @boot_protocol end |
#boot_protocol=(value) ⇒ Object
Sets the value of the boot_protocol
attribute.
43131 43132 43133 |
# File 'lib/ovirtsdk4/types.rb', line 43131 def boot_protocol=(value) @boot_protocol = value end |
#bridged ⇒ Boolean
Returns the value of the bridged
attribute.
43140 43141 43142 |
# File 'lib/ovirtsdk4/types.rb', line 43140 def bridged @bridged end |
#bridged=(value) ⇒ Object
Sets the value of the bridged
attribute.
43149 43150 43151 |
# File 'lib/ovirtsdk4/types.rb', line 43149 def bridged=(value) @bridged = value end |
#check_connectivity ⇒ Boolean
Returns the value of the check_connectivity
attribute.
43158 43159 43160 |
# File 'lib/ovirtsdk4/types.rb', line 43158 def check_connectivity @check_connectivity end |
#check_connectivity=(value) ⇒ Object
Sets the value of the check_connectivity
attribute.
43167 43168 43169 |
# File 'lib/ovirtsdk4/types.rb', line 43167 def check_connectivity=(value) @check_connectivity = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
43176 43177 43178 |
# File 'lib/ovirtsdk4/types.rb', line 43176 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
43185 43186 43187 |
# File 'lib/ovirtsdk4/types.rb', line 43185 def comment=(value) @comment = value end |
#custom_configuration ⇒ Boolean
Returns the value of the custom_configuration
attribute.
43194 43195 43196 |
# File 'lib/ovirtsdk4/types.rb', line 43194 def custom_configuration @custom_configuration end |
#custom_configuration=(value) ⇒ Object
Sets the value of the custom_configuration
attribute.
43203 43204 43205 |
# File 'lib/ovirtsdk4/types.rb', line 43203 def custom_configuration=(value) @custom_configuration = value end |
#description ⇒ String
Returns the value of the description
attribute.
43212 43213 43214 |
# File 'lib/ovirtsdk4/types.rb', line 43212 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
43221 43222 43223 |
# File 'lib/ovirtsdk4/types.rb', line 43221 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
43780 43781 43782 43783 43784 43785 43786 43787 43788 43789 43790 43791 43792 43793 43794 43795 43796 43797 43798 43799 43800 43801 43802 43803 43804 43805 43806 |
# File 'lib/ovirtsdk4/types.rb', line 43780 def hash super + @ad_aggregator_id.hash + @base_interface.hash + @bonding.hash + @boot_protocol.hash + @bridged.hash + @check_connectivity.hash + @custom_configuration.hash + @host.hash + @ip.hash + @ipv6.hash + @ipv6_boot_protocol.hash + @mac.hash + @mtu.hash + @network.hash + @network_labels.hash + @override_configuration.hash + @physical_function.hash + @properties.hash + @qos.hash + @speed.hash + @statistics.hash + @status.hash + @virtual_functions_configuration.hash + @vlan.hash end |
#host ⇒ Host
Returns the value of the host
attribute.
43230 43231 43232 |
# File 'lib/ovirtsdk4/types.rb', line 43230 def host @host end |
#host=(value) ⇒ Object
Sets the value of the host
attribute.
The value
parameter can be an instance of OvirtSDK4::Host 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.
43243 43244 43245 43246 43247 43248 |
# File 'lib/ovirtsdk4/types.rb', line 43243 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end |
#id ⇒ String
Returns the value of the id
attribute.
43255 43256 43257 |
# File 'lib/ovirtsdk4/types.rb', line 43255 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
43264 43265 43266 |
# File 'lib/ovirtsdk4/types.rb', line 43264 def id=(value) @id = value end |
#ip ⇒ Ip
Returns the value of the ip
attribute.
43273 43274 43275 |
# File 'lib/ovirtsdk4/types.rb', line 43273 def ip @ip end |
#ip=(value) ⇒ Object
Sets the value of the ip
attribute.
The value
parameter can be an instance of Ip 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.
43286 43287 43288 43289 43290 43291 |
# File 'lib/ovirtsdk4/types.rb', line 43286 def ip=(value) if value.is_a?(Hash) value = Ip.new(value) end @ip = value end |
#ipv6 ⇒ Ip
Returns the value of the ipv6
attribute.
43298 43299 43300 |
# File 'lib/ovirtsdk4/types.rb', line 43298 def ipv6 @ipv6 end |
#ipv6=(value) ⇒ Object
Sets the value of the ipv6
attribute.
The value
parameter can be an instance of Ip 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.
43311 43312 43313 43314 43315 43316 |
# File 'lib/ovirtsdk4/types.rb', line 43311 def ipv6=(value) if value.is_a?(Hash) value = Ip.new(value) end @ipv6 = value end |
#ipv6_boot_protocol ⇒ BootProtocol
Returns the value of the ipv6_boot_protocol
attribute.
43323 43324 43325 |
# File 'lib/ovirtsdk4/types.rb', line 43323 def ipv6_boot_protocol @ipv6_boot_protocol end |
#ipv6_boot_protocol=(value) ⇒ Object
Sets the value of the ipv6_boot_protocol
attribute.
43332 43333 43334 |
# File 'lib/ovirtsdk4/types.rb', line 43332 def ipv6_boot_protocol=(value) @ipv6_boot_protocol = value end |
#mac ⇒ Mac
Returns the value of the mac
attribute.
43341 43342 43343 |
# File 'lib/ovirtsdk4/types.rb', line 43341 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.
43354 43355 43356 43357 43358 43359 |
# File 'lib/ovirtsdk4/types.rb', line 43354 def mac=(value) if value.is_a?(Hash) value = Mac.new(value) end @mac = value end |
#mtu ⇒ Integer
Returns the value of the mtu
attribute.
43366 43367 43368 |
# File 'lib/ovirtsdk4/types.rb', line 43366 def mtu @mtu end |
#mtu=(value) ⇒ Object
Sets the value of the mtu
attribute.
43375 43376 43377 |
# File 'lib/ovirtsdk4/types.rb', line 43375 def mtu=(value) @mtu = value end |
#name ⇒ String
Returns the value of the name
attribute.
43384 43385 43386 |
# File 'lib/ovirtsdk4/types.rb', line 43384 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
43393 43394 43395 |
# File 'lib/ovirtsdk4/types.rb', line 43393 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network
attribute.
43402 43403 43404 |
# File 'lib/ovirtsdk4/types.rb', line 43402 def network @network end |
#network=(value) ⇒ Object
Sets the value of the network
attribute.
The value
parameter can be an instance of 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.
43415 43416 43417 43418 43419 43420 |
# File 'lib/ovirtsdk4/types.rb', line 43415 def network=(value) if value.is_a?(Hash) value = Network.new(value) end @network = value end |
#network_labels ⇒ Array<NetworkLabel>
Returns the value of the network_labels
attribute.
43427 43428 43429 |
# File 'lib/ovirtsdk4/types.rb', line 43427 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels
attribute.
43436 43437 43438 43439 43440 43441 43442 43443 43444 43445 43446 |
# File 'lib/ovirtsdk4/types.rb', line 43436 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 |
#override_configuration ⇒ Boolean
Returns the value of the override_configuration
attribute.
43453 43454 43455 |
# File 'lib/ovirtsdk4/types.rb', line 43453 def override_configuration @override_configuration end |
#override_configuration=(value) ⇒ Object
Sets the value of the override_configuration
attribute.
43462 43463 43464 |
# File 'lib/ovirtsdk4/types.rb', line 43462 def override_configuration=(value) @override_configuration = value end |
#physical_function ⇒ HostNic
Returns the value of the physical_function
attribute.
43471 43472 43473 |
# File 'lib/ovirtsdk4/types.rb', line 43471 def physical_function @physical_function end |
#physical_function=(value) ⇒ Object
Sets the value of the physical_function
attribute.
The value
parameter can be an instance of OvirtSDK4::HostNic 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.
43484 43485 43486 43487 43488 43489 |
# File 'lib/ovirtsdk4/types.rb', line 43484 def physical_function=(value) if value.is_a?(Hash) value = HostNic.new(value) end @physical_function = value end |
#properties ⇒ Array<Property>
Returns the value of the properties
attribute.
43496 43497 43498 |
# File 'lib/ovirtsdk4/types.rb', line 43496 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties
attribute.
43505 43506 43507 43508 43509 43510 43511 43512 43513 43514 43515 |
# File 'lib/ovirtsdk4/types.rb', line 43505 def properties=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Property.new(value) end end end @properties = list end |
#qos ⇒ Qos
Returns the value of the qos
attribute.
43522 43523 43524 |
# File 'lib/ovirtsdk4/types.rb', line 43522 def qos @qos end |
#qos=(value) ⇒ Object
Sets the value of the qos
attribute.
The value
parameter can be an instance of Qos 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.
43535 43536 43537 43538 43539 43540 |
# File 'lib/ovirtsdk4/types.rb', line 43535 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end |
#speed ⇒ Integer
Returns the value of the speed
attribute.
43547 43548 43549 |
# File 'lib/ovirtsdk4/types.rb', line 43547 def speed @speed end |
#speed=(value) ⇒ Object
Sets the value of the speed
attribute.
43556 43557 43558 |
# File 'lib/ovirtsdk4/types.rb', line 43556 def speed=(value) @speed = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
43565 43566 43567 |
# File 'lib/ovirtsdk4/types.rb', line 43565 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
43574 43575 43576 43577 43578 43579 43580 43581 43582 43583 43584 |
# File 'lib/ovirtsdk4/types.rb', line 43574 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 |
#status ⇒ NicStatus
Returns the value of the status
attribute.
43591 43592 43593 |
# File 'lib/ovirtsdk4/types.rb', line 43591 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
43600 43601 43602 |
# File 'lib/ovirtsdk4/types.rb', line 43600 def status=(value) @status = value end |
#virtual_functions_configuration ⇒ HostNicVirtualFunctionsConfiguration
Returns the value of the virtual_functions_configuration
attribute.
43609 43610 43611 |
# File 'lib/ovirtsdk4/types.rb', line 43609 def virtual_functions_configuration @virtual_functions_configuration end |
#virtual_functions_configuration=(value) ⇒ Object
Sets the value of the virtual_functions_configuration
attribute.
The value
parameter can be an instance of OvirtSDK4::HostNicVirtualFunctionsConfiguration 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.
43622 43623 43624 43625 43626 43627 |
# File 'lib/ovirtsdk4/types.rb', line 43622 def virtual_functions_configuration=(value) if value.is_a?(Hash) value = HostNicVirtualFunctionsConfiguration.new(value) end @virtual_functions_configuration = value end |
#vlan ⇒ Vlan
Returns the value of the vlan
attribute.
43634 43635 43636 |
# File 'lib/ovirtsdk4/types.rb', line 43634 def vlan @vlan end |
#vlan=(value) ⇒ Object
Sets the value of the vlan
attribute.
The value
parameter can be an instance of Vlan 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.
43647 43648 43649 43650 43651 43652 |
# File 'lib/ovirtsdk4/types.rb', line 43647 def vlan=(value) if value.is_a?(Hash) value = Vlan.new(value) end @vlan = value end |