class OvirtSDK4::FilesService
Constants
- LIST
Public Instance Methods
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 10836 def file_service(id) FileService.new(self, id) end
Returns the list of ISO images and virtual floppy disks available in the storage domain. The order of the returned list is not guaranteed.
If the `refresh` parameter is `false`, the returned list may not reflect recent changes to the storage domain; for example, it may not contain a new ISO file that was recently added. This is because the server caches the list of files to improve performance. To get the very latest results, set the `refresh` parameter to `true`.
The default value of the `refresh` parameter is `true`, but it can be changed using the configuration value `ForceRefreshDomainFilesByDefault`:
- source
# engine-config -s ForceRefreshDomainFilesByDefault=false
IMPORTANT: Setting the value of the `refresh` parameter to `true` has an impact on the performance of the server. Use it only if necessary.
@param opts [Hash] Additional options.
@option opts [Boolean] :case_sensitive Indicates if the search performed using the `search` parameter should take case into
account. The default value is `true`.
@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 files to return. If not specified, all the files are returned.
@option opts [Boolean] :refresh Indicates whether the list of files should be refreshed from the storage domain, rather than showing cached
results that are updated at certain intervals.
@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 10825 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 10847 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