class OvirtSDK4::MacPoolsService
Constants
- ADD
- LIST
Public Instance Methods
Creates a new MAC address pool.
Creation of a MAC address pool requires values for the `name` and `ranges` attributes.
For example, to create MAC address pool send a request like this:
“`http POST /ovirt-engine/api/macpools HTTP/1.1 “`
With a request body like this:
“`xml <mac_pool>
<name>MACPool</name>
<description>A MAC address pool</description>
<allow_duplicates>true</allow_duplicates>
<default_pool>false</default_pool>
<ranges>
<range>
<from>00:1A:4A:16:01:51</from>
<to>00:1A:4A:16:01:e6</to>
</range>
</ranges>
</mac_pool> “`
@param pool [MacPool] The `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 [MacPool]
# File lib/ovirtsdk4/services.rb, line 15500 def add(pool, opts = {}) internal_add(pool, MacPool, ADD, opts) end
Return the list of MAC address pools of the system.
The returned list of MAC address pools isn't guaranteed.
@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 [Integer] :max Sets the maximum number of pools to return. If not specified all the pools are returned.
@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<MacPool>]
# File lib/ovirtsdk4/services.rb, line 15534 def list(opts = {}) internal_get(LIST, opts) end
Locates the `mac_pool` service.
@param id [String] The identifier of the `mac_pool`.
@return [MacPoolService] A reference to the `mac_pool` service.
# File lib/ovirtsdk4/services.rb, line 15545 def mac_pool_service(id) MacPoolService.new(self, 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 15556 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return mac_pool_service(path) end return mac_pool_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end