Class: OvirtSDK4::NicConfiguration
- 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. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ NicConfiguration
constructor
Creates a new instance of the NicConfiguration 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. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#on_boot ⇒ Boolean
Returns the value of the
on_boot
attribute. -
#on_boot=(value) ⇒ Object
Sets the value of the
on_boot
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ NicConfiguration
Creates a new instance of the OvirtSDK4::NicConfiguration class.
11234 11235 11236 11237 11238 11239 11240 11241 11242 |
# File 'lib/ovirtsdk4/types.rb', line 11234 def initialize(opts = {}) super(opts) self.boot_protocol = opts[:boot_protocol] self.ip = opts[:ip] self.ipv6 = opts[:ipv6] self.ipv6_boot_protocol = opts[:ipv6_boot_protocol] self.name = opts[:name] self.on_boot = opts[:on_boot] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
11247 11248 11249 11250 11251 11252 11253 11254 11255 |
# File 'lib/ovirtsdk4/types.rb', line 11247 def ==(other) super && @boot_protocol == other.boot_protocol && @ip == other.ip && @ipv6 == other.ipv6 && @ipv6_boot_protocol == other.ipv6_boot_protocol && @name == other.name && @on_boot == other.on_boot end |
#boot_protocol ⇒ BootProtocol
Returns the value of the boot_protocol
attribute.
11097 11098 11099 |
# File 'lib/ovirtsdk4/types.rb', line 11097 def boot_protocol @boot_protocol end |
#boot_protocol=(value) ⇒ Object
Sets the value of the boot_protocol
attribute.
11106 11107 11108 |
# File 'lib/ovirtsdk4/types.rb', line 11106 def boot_protocol=(value) @boot_protocol = value end |
#hash ⇒ Object
Generates a hash value for this object.
11260 11261 11262 11263 11264 11265 11266 11267 11268 |
# File 'lib/ovirtsdk4/types.rb', line 11260 def hash super + @boot_protocol.hash + @ip.hash + @ipv6.hash + @ipv6_boot_protocol.hash + @name.hash + @on_boot.hash end |
#ip ⇒ Ip
Returns the value of the ip
attribute.
11115 11116 11117 |
# File 'lib/ovirtsdk4/types.rb', line 11115 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.
11128 11129 11130 11131 11132 11133 |
# File 'lib/ovirtsdk4/types.rb', line 11128 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.
11140 11141 11142 |
# File 'lib/ovirtsdk4/types.rb', line 11140 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.
11153 11154 11155 11156 11157 11158 |
# File 'lib/ovirtsdk4/types.rb', line 11153 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.
11165 11166 11167 |
# File 'lib/ovirtsdk4/types.rb', line 11165 def ipv6_boot_protocol @ipv6_boot_protocol end |
#ipv6_boot_protocol=(value) ⇒ Object
Sets the value of the ipv6_boot_protocol
attribute.
11174 11175 11176 |
# File 'lib/ovirtsdk4/types.rb', line 11174 def ipv6_boot_protocol=(value) @ipv6_boot_protocol = value end |
#name ⇒ String
Returns the value of the name
attribute.
11183 11184 11185 |
# File 'lib/ovirtsdk4/types.rb', line 11183 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
11192 11193 11194 |
# File 'lib/ovirtsdk4/types.rb', line 11192 def name=(value) @name = value end |
#on_boot ⇒ Boolean
Returns the value of the on_boot
attribute.
11201 11202 11203 |
# File 'lib/ovirtsdk4/types.rb', line 11201 def on_boot @on_boot end |
#on_boot=(value) ⇒ Object
Sets the value of the on_boot
attribute.
11210 11211 11212 |
# File 'lib/ovirtsdk4/types.rb', line 11210 def on_boot=(value) @on_boot = value end |