class OvirtSDK4::OpenstackVolumeProviderService

Constants

GET
IMPORT_CERTIFICATES
REMOVE
TEST_CONNECTIVITY
UPDATE

Public Instance Methods

authentication_keys_service() click to toggle source

Locates the `authentication_keys` service.

@return [OpenstackVolumeAuthenticationKeysService] A reference to `authentication_keys` service.

# File lib/ovirtsdk4/services.rb, line 18465
def authentication_keys_service
  @authentication_keys_service ||= OpenstackVolumeAuthenticationKeysService.new(self, 'authenticationkeys')
end
certificates_service() click to toggle source

A service to view certificates for this external provider.

@return [ExternalProviderCertificatesService] A reference to `certificates` service.

# File lib/ovirtsdk4/services.rb, line 18474
def certificates_service
  @certificates_service ||= ExternalProviderCertificatesService.new(self, 'certificates')
end
get(opts = {}) click to toggle source

Returns the representation of the object managed by this service.

@param opts [Hash] Additional options.

@option opts [String] :follow Indicates which inner links should be followed. The objects referenced by these links will be fetched as part

of the current request. See <<documents/003_common_concepts/follow, here>> for details.

@option opts [Hash] :headers ({}) Additional HTTP headers.

@option opts [Hash] :query ({}) Additional URL query parameters.

@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly

given then the timeout set globally for the connection will be used.

@option opts [Boolean] :wait (true) If `true` wait for the response.

@return [OpenStackVolumeProvider]

# File lib/ovirtsdk4/services.rb, line 18339
def get(opts = {})
  internal_get(GET, opts)
end
import_certificates(opts = {}) click to toggle source

Import the SSL certificates of the external host provider.

@param opts [Hash] Additional options.

@option opts [Array<Certificate>] :certificates

@option opts [Hash] :headers ({}) Additional HTTP headers.

@option opts [Hash] :query ({}) Additional URL query parameters.

@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly

given then the timeout set globally for the connection will be used.

@option opts [Boolean] :wait (true) If `true` wait for the response.

# File lib/ovirtsdk4/services.rb, line 18365
def import_certificates(opts = {})
  internal_action(:importcertificates, nil, IMPORT_CERTIFICATES, opts)
end
remove(opts = {}) click to toggle source

Deletes the object managed by this service.

@param opts [Hash] Additional options.

@option opts [Boolean] :async Indicates if the remove should be performed asynchronously. @option opts [Boolean] :force Indicates if the operation should succeed, and the provider removed from the database,

even if something fails during the operation.

This parameter is optional, and the default value is `false`.

@option opts [Hash] :headers ({}) Additional HTTP headers.

@option opts [Hash] :query ({}) Additional URL query parameters.

@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly

given then the timeout set globally for the connection will be used.

@option opts [Boolean] :wait (true) If `true` wait for the response.

# File lib/ovirtsdk4/services.rb, line 18395
def remove(opts = {})
  internal_remove(REMOVE, opts)
end
service(path) click to toggle source

Locates the service corresponding to the given path.

@param path [String] The path of the service.

@return [Service] A reference to the service.

# File lib/ovirtsdk4/services.rb, line 18494
def service(path)
  if path.nil? || path == ''
    return self
  end
  if path == 'authenticationkeys'
    return authentication_keys_service
  end
  if path.start_with?('authenticationkeys/')
    return authentication_keys_service.service(path[19..-1])
  end
  if path == 'certificates'
    return certificates_service
  end
  if path.start_with?('certificates/')
    return certificates_service.service(path[13..-1])
  end
  if path == 'volumetypes'
    return volume_types_service
  end
  if path.start_with?('volumetypes/')
    return volume_types_service.service(path[12..-1])
  end
  raise Error.new("The path \"#{path}\" doesn't correspond to any service")
end
test_connectivity(opts = {}) click to toggle source

In order to test connectivity for external provider we need to run following request where 123 is an id of a provider.

source

POST /ovirt-engine/api/externalhostproviders/123/testconnectivity


@param opts [Hash] Additional options.

@option opts [Boolean] :async Indicates if the test should be performed asynchronously.

@option opts [Hash] :headers ({}) Additional HTTP headers.

@option opts [Hash] :query ({}) Additional URL query parameters.

@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly

given then the timeout set globally for the connection will be used.

@option opts [Boolean] :wait (true) If `true` wait for the response.

# File lib/ovirtsdk4/services.rb, line 18427
def test_connectivity(opts = {})
  internal_action(:testconnectivity, nil, TEST_CONNECTIVITY, opts)
end
update(provider, opts = {}) click to toggle source

Update the specified OpenStack volume provider in the system.

@param provider [OpenStackVolumeProvider] The `provider` to update. @param opts [Hash] Additional options.

@option opts [Boolean] :async Indicates if the update should be performed asynchronously.

@option opts [Hash] :headers ({}) Additional HTTP headers.

@option opts [Hash] :query ({}) Additional URL query parameters.

@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly

given then the timeout set globally for the connection will be used.

@option opts [Boolean] :wait (true) If `true` wait for the response.

@return [OpenStackVolumeProvider]

# File lib/ovirtsdk4/services.rb, line 18456
def update(provider, opts = {})
  internal_update(provider, OpenStackVolumeProvider, UPDATE, opts)
end
volume_types_service() click to toggle source

Locates the `volume_types` service.

@return [OpenstackVolumeTypesService] A reference to `volume_types` service.

# File lib/ovirtsdk4/services.rb, line 18483
def volume_types_service
  @volume_types_service ||= OpenstackVolumeTypesService.new(self, 'volumetypes')
end