Add a new image transfer. An image, disk or disk snapshot needs to be specified in order to make a new transfer.
IMPORTANT: The `image` attribute is deprecated since version 4.2 of the engine. Use the `disk` or `snapshot` attributes instead.
@param image_transfer [ImageTransfer] The `image_transfer` 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 [ImageTransfer]
# File lib/ovirtsdk4/services.rb, line 12117 def add(image_transfer, opts = {}) internal_add(image_transfer, ImageTransfer, ADD, opts) end
Adds a new `image_transfer`.
@param image_transfer [ImageTransfer] The `image_transfer` 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 [ImageTransfer]
# File lib/ovirtsdk4/services.rb, line 12144 def add_for_disk(image_transfer, opts = {}) internal_add(image_transfer, ImageTransfer, ADD_FOR_DISK, opts) end
Adds a new `image_transfer`.
@param image_transfer [ImageTransfer] The `image_transfer` 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 [ImageTransfer]
# File lib/ovirtsdk4/services.rb, line 12171 def add_for_image(image_transfer, opts = {}) internal_add(image_transfer, ImageTransfer, ADD_FOR_IMAGE, opts) end
Adds a new `image_transfer`.
@param image_transfer [ImageTransfer] The `image_transfer` 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 [ImageTransfer]
# File lib/ovirtsdk4/services.rb, line 12198 def add_for_snapshot(image_transfer, opts = {}) internal_add(image_transfer, ImageTransfer, ADD_FOR_SNAPSHOT, opts) end
Returns a reference to the service that manages an specific image transfer.
@param id [String] The identifier of the `image_transfer`.
@return [ImageTransferService] A reference to the `image_transfer` service.
# File lib/ovirtsdk4/services.rb, line 12242 def image_transfer_service(id) ImageTransferService.new(self, id) end
Retrieves the list of image transfers that are currently being performed.
The order of the returned list of image transfers is not 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 [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<ImageTransfer>]
# File lib/ovirtsdk4/services.rb, line 12230 def list(opts = {}) internal_get(LIST, 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 12253 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return image_transfer_service(path) end return image_transfer_service(path[0..(index - 1)]).service(path[(index +1)..-1]) end