class OvirtSDK4::FilesService

Constants

LIST

Public Instance Methods

file_service(id) click to toggle source

Locates the `file` service.

@param id [String] The identifier of the `file`.

@return [FileService] A reference to the `file` service.

# File lib/ovirtsdk4/services.rb, line 8727
def file_service(id)
  FileService.new(@connection, "#{@path}/#{id}")
end
list(opts = {}) click to toggle source

Returns the list of ISO images and virtual floppy disks available in the storage domain.

The order returned list of ISO images and virtual floppy disks isn't guaranteed.

@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 [Integer] :max Sets the maximum number of files to return. If not specified all the files are returned.

@option opts [String] :search A query string used to restrict the returned files.

@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<File>]

# File lib/ovirtsdk4/services.rb, line 8716
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 8738
def service(path)
  if path.nil? || path == ''
    return self
  end
  index = path.index('/')
  if index.nil?
    return file_service(path)
  end
  return file_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 8754
def to_s
  "#<#{FilesService}:#{@path}>"
end