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.



53189
53190
53191
53192
53193
# File 'lib/ovirtsdk4/types.rb', line 53189

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.



53198
53199
53200
53201
53202
# File 'lib/ovirtsdk4/types.rb', line 53198

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

#authentication_urlString

Returns the value of the authentication_url attribute.

Returns:

  • (String)


52902
52903
52904
# File 'lib/ovirtsdk4/types.rb', line 52902

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)


52911
52912
52913
# File 'lib/ovirtsdk4/types.rb', line 52911

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:



52920
52921
52922
# File 'lib/ovirtsdk4/types.rb', line 52920

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:



52929
52930
52931
52932
52933
52934
52935
52936
52937
52938
52939
# File 'lib/ovirtsdk4/types.rb', line 52929

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)


52946
52947
52948
# File 'lib/ovirtsdk4/types.rb', line 52946

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


52955
52956
52957
# File 'lib/ovirtsdk4/types.rb', line 52955

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


52964
52965
52966
# File 'lib/ovirtsdk4/types.rb', line 52964

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


52973
52974
52975
# File 'lib/ovirtsdk4/types.rb', line 52973

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



53207
53208
53209
53210
53211
# File 'lib/ovirtsdk4/types.rb', line 53207

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

#idString

Returns the value of the id attribute.

Returns:

  • (String)


52982
52983
52984
# File 'lib/ovirtsdk4/types.rb', line 52982

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


52991
52992
52993
# File 'lib/ovirtsdk4/types.rb', line 52991

def id=(value)
  @id = value
end

#imagesArray<OpenStackImage>

Returns the value of the images attribute.

Returns:



53000
53001
53002
# File 'lib/ovirtsdk4/types.rb', line 53000

def images
  @images
end

#images=(list) ⇒ Object

Sets the value of the images attribute.

Parameters:



53009
53010
53011
53012
53013
53014
53015
53016
53017
53018
53019
# File 'lib/ovirtsdk4/types.rb', line 53009

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)


53026
53027
53028
# File 'lib/ovirtsdk4/types.rb', line 53026

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


53035
53036
53037
# File 'lib/ovirtsdk4/types.rb', line 53035

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


53044
53045
53046
# File 'lib/ovirtsdk4/types.rb', line 53044

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


53053
53054
53055
# File 'lib/ovirtsdk4/types.rb', line 53053

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



53062
53063
53064
# File 'lib/ovirtsdk4/types.rb', line 53062

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



53071
53072
53073
53074
53075
53076
53077
53078
53079
53080
53081
# File 'lib/ovirtsdk4/types.rb', line 53071

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)


53088
53089
53090
# File 'lib/ovirtsdk4/types.rb', line 53088

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)


53097
53098
53099
# File 'lib/ovirtsdk4/types.rb', line 53097

def requires_authentication=(value)
  @requires_authentication = value
end

#tenant_nameString

Returns the value of the tenant_name attribute.

Returns:

  • (String)


53106
53107
53108
# File 'lib/ovirtsdk4/types.rb', line 53106

def tenant_name
  @tenant_name
end

#tenant_name=(value) ⇒ Object

Sets the value of the tenant_name attribute.

Parameters:

  • value (String)


53115
53116
53117
# File 'lib/ovirtsdk4/types.rb', line 53115

def tenant_name=(value)
  @tenant_name = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


53124
53125
53126
# File 'lib/ovirtsdk4/types.rb', line 53124

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


53133
53134
53135
# File 'lib/ovirtsdk4/types.rb', line 53133

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


53142
53143
53144
# File 'lib/ovirtsdk4/types.rb', line 53142

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


53151
53152
53153
# File 'lib/ovirtsdk4/types.rb', line 53151

def username=(value)
  @username = value
end