Class: OvirtSDK4::NicConfiguration

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ NicConfiguration

Creates a new instance of the OvirtSDK4::NicConfiguration class.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :boot_protocol (BootProtocol)

    The value of attribute boot_protocol.

  • :ip (Ip, Hash)

    The value of attribute ip.

  • :ipv6 (Ip, Hash)

    The value of attribute ipv6.

  • :ipv6_boot_protocol (BootProtocol)

    The value of attribute ipv6_boot_protocol.

  • :name (String)

    The value of attribute name.

  • :on_boot (Boolean)

    The value of attribute on_boot.



11231
11232
11233
11234
11235
11236
11237
11238
11239
# File 'lib/ovirtsdk4/types.rb', line 11231

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.



11244
11245
11246
11247
11248
11249
11250
11251
11252
# File 'lib/ovirtsdk4/types.rb', line 11244

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_protocolBootProtocol

Returns the value of the boot_protocol attribute.

Returns:



11094
11095
11096
# File 'lib/ovirtsdk4/types.rb', line 11094

def boot_protocol
  @boot_protocol
end

#boot_protocol=(value) ⇒ Object

Sets the value of the boot_protocol attribute.

Parameters:



11103
11104
11105
# File 'lib/ovirtsdk4/types.rb', line 11103

def boot_protocol=(value)
  @boot_protocol = value
end

#hashObject

Generates a hash value for this object.



11257
11258
11259
11260
11261
11262
11263
11264
11265
# File 'lib/ovirtsdk4/types.rb', line 11257

def hash
  super +
  @boot_protocol.hash +
  @ip.hash +
  @ipv6.hash +
  @ipv6_boot_protocol.hash +
  @name.hash +
  @on_boot.hash
end

#ipIp

Returns the value of the ip attribute.

Returns:



11112
11113
11114
# File 'lib/ovirtsdk4/types.rb', line 11112

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.

Parameters:

  • value (Ip, Hash)


11125
11126
11127
11128
11129
11130
# File 'lib/ovirtsdk4/types.rb', line 11125

def ip=(value)
  if value.is_a?(Hash)
    value = Ip.new(value)
  end
  @ip = value
end

#ipv6Ip

Returns the value of the ipv6 attribute.

Returns:



11137
11138
11139
# File 'lib/ovirtsdk4/types.rb', line 11137

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.

Parameters:

  • value (Ip, Hash)


11150
11151
11152
11153
11154
11155
# File 'lib/ovirtsdk4/types.rb', line 11150

def ipv6=(value)
  if value.is_a?(Hash)
    value = Ip.new(value)
  end
  @ipv6 = value
end

#ipv6_boot_protocolBootProtocol

Returns the value of the ipv6_boot_protocol attribute.

Returns:



11162
11163
11164
# File 'lib/ovirtsdk4/types.rb', line 11162

def ipv6_boot_protocol
  @ipv6_boot_protocol
end

#ipv6_boot_protocol=(value) ⇒ Object

Sets the value of the ipv6_boot_protocol attribute.

Parameters:



11171
11172
11173
# File 'lib/ovirtsdk4/types.rb', line 11171

def ipv6_boot_protocol=(value)
  @ipv6_boot_protocol = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


11180
11181
11182
# File 'lib/ovirtsdk4/types.rb', line 11180

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


11189
11190
11191
# File 'lib/ovirtsdk4/types.rb', line 11189

def name=(value)
  @name = value
end

#on_bootBoolean

Returns the value of the on_boot attribute.

Returns:

  • (Boolean)


11198
11199
11200
# File 'lib/ovirtsdk4/types.rb', line 11198

def on_boot
  @on_boot
end

#on_boot=(value) ⇒ Object

Sets the value of the on_boot attribute.

Parameters:

  • value (Boolean)


11207
11208
11209
# File 'lib/ovirtsdk4/types.rb', line 11207

def on_boot=(value)
  @on_boot = value
end