Class: OvirtSDK4::ExternalDiscoveredHost

Inherits:
Identified 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 = {}) ⇒ ExternalDiscoveredHost

Creates a new instance of the OvirtSDK4::ExternalDiscoveredHost 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):

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :external_host_provider (ExternalHostProvider, Hash)

    The value of attribute external_host_provider.

  • :id (String)

    The value of attribute id.

  • :ip (String)

    The value of attribute ip.

  • :last_report (String)

    The value of attribute last_report.

  • :mac (String)

    The value of attribute mac.

  • :name (String)

    The value of attribute name.

  • :subnet_name (String)

    The value of attribute subnet_name.


38417
38418
38419
38420
38421
38422
38423
38424
# File 'lib/ovirtsdk4/types.rb', line 38417

def initialize(opts = {})
  super(opts)
  self.external_host_provider = opts[:external_host_provider]
  self.ip = opts[:ip]
  self.last_report = opts[:last_report]
  self.mac = opts[:mac]
  self.subnet_name = opts[:subnet_name]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.


38429
38430
38431
38432
38433
38434
38435
38436
# File 'lib/ovirtsdk4/types.rb', line 38429

def ==(other)
  super &&
  @external_host_provider == other.external_host_provider &&
  @ip == other.ip &&
  @last_report == other.last_report &&
  @mac == other.mac &&
  @subnet_name == other.subnet_name
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

38227
38228
38229
# File 'lib/ovirtsdk4/types.rb', line 38227

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

38236
38237
38238
# File 'lib/ovirtsdk4/types.rb', line 38236

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

38245
38246
38247
# File 'lib/ovirtsdk4/types.rb', line 38245

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

38254
38255
38256
# File 'lib/ovirtsdk4/types.rb', line 38254

def description=(value)
  @description = value
end

#external_host_providerExternalHostProvider

Returns the value of the external_host_provider attribute.


38263
38264
38265
# File 'lib/ovirtsdk4/types.rb', line 38263

def external_host_provider
  @external_host_provider
end

#external_host_provider=(value) ⇒ Object

Sets the value of the external_host_provider attribute.

The value parameter can be an instance of OvirtSDK4::ExternalHostProvider 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:


38276
38277
38278
38279
38280
38281
# File 'lib/ovirtsdk4/types.rb', line 38276

def external_host_provider=(value)
  if value.is_a?(Hash)
    value = ExternalHostProvider.new(value)
  end
  @external_host_provider = value
end

#hashObject

Generates a hash value for this object.


38441
38442
38443
38444
38445
38446
38447
38448
# File 'lib/ovirtsdk4/types.rb', line 38441

def hash
  super +
  @external_host_provider.hash +
  @ip.hash +
  @last_report.hash +
  @mac.hash +
  @subnet_name.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)

38288
38289
38290
# File 'lib/ovirtsdk4/types.rb', line 38288

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

38297
38298
38299
# File 'lib/ovirtsdk4/types.rb', line 38297

def id=(value)
  @id = value
end

#ipString

Returns the value of the ip attribute.

Returns:

  • (String)

38306
38307
38308
# File 'lib/ovirtsdk4/types.rb', line 38306

def ip
  @ip
end

#ip=(value) ⇒ Object

Sets the value of the ip attribute.

Parameters:

  • value (String)

38315
38316
38317
# File 'lib/ovirtsdk4/types.rb', line 38315

def ip=(value)
  @ip = value
end

#last_reportString

Returns the value of the last_report attribute.

Returns:

  • (String)

38324
38325
38326
# File 'lib/ovirtsdk4/types.rb', line 38324

def last_report
  @last_report
end

#last_report=(value) ⇒ Object

Sets the value of the last_report attribute.

Parameters:

  • value (String)

38333
38334
38335
# File 'lib/ovirtsdk4/types.rb', line 38333

def last_report=(value)
  @last_report = value
end

#macString

Returns the value of the mac attribute.

Returns:

  • (String)

38342
38343
38344
# File 'lib/ovirtsdk4/types.rb', line 38342

def mac
  @mac
end

#mac=(value) ⇒ Object

Sets the value of the mac attribute.

Parameters:

  • value (String)

38351
38352
38353
# File 'lib/ovirtsdk4/types.rb', line 38351

def mac=(value)
  @mac = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

38360
38361
38362
# File 'lib/ovirtsdk4/types.rb', line 38360

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

38369
38370
38371
# File 'lib/ovirtsdk4/types.rb', line 38369

def name=(value)
  @name = value
end

#subnet_nameString

Returns the value of the subnet_name attribute.

Returns:

  • (String)

38378
38379
38380
# File 'lib/ovirtsdk4/types.rb', line 38378

def subnet_name
  @subnet_name
end

#subnet_name=(value) ⇒ Object

Sets the value of the subnet_name attribute.

Parameters:

  • value (String)

38387
38388
38389
# File 'lib/ovirtsdk4/types.rb', line 38387

def subnet_name=(value)
  @subnet_name = value
end