Class: OvirtSDK4::VmDiskService
- Inherits:
-
MeasurableService
- Object
- Service
- MeasurableService
- OvirtSDK4::VmDiskService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#activate(opts = {}) ⇒ Object
Executes the
activate
method. -
#deactivate(opts = {}) ⇒ Object
Executes the
deactivate
method. -
#export(opts = {}) ⇒ Object
Executes the
export
method. -
#get(opts = {}) ⇒ Disk
Returns the representation of the object managed by this service.
-
#move(opts = {}) ⇒ Object
Executes the
move
method. -
#permissions_service ⇒ AssignedPermissionsService
Locates the
permissions
service. -
#remove(opts = {}) ⇒ Object
Detach the disk from the virtual machine.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#statistics_service ⇒ StatisticsService
Locates the
statistics
service. -
#update(disk, opts = {}) ⇒ Disk
Updates the
disk
.
Methods inherited from Service
Instance Method Details
#activate(opts = {}) ⇒ Object
Executes the activate
method.
29445 29446 29447 |
# File 'lib/ovirtsdk4/services.rb', line 29445 def activate(opts = {}) internal_action(:activate, nil, ACTIVATE, opts) end |
#deactivate(opts = {}) ⇒ Object
Executes the deactivate
method.
29471 29472 29473 |
# File 'lib/ovirtsdk4/services.rb', line 29471 def deactivate(opts = {}) internal_action(:deactivate, nil, DEACTIVATE, opts) end |
#export(opts = {}) ⇒ Object
Executes the export
method.
29500 29501 29502 |
# File 'lib/ovirtsdk4/services.rb', line 29500 def export(opts = {}) internal_action(:export, nil, EXPORT, opts) end |
#get(opts = {}) ⇒ Disk
Returns the representation of the object managed by this service.
29529 29530 29531 |
# File 'lib/ovirtsdk4/services.rb', line 29529 def get(opts = {}) internal_get(GET, opts) end |
#move(opts = {}) ⇒ Object
Executes the move
method.
29558 29559 29560 |
# File 'lib/ovirtsdk4/services.rb', line 29558 def move(opts = {}) internal_action(:move, nil, MOVE, opts) end |
#permissions_service ⇒ AssignedPermissionsService
Locates the permissions
service.
29625 29626 29627 |
# File 'lib/ovirtsdk4/services.rb', line 29625 def @permissions_service ||= AssignedPermissionsService.new(self, 'permissions') end |
#remove(opts = {}) ⇒ Object
Detach the disk from the virtual machine.
Note
|
In version 3 of the API this used to also remove the disk completely from the system, but starting with version 4 it doesn’t. If you need to remove it completely use the remove method of the top level disk service. |
29587 29588 29589 |
# File 'lib/ovirtsdk4/services.rb', line 29587 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
29645 29646 29647 29648 29649 29650 29651 29652 29653 29654 29655 29656 29657 29658 29659 29660 29661 29662 |
# File 'lib/ovirtsdk4/services.rb', line 29645 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 |
#statistics_service ⇒ StatisticsService
Locates the statistics
service.
29634 29635 29636 |
# File 'lib/ovirtsdk4/services.rb', line 29634 def statistics_service @statistics_service ||= StatisticsService.new(self, 'statistics') end |