Locates the `disk_profiles` service.
@return [AssignedDiskProfilesService] A reference to `disk_profiles` service.
# File lib/ovirtsdk4/services.rb, line 19954 def disk_profiles_service AssignedDiskProfilesService.new(@connection, "#{@path}/diskprofiles") end
Locates the `disk_snapshots` service.
@return [DiskSnapshotsService] A reference to `disk_snapshots` service.
# File lib/ovirtsdk4/services.rb, line 19963 def disk_snapshots_service DiskSnapshotsService.new(@connection, "#{@path}/disksnapshots") end
Locates the `disks` service.
@return [DisksService] A reference to `disks` service.
# File lib/ovirtsdk4/services.rb, line 19972 def disks_service DisksService.new(@connection, "#{@path}/disks") end
Returns a reference to the service that manages the files available in the storage domain.
@return [FilesService] A reference to `files` service.
# File lib/ovirtsdk4/services.rb, line 19981 def files_service FilesService.new(@connection, "#{@path}/files") end
Returns the representation of the object managed by this service.
@param opts [Hash] Additional options.
@option opts [Boolean] :filter Indicates if the results should be filtered according to the permissions of the user.
@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 [StorageDomain]
# File lib/ovirtsdk4/services.rb, line 19678 def get(opts = {}) internal_get(GET, opts) end
Locates the `images` service.
@return [ImagesService] A reference to `images` service.
# File lib/ovirtsdk4/services.rb, line 19990 def images_service ImagesService.new(@connection, "#{@path}/images") end
Executes the `is_attached` method.
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the action should be performed asynchronously.
@option opts [Host] :host
@option opts [Boolean] :is_attached
@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 19702 def is_attached(opts = {}) internal_action(:isattached, :is_attached, opts) end
Locates the `permissions` service.
@return [AssignedPermissionsService] A reference to `permissions` service.
# File lib/ovirtsdk4/services.rb, line 19999 def permissions_service AssignedPermissionsService.new(@connection, "#{@path}/permissions") end
This operation reduces logical units from the storage domain.
In order to do so the data stored on the provided logical units will be moved to other logical units of the storage domain and only then they will be reduced from the storage domain.
For example, in order to reduce two logical units from a storage domain send a request like this:
POST /ovirt-engine/api/storagedomains/123/reduceluns
With a request body like this:
<action> <logical_units> <logical_unit id="1IET_00010001"/> <logical_unit id="1IET_00010002"/> </logical_units> </action>
Note that this operation is only applicable to block storage domains (i.e., storage domains with the <<types/storage_type, storage type> of iSCSI or FCP).
@param opts [Hash] Additional options.
@option opts [Array<LogicalUnit>] :logical_units The logical units that needs to be reduced from the storage domain.
@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 19747 def reduce_luns(opts = {}) internal_action(:reduceluns, nil, opts) end
This operation refreshes the LUN size.
After increasing the size of the underlying LUN on the storage server, the user can refresh the LUN size. This action forces a rescan of the provided LUNs and updates the database with the new size if required.
For example, in order to refresh the size of two LUNs send a request like this:
POST /ovirt-engine/api/storagedomains/262b056b-aede-40f1-9666-b883eff59d40/refreshluns
With a request body like this:
<action> <logical_units> <logical_unit id="1IET_00010001"/> <logical_unit id="1IET_00010002"/> </logical_units> </action>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the refresh should be performed asynchronously.
@option opts [Array<LogicalUnit>] :logical_units The LUNs that need to be refreshed.
@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 19793 def refresh_luns(opts = {}) internal_action(:refreshluns, nil, opts) end
Removes the storage domain.
Without any special parameters, the storage domain is detached from the system and removed from the database. The storage domain can then be imported to the same or different setup, with all the data on it. If the storage isn't accessible the operation will fail.
If the `destroy` parameter is `true` then the operation will always succeed, even if the storage isn't accessible, the failure is just ignored and the storage domain is removed from the database anyway.
If the `format` parameter is `true` then the actual storage is formatted, and the metadata is removed from the LUN or directory, so it can no longer be imported to the same or a different setup.
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the remove should be performed asynchronously. @option opts [Boolean] :destroy Indicates if the operation should succeed, and the storage domain removed from the database, even if the
storage isn't accessible. [source] ---- DELETE /ovirt-engine/api/storagedomains/123?destroy=true ---- This parameter is optional, and the default value is `false`.
@option opts [Boolean] :format Indicates if the actual storage should be formatted, removing all the metadata from the underlying LUN or
directory: [source] ---- DELETE /ovirt-engine/api/storagedomains/123?format=true ---- This parameter is optional, and the default value is `false`.
@option opts [String] :host Indicates what host should be used to remove the storage domain.
This parameter is mandatory, and it can contain the name or the identifier of the host. For example, to use the host named `myhost` to remove the storage domain with identifier `123` send a request like this: [source] ---- DELETE /ovirt-engine/api/storagedomains/123?host=myhost ----
@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 19858 def remove(opts = {}) internal_remove(REMOVE, 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 20037 def service(path) if path.nil? || path == '' return self end if path == 'diskprofiles' return disk_profiles_service end if path.start_with?('diskprofiles/') return disk_profiles_service.service(path[13..-1]) end if path == 'disksnapshots' return disk_snapshots_service end if path.start_with?('disksnapshots/') return disk_snapshots_service.service(path[14..-1]) end if path == 'disks' return disks_service end if path.start_with?('disks/') return disks_service.service(path[6..-1]) end if path == 'files' return files_service end if path.start_with?('files/') return files_service.service(path[6..-1]) end if path == 'images' return images_service end if path.start_with?('images/') return images_service.service(path[7..-1]) end if path == 'permissions' return permissions_service end if path.start_with?('permissions/') return permissions_service.service(path[12..-1]) end if path == 'storageconnections' return storage_connections_service end if path.start_with?('storageconnections/') return storage_connections_service.service(path[19..-1]) end if path == 'templates' return templates_service end if path.start_with?('templates/') return templates_service.service(path[10..-1]) end if path == 'vms' return vms_service end if path.start_with?('vms/') return vms_service.service(path[4..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end
Returns a reference to the service that manages the storage connections.
@return [StorageDomainServerConnectionsService] A reference to `storage_connections` service.
# File lib/ovirtsdk4/services.rb, line 20008 def storage_connections_service StorageDomainServerConnectionsService.new(@connection, "#{@path}/storageconnections") end
Locates the `templates` service.
@return [StorageDomainTemplatesService] A reference to `templates` service.
# File lib/ovirtsdk4/services.rb, line 20017 def templates_service StorageDomainTemplatesService.new(@connection, "#{@path}/templates") end
Returns an string representation of this service.
@return [String]
# File lib/ovirtsdk4/services.rb, line 20103 def to_s "#<#{StorageDomainService}:#{@path}>" end
Updates a storage domain.
Not all of the <<types/storage_domain,StorageDomain>>'s attributes are updatable post-creation. Those that can be updated are: `name`, `description`, `comment`, `warning_low_space_indicator`, `critical_space_action_blocker` and `wipe_after_delete` (note that changing the `wipe_after_delete` attribute will not change the wipe after delete property of disks that already exist).
To update the `name` and `wipe_after_delete` attributes of a storage domain with an identifier `123`, send a request as follows:
PUT /ovirt-engine/api/storagedomains/123
With a request body as follows:
<storage_domain>
<name>data2</name> <wipe_after_delete>true</wipe_after_delete>
</storage_domain>
@param storage_domain [StorageDomain] The `storage_domain` to update. @param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the update should be performed asynchronously.
@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 [StorageDomain]
# File lib/ovirtsdk4/services.rb, line 19910 def update(storage_domain, opts = {}) internal_update(storage_domain, StorageDomain, UPDATE, opts) end
This operation forces the update of the `OVF_STORE` of this storage domain.
The `OVF_STORE` is a disk image that contains the meta-data of virtual machines and disks that reside in the storage domain. This meta-data is used in case the domain is imported or exported to or from a different data center or a different installation.
By default the `OVF_STORE` is updated periodically (set by default to 60 minutes) but users might want to force an update after an important change, or when the they believe the `OVF_STORE` is corrupt.
When initiated by the user, `OVF_STORE` update will be performed whether an update is needed or not.
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the `OVF_STORE` update should be performed asynchronously.
@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 19945 def update_ovf_store(opts = {}) internal_action(:updateovfstore, nil, opts) end
Locates the `vms` service.
@return [StorageDomainVmsService] A reference to `vms` service.
# File lib/ovirtsdk4/services.rb, line 20026 def vms_service StorageDomainVmsService.new(@connection, "#{@path}/vms") end