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.



52376
52377
52378
52379
52380
# File 'lib/ovirtsdk4/types.rb', line 52376

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.



52385
52386
52387
52388
52389
# File 'lib/ovirtsdk4/types.rb', line 52385

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

#authentication_urlString

Returns the value of the authentication_url attribute.

Returns:

  • (String)


52089
52090
52091
# File 'lib/ovirtsdk4/types.rb', line 52089

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)


52098
52099
52100
# File 'lib/ovirtsdk4/types.rb', line 52098

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:



52107
52108
52109
# File 'lib/ovirtsdk4/types.rb', line 52107

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:



52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
# File 'lib/ovirtsdk4/types.rb', line 52116

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)


52133
52134
52135
# File 'lib/ovirtsdk4/types.rb', line 52133

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


52142
52143
52144
# File 'lib/ovirtsdk4/types.rb', line 52142

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


52151
52152
52153
# File 'lib/ovirtsdk4/types.rb', line 52151

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


52160
52161
52162
# File 'lib/ovirtsdk4/types.rb', line 52160

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



52394
52395
52396
52397
52398
# File 'lib/ovirtsdk4/types.rb', line 52394

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

#idString

Returns the value of the id attribute.

Returns:

  • (String)


52169
52170
52171
# File 'lib/ovirtsdk4/types.rb', line 52169

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


52178
52179
52180
# File 'lib/ovirtsdk4/types.rb', line 52178

def id=(value)
  @id = value
end

#imagesArray<OpenStackImage>

Returns the value of the images attribute.

Returns:



52187
52188
52189
# File 'lib/ovirtsdk4/types.rb', line 52187

def images
  @images
end

#images=(list) ⇒ Object

Sets the value of the images attribute.

Parameters:



52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
# File 'lib/ovirtsdk4/types.rb', line 52196

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)


52213
52214
52215
# File 'lib/ovirtsdk4/types.rb', line 52213

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


52222
52223
52224
# File 'lib/ovirtsdk4/types.rb', line 52222

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


52231
52232
52233
# File 'lib/ovirtsdk4/types.rb', line 52231

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


52240
52241
52242
# File 'lib/ovirtsdk4/types.rb', line 52240

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



52249
52250
52251
# File 'lib/ovirtsdk4/types.rb', line 52249

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
# File 'lib/ovirtsdk4/types.rb', line 52258

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)


52275
52276
52277
# File 'lib/ovirtsdk4/types.rb', line 52275

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)


52284
52285
52286
# File 'lib/ovirtsdk4/types.rb', line 52284

def requires_authentication=(value)
  @requires_authentication = value
end

#tenant_nameString

Returns the value of the tenant_name attribute.

Returns:

  • (String)


52293
52294
52295
# File 'lib/ovirtsdk4/types.rb', line 52293

def tenant_name
  @tenant_name
end

#tenant_name=(value) ⇒ Object

Sets the value of the tenant_name attribute.

Parameters:

  • value (String)


52302
52303
52304
# File 'lib/ovirtsdk4/types.rb', line 52302

def tenant_name=(value)
  @tenant_name = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


52311
52312
52313
# File 'lib/ovirtsdk4/types.rb', line 52311

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


52320
52321
52322
# File 'lib/ovirtsdk4/types.rb', line 52320

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


52329
52330
52331
# File 'lib/ovirtsdk4/types.rb', line 52329

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


52338
52339
52340
# File 'lib/ovirtsdk4/types.rb', line 52338

def username=(value)
  @username = value
end