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
activatemethod. -
#deactivate(opts = {}) ⇒ Object
Executes the
deactivatemethod. -
#export(opts = {}) ⇒ Object
Executes the
exportmethod. -
#get(opts = {}) ⇒ Disk
Returns the representation of the object managed by this service.
-
#move(opts = {}) ⇒ Object
Executes the
movemethod. -
#permissions_service ⇒ AssignedPermissionsService
Locates the
permissionsservice. -
#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
statisticsservice. -
#update(disk, opts = {}) ⇒ Disk
Updates the
disk.
Methods inherited from Service
Instance Method Details
#activate(opts = {}) ⇒ Object
Executes the activate method.
29503 29504 29505 |
# File 'lib/ovirtsdk4/services.rb', line 29503 def activate(opts = {}) internal_action(:activate, nil, ACTIVATE, opts) end |
#deactivate(opts = {}) ⇒ Object
Executes the deactivate method.
29529 29530 29531 |
# File 'lib/ovirtsdk4/services.rb', line 29529 def deactivate(opts = {}) internal_action(:deactivate, nil, DEACTIVATE, opts) end |
#export(opts = {}) ⇒ Object
Executes the export method.
29558 29559 29560 |
# File 'lib/ovirtsdk4/services.rb', line 29558 def export(opts = {}) internal_action(:export, nil, EXPORT, opts) end |
#get(opts = {}) ⇒ Disk
Returns the representation of the object managed by this service.
29587 29588 29589 |
# File 'lib/ovirtsdk4/services.rb', line 29587 def get(opts = {}) internal_get(GET, opts) end |
#move(opts = {}) ⇒ Object
Executes the move method.
29616 29617 29618 |
# File 'lib/ovirtsdk4/services.rb', line 29616 def move(opts = {}) internal_action(:move, nil, MOVE, opts) end |
#permissions_service ⇒ AssignedPermissionsService
Locates the permissions service.
29683 29684 29685 |
# File 'lib/ovirtsdk4/services.rb', line 29683 def ||= 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. |
29645 29646 29647 |
# File 'lib/ovirtsdk4/services.rb', line 29645 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
29703 29704 29705 29706 29707 29708 29709 29710 29711 29712 29713 29714 29715 29716 29717 29718 29719 29720 |
# File 'lib/ovirtsdk4/services.rb', line 29703 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.
29692 29693 29694 |
# File 'lib/ovirtsdk4/services.rb', line 29692 def statistics_service @statistics_service ||= StatisticsService.new(self, 'statistics') end |
#update(disk, opts = {}) ⇒ Disk
Updates the disk.
29674 29675 29676 |
# File 'lib/ovirtsdk4/services.rb', line 29674 def update(disk, opts = {}) internal_update(disk, Disk, UPDATE, opts) end |