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.

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.



56967
56968
56969
56970
56971
# File 'lib/ovirtsdk4/types.rb', line 56967

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.



56976
56977
56978
56979
56980
# File 'lib/ovirtsdk4/types.rb', line 56976

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

#authentication_urlString

Returns the value of the authentication_url attribute.



56680
56681
56682
# File 'lib/ovirtsdk4/types.rb', line 56680

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.



56689
56690
56691
# File 'lib/ovirtsdk4/types.rb', line 56689

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.



56698
56699
56700
# File 'lib/ovirtsdk4/types.rb', line 56698

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.



56707
56708
56709
56710
56711
56712
56713
56714
56715
56716
56717
# File 'lib/ovirtsdk4/types.rb', line 56707

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.



56724
56725
56726
# File 'lib/ovirtsdk4/types.rb', line 56724

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.



56733
56734
56735
# File 'lib/ovirtsdk4/types.rb', line 56733

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.



56742
56743
56744
# File 'lib/ovirtsdk4/types.rb', line 56742

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.



56751
56752
56753
# File 'lib/ovirtsdk4/types.rb', line 56751

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



56985
56986
56987
56988
56989
# File 'lib/ovirtsdk4/types.rb', line 56985

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

#idString

Returns the value of the id attribute.



56760
56761
56762
# File 'lib/ovirtsdk4/types.rb', line 56760

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.



56769
56770
56771
# File 'lib/ovirtsdk4/types.rb', line 56769

def id=(value)
  @id = value
end

#imagesArray<OpenStackImage>

Returns the value of the images attribute.



56778
56779
56780
# File 'lib/ovirtsdk4/types.rb', line 56778

def images
  @images
end

#images=(list) ⇒ Object

Sets the value of the images attribute.



56787
56788
56789
56790
56791
56792
56793
56794
56795
56796
56797
# File 'lib/ovirtsdk4/types.rb', line 56787

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.



56804
56805
56806
# File 'lib/ovirtsdk4/types.rb', line 56804

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.



56813
56814
56815
# File 'lib/ovirtsdk4/types.rb', line 56813

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.



56822
56823
56824
# File 'lib/ovirtsdk4/types.rb', line 56822

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.



56831
56832
56833
# File 'lib/ovirtsdk4/types.rb', line 56831

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.



56840
56841
56842
# File 'lib/ovirtsdk4/types.rb', line 56840

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.



56849
56850
56851
56852
56853
56854
56855
56856
56857
56858
56859
# File 'lib/ovirtsdk4/types.rb', line 56849

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.



56866
56867
56868
# File 'lib/ovirtsdk4/types.rb', line 56866

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.



56875
56876
56877
# File 'lib/ovirtsdk4/types.rb', line 56875

def requires_authentication=(value)
  @requires_authentication = value
end

#tenant_nameString

Returns the value of the tenant_name attribute.



56884
56885
56886
# File 'lib/ovirtsdk4/types.rb', line 56884

def tenant_name
  @tenant_name
end

#tenant_name=(value) ⇒ Object

Sets the value of the tenant_name attribute.



56893
56894
56895
# File 'lib/ovirtsdk4/types.rb', line 56893

def tenant_name=(value)
  @tenant_name = value
end

#urlString

Returns the value of the url attribute.



56902
56903
56904
# File 'lib/ovirtsdk4/types.rb', line 56902

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.



56911
56912
56913
# File 'lib/ovirtsdk4/types.rb', line 56911

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.



56920
56921
56922
# File 'lib/ovirtsdk4/types.rb', line 56920

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.



56929
56930
56931
# File 'lib/ovirtsdk4/types.rb', line 56929

def username=(value)
  @username = value
end