class OvirtSDK4::ImageTransfersService

Constants

ADD
LIST

Public Instance Methods

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

Add a new image transfer. An image needs to be specified in order to make a new 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 10649
def add(image_transfer, opts = {})
  internal_add(image_transfer, ImageTransfer, ADD, opts)
end
image_transfer_service(id) click to toggle source

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 10687
def image_transfer_service(id)
  ImageTransferService.new(@connection, "#{@path}/#{id}")
end
list(opts = {}) click to toggle source

Retrieves the list of image transfers that are currently being performed.

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

# File lib/ovirtsdk4/services.rb, line 10675
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 10698
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
to_s() click to toggle source

Returns an string representation of this service.

@return [String]

# File lib/ovirtsdk4/services.rb, line 10714
def to_s
  "#<#{ImageTransfersService}:#{@path}>"
end