Class: OvirtSDK4::OpenStackVolumeProvider

Inherits:
OpenStackProvider 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 = {}) ⇒ OpenStackVolumeProvider

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

  • :authentication_keys (Array<OpenstackVolumeAuthenticationKey>, Array<Hash>)

    The values of attribute authentication_keys.

  • :authentication_url (String)

    The value of attribute authentication_url.

  • :certificates (Array<Certificate>, Array<Hash>)

    The values of attribute certificates.

  • :comment (String)

    The value of attribute comment.

  • :data_center (DataCenter, Hash)

    The value of attribute data_center.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :password (String)

    The value of attribute password.

  • :properties (Array<Property>, Array<Hash>)

    The values of attribute properties.

  • :requires_authentication (Boolean)

    The value of attribute requires_authentication.

  • :tenant_name (String)

    The value of attribute tenant_name.

  • :url (String)

    The value of attribute url.

  • :username (String)

    The value of attribute username.

  • :volume_types (Array<OpenStackVolumeType>, Array<Hash>)

    The values of attribute volume_types.



49532
49533
49534
49535
49536
49537
49538
# File 'lib/ovirtsdk4/types.rb', line 49532

def initialize(opts = {})
  super(opts)
  self.authentication_keys = opts[:authentication_keys]
  self.certificates = opts[:certificates]
  self.data_center = opts[:data_center]
  self.volume_types = opts[:volume_types]
end

Instance Method Details

#==(other) ⇒ Object

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



49543
49544
49545
49546
49547
49548
49549
# File 'lib/ovirtsdk4/types.rb', line 49543

def ==(other)
  super &&
  @authentication_keys == other.authentication_keys &&
  @certificates == other.certificates &&
  @data_center == other.data_center &&
  @volume_types == other.volume_types
end

#authentication_keysArray<OpenstackVolumeAuthenticationKey>

Returns the value of the authentication_keys attribute.



49190
49191
49192
# File 'lib/ovirtsdk4/types.rb', line 49190

def authentication_keys
  @authentication_keys
end

#authentication_keys=(list) ⇒ Object

Sets the value of the authentication_keys attribute.

Parameters:



49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
# File 'lib/ovirtsdk4/types.rb', line 49199

def authentication_keys=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = OpenstackVolumeAuthenticationKey.new(value)
      end
    end
  end
  @authentication_keys = list
end

#authentication_urlString

Returns the value of the authentication_url attribute.

Returns:

  • (String)


49216
49217
49218
# File 'lib/ovirtsdk4/types.rb', line 49216

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)


49225
49226
49227
# File 'lib/ovirtsdk4/types.rb', line 49225

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:



49234
49235
49236
# File 'lib/ovirtsdk4/types.rb', line 49234

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:



49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
# File 'lib/ovirtsdk4/types.rb', line 49243

def certificates=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Certificate.new(value)
      end
    end
  end
  @certificates = list
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


49260
49261
49262
# File 'lib/ovirtsdk4/types.rb', line 49260

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


49269
49270
49271
# File 'lib/ovirtsdk4/types.rb', line 49269

def comment=(value)
  @comment = value
end

#data_centerDataCenter

Returns the value of the data_center attribute.

Returns:



49278
49279
49280
# File 'lib/ovirtsdk4/types.rb', line 49278

def data_center
  @data_center
end

#data_center=(value) ⇒ Object

Sets the value of the data_center attribute.

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



49291
49292
49293
49294
49295
49296
# File 'lib/ovirtsdk4/types.rb', line 49291

def data_center=(value)
  if value.is_a?(Hash)
    value = DataCenter.new(value)
  end
  @data_center = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


49303
49304
49305
# File 'lib/ovirtsdk4/types.rb', line 49303

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


49312
49313
49314
# File 'lib/ovirtsdk4/types.rb', line 49312

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



49554
49555
49556
49557
49558
49559
49560
# File 'lib/ovirtsdk4/types.rb', line 49554

def hash
  super +
  @authentication_keys.hash +
  @certificates.hash +
  @data_center.hash +
  @volume_types.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


49321
49322
49323
# File 'lib/ovirtsdk4/types.rb', line 49321

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


49330
49331
49332
# File 'lib/ovirtsdk4/types.rb', line 49330

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


49339
49340
49341
# File 'lib/ovirtsdk4/types.rb', line 49339

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


49348
49349
49350
# File 'lib/ovirtsdk4/types.rb', line 49348

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


49357
49358
49359
# File 'lib/ovirtsdk4/types.rb', line 49357

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


49366
49367
49368
# File 'lib/ovirtsdk4/types.rb', line 49366

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



49375
49376
49377
# File 'lib/ovirtsdk4/types.rb', line 49375

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
# File 'lib/ovirtsdk4/types.rb', line 49384

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

#requires_authenticationBoolean

Returns the value of the requires_authentication attribute.

Returns:

  • (Boolean)


49401
49402
49403
# File 'lib/ovirtsdk4/types.rb', line 49401

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)


49410
49411
49412
# File 'lib/ovirtsdk4/types.rb', line 49410

def requires_authentication=(value)
  @requires_authentication = value
end

#tenant_nameString

Returns the value of the tenant_name attribute.

Returns:

  • (String)


49419
49420
49421
# File 'lib/ovirtsdk4/types.rb', line 49419

def tenant_name
  @tenant_name
end

#tenant_name=(value) ⇒ Object

Sets the value of the tenant_name attribute.

Parameters:

  • value (String)


49428
49429
49430
# File 'lib/ovirtsdk4/types.rb', line 49428

def tenant_name=(value)
  @tenant_name = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


49437
49438
49439
# File 'lib/ovirtsdk4/types.rb', line 49437

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


49446
49447
49448
# File 'lib/ovirtsdk4/types.rb', line 49446

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


49455
49456
49457
# File 'lib/ovirtsdk4/types.rb', line 49455

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


49464
49465
49466
# File 'lib/ovirtsdk4/types.rb', line 49464

def username=(value)
  @username = value
end

#volume_typesArray<OpenStackVolumeType>

Returns the value of the volume_types attribute.

Returns:



49473
49474
49475
# File 'lib/ovirtsdk4/types.rb', line 49473

def volume_types
  @volume_types
end

#volume_types=(list) ⇒ Object

Sets the value of the volume_types attribute.

Parameters:



49482
49483
49484
49485
49486
49487
49488
49489
49490
49491
49492
# File 'lib/ovirtsdk4/types.rb', line 49482

def volume_types=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = OpenStackVolumeType.new(value)
      end
    end
  end
  @volume_types = list
end