Class: OvirtSDK4::OpenStackImageProvider

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 = {}) ⇒ OpenStackImageProvider

Creates a new instance of the OvirtSDK4::OpenStackImageProvider 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_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.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :images (Array<OpenStackImage>, Array<Hash>)

    The values of attribute images.

  • :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.



52445
52446
52447
52448
52449
# File 'lib/ovirtsdk4/types.rb', line 52445

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

Instance Method Details

#==(other) ⇒ Object

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



52454
52455
52456
52457
52458
# File 'lib/ovirtsdk4/types.rb', line 52454

def ==(other)
  super &&
  @certificates == other.certificates &&
  @images == other.images
end

#authentication_urlString

Returns the value of the authentication_url attribute.

Returns:

  • (String)


52158
52159
52160
# File 'lib/ovirtsdk4/types.rb', line 52158

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)


52167
52168
52169
# File 'lib/ovirtsdk4/types.rb', line 52167

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:



52176
52177
52178
# File 'lib/ovirtsdk4/types.rb', line 52176

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:



52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
# File 'lib/ovirtsdk4/types.rb', line 52185

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)


52202
52203
52204
# File 'lib/ovirtsdk4/types.rb', line 52202

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


52211
52212
52213
# File 'lib/ovirtsdk4/types.rb', line 52211

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


52220
52221
52222
# File 'lib/ovirtsdk4/types.rb', line 52220

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


52229
52230
52231
# File 'lib/ovirtsdk4/types.rb', line 52229

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



52463
52464
52465
52466
52467
# File 'lib/ovirtsdk4/types.rb', line 52463

def hash
  super +
  @certificates.hash +
  @images.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


52238
52239
52240
# File 'lib/ovirtsdk4/types.rb', line 52238

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


52247
52248
52249
# File 'lib/ovirtsdk4/types.rb', line 52247

def id=(value)
  @id = value
end

#imagesArray<OpenStackImage>

Returns the value of the images attribute.

Returns:



52256
52257
52258
# File 'lib/ovirtsdk4/types.rb', line 52256

def images
  @images
end

#images=(list) ⇒ Object

Sets the value of the images attribute.

Parameters:



52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
# File 'lib/ovirtsdk4/types.rb', line 52265

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

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


52282
52283
52284
# File 'lib/ovirtsdk4/types.rb', line 52282

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


52291
52292
52293
# File 'lib/ovirtsdk4/types.rb', line 52291

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


52300
52301
52302
# File 'lib/ovirtsdk4/types.rb', line 52300

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


52309
52310
52311
# File 'lib/ovirtsdk4/types.rb', line 52309

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



52318
52319
52320
# File 'lib/ovirtsdk4/types.rb', line 52318

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
# File 'lib/ovirtsdk4/types.rb', line 52327

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)


52344
52345
52346
# File 'lib/ovirtsdk4/types.rb', line 52344

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)


52353
52354
52355
# File 'lib/ovirtsdk4/types.rb', line 52353

def requires_authentication=(value)
  @requires_authentication = value
end

#tenant_nameString

Returns the value of the tenant_name attribute.

Returns:

  • (String)


52362
52363
52364
# File 'lib/ovirtsdk4/types.rb', line 52362

def tenant_name
  @tenant_name
end

#tenant_name=(value) ⇒ Object

Sets the value of the tenant_name attribute.

Parameters:

  • value (String)


52371
52372
52373
# File 'lib/ovirtsdk4/types.rb', line 52371

def tenant_name=(value)
  @tenant_name = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


52380
52381
52382
# File 'lib/ovirtsdk4/types.rb', line 52380

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


52389
52390
52391
# File 'lib/ovirtsdk4/types.rb', line 52389

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


52398
52399
52400
# File 'lib/ovirtsdk4/types.rb', line 52398

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


52407
52408
52409
# File 'lib/ovirtsdk4/types.rb', line 52407

def username=(value)
  @username = value
end