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.



45611
45612
45613
45614
45615
45616
45617
# File 'lib/ovirtsdk4/types.rb', line 45611

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.



45622
45623
45624
45625
45626
45627
45628
# File 'lib/ovirtsdk4/types.rb', line 45622

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.



45269
45270
45271
# File 'lib/ovirtsdk4/types.rb', line 45269

def authentication_keys
  @authentication_keys
end

#authentication_keys=(list) ⇒ Object

Sets the value of the authentication_keys attribute.

Parameters:



45278
45279
45280
45281
45282
45283
45284
45285
45286
45287
45288
# File 'lib/ovirtsdk4/types.rb', line 45278

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)


45295
45296
45297
# File 'lib/ovirtsdk4/types.rb', line 45295

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)


45304
45305
45306
# File 'lib/ovirtsdk4/types.rb', line 45304

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:



45313
45314
45315
# File 'lib/ovirtsdk4/types.rb', line 45313

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:



45322
45323
45324
45325
45326
45327
45328
45329
45330
45331
45332
# File 'lib/ovirtsdk4/types.rb', line 45322

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)


45339
45340
45341
# File 'lib/ovirtsdk4/types.rb', line 45339

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


45348
45349
45350
# File 'lib/ovirtsdk4/types.rb', line 45348

def comment=(value)
  @comment = value
end

#data_centerDataCenter

Returns the value of the data_center attribute.

Returns:



45357
45358
45359
# File 'lib/ovirtsdk4/types.rb', line 45357

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:



45370
45371
45372
45373
45374
45375
# File 'lib/ovirtsdk4/types.rb', line 45370

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)


45382
45383
45384
# File 'lib/ovirtsdk4/types.rb', line 45382

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


45391
45392
45393
# File 'lib/ovirtsdk4/types.rb', line 45391

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



45633
45634
45635
45636
45637
45638
45639
# File 'lib/ovirtsdk4/types.rb', line 45633

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)


45400
45401
45402
# File 'lib/ovirtsdk4/types.rb', line 45400

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


45409
45410
45411
# File 'lib/ovirtsdk4/types.rb', line 45409

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


45418
45419
45420
# File 'lib/ovirtsdk4/types.rb', line 45418

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


45427
45428
45429
# File 'lib/ovirtsdk4/types.rb', line 45427

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


45436
45437
45438
# File 'lib/ovirtsdk4/types.rb', line 45436

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


45445
45446
45447
# File 'lib/ovirtsdk4/types.rb', line 45445

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



45454
45455
45456
# File 'lib/ovirtsdk4/types.rb', line 45454

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



45463
45464
45465
45466
45467
45468
45469
45470
45471
45472
45473
# File 'lib/ovirtsdk4/types.rb', line 45463

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)


45480
45481
45482
# File 'lib/ovirtsdk4/types.rb', line 45480

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)


45489
45490
45491
# File 'lib/ovirtsdk4/types.rb', line 45489

def requires_authentication=(value)
  @requires_authentication = value
end

#tenant_nameString

Returns the value of the tenant_name attribute.

Returns:

  • (String)


45498
45499
45500
# File 'lib/ovirtsdk4/types.rb', line 45498

def tenant_name
  @tenant_name
end

#tenant_name=(value) ⇒ Object

Sets the value of the tenant_name attribute.

Parameters:

  • value (String)


45507
45508
45509
# File 'lib/ovirtsdk4/types.rb', line 45507

def tenant_name=(value)
  @tenant_name = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


45516
45517
45518
# File 'lib/ovirtsdk4/types.rb', line 45516

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


45525
45526
45527
# File 'lib/ovirtsdk4/types.rb', line 45525

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


45534
45535
45536
# File 'lib/ovirtsdk4/types.rb', line 45534

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


45543
45544
45545
# File 'lib/ovirtsdk4/types.rb', line 45543

def username=(value)
  @username = value
end

#volume_typesArray<OpenStackVolumeType>

Returns the value of the volume_types attribute.

Returns:



45552
45553
45554
# File 'lib/ovirtsdk4/types.rb', line 45552

def volume_types
  @volume_types
end

#volume_types=(list) ⇒ Object

Sets the value of the volume_types attribute.

Parameters:



45561
45562
45563
45564
45565
45566
45567
45568
45569
45570
45571
# File 'lib/ovirtsdk4/types.rb', line 45561

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