class OvirtSDK4::ImageTransferService

Constants

EXTEND
FINALIZE
GET
PAUSE
RESUME

Public Instance Methods

extend(opts = {}) click to toggle source

Extend the image transfer session.

@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.

# File lib/ovirtsdk4/services.rb, line 12005
def extend(opts = {})
  internal_action(:extend, nil, EXTEND, opts)
end
finalize(opts = {}) click to toggle source

After finishing to transfer the data, finalize the transfer.

This will make sure that the data being transferred is valid and fits the image entity that was targeted in the transfer. Specifically, will verify that if the image entity is a QCOW disk, the data uploaded is indeed a QCOW file, and that the image doesn't have a backing file.

@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.

# File lib/ovirtsdk4/services.rb, line 12033
def finalize(opts = {})
  internal_action(:finalize, nil, FINALIZE, opts)
end
get(opts = {}) click to toggle source

Get the image transfer entity.

@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 12058
def get(opts = {})
  internal_get(GET, opts)
end
pause(opts = {}) click to toggle source

Pause the image transfer session.

@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.

# File lib/ovirtsdk4/services.rb, line 12081
def pause(opts = {})
  internal_action(:pause, nil, PAUSE, opts)
end
resume(opts = {}) click to toggle source

Resume the image transfer session. The client will need to poll the transfer's phase until it is different than `resuming`. For example:

source,python

transfer_service = transfers_service.image_transfer_service(transfer.id) transfer_service.resume() transfer = transfer_service.get()

while transfer.phase == types.ImageTransferPhase.RESUMING:

time.sleep(1)
transfer = transfer_service.get()

@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.

# File lib/ovirtsdk4/services.rb, line 12116
def resume(opts = {})
  internal_action(:resume, nil, RESUME, 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 12127
def service(path)
  if path.nil? || path == ''
    return self
  end
  raise Error.new("The path \"#{path}\" doesn't correspond to any service")
end
to_s() click to toggle source

Returns an string representation of this service.

@return [String]

# File lib/ovirtsdk4/services.rb, line 12139
def to_s
  "#<#{ImageTransferService}:#{absolute_path}>"
end