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.


53933
53934
53935
53936
53937
# File 'lib/ovirtsdk4/types.rb', line 53933

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.


53942
53943
53944
53945
53946
# File 'lib/ovirtsdk4/types.rb', line 53942

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

#authentication_urlString

Returns the value of the authentication_url attribute.

Returns:

  • (String)

53646
53647
53648
# File 'lib/ovirtsdk4/types.rb', line 53646

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)

53655
53656
53657
# File 'lib/ovirtsdk4/types.rb', line 53655

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:


53664
53665
53666
# File 'lib/ovirtsdk4/types.rb', line 53664

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:


53673
53674
53675
53676
53677
53678
53679
53680
53681
53682
53683
# File 'lib/ovirtsdk4/types.rb', line 53673

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)

53690
53691
53692
# File 'lib/ovirtsdk4/types.rb', line 53690

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

53699
53700
53701
# File 'lib/ovirtsdk4/types.rb', line 53699

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

53708
53709
53710
# File 'lib/ovirtsdk4/types.rb', line 53708

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

53717
53718
53719
# File 'lib/ovirtsdk4/types.rb', line 53717

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.


53951
53952
53953
53954
53955
# File 'lib/ovirtsdk4/types.rb', line 53951

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

#idString

Returns the value of the id attribute.

Returns:

  • (String)

53726
53727
53728
# File 'lib/ovirtsdk4/types.rb', line 53726

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

53735
53736
53737
# File 'lib/ovirtsdk4/types.rb', line 53735

def id=(value)
  @id = value
end

#imagesArray<OpenStackImage>

Returns the value of the images attribute.

Returns:


53744
53745
53746
# File 'lib/ovirtsdk4/types.rb', line 53744

def images
  @images
end

#images=(list) ⇒ Object

Sets the value of the images attribute.

Parameters:


53753
53754
53755
53756
53757
53758
53759
53760
53761
53762
53763
# File 'lib/ovirtsdk4/types.rb', line 53753

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)

53770
53771
53772
# File 'lib/ovirtsdk4/types.rb', line 53770

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

53779
53780
53781
# File 'lib/ovirtsdk4/types.rb', line 53779

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)

53788
53789
53790
# File 'lib/ovirtsdk4/types.rb', line 53788

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)

53797
53798
53799
# File 'lib/ovirtsdk4/types.rb', line 53797

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:


53806
53807
53808
# File 'lib/ovirtsdk4/types.rb', line 53806

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:


53815
53816
53817
53818
53819
53820
53821
53822
53823
53824
53825
# File 'lib/ovirtsdk4/types.rb', line 53815

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)

53832
53833
53834
# File 'lib/ovirtsdk4/types.rb', line 53832

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)

53841
53842
53843
# File 'lib/ovirtsdk4/types.rb', line 53841

def requires_authentication=(value)
  @requires_authentication = value
end

#tenant_nameString

Returns the value of the tenant_name attribute.

Returns:

  • (String)

53850
53851
53852
# File 'lib/ovirtsdk4/types.rb', line 53850

def tenant_name
  @tenant_name
end

#tenant_name=(value) ⇒ Object

Sets the value of the tenant_name attribute.

Parameters:

  • value (String)

53859
53860
53861
# File 'lib/ovirtsdk4/types.rb', line 53859

def tenant_name=(value)
  @tenant_name = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)

53868
53869
53870
# File 'lib/ovirtsdk4/types.rb', line 53868

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)

53877
53878
53879
# File 'lib/ovirtsdk4/types.rb', line 53877

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)

53886
53887
53888
# File 'lib/ovirtsdk4/types.rb', line 53886

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)

53895
53896
53897
# File 'lib/ovirtsdk4/types.rb', line 53895

def username=(value)
  @username = value
end