class OvirtSDK4::ClusterEnabledFeaturesService

Constants

ADD
LIST

Public Instance Methods

add(feature, opts = {}) click to toggle source

Enable an additional feature for a cluster.

For example, to enable a feature `456` on cluster `123`, send a request like this:

source

POST /ovirt-engine/api/clusters/123/enabledfeatures


The request body should look like this:

source,xml

<cluster_feature id=“456”/>


@param feature [ClusterFeature] The `feature` to add.

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

# File lib/ovirtsdk4/services.rb, line 5241
def add(feature, opts = {})
  internal_add(feature, ClusterFeature, ADD, opts)
end
feature_service(id) click to toggle source

A reference to the service that provides information about a specific feature enabled for the cluster.

@param id [String] The identifier of the `feature`.

@return [ClusterEnabledFeatureService] A reference to the `feature` service.

# File lib/ovirtsdk4/services.rb, line 5301
def feature_service(id)
  ClusterEnabledFeatureService.new(self, id)
end
list(opts = {}) click to toggle source

Lists the additional features enabled for the cluster.

For example, to get the features enabled for cluster `123` send a request like this:

source

GET /ovirt-engine/api/clusters/123/enabledfeatures


This will return a list of features:

source,xml

<enabled_features>

<cluster_feature id="123">
   <name>test_feature</name>
</cluster_feature>
...

</enabled_features>


@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 [Array<ClusterFeature>]

# File lib/ovirtsdk4/services.rb, line 5289
def list(opts = {})
  internal_get(LIST, 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 5312
def service(path)
  if path.nil? || path == ''
    return self
  end
  index = path.index('/')
  if index.nil?
    return feature_service(path)
  end
  return feature_service(path[0..(index - 1)]).service(path[(index + 1)..-1])
end