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.



45816
45817
45818
45819
45820
45821
45822
# File 'lib/ovirtsdk4/types.rb', line 45816

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.



45827
45828
45829
45830
45831
45832
45833
# File 'lib/ovirtsdk4/types.rb', line 45827

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.



45474
45475
45476
# File 'lib/ovirtsdk4/types.rb', line 45474

def authentication_keys
  @authentication_keys
end

#authentication_keys=(list) ⇒ Object

Sets the value of the authentication_keys attribute.

Parameters:



45483
45484
45485
45486
45487
45488
45489
45490
45491
45492
45493
# File 'lib/ovirtsdk4/types.rb', line 45483

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)


45500
45501
45502
# File 'lib/ovirtsdk4/types.rb', line 45500

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)


45509
45510
45511
# File 'lib/ovirtsdk4/types.rb', line 45509

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:



45518
45519
45520
# File 'lib/ovirtsdk4/types.rb', line 45518

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:



45527
45528
45529
45530
45531
45532
45533
45534
45535
45536
45537
# File 'lib/ovirtsdk4/types.rb', line 45527

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)


45544
45545
45546
# File 'lib/ovirtsdk4/types.rb', line 45544

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


45553
45554
45555
# File 'lib/ovirtsdk4/types.rb', line 45553

def comment=(value)
  @comment = value
end

#data_centerDataCenter

Returns the value of the data_center attribute.

Returns:



45562
45563
45564
# File 'lib/ovirtsdk4/types.rb', line 45562

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:



45575
45576
45577
45578
45579
45580
# File 'lib/ovirtsdk4/types.rb', line 45575

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)


45587
45588
45589
# File 'lib/ovirtsdk4/types.rb', line 45587

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


45596
45597
45598
# File 'lib/ovirtsdk4/types.rb', line 45596

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



45838
45839
45840
45841
45842
45843
45844
# File 'lib/ovirtsdk4/types.rb', line 45838

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)


45605
45606
45607
# File 'lib/ovirtsdk4/types.rb', line 45605

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


45614
45615
45616
# File 'lib/ovirtsdk4/types.rb', line 45614

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


45623
45624
45625
# File 'lib/ovirtsdk4/types.rb', line 45623

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


45632
45633
45634
# File 'lib/ovirtsdk4/types.rb', line 45632

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


45641
45642
45643
# File 'lib/ovirtsdk4/types.rb', line 45641

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


45650
45651
45652
# File 'lib/ovirtsdk4/types.rb', line 45650

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



45659
45660
45661
# File 'lib/ovirtsdk4/types.rb', line 45659

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



45668
45669
45670
45671
45672
45673
45674
45675
45676
45677
45678
# File 'lib/ovirtsdk4/types.rb', line 45668

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)


45685
45686
45687
# File 'lib/ovirtsdk4/types.rb', line 45685

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)


45694
45695
45696
# File 'lib/ovirtsdk4/types.rb', line 45694

def requires_authentication=(value)
  @requires_authentication = value
end

#tenant_nameString

Returns the value of the tenant_name attribute.

Returns:

  • (String)


45703
45704
45705
# File 'lib/ovirtsdk4/types.rb', line 45703

def tenant_name
  @tenant_name
end

#tenant_name=(value) ⇒ Object

Sets the value of the tenant_name attribute.

Parameters:

  • value (String)


45712
45713
45714
# File 'lib/ovirtsdk4/types.rb', line 45712

def tenant_name=(value)
  @tenant_name = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


45721
45722
45723
# File 'lib/ovirtsdk4/types.rb', line 45721

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


45730
45731
45732
# File 'lib/ovirtsdk4/types.rb', line 45730

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


45739
45740
45741
# File 'lib/ovirtsdk4/types.rb', line 45739

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


45748
45749
45750
# File 'lib/ovirtsdk4/types.rb', line 45748

def username=(value)
  @username = value
end

#volume_typesArray<OpenStackVolumeType>

Returns the value of the volume_types attribute.

Returns:



45757
45758
45759
# File 'lib/ovirtsdk4/types.rb', line 45757

def volume_types
  @volume_types
end

#volume_types=(list) ⇒ Object

Sets the value of the volume_types attribute.

Parameters:



45766
45767
45768
45769
45770
45771
45772
45773
45774
45775
45776
# File 'lib/ovirtsdk4/types.rb', line 45766

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