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
trueifselfandotherhave the same attributes and values. -
#ad_aggregator_id ⇒ Integer
Returns the value of the
ad_aggregator_idattribute. -
#ad_aggregator_id=(value) ⇒ Object
Sets the value of the
ad_aggregator_idattribute. -
#base_interface ⇒ String
Returns the value of the
base_interfaceattribute. -
#base_interface=(value) ⇒ Object
Sets the value of the
base_interfaceattribute. -
#bonding ⇒ Bonding
Returns the value of the
bondingattribute. -
#bonding=(value) ⇒ Object
Sets the value of the
bondingattribute. -
#boot_protocol ⇒ BootProtocol
Returns the value of the
boot_protocolattribute. -
#boot_protocol=(value) ⇒ Object
Sets the value of the
boot_protocolattribute. -
#bridged ⇒ Boolean
Returns the value of the
bridgedattribute. -
#bridged=(value) ⇒ Object
Sets the value of the
bridgedattribute. -
#check_connectivity ⇒ Boolean
Returns the value of the
check_connectivityattribute. -
#check_connectivity=(value) ⇒ Object
Sets the value of the
check_connectivityattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#custom_configuration ⇒ Boolean
Returns the value of the
custom_configurationattribute. -
#custom_configuration=(value) ⇒ Object
Sets the value of the
custom_configurationattribute. -
#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.
-
#host ⇒ Host
Returns the value of the
hostattribute. -
#host=(value) ⇒ Object
Sets the value of the
hostattribute. -
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ HostNic
constructor
Creates a new instance of the HostNic class.
-
#ip ⇒ Ip
Returns the value of the
ipattribute. -
#ip=(value) ⇒ Object
Sets the value of the
ipattribute. -
#ipv6 ⇒ Ip
Returns the value of the
ipv6attribute. -
#ipv6=(value) ⇒ Object
Sets the value of the
ipv6attribute. -
#ipv6_boot_protocol ⇒ BootProtocol
Returns the value of the
ipv6_boot_protocolattribute. -
#ipv6_boot_protocol=(value) ⇒ Object
Sets the value of the
ipv6_boot_protocolattribute. -
#mac ⇒ Mac
Returns the value of the
macattribute. -
#mac=(value) ⇒ Object
Sets the value of the
macattribute. -
#mtu ⇒ Integer
Returns the value of the
mtuattribute. -
#mtu=(value) ⇒ Object
Sets the value of the
mtuattribute. -
#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_labels ⇒ Array<NetworkLabel>
Returns the value of the
network_labelsattribute. -
#network_labels=(list) ⇒ Object
Sets the value of the
network_labelsattribute. -
#override_configuration ⇒ Boolean
Returns the value of the
override_configurationattribute. -
#override_configuration=(value) ⇒ Object
Sets the value of the
override_configurationattribute. -
#physical_function ⇒ HostNic
Returns the value of the
physical_functionattribute. -
#physical_function=(value) ⇒ Object
Sets the value of the
physical_functionattribute. -
#properties ⇒ Array<Property>
Returns the value of the
propertiesattribute. -
#properties=(list) ⇒ Object
Sets the value of the
propertiesattribute. -
#qos ⇒ Qos
Returns the value of the
qosattribute. -
#qos=(value) ⇒ Object
Sets the value of the
qosattribute. -
#speed ⇒ Integer
Returns the value of the
speedattribute. -
#speed=(value) ⇒ Object
Sets the value of the
speedattribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statisticsattribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statisticsattribute. -
#status ⇒ NicStatus
Returns the value of the
statusattribute. -
#status=(value) ⇒ Object
Sets the value of the
statusattribute. -
#virtual_functions_configuration ⇒ HostNicVirtualFunctionsConfiguration
Returns the value of the
virtual_functions_configurationattribute. -
#virtual_functions_configuration=(value) ⇒ Object
Sets the value of the
virtual_functions_configurationattribute. -
#vlan ⇒ Vlan
Returns the value of the
vlanattribute. -
#vlan=(value) ⇒ Object
Sets the value of the
vlanattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ HostNic
Creates a new instance of the OvirtSDK4::HostNic class.
44340 44341 44342 44343 44344 44345 44346 44347 44348 44349 44350 44351 44352 44353 44354 44355 44356 44357 44358 44359 44360 44361 44362 44363 44364 44365 44366 |
# File 'lib/ovirtsdk4/types.rb', line 44340 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.
44371 44372 44373 44374 44375 44376 44377 44378 44379 44380 44381 44382 44383 44384 44385 44386 44387 44388 44389 44390 44391 44392 44393 44394 44395 44396 44397 |
# File 'lib/ovirtsdk4/types.rb', line 44371 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.
43683 43684 43685 |
# File 'lib/ovirtsdk4/types.rb', line 43683 def ad_aggregator_id @ad_aggregator_id end |
#ad_aggregator_id=(value) ⇒ Object
Sets the value of the ad_aggregator_id attribute.
43692 43693 43694 |
# File 'lib/ovirtsdk4/types.rb', line 43692 def ad_aggregator_id=(value) @ad_aggregator_id = value end |
#base_interface ⇒ String
Returns the value of the base_interface attribute.
43701 43702 43703 |
# File 'lib/ovirtsdk4/types.rb', line 43701 def base_interface @base_interface end |
#base_interface=(value) ⇒ Object
Sets the value of the base_interface attribute.
43710 43711 43712 |
# File 'lib/ovirtsdk4/types.rb', line 43710 def base_interface=(value) @base_interface = value end |
#bonding ⇒ Bonding
Returns the value of the bonding attribute.
43719 43720 43721 |
# File 'lib/ovirtsdk4/types.rb', line 43719 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.
43732 43733 43734 43735 43736 43737 |
# File 'lib/ovirtsdk4/types.rb', line 43732 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.
43744 43745 43746 |
# File 'lib/ovirtsdk4/types.rb', line 43744 def boot_protocol @boot_protocol end |
#boot_protocol=(value) ⇒ Object
Sets the value of the boot_protocol attribute.
43753 43754 43755 |
# File 'lib/ovirtsdk4/types.rb', line 43753 def boot_protocol=(value) @boot_protocol = value end |
#bridged ⇒ Boolean
Returns the value of the bridged attribute.
43762 43763 43764 |
# File 'lib/ovirtsdk4/types.rb', line 43762 def bridged @bridged end |
#bridged=(value) ⇒ Object
Sets the value of the bridged attribute.
43771 43772 43773 |
# File 'lib/ovirtsdk4/types.rb', line 43771 def bridged=(value) @bridged = value end |
#check_connectivity ⇒ Boolean
Returns the value of the check_connectivity attribute.
43780 43781 43782 |
# File 'lib/ovirtsdk4/types.rb', line 43780 def check_connectivity @check_connectivity end |
#check_connectivity=(value) ⇒ Object
Sets the value of the check_connectivity attribute.
43789 43790 43791 |
# File 'lib/ovirtsdk4/types.rb', line 43789 def check_connectivity=(value) @check_connectivity = value end |
#comment ⇒ String
Returns the value of the comment attribute.
43798 43799 43800 |
# File 'lib/ovirtsdk4/types.rb', line 43798 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
43807 43808 43809 |
# File 'lib/ovirtsdk4/types.rb', line 43807 def comment=(value) @comment = value end |
#custom_configuration ⇒ Boolean
Returns the value of the custom_configuration attribute.
43816 43817 43818 |
# File 'lib/ovirtsdk4/types.rb', line 43816 def custom_configuration @custom_configuration end |
#custom_configuration=(value) ⇒ Object
Sets the value of the custom_configuration attribute.
43825 43826 43827 |
# File 'lib/ovirtsdk4/types.rb', line 43825 def custom_configuration=(value) @custom_configuration = value end |
#description ⇒ String
Returns the value of the description attribute.
43834 43835 43836 |
# File 'lib/ovirtsdk4/types.rb', line 43834 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
43843 43844 43845 |
# File 'lib/ovirtsdk4/types.rb', line 43843 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
44402 44403 44404 44405 44406 44407 44408 44409 44410 44411 44412 44413 44414 44415 44416 44417 44418 44419 44420 44421 44422 44423 44424 44425 44426 44427 44428 |
# File 'lib/ovirtsdk4/types.rb', line 44402 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.
43852 43853 43854 |
# File 'lib/ovirtsdk4/types.rb', line 43852 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.
43865 43866 43867 43868 43869 43870 |
# File 'lib/ovirtsdk4/types.rb', line 43865 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.
43877 43878 43879 |
# File 'lib/ovirtsdk4/types.rb', line 43877 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
43886 43887 43888 |
# File 'lib/ovirtsdk4/types.rb', line 43886 def id=(value) @id = value end |
#ip ⇒ Ip
Returns the value of the ip attribute.
43895 43896 43897 |
# File 'lib/ovirtsdk4/types.rb', line 43895 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.
43908 43909 43910 43911 43912 43913 |
# File 'lib/ovirtsdk4/types.rb', line 43908 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.
43920 43921 43922 |
# File 'lib/ovirtsdk4/types.rb', line 43920 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.
43933 43934 43935 43936 43937 43938 |
# File 'lib/ovirtsdk4/types.rb', line 43933 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.
43945 43946 43947 |
# File 'lib/ovirtsdk4/types.rb', line 43945 def ipv6_boot_protocol @ipv6_boot_protocol end |
#ipv6_boot_protocol=(value) ⇒ Object
Sets the value of the ipv6_boot_protocol attribute.
43954 43955 43956 |
# File 'lib/ovirtsdk4/types.rb', line 43954 def ipv6_boot_protocol=(value) @ipv6_boot_protocol = value end |
#mac ⇒ Mac
Returns the value of the mac attribute.
43963 43964 43965 |
# File 'lib/ovirtsdk4/types.rb', line 43963 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.
43976 43977 43978 43979 43980 43981 |
# File 'lib/ovirtsdk4/types.rb', line 43976 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.
43988 43989 43990 |
# File 'lib/ovirtsdk4/types.rb', line 43988 def mtu @mtu end |
#mtu=(value) ⇒ Object
Sets the value of the mtu attribute.
43997 43998 43999 |
# File 'lib/ovirtsdk4/types.rb', line 43997 def mtu=(value) @mtu = value end |
#name ⇒ String
Returns the value of the name attribute.
44006 44007 44008 |
# File 'lib/ovirtsdk4/types.rb', line 44006 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
44015 44016 44017 |
# File 'lib/ovirtsdk4/types.rb', line 44015 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network attribute.
44024 44025 44026 |
# File 'lib/ovirtsdk4/types.rb', line 44024 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.
44037 44038 44039 44040 44041 44042 |
# File 'lib/ovirtsdk4/types.rb', line 44037 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.
44049 44050 44051 |
# File 'lib/ovirtsdk4/types.rb', line 44049 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels attribute.
44058 44059 44060 44061 44062 44063 44064 44065 44066 44067 44068 |
# File 'lib/ovirtsdk4/types.rb', line 44058 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.
44075 44076 44077 |
# File 'lib/ovirtsdk4/types.rb', line 44075 def override_configuration @override_configuration end |
#override_configuration=(value) ⇒ Object
Sets the value of the override_configuration attribute.
44084 44085 44086 |
# File 'lib/ovirtsdk4/types.rb', line 44084 def override_configuration=(value) @override_configuration = value end |
#physical_function ⇒ HostNic
Returns the value of the physical_function attribute.
44093 44094 44095 |
# File 'lib/ovirtsdk4/types.rb', line 44093 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.
44106 44107 44108 44109 44110 44111 |
# File 'lib/ovirtsdk4/types.rb', line 44106 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.
44118 44119 44120 |
# File 'lib/ovirtsdk4/types.rb', line 44118 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties attribute.
44127 44128 44129 44130 44131 44132 44133 44134 44135 44136 44137 |
# File 'lib/ovirtsdk4/types.rb', line 44127 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.
44144 44145 44146 |
# File 'lib/ovirtsdk4/types.rb', line 44144 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.
44157 44158 44159 44160 44161 44162 |
# File 'lib/ovirtsdk4/types.rb', line 44157 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.
44169 44170 44171 |
# File 'lib/ovirtsdk4/types.rb', line 44169 def speed @speed end |
#speed=(value) ⇒ Object
Sets the value of the speed attribute.
44178 44179 44180 |
# File 'lib/ovirtsdk4/types.rb', line 44178 def speed=(value) @speed = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics attribute.
44187 44188 44189 |
# File 'lib/ovirtsdk4/types.rb', line 44187 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics attribute.
44196 44197 44198 44199 44200 44201 44202 44203 44204 44205 44206 |
# File 'lib/ovirtsdk4/types.rb', line 44196 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.
44213 44214 44215 |
# File 'lib/ovirtsdk4/types.rb', line 44213 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status attribute.
44222 44223 44224 |
# File 'lib/ovirtsdk4/types.rb', line 44222 def status=(value) @status = value end |
#virtual_functions_configuration ⇒ HostNicVirtualFunctionsConfiguration
Returns the value of the virtual_functions_configuration attribute.
44231 44232 44233 |
# File 'lib/ovirtsdk4/types.rb', line 44231 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.
44244 44245 44246 44247 44248 44249 |
# File 'lib/ovirtsdk4/types.rb', line 44244 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.
44256 44257 44258 |
# File 'lib/ovirtsdk4/types.rb', line 44256 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.
44269 44270 44271 44272 44273 44274 |
# File 'lib/ovirtsdk4/types.rb', line 44269 def vlan=(value) if value.is_a?(Hash) value = Vlan.new(value) end @vlan = value end |