class OvirtSDK4::SystemOptionService

Constants

GET

Public Instance Methods

get(opts = {}) click to toggle source

Get the values of specific configuration option.

For example to retrieve the values of configuration option `MigrationPolicies` send a request like this:

source

GET /ovirt-engine/api/options/MigrationPolicies


The response to that request will be the following:

source,xml

<?xml version=“1.0” encoding=“UTF-8” standalone=“yes”?> <system_option href=“/ovirt-engine/api/options/MigrationPolicies” id=“MigrationPolicies”>

<name>MigrationPolicies</name>
<values>
    <system_option_value>
        <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
        <version>4.2</version>
    </system_option_value>
    <system_option_value>
        <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
        <version>4.3</version>
    </system_option_value>
    <system_option_value>
        <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
        <version>4.4</version>
    </system_option_value>
    <system_option_value>
        <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
        <version>4.5</version>
    </system_option_value>
    <system_option_value>
        <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
        <version>4.6</version>
    </system_option_value>
    <system_option_value>
        <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
        <version>4.7</version>
    </system_option_value>
</values>

</system_option>


NOTE: The appropriate permissions are required to query configuration options. Some options can be queried only by users with administrator permissions.

IMPORTANT

There is NO backward compatibility and no guarantee about the names or values of the options. Options may be removed and their meaning can be changed at any point.

We strongly discourage the use of this service for applications other than the ones that are released simultaneously with the engine. Usage by other applications is not supported. Therefore there will be no documentation listing accessible configuration options.

@param opts [Hash] Additional options.

@option opts [String] :version Optional version parameter that specifies that only particular version of the configuration option

should be returned.
If this parameter isn't used then all the versions will be returned.

For example, to get the value of the `MigrationPolicies` option but only for version `4.2` send
a request like this:

[source]
----
GET /ovirt-engine/api/options/MigrationPolicies?version=4.2
----

The response to that request will be like this:

[source,xml]
----
<system_option href="/ovirt-engine/api/options/MigrationPolicies" id="MigrationPolicies">
    <name>MigrationPolicies</name>
    <values>
        <system_option_value>
            <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
            <version>4.2</version>
        </system_option_value>
    </values>
</system_option>
----

@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 [SystemOption]

# File lib/ovirtsdk4/services.rb, line 26297
def get(opts = {})
  internal_get(GET, 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 26308
def service(path)
  if path.nil? || path == ''
    return self
  end
  raise Error.new("The path \"#{path}\" doesn't correspond to any service")
end