Class: OvirtSDK4::FilesService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#file_service(id) ⇒ FileService
Locates the
file
service. -
#list(opts = {}) ⇒ Array<File>
Returns the list of ISO images and virtual floppy disks available in the storage domain.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#file_service(id) ⇒ FileService
Locates the file
service.
10836 10837 10838 |
# File 'lib/ovirtsdk4/services.rb', line 10836 def file_service(id) FileService.new(self, id) end |
#list(opts = {}) ⇒ Array<File>
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
:
# 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.
|
10825 10826 10827 |
# File 'lib/ovirtsdk4/services.rb', line 10825 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 |
# 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 |