A service to view certificates for this external provider.
@return [ExternalProviderCertificatesService] A reference to `certificates` service.
# File lib/ovirtsdk4/services.rb, line 14382 def certificates_service @certificates_service ||= ExternalProviderCertificatesService.new(self, 'certificates') end
Returns the representation of the object managed by this service.
For example, to get the OpenStack network provider with identifier `1234`, send a request like this:
GET /ovirt-engine/api/openstacknetworkproviders/1234
@param opts [Hash] Additional options.
@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 [OpenStackNetworkProvider]
# File lib/ovirtsdk4/services.rb, line 14245 def get(opts = {}) internal_get(GET, opts) end
Executes the `import_certificates` method.
@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 14265 def import_certificates(opts = {}) internal_action(:importcertificates, nil, opts) end
Reference to OpenStack networks service.
@return [OpenstackNetworksService] A reference to `networks` service.
# File lib/ovirtsdk4/services.rb, line 14391 def networks_service @networks_service ||= OpenstackNetworksService.new(self, 'networks') end
Removes the provider.
For example, to remove the OpenStack network provider with identifier `1234`, send a request like this:
DELETE /ovirt-engine/api/openstacknetworkproviders/1234
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the remove 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 14297 def remove(opts = {}) internal_remove(REMOVE, opts) end
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 14402 def service(path) if path.nil? || path == '' return self end if path == 'certificates' return certificates_service end if path.start_with?('certificates/') return certificates_service.service(path[13..-1]) end if path == 'networks' return networks_service end if path.start_with?('networks/') return networks_service.service(path[9..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end
In order to test connectivity for external provider we need to run following request where 123 is an id of a provider.
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 14323 def test_connectivity(opts = {}) internal_action(:testconnectivity, nil, opts) end
Updates the provider.
For example, to update `provider_name`, `requires_authentication`, `url`, `tenant_name` and `type` properties, for the OpenStack network provider with identifier `1234`, send a request like this:
PUT /ovirt-engine/api/openstacknetworkproviders/1234
With a request body like this:
<openstack_network_provider>
<name>ovn-network-provider</name> <requires_authentication>false</requires_authentication> <url>http://some_server_url.domain.com:9696</url> <tenant_name>oVirt</tenant_name> <type>external</type>
</openstack_network_provider>
@param provider [OpenStackNetworkProvider] 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 [OpenStackNetworkProvider]
# File lib/ovirtsdk4/services.rb, line 14373 def update(provider, opts = {}) internal_update(provider, OpenStackNetworkProvider, UPDATE, opts) end