Class: OvirtSDK4::StorageDomainDiskService
- Inherits:
-
MeasurableService
- Object
- Service
- MeasurableService
- OvirtSDK4::StorageDomainDiskService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#copy(opts = {}) ⇒ Object
Copies a disk to the specified storage domain.
-
#export(opts = {}) ⇒ Object
Exports a disk to an export storage domain.
-
#get(opts = {}) ⇒ Disk
Retrieves the description of the disk.
-
#move(opts = {}) ⇒ Object
Moves a disk to another storage domain.
-
#permissions_service ⇒ AssignedPermissionsService
Reference to the service that manages the permissions assigned to the disk.
-
#reduce(opts = {}) ⇒ Object
Reduces the size of the disk image.
-
#remove(opts = {}) ⇒ Object
Removes a disk.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#sparsify(opts = {}) ⇒ Object
Sparsify the disk.
-
#statistics_service ⇒ StatisticsService
Locates the
statisticsservice. -
#update(disk, opts = {}) ⇒ Disk
Updates the disk.
Methods inherited from Service
Instance Method Details
#copy(opts = {}) ⇒ Object
Copies a disk to the specified storage domain.
|
Important
|
Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To copy a disk use the copy operation of the service that manages that disk. |
22642 22643 22644 |
# File 'lib/ovirtsdk4/services.rb', line 22642 def copy(opts = {}) internal_action(:copy, nil, COPY, opts) end |
#export(opts = {}) ⇒ Object
Exports a disk to an export storage domain.
|
Important
|
Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To export a disk use the export operation of the service that manages that disk. |
22672 22673 22674 |
# File 'lib/ovirtsdk4/services.rb', line 22672 def export(opts = {}) internal_action(:export, nil, EXPORT, opts) end |
#get(opts = {}) ⇒ Disk
Retrieves the description of the disk.
22701 22702 22703 |
# File 'lib/ovirtsdk4/services.rb', line 22701 def get(opts = {}) internal_get(GET, opts) end |
#move(opts = {}) ⇒ Object
Moves a disk to another storage domain.
|
Important
|
Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To move a disk use the move operation of the service that manages that disk. |
22737 22738 22739 |
# File 'lib/ovirtsdk4/services.rb', line 22737 def move(opts = {}) internal_action(:move, nil, MOVE, opts) end |
#permissions_service ⇒ AssignedPermissionsService
Reference to the service that manages the permissions assigned to the disk.
22860 22861 22862 |
# File 'lib/ovirtsdk4/services.rb', line 22860 def ||= AssignedPermissionsService.new(self, 'permissions') end |
#reduce(opts = {}) ⇒ Object
Reduces the size of the disk image.
Invokes reduce on the logical volume (i.e. this is only applicable for block storage domains). This is applicable for floating disks and disks attached to non-running virtual machines. There is no need to specify the size as the optimal size is calculated automatically.
22767 22768 22769 |
# File 'lib/ovirtsdk4/services.rb', line 22767 def reduce(opts = {}) internal_action(:reduce, nil, REDUCE, opts) end |
#remove(opts = {}) ⇒ Object
Removes a disk.
|
Important
|
Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To remove a disk use the remove operation of the service that manages that disk. |
22794 22795 22796 |
# File 'lib/ovirtsdk4/services.rb', line 22794 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
22880 22881 22882 22883 22884 22885 22886 22887 22888 22889 22890 22891 22892 22893 22894 22895 22896 22897 |
# File 'lib/ovirtsdk4/services.rb', line 22880 def service(path) if path.nil? || path == '' return self end if path == 'permissions' return end if path.start_with?('permissions/') return .service(path[12..-1]) end if path == 'statistics' return statistics_service end if path.start_with?('statistics/') return statistics_service.service(path[11..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#sparsify(opts = {}) ⇒ Object
Sparsify the disk.
|
Important
|
Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To remove a disk use the remove operation of the service that manages that disk. |
22821 22822 22823 |
# File 'lib/ovirtsdk4/services.rb', line 22821 def sparsify(opts = {}) internal_action(:sparsify, nil, SPARSIFY, opts) end |
#statistics_service ⇒ StatisticsService
Locates the statistics service.
22869 22870 22871 |
# File 'lib/ovirtsdk4/services.rb', line 22869 def statistics_service @statistics_service ||= StatisticsService.new(self, 'statistics') end |
#update(disk, opts = {}) ⇒ Disk
Updates the disk.
|
Important
|
Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To update a disk use the update operation of the service that manages that disk. |
22851 22852 22853 |
# File 'lib/ovirtsdk4/services.rb', line 22851 def update(disk, opts = {}) internal_update(disk, Disk, UPDATE, opts) end |