Creates a new virtual machine pool.
A new pool requires the `name`, `cluster` and `template` attributes. Identify the cluster and template with the `id` or `name` nested attributes:
POST /ovirt-engine/api/vmpools
With the following body:
<vmpool>
<name>mypool</name> <cluster id="123"/> <template id="456"/>
</vmpool>
@param pool [VmPool] Pool 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 [VmPool]
# File lib/ovirtsdk4/services.rb, line 28450 def add(pool, opts = {}) internal_add(pool, VmPool, ADD, opts) end
Get a list of available virtual machines pools.
GET /ovirt-engine/api/vmpools
You will receive the following response:
<vm_pools>
<vm_pool id="123"> ... </vm_pool> ...
</vm_pools>
@param opts [Hash] Additional options.
@option opts [Boolean] :case_sensitive Indicates if the search performed using the `search` parameter should be performed taking case into
account. The default value is `true`, which means that case is taken into account. If you want to search ignoring case set it to `false`.
@option opts [Boolean] :filter Indicates if the results should be filtered according to the permissions of the user.
@option opts [Integer] :max Sets the maximum number of pools to return. If this value is not specified, all of the pools are returned.
@option opts [String] :search A query string used to restrict the returned pools.
@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<VmPool>]
# File lib/ovirtsdk4/services.rb, line 28506 def list(opts = {}) internal_get(LIST, opts) end
Reference to the service that manages a specific virtual machine pool.
@param id [String] The identifier of the `pool`.
@return [VmPoolService] A reference to the `pool` service.
# File lib/ovirtsdk4/services.rb, line 28517 def pool_service(id) VmPoolService.new(@connection, "#{@path}/#{id}") 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 28528 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return pool_service(path) end return pool_service(path[0..(index - 1)]).service(path[(index +1)..-1]) end
Returns an string representation of this service.
@return [String]
# File lib/ovirtsdk4/services.rb, line 28544 def to_s "#<#{VmPoolsService}:#{@path}>" end