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.



46424
46425
46426
46427
46428
46429
46430
# File 'lib/ovirtsdk4/types.rb', line 46424

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.



46435
46436
46437
46438
46439
46440
46441
# File 'lib/ovirtsdk4/types.rb', line 46435

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.



46082
46083
46084
# File 'lib/ovirtsdk4/types.rb', line 46082

def authentication_keys
  @authentication_keys
end

#authentication_keys=(list) ⇒ Object

Sets the value of the authentication_keys attribute.

Parameters:



46091
46092
46093
46094
46095
46096
46097
46098
46099
46100
46101
# File 'lib/ovirtsdk4/types.rb', line 46091

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)


46108
46109
46110
# File 'lib/ovirtsdk4/types.rb', line 46108

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)


46117
46118
46119
# File 'lib/ovirtsdk4/types.rb', line 46117

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:



46126
46127
46128
# File 'lib/ovirtsdk4/types.rb', line 46126

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:



46135
46136
46137
46138
46139
46140
46141
46142
46143
46144
46145
# File 'lib/ovirtsdk4/types.rb', line 46135

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)


46152
46153
46154
# File 'lib/ovirtsdk4/types.rb', line 46152

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


46161
46162
46163
# File 'lib/ovirtsdk4/types.rb', line 46161

def comment=(value)
  @comment = value
end

#data_centerDataCenter

Returns the value of the data_center attribute.

Returns:



46170
46171
46172
# File 'lib/ovirtsdk4/types.rb', line 46170

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:



46183
46184
46185
46186
46187
46188
# File 'lib/ovirtsdk4/types.rb', line 46183

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)


46195
46196
46197
# File 'lib/ovirtsdk4/types.rb', line 46195

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


46204
46205
46206
# File 'lib/ovirtsdk4/types.rb', line 46204

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



46446
46447
46448
46449
46450
46451
46452
# File 'lib/ovirtsdk4/types.rb', line 46446

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)


46213
46214
46215
# File 'lib/ovirtsdk4/types.rb', line 46213

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


46222
46223
46224
# File 'lib/ovirtsdk4/types.rb', line 46222

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


46231
46232
46233
# File 'lib/ovirtsdk4/types.rb', line 46231

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


46240
46241
46242
# File 'lib/ovirtsdk4/types.rb', line 46240

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


46249
46250
46251
# File 'lib/ovirtsdk4/types.rb', line 46249

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


46258
46259
46260
# File 'lib/ovirtsdk4/types.rb', line 46258

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



46267
46268
46269
# File 'lib/ovirtsdk4/types.rb', line 46267

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



46276
46277
46278
46279
46280
46281
46282
46283
46284
46285
46286
# File 'lib/ovirtsdk4/types.rb', line 46276

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)


46293
46294
46295
# File 'lib/ovirtsdk4/types.rb', line 46293

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)


46302
46303
46304
# File 'lib/ovirtsdk4/types.rb', line 46302

def requires_authentication=(value)
  @requires_authentication = value
end

#tenant_nameString

Returns the value of the tenant_name attribute.

Returns:

  • (String)


46311
46312
46313
# File 'lib/ovirtsdk4/types.rb', line 46311

def tenant_name
  @tenant_name
end

#tenant_name=(value) ⇒ Object

Sets the value of the tenant_name attribute.

Parameters:

  • value (String)


46320
46321
46322
# File 'lib/ovirtsdk4/types.rb', line 46320

def tenant_name=(value)
  @tenant_name = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


46329
46330
46331
# File 'lib/ovirtsdk4/types.rb', line 46329

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


46338
46339
46340
# File 'lib/ovirtsdk4/types.rb', line 46338

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


46347
46348
46349
# File 'lib/ovirtsdk4/types.rb', line 46347

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


46356
46357
46358
# File 'lib/ovirtsdk4/types.rb', line 46356

def username=(value)
  @username = value
end

#volume_typesArray<OpenStackVolumeType>

Returns the value of the volume_types attribute.

Returns:



46365
46366
46367
# File 'lib/ovirtsdk4/types.rb', line 46365

def volume_types
  @volume_types
end

#volume_types=(list) ⇒ Object

Sets the value of the volume_types attribute.

Parameters:



46374
46375
46376
46377
46378
46379
46380
46381
46382
46383
46384
# File 'lib/ovirtsdk4/types.rb', line 46374

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