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.
47132 47133 47134 47135 47136 47137 47138 47139 47140 47141 47142 47143 47144 47145 47146 47147 47148 47149 47150 47151 47152 47153 47154 47155 47156 47157 47158 |
# File 'lib/ovirtsdk4/types.rb', line 47132 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.
47163 47164 47165 47166 47167 47168 47169 47170 47171 47172 47173 47174 47175 47176 47177 47178 47179 47180 47181 47182 47183 47184 47185 47186 47187 47188 47189 |
# File 'lib/ovirtsdk4/types.rb', line 47163 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.
46475 46476 46477 |
# File 'lib/ovirtsdk4/types.rb', line 46475 def ad_aggregator_id @ad_aggregator_id end |
#ad_aggregator_id=(value) ⇒ Object
Sets the value of the ad_aggregator_id
attribute.
46484 46485 46486 |
# File 'lib/ovirtsdk4/types.rb', line 46484 def ad_aggregator_id=(value) @ad_aggregator_id = value end |
#base_interface ⇒ String
Returns the value of the base_interface
attribute.
46493 46494 46495 |
# File 'lib/ovirtsdk4/types.rb', line 46493 def base_interface @base_interface end |
#base_interface=(value) ⇒ Object
Sets the value of the base_interface
attribute.
46502 46503 46504 |
# File 'lib/ovirtsdk4/types.rb', line 46502 def base_interface=(value) @base_interface = value end |
#bonding ⇒ Bonding
Returns the value of the bonding
attribute.
46511 46512 46513 |
# File 'lib/ovirtsdk4/types.rb', line 46511 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.
46524 46525 46526 46527 46528 46529 |
# File 'lib/ovirtsdk4/types.rb', line 46524 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.
46536 46537 46538 |
# File 'lib/ovirtsdk4/types.rb', line 46536 def boot_protocol @boot_protocol end |
#boot_protocol=(value) ⇒ Object
Sets the value of the boot_protocol
attribute.
46545 46546 46547 |
# File 'lib/ovirtsdk4/types.rb', line 46545 def boot_protocol=(value) @boot_protocol = value end |
#bridged ⇒ Boolean
Returns the value of the bridged
attribute.
46554 46555 46556 |
# File 'lib/ovirtsdk4/types.rb', line 46554 def bridged @bridged end |
#bridged=(value) ⇒ Object
Sets the value of the bridged
attribute.
46563 46564 46565 |
# File 'lib/ovirtsdk4/types.rb', line 46563 def bridged=(value) @bridged = value end |
#check_connectivity ⇒ Boolean
Returns the value of the check_connectivity
attribute.
46572 46573 46574 |
# File 'lib/ovirtsdk4/types.rb', line 46572 def check_connectivity @check_connectivity end |
#check_connectivity=(value) ⇒ Object
Sets the value of the check_connectivity
attribute.
46581 46582 46583 |
# File 'lib/ovirtsdk4/types.rb', line 46581 def check_connectivity=(value) @check_connectivity = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
46590 46591 46592 |
# File 'lib/ovirtsdk4/types.rb', line 46590 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
46599 46600 46601 |
# File 'lib/ovirtsdk4/types.rb', line 46599 def comment=(value) @comment = value end |
#custom_configuration ⇒ Boolean
Returns the value of the custom_configuration
attribute.
46608 46609 46610 |
# File 'lib/ovirtsdk4/types.rb', line 46608 def custom_configuration @custom_configuration end |
#custom_configuration=(value) ⇒ Object
Sets the value of the custom_configuration
attribute.
46617 46618 46619 |
# File 'lib/ovirtsdk4/types.rb', line 46617 def custom_configuration=(value) @custom_configuration = value end |
#description ⇒ String
Returns the value of the description
attribute.
46626 46627 46628 |
# File 'lib/ovirtsdk4/types.rb', line 46626 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
46635 46636 46637 |
# File 'lib/ovirtsdk4/types.rb', line 46635 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
47194 47195 47196 47197 47198 47199 47200 47201 47202 47203 47204 47205 47206 47207 47208 47209 47210 47211 47212 47213 47214 47215 47216 47217 47218 47219 47220 |
# File 'lib/ovirtsdk4/types.rb', line 47194 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.
46644 46645 46646 |
# File 'lib/ovirtsdk4/types.rb', line 46644 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.
46657 46658 46659 46660 46661 46662 |
# File 'lib/ovirtsdk4/types.rb', line 46657 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.
46669 46670 46671 |
# File 'lib/ovirtsdk4/types.rb', line 46669 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
46678 46679 46680 |
# File 'lib/ovirtsdk4/types.rb', line 46678 def id=(value) @id = value end |
#ip ⇒ Ip
Returns the value of the ip
attribute.
46687 46688 46689 |
# File 'lib/ovirtsdk4/types.rb', line 46687 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.
46700 46701 46702 46703 46704 46705 |
# File 'lib/ovirtsdk4/types.rb', line 46700 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.
46712 46713 46714 |
# File 'lib/ovirtsdk4/types.rb', line 46712 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.
46725 46726 46727 46728 46729 46730 |
# File 'lib/ovirtsdk4/types.rb', line 46725 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.
46737 46738 46739 |
# File 'lib/ovirtsdk4/types.rb', line 46737 def ipv6_boot_protocol @ipv6_boot_protocol end |
#ipv6_boot_protocol=(value) ⇒ Object
Sets the value of the ipv6_boot_protocol
attribute.
46746 46747 46748 |
# File 'lib/ovirtsdk4/types.rb', line 46746 def ipv6_boot_protocol=(value) @ipv6_boot_protocol = value end |
#mac ⇒ Mac
Returns the value of the mac
attribute.
46755 46756 46757 |
# File 'lib/ovirtsdk4/types.rb', line 46755 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.
46768 46769 46770 46771 46772 46773 |
# File 'lib/ovirtsdk4/types.rb', line 46768 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.
46780 46781 46782 |
# File 'lib/ovirtsdk4/types.rb', line 46780 def mtu @mtu end |
#mtu=(value) ⇒ Object
Sets the value of the mtu
attribute.
46789 46790 46791 |
# File 'lib/ovirtsdk4/types.rb', line 46789 def mtu=(value) @mtu = value end |
#name ⇒ String
Returns the value of the name
attribute.
46798 46799 46800 |
# File 'lib/ovirtsdk4/types.rb', line 46798 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
46807 46808 46809 |
# File 'lib/ovirtsdk4/types.rb', line 46807 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network
attribute.
46816 46817 46818 |
# File 'lib/ovirtsdk4/types.rb', line 46816 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.
46829 46830 46831 46832 46833 46834 |
# File 'lib/ovirtsdk4/types.rb', line 46829 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.
46841 46842 46843 |
# File 'lib/ovirtsdk4/types.rb', line 46841 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels
attribute.
46850 46851 46852 46853 46854 46855 46856 46857 46858 46859 46860 |
# File 'lib/ovirtsdk4/types.rb', line 46850 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.
46867 46868 46869 |
# File 'lib/ovirtsdk4/types.rb', line 46867 def override_configuration @override_configuration end |
#override_configuration=(value) ⇒ Object
Sets the value of the override_configuration
attribute.
46876 46877 46878 |
# File 'lib/ovirtsdk4/types.rb', line 46876 def override_configuration=(value) @override_configuration = value end |
#physical_function ⇒ HostNic
Returns the value of the physical_function
attribute.
46885 46886 46887 |
# File 'lib/ovirtsdk4/types.rb', line 46885 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.
46898 46899 46900 46901 46902 46903 |
# File 'lib/ovirtsdk4/types.rb', line 46898 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.
46910 46911 46912 |
# File 'lib/ovirtsdk4/types.rb', line 46910 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties
attribute.
46919 46920 46921 46922 46923 46924 46925 46926 46927 46928 46929 |
# File 'lib/ovirtsdk4/types.rb', line 46919 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.
46936 46937 46938 |
# File 'lib/ovirtsdk4/types.rb', line 46936 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.
46949 46950 46951 46952 46953 46954 |
# File 'lib/ovirtsdk4/types.rb', line 46949 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.
46961 46962 46963 |
# File 'lib/ovirtsdk4/types.rb', line 46961 def speed @speed end |
#speed=(value) ⇒ Object
Sets the value of the speed
attribute.
46970 46971 46972 |
# File 'lib/ovirtsdk4/types.rb', line 46970 def speed=(value) @speed = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
46979 46980 46981 |
# File 'lib/ovirtsdk4/types.rb', line 46979 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
46988 46989 46990 46991 46992 46993 46994 46995 46996 46997 46998 |
# File 'lib/ovirtsdk4/types.rb', line 46988 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.
47005 47006 47007 |
# File 'lib/ovirtsdk4/types.rb', line 47005 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
47014 47015 47016 |
# File 'lib/ovirtsdk4/types.rb', line 47014 def status=(value) @status = value end |
#virtual_functions_configuration ⇒ HostNicVirtualFunctionsConfiguration
Returns the value of the virtual_functions_configuration
attribute.
47023 47024 47025 |
# File 'lib/ovirtsdk4/types.rb', line 47023 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.
47036 47037 47038 47039 47040 47041 |
# File 'lib/ovirtsdk4/types.rb', line 47036 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.
47048 47049 47050 |
# File 'lib/ovirtsdk4/types.rb', line 47048 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.
47061 47062 47063 47064 47065 47066 |
# File 'lib/ovirtsdk4/types.rb', line 47061 def vlan=(value) if value.is_a?(Hash) value = Vlan.new(value) end @vlan = value end |