Class: OvirtSDK4::VmCheckpointsService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#checkpoint_service(id) ⇒ VmCheckpointService
Returns a reference to the service that manages a specific VM checkpoint.
-
#list(opts = {}) ⇒ Array<Checkpoint>
The list of virtual machine checkpoints.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#checkpoint_service(id) ⇒ VmCheckpointService
Returns a reference to the service that manages a specific VM checkpoint.
32827 32828 32829 |
# File 'lib/ovirtsdk4/services.rb', line 32827 def checkpoint_service(id) VmCheckpointService.new(self, id) end |
#list(opts = {}) ⇒ Array<Checkpoint>
The list of virtual machine checkpoints.
To get a list of checkpoints for a virtual machine with an id '123', send a request as follows:
GET /ovirt-engine/api/vms/123/checkpoints
32816 32817 32818 |
# File 'lib/ovirtsdk4/services.rb', line 32816 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
32838 32839 32840 32841 32842 32843 32844 32845 32846 32847 |
# File 'lib/ovirtsdk4/services.rb', line 32838 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return checkpoint_service(path) end return checkpoint_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |