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.


47168
47169
47170
47171
47172
47173
47174
# File 'lib/ovirtsdk4/types.rb', line 47168

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.


47179
47180
47181
47182
47183
47184
47185
# File 'lib/ovirtsdk4/types.rb', line 47179

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.


46826
46827
46828
# File 'lib/ovirtsdk4/types.rb', line 46826

def authentication_keys
  @authentication_keys
end

#authentication_keys=(list) ⇒ Object

Sets the value of the authentication_keys attribute.

Parameters:


46835
46836
46837
46838
46839
46840
46841
46842
46843
46844
46845
# File 'lib/ovirtsdk4/types.rb', line 46835

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)

46852
46853
46854
# File 'lib/ovirtsdk4/types.rb', line 46852

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)

46861
46862
46863
# File 'lib/ovirtsdk4/types.rb', line 46861

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:


46870
46871
46872
# File 'lib/ovirtsdk4/types.rb', line 46870

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:


46879
46880
46881
46882
46883
46884
46885
46886
46887
46888
46889
# File 'lib/ovirtsdk4/types.rb', line 46879

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)

46896
46897
46898
# File 'lib/ovirtsdk4/types.rb', line 46896

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

46905
46906
46907
# File 'lib/ovirtsdk4/types.rb', line 46905

def comment=(value)
  @comment = value
end

#data_centerDataCenter

Returns the value of the data_center attribute.

Returns:


46914
46915
46916
# File 'lib/ovirtsdk4/types.rb', line 46914

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:


46927
46928
46929
46930
46931
46932
# File 'lib/ovirtsdk4/types.rb', line 46927

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)

46939
46940
46941
# File 'lib/ovirtsdk4/types.rb', line 46939

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

46948
46949
46950
# File 'lib/ovirtsdk4/types.rb', line 46948

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.


47190
47191
47192
47193
47194
47195
47196
# File 'lib/ovirtsdk4/types.rb', line 47190

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)

46957
46958
46959
# File 'lib/ovirtsdk4/types.rb', line 46957

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

46966
46967
46968
# File 'lib/ovirtsdk4/types.rb', line 46966

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

46975
46976
46977
# File 'lib/ovirtsdk4/types.rb', line 46975

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

46984
46985
46986
# File 'lib/ovirtsdk4/types.rb', line 46984

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)

46993
46994
46995
# File 'lib/ovirtsdk4/types.rb', line 46993

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)

47002
47003
47004
# File 'lib/ovirtsdk4/types.rb', line 47002

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:


47011
47012
47013
# File 'lib/ovirtsdk4/types.rb', line 47011

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:


47020
47021
47022
47023
47024
47025
47026
47027
47028
47029
47030
# File 'lib/ovirtsdk4/types.rb', line 47020

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)

47037
47038
47039
# File 'lib/ovirtsdk4/types.rb', line 47037

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)

47046
47047
47048
# File 'lib/ovirtsdk4/types.rb', line 47046

def requires_authentication=(value)
  @requires_authentication = value
end

#tenant_nameString

Returns the value of the tenant_name attribute.

Returns:

  • (String)

47055
47056
47057
# File 'lib/ovirtsdk4/types.rb', line 47055

def tenant_name
  @tenant_name
end

#tenant_name=(value) ⇒ Object

Sets the value of the tenant_name attribute.

Parameters:

  • value (String)

47064
47065
47066
# File 'lib/ovirtsdk4/types.rb', line 47064

def tenant_name=(value)
  @tenant_name = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)

47073
47074
47075
# File 'lib/ovirtsdk4/types.rb', line 47073

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)

47082
47083
47084
# File 'lib/ovirtsdk4/types.rb', line 47082

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)

47091
47092
47093
# File 'lib/ovirtsdk4/types.rb', line 47091

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)

47100
47101
47102
# File 'lib/ovirtsdk4/types.rb', line 47100

def username=(value)
  @username = value
end

#volume_typesArray<OpenStackVolumeType>

Returns the value of the volume_types attribute.

Returns:


47109
47110
47111
# File 'lib/ovirtsdk4/types.rb', line 47109

def volume_types
  @volume_types
end

#volume_types=(list) ⇒ Object

Sets the value of the volume_types attribute.

Parameters:


47118
47119
47120
47121
47122
47123
47124
47125
47126
47127
47128
# File 'lib/ovirtsdk4/types.rb', line 47118

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