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.
45990 45991 45992 45993 45994 45995 45996 45997 45998 45999 46000 46001 46002 46003 46004 46005 46006 46007 46008 46009 46010 46011 46012 46013 46014 46015 46016 |
# File 'lib/ovirtsdk4/types.rb', line 45990 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.
46021 46022 46023 46024 46025 46026 46027 46028 46029 46030 46031 46032 46033 46034 46035 46036 46037 46038 46039 46040 46041 46042 46043 46044 46045 46046 46047 |
# File 'lib/ovirtsdk4/types.rb', line 46021 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.
45333 45334 45335 |
# File 'lib/ovirtsdk4/types.rb', line 45333 def ad_aggregator_id @ad_aggregator_id end |
#ad_aggregator_id=(value) ⇒ Object
Sets the value of the ad_aggregator_id
attribute.
45342 45343 45344 |
# File 'lib/ovirtsdk4/types.rb', line 45342 def ad_aggregator_id=(value) @ad_aggregator_id = value end |
#base_interface ⇒ String
Returns the value of the base_interface
attribute.
45351 45352 45353 |
# File 'lib/ovirtsdk4/types.rb', line 45351 def base_interface @base_interface end |
#base_interface=(value) ⇒ Object
Sets the value of the base_interface
attribute.
45360 45361 45362 |
# File 'lib/ovirtsdk4/types.rb', line 45360 def base_interface=(value) @base_interface = value end |
#bonding ⇒ Bonding
Returns the value of the bonding
attribute.
45369 45370 45371 |
# File 'lib/ovirtsdk4/types.rb', line 45369 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.
45382 45383 45384 45385 45386 45387 |
# File 'lib/ovirtsdk4/types.rb', line 45382 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.
45394 45395 45396 |
# File 'lib/ovirtsdk4/types.rb', line 45394 def boot_protocol @boot_protocol end |
#boot_protocol=(value) ⇒ Object
Sets the value of the boot_protocol
attribute.
45403 45404 45405 |
# File 'lib/ovirtsdk4/types.rb', line 45403 def boot_protocol=(value) @boot_protocol = value end |
#bridged ⇒ Boolean
Returns the value of the bridged
attribute.
45412 45413 45414 |
# File 'lib/ovirtsdk4/types.rb', line 45412 def bridged @bridged end |
#bridged=(value) ⇒ Object
Sets the value of the bridged
attribute.
45421 45422 45423 |
# File 'lib/ovirtsdk4/types.rb', line 45421 def bridged=(value) @bridged = value end |
#check_connectivity ⇒ Boolean
Returns the value of the check_connectivity
attribute.
45430 45431 45432 |
# File 'lib/ovirtsdk4/types.rb', line 45430 def check_connectivity @check_connectivity end |
#check_connectivity=(value) ⇒ Object
Sets the value of the check_connectivity
attribute.
45439 45440 45441 |
# File 'lib/ovirtsdk4/types.rb', line 45439 def check_connectivity=(value) @check_connectivity = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
45448 45449 45450 |
# File 'lib/ovirtsdk4/types.rb', line 45448 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
45457 45458 45459 |
# File 'lib/ovirtsdk4/types.rb', line 45457 def comment=(value) @comment = value end |
#custom_configuration ⇒ Boolean
Returns the value of the custom_configuration
attribute.
45466 45467 45468 |
# File 'lib/ovirtsdk4/types.rb', line 45466 def custom_configuration @custom_configuration end |
#custom_configuration=(value) ⇒ Object
Sets the value of the custom_configuration
attribute.
45475 45476 45477 |
# File 'lib/ovirtsdk4/types.rb', line 45475 def custom_configuration=(value) @custom_configuration = value end |
#description ⇒ String
Returns the value of the description
attribute.
45484 45485 45486 |
# File 'lib/ovirtsdk4/types.rb', line 45484 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
45493 45494 45495 |
# File 'lib/ovirtsdk4/types.rb', line 45493 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
46052 46053 46054 46055 46056 46057 46058 46059 46060 46061 46062 46063 46064 46065 46066 46067 46068 46069 46070 46071 46072 46073 46074 46075 46076 46077 46078 |
# File 'lib/ovirtsdk4/types.rb', line 46052 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.
45502 45503 45504 |
# File 'lib/ovirtsdk4/types.rb', line 45502 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.
45515 45516 45517 45518 45519 45520 |
# File 'lib/ovirtsdk4/types.rb', line 45515 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.
45527 45528 45529 |
# File 'lib/ovirtsdk4/types.rb', line 45527 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
45536 45537 45538 |
# File 'lib/ovirtsdk4/types.rb', line 45536 def id=(value) @id = value end |
#ip ⇒ Ip
Returns the value of the ip
attribute.
45545 45546 45547 |
# File 'lib/ovirtsdk4/types.rb', line 45545 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.
45558 45559 45560 45561 45562 45563 |
# File 'lib/ovirtsdk4/types.rb', line 45558 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.
45570 45571 45572 |
# File 'lib/ovirtsdk4/types.rb', line 45570 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.
45583 45584 45585 45586 45587 45588 |
# File 'lib/ovirtsdk4/types.rb', line 45583 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.
45595 45596 45597 |
# File 'lib/ovirtsdk4/types.rb', line 45595 def ipv6_boot_protocol @ipv6_boot_protocol end |
#ipv6_boot_protocol=(value) ⇒ Object
Sets the value of the ipv6_boot_protocol
attribute.
45604 45605 45606 |
# File 'lib/ovirtsdk4/types.rb', line 45604 def ipv6_boot_protocol=(value) @ipv6_boot_protocol = value end |
#mac ⇒ Mac
Returns the value of the mac
attribute.
45613 45614 45615 |
# File 'lib/ovirtsdk4/types.rb', line 45613 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.
45626 45627 45628 45629 45630 45631 |
# File 'lib/ovirtsdk4/types.rb', line 45626 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.
45638 45639 45640 |
# File 'lib/ovirtsdk4/types.rb', line 45638 def mtu @mtu end |
#mtu=(value) ⇒ Object
Sets the value of the mtu
attribute.
45647 45648 45649 |
# File 'lib/ovirtsdk4/types.rb', line 45647 def mtu=(value) @mtu = value end |
#name ⇒ String
Returns the value of the name
attribute.
45656 45657 45658 |
# File 'lib/ovirtsdk4/types.rb', line 45656 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
45665 45666 45667 |
# File 'lib/ovirtsdk4/types.rb', line 45665 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network
attribute.
45674 45675 45676 |
# File 'lib/ovirtsdk4/types.rb', line 45674 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.
45687 45688 45689 45690 45691 45692 |
# File 'lib/ovirtsdk4/types.rb', line 45687 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.
45699 45700 45701 |
# File 'lib/ovirtsdk4/types.rb', line 45699 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels
attribute.
45708 45709 45710 45711 45712 45713 45714 45715 45716 45717 45718 |
# File 'lib/ovirtsdk4/types.rb', line 45708 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.
45725 45726 45727 |
# File 'lib/ovirtsdk4/types.rb', line 45725 def override_configuration @override_configuration end |
#override_configuration=(value) ⇒ Object
Sets the value of the override_configuration
attribute.
45734 45735 45736 |
# File 'lib/ovirtsdk4/types.rb', line 45734 def override_configuration=(value) @override_configuration = value end |
#physical_function ⇒ HostNic
Returns the value of the physical_function
attribute.
45743 45744 45745 |
# File 'lib/ovirtsdk4/types.rb', line 45743 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.
45756 45757 45758 45759 45760 45761 |
# File 'lib/ovirtsdk4/types.rb', line 45756 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.
45768 45769 45770 |
# File 'lib/ovirtsdk4/types.rb', line 45768 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties
attribute.
45777 45778 45779 45780 45781 45782 45783 45784 45785 45786 45787 |
# File 'lib/ovirtsdk4/types.rb', line 45777 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.
45794 45795 45796 |
# File 'lib/ovirtsdk4/types.rb', line 45794 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.
45807 45808 45809 45810 45811 45812 |
# File 'lib/ovirtsdk4/types.rb', line 45807 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.
45819 45820 45821 |
# File 'lib/ovirtsdk4/types.rb', line 45819 def speed @speed end |
#speed=(value) ⇒ Object
Sets the value of the speed
attribute.
45828 45829 45830 |
# File 'lib/ovirtsdk4/types.rb', line 45828 def speed=(value) @speed = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
45837 45838 45839 |
# File 'lib/ovirtsdk4/types.rb', line 45837 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
45846 45847 45848 45849 45850 45851 45852 45853 45854 45855 45856 |
# File 'lib/ovirtsdk4/types.rb', line 45846 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.
45863 45864 45865 |
# File 'lib/ovirtsdk4/types.rb', line 45863 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
45872 45873 45874 |
# File 'lib/ovirtsdk4/types.rb', line 45872 def status=(value) @status = value end |
#virtual_functions_configuration ⇒ HostNicVirtualFunctionsConfiguration
Returns the value of the virtual_functions_configuration
attribute.
45881 45882 45883 |
# File 'lib/ovirtsdk4/types.rb', line 45881 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.
45894 45895 45896 45897 45898 45899 |
# File 'lib/ovirtsdk4/types.rb', line 45894 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.
45906 45907 45908 |
# File 'lib/ovirtsdk4/types.rb', line 45906 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.
45919 45920 45921 45922 45923 45924 |
# File 'lib/ovirtsdk4/types.rb', line 45919 def vlan=(value) if value.is_a?(Hash) value = Vlan.new(value) end @vlan = value end |