Class: OvirtSDK4::OpenStackVolumeProvider

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

Creates a new instance of the OvirtSDK4::OpenStackVolumeProvider 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_keys (Array<OpenstackVolumeAuthenticationKey>, Array<Hash>)

    The values of attribute authentication_keys.

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

  • :data_center (DataCenter, Hash)

    The value of attribute data_center.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

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

  • :volume_types (Array<OpenStackVolumeType>, Array<Hash>)

    The values of attribute volume_types.



48074
48075
48076
48077
48078
48079
48080
# File 'lib/ovirtsdk4/types.rb', line 48074

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

Instance Method Details

#==(other) ⇒ Object

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



48085
48086
48087
48088
48089
48090
48091
# File 'lib/ovirtsdk4/types.rb', line 48085

def ==(other)
  super &&
  @authentication_keys == other.authentication_keys &&
  @certificates == other.certificates &&
  @data_center == other.data_center &&
  @volume_types == other.volume_types
end

#authentication_keysArray<OpenstackVolumeAuthenticationKey>

Returns the value of the authentication_keys attribute.



47732
47733
47734
# File 'lib/ovirtsdk4/types.rb', line 47732

def authentication_keys
  @authentication_keys
end

#authentication_keys=(list) ⇒ Object

Sets the value of the authentication_keys attribute.

Parameters:



47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
# File 'lib/ovirtsdk4/types.rb', line 47741

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

#authentication_urlString

Returns the value of the authentication_url attribute.

Returns:

  • (String)


47758
47759
47760
# File 'lib/ovirtsdk4/types.rb', line 47758

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)


47767
47768
47769
# File 'lib/ovirtsdk4/types.rb', line 47767

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:



47776
47777
47778
# File 'lib/ovirtsdk4/types.rb', line 47776

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:



47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795
# File 'lib/ovirtsdk4/types.rb', line 47785

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)


47802
47803
47804
# File 'lib/ovirtsdk4/types.rb', line 47802

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


47811
47812
47813
# File 'lib/ovirtsdk4/types.rb', line 47811

def comment=(value)
  @comment = value
end

#data_centerDataCenter

Returns the value of the data_center attribute.

Returns:



47820
47821
47822
# File 'lib/ovirtsdk4/types.rb', line 47820

def data_center
  @data_center
end

#data_center=(value) ⇒ Object

Sets the value of the data_center attribute.

The value parameter can be an instance of DataCenter or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:



47833
47834
47835
47836
47837
47838
# File 'lib/ovirtsdk4/types.rb', line 47833

def data_center=(value)
  if value.is_a?(Hash)
    value = DataCenter.new(value)
  end
  @data_center = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


47845
47846
47847
# File 'lib/ovirtsdk4/types.rb', line 47845

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


47854
47855
47856
# File 'lib/ovirtsdk4/types.rb', line 47854

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



48096
48097
48098
48099
48100
48101
48102
# File 'lib/ovirtsdk4/types.rb', line 48096

def hash
  super +
  @authentication_keys.hash +
  @certificates.hash +
  @data_center.hash +
  @volume_types.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


47863
47864
47865
# File 'lib/ovirtsdk4/types.rb', line 47863

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


47872
47873
47874
# File 'lib/ovirtsdk4/types.rb', line 47872

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


47881
47882
47883
# File 'lib/ovirtsdk4/types.rb', line 47881

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


47890
47891
47892
# File 'lib/ovirtsdk4/types.rb', line 47890

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


47899
47900
47901
# File 'lib/ovirtsdk4/types.rb', line 47899

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


47908
47909
47910
# File 'lib/ovirtsdk4/types.rb', line 47908

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



47917
47918
47919
# File 'lib/ovirtsdk4/types.rb', line 47917

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



47926
47927
47928
47929
47930
47931
47932
47933
47934
47935
47936
# File 'lib/ovirtsdk4/types.rb', line 47926

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)


47943
47944
47945
# File 'lib/ovirtsdk4/types.rb', line 47943

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)


47952
47953
47954
# File 'lib/ovirtsdk4/types.rb', line 47952

def requires_authentication=(value)
  @requires_authentication = value
end

#tenant_nameString

Returns the value of the tenant_name attribute.

Returns:

  • (String)


47961
47962
47963
# File 'lib/ovirtsdk4/types.rb', line 47961

def tenant_name
  @tenant_name
end

#tenant_name=(value) ⇒ Object

Sets the value of the tenant_name attribute.

Parameters:

  • value (String)


47970
47971
47972
# File 'lib/ovirtsdk4/types.rb', line 47970

def tenant_name=(value)
  @tenant_name = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


47979
47980
47981
# File 'lib/ovirtsdk4/types.rb', line 47979

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


47988
47989
47990
# File 'lib/ovirtsdk4/types.rb', line 47988

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


47997
47998
47999
# File 'lib/ovirtsdk4/types.rb', line 47997

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


48006
48007
48008
# File 'lib/ovirtsdk4/types.rb', line 48006

def username=(value)
  @username = value
end

#volume_typesArray<OpenStackVolumeType>

Returns the value of the volume_types attribute.

Returns:



48015
48016
48017
# File 'lib/ovirtsdk4/types.rb', line 48015

def volume_types
  @volume_types
end

#volume_types=(list) ⇒ Object

Sets the value of the volume_types attribute.

Parameters:



48024
48025
48026
48027
48028
48029
48030
48031
48032
48033
48034
# File 'lib/ovirtsdk4/types.rb', line 48024

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