Class: OvirtSDK4::VmService
- Inherits:
-
MeasurableService
- Object
- Service
- MeasurableService
- OvirtSDK4::VmService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#affinity_labels_service ⇒ AssignedAffinityLabelsService
List of scheduling labels assigned to this virtual machine.
-
#applications_service ⇒ VmApplicationsService
Locates the
applicationsservice. -
#auto_pin_cpu_and_numa_nodes(opts = {}) ⇒ Object
Apply an automatic CPU and NUMA configuration on the VM.
-
#backups_service ⇒ VmBackupsService
List of backups of this virtual machine.
-
#cancel_migration(opts = {}) ⇒ Object
This operation stops any migration of a virtual machine to another physical host.
-
#cdroms_service ⇒ VmCdromsService
Locates the
cdromsservice. -
#checkpoints_service ⇒ VmCheckpointsService
List of checkpoints of this virtual machine.
-
#clone(opts = {}) ⇒ Object
Executes the
clonemethod. -
#commit_snapshot(opts = {}) ⇒ Object
Permanently restores the virtual machine to the state of the previewed snapshot.
-
#detach(opts = {}) ⇒ Object
Detaches a virtual machine from a pool.
-
#disk_attachments_service ⇒ DiskAttachmentsService
List of disks attached to this virtual machine.
-
#export(opts = {}) ⇒ Object
Exports the virtual machine.
-
#export_to_export_domain(opts = {}) ⇒ Object
Exports a virtual machine to an export domain.
-
#export_to_path_on_host(opts = {}) ⇒ Object
Exports a virtual machine as an OVA file to a given path on a specified host.
-
#freeze_filesystems(opts = {}) ⇒ Object
Freezes virtual machine file systems.
-
#get(opts = {}) ⇒ Vm
Retrieves the description of the virtual machine.
-
#graphics_consoles_service ⇒ VmGraphicsConsolesService
Locates the
graphics_consolesservice. -
#host_devices_service ⇒ VmHostDevicesService
Locates the
host_devicesservice. -
#katello_errata_service ⇒ KatelloErrataService
Reference to the service that can show the applicable errata available on the virtual machine.
-
#logon(opts = {}) ⇒ Object
Initiates the automatic user logon to access a virtual machine from an external console.
-
#maintenance(opts = {}) ⇒ Object
Sets the global maintenance mode on the hosted engine virtual machine.
-
#mediated_devices_service ⇒ VmMediatedDevicesService
Reference to the service that manages mediated devices associated with the VM.
-
#migrate(opts = {}) ⇒ Object
Migrates a virtual machine to another physical host.
-
#nics_service ⇒ VmNicsService
Locates the
nicsservice. -
#numa_nodes_service ⇒ VmNumaNodesService
Locates the
numa_nodesservice. -
#permissions_service ⇒ AssignedPermissionsService
Locates the
permissionsservice. -
#preview_snapshot(opts = {}) ⇒ Object
Temporarily restores the virtual machine to the state of a snapshot.
-
#reboot(opts = {}) ⇒ Object
Sends a reboot request to a virtual machine.
-
#remove(opts = {}) ⇒ Object
Removes the virtual machine, including the virtual disks attached to it.
-
#reorder_mac_addresses(opts = {}) ⇒ Object
Executes the
reorder_mac_addressesmethod. -
#reported_devices_service ⇒ VmReportedDevicesService
Locates the
reported_devicesservice. -
#reset(opts = {}) ⇒ Object
Sends a reset request to a virtual machine.
-
#screenshot(opts = {}) ⇒ Object
Captures screenshot of the current state of the VM.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#sessions_service ⇒ VmSessionsService
Reference to the service that provides information about virtual machine user sessions.
-
#shutdown(opts = {}) ⇒ Object
This operation sends a shutdown request to a virtual machine.
-
#snapshots_service ⇒ SnapshotsService
Locates the
snapshotsservice. -
#start(opts = {}) ⇒ Object
Starts the virtual machine.
-
#statistics_service ⇒ StatisticsService
Locates the
statisticsservice. -
#stop(opts = {}) ⇒ Object
This operation forces a virtual machine to power-off.
-
#suspend(opts = {}) ⇒ Object
This operation saves the virtual machine state to disk and stops it.
-
#tags_service ⇒ AssignedTagsService
Locates the
tagsservice. -
#thaw_filesystems(opts = {}) ⇒ Object
Thaws virtual machine file systems.
-
#ticket(opts = {}) ⇒ Object
Generates a time-sensitive authentication token for accessing a virtual machine’s display.
-
#undo_snapshot(opts = {}) ⇒ Object
Restores the virtual machine to the state it had before previewing the snapshot.
-
#update(vm, opts = {}) ⇒ Vm
Update the virtual machine in the system for the given virtual machine id.
-
#watchdogs_service ⇒ VmWatchdogsService
Locates the
watchdogsservice.
Methods inherited from Service
Instance Method Details
#affinity_labels_service ⇒ AssignedAffinityLabelsService
List of scheduling labels assigned to this virtual machine.
31090 31091 31092 |
# File 'lib/ovirtsdk4/services.rb', line 31090 def affinity_labels_service @affinity_labels_service ||= AssignedAffinityLabelsService.new(self, 'affinitylabels') end |
#applications_service ⇒ VmApplicationsService
Locates the applications service.
31099 31100 31101 |
# File 'lib/ovirtsdk4/services.rb', line 31099 def applications_service @applications_service ||= VmApplicationsService.new(self, 'applications') end |
#auto_pin_cpu_and_numa_nodes(opts = {}) ⇒ Object
Apply an automatic CPU and NUMA configuration on the VM.
|
Important
|
Since version 4.5 of the engine this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. Instead please use PUT followed by update operation. |
An example for a request:
POST /ovirt-engine/api/vms/123/autopincpuandnumanodes HTTP/1.1
With a request body like this:
<action>
<optimize_cpu_settings>true</optimize_cpu_settings>
</action>
29806 29807 29808 |
# File 'lib/ovirtsdk4/services.rb', line 29806 def auto_pin_cpu_and_numa_nodes(opts = {}) internal_action(:autopincpuandnumanodes, nil, AUTO_PIN_CPU_AND_NUMA_NODES, opts) end |
#backups_service ⇒ VmBackupsService
List of backups of this virtual machine.
31108 31109 31110 |
# File 'lib/ovirtsdk4/services.rb', line 31108 def backups_service @backups_service ||= VmBackupsService.new(self, 'backups') end |
#cancel_migration(opts = {}) ⇒ Object
This operation stops any migration of a virtual machine to another physical host.
POST /ovirt-engine/api/vms/123/cancelmigration HTTP/1.1
The cancel migration action does not take any action specific parameters;
therefore, the request body should contain an empty action:
<action/>
29845 29846 29847 |
# File 'lib/ovirtsdk4/services.rb', line 29845 def cancel_migration(opts = {}) internal_action(:cancelmigration, nil, CANCEL_MIGRATION, opts) end |
#cdroms_service ⇒ VmCdromsService
Locates the cdroms service.
31117 31118 31119 |
# File 'lib/ovirtsdk4/services.rb', line 31117 def cdroms_service @cdroms_service ||= VmCdromsService.new(self, 'cdroms') end |
#checkpoints_service ⇒ VmCheckpointsService
List of checkpoints of this virtual machine.
31126 31127 31128 |
# File 'lib/ovirtsdk4/services.rb', line 31126 def checkpoints_service @checkpoints_service ||= VmCheckpointsService.new(self, 'checkpoints') end |
#clone(opts = {}) ⇒ Object
Executes the clone method.
29881 29882 29883 |
# File 'lib/ovirtsdk4/services.rb', line 29881 def clone(opts = {}) internal_action(:clone, nil, CLONE, opts) end |
#commit_snapshot(opts = {}) ⇒ Object
Permanently restores the virtual machine to the state of the previewed snapshot.
See the preview_snapshot operation for details.
29909 29910 29911 |
# File 'lib/ovirtsdk4/services.rb', line 29909 def commit_snapshot(opts = {}) internal_action(:commitsnapshot, nil, COMMIT_SNAPSHOT, opts) end |
#detach(opts = {}) ⇒ Object
Detaches a virtual machine from a pool.
POST /ovirt-engine/api/vms/123/detach HTTP/1.1
The detach action does not take any action specific parameters; therefore, the request body should contain an
empty action:
<action/>
29946 29947 29948 |
# File 'lib/ovirtsdk4/services.rb', line 29946 def detach(opts = {}) internal_action(:detach, nil, DETACH, opts) end |
#disk_attachments_service ⇒ DiskAttachmentsService
List of disks attached to this virtual machine.
31135 31136 31137 |
# File 'lib/ovirtsdk4/services.rb', line 31135 def @disk_attachments_service ||= DiskAttachmentsService.new(self, 'diskattachments') end |
#export(opts = {}) ⇒ Object
Exports the virtual machine.
A virtual machine can be exported to an export domain.
For example, to export virtual machine 123 to the export domain myexport:
POST /ovirt-engine/api/vms/123/export HTTP/1.1
With a request body like this:
<action>
<storage_domain>
<name>myexport</name>
</storage_domain>
<exclusive>true</exclusive>
<discard_snapshots>true</discard_snapshots>
</action>
Since version 4.2 of the engine it is also possible to export a virtual machine as a virtual appliance (OVA).
For example, to export virtual machine 123 as an OVA file named myvm.ova that is placed in the directory /home/ovirt/ on host myhost:
POST /ovirt-engine/api/vms/123/export HTTP/1.1
With a request body like this:
<action>
<host>
<name>myhost</name>
</host>
<directory>/home/ovirt</directory>
<filename>myvm.ova</filename>
</action>
|
Note
|
Confirm that the export operation has completed before attempting any actions on the export domain. |
30023 30024 30025 |
# File 'lib/ovirtsdk4/services.rb', line 30023 def export(opts = {}) internal_action(:export, nil, EXPORT, opts) end |
#export_to_export_domain(opts = {}) ⇒ Object
Exports a virtual machine to an export domain.
30970 30971 30972 |
# File 'lib/ovirtsdk4/services.rb', line 30970 def export_to_export_domain(opts = {}) internal_action(:export, nil, EXPORT_TO_EXPORT_DOMAIN, opts) end |
#export_to_path_on_host(opts = {}) ⇒ Object
Exports a virtual machine as an OVA file to a given path on a specified host.
31019 31020 31021 |
# File 'lib/ovirtsdk4/services.rb', line 31019 def export_to_path_on_host(opts = {}) internal_action(:export, nil, EXPORT_TO_PATH_ON_HOST, opts) end |
#freeze_filesystems(opts = {}) ⇒ Object
Freezes virtual machine file systems.
This operation freezes a virtual machine’s file systems using the QEMU guest agent when taking a live snapshot of a running virtual machine. Normally, this is done automatically by the manager, but this must be executed manually with the API for virtual machines using OpenStack Volume (Cinder) disks.
Example:
POST /ovirt-engine/api/vms/123/freezefilesystems HTTP/1.1
<action/>
30063 30064 30065 |
# File 'lib/ovirtsdk4/services.rb', line 30063 def freeze_filesystems(opts = {}) internal_action(:freezefilesystems, nil, FREEZE_FILESYSTEMS, opts) end |
#get(opts = {}) ⇒ Vm
Retrieves the description of the virtual machine.
30143 30144 30145 |
# File 'lib/ovirtsdk4/services.rb', line 30143 def get(opts = {}) internal_get(GET, opts) end |
#graphics_consoles_service ⇒ VmGraphicsConsolesService
Locates the graphics_consoles service.
31144 31145 31146 |
# File 'lib/ovirtsdk4/services.rb', line 31144 def graphics_consoles_service @graphics_consoles_service ||= VmGraphicsConsolesService.new(self, 'graphicsconsoles') end |
#host_devices_service ⇒ VmHostDevicesService
Locates the host_devices service.
31153 31154 31155 |
# File 'lib/ovirtsdk4/services.rb', line 31153 def host_devices_service @host_devices_service ||= VmHostDevicesService.new(self, 'hostdevices') end |
#katello_errata_service ⇒ KatelloErrataService
Reference to the service that can show the applicable errata available on the virtual machine. This information is taken from Katello.
31163 31164 31165 |
# File 'lib/ovirtsdk4/services.rb', line 31163 def katello_errata_service @katello_errata_service ||= KatelloErrataService.new(self, 'katelloerrata') end |
#logon(opts = {}) ⇒ Object
Initiates the automatic user logon to access a virtual machine from an external console.
This action requires the ovirt-guest-agent-gdm-plugin and the ovirt-guest-agent-pam-module packages to be
installed and the ovirt-guest-agent service to be running on the virtual machine.
Users require the appropriate user permissions for the virtual machine in order to access the virtual machine from an external console.
For example:
POST /ovirt-engine/api/vms/123/logon HTTP/1.1
Request body:
<action/>
30187 30188 30189 |
# File 'lib/ovirtsdk4/services.rb', line 30187 def logon(opts = {}) internal_action(:logon, nil, LOGON, opts) end |
#maintenance(opts = {}) ⇒ Object
Sets the global maintenance mode on the hosted engine virtual machine.
This action has no effect on other virtual machines.
Example:
POST /ovirt-engine/api/vms/123/maintenance HTTP/1.1
<action>
<maintenance_enabled>true<maintenance_enabled/>
</action>
30230 30231 30232 |
# File 'lib/ovirtsdk4/services.rb', line 30230 def maintenance(opts = {}) internal_action(:maintenance, nil, MAINTENANCE, opts) end |
#mediated_devices_service ⇒ VmMediatedDevicesService
Reference to the service that manages mediated devices associated with the VM.
31172 31173 31174 |
# File 'lib/ovirtsdk4/services.rb', line 31172 def mediated_devices_service @mediated_devices_service ||= VmMediatedDevicesService.new(self, 'mediateddevices') end |
#migrate(opts = {}) ⇒ Object
Migrates a virtual machine to another physical host.
Example:
POST /ovirt-engine/api/vms/123/migrate HTTP/1.1
To specify a specific host to migrate the virtual machine to:
<action>
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"/>
</action>
30292 30293 30294 |
# File 'lib/ovirtsdk4/services.rb', line 30292 def migrate(opts = {}) internal_action(:migrate, nil, MIGRATE, opts) end |
#nics_service ⇒ VmNicsService
Locates the nics service.
31181 31182 31183 |
# File 'lib/ovirtsdk4/services.rb', line 31181 def nics_service @nics_service ||= VmNicsService.new(self, 'nics') end |
#numa_nodes_service ⇒ VmNumaNodesService
Locates the numa_nodes service.
31190 31191 31192 |
# File 'lib/ovirtsdk4/services.rb', line 31190 def numa_nodes_service @numa_nodes_service ||= VmNumaNodesService.new(self, 'numanodes') end |
#permissions_service ⇒ AssignedPermissionsService
Locates the permissions service.
31199 31200 31201 |
# File 'lib/ovirtsdk4/services.rb', line 31199 def @permissions_service ||= AssignedPermissionsService.new(self, 'permissions') end |
#preview_snapshot(opts = {}) ⇒ Object
Temporarily restores the virtual machine to the state of a snapshot.
The snapshot is indicated with the snapshot.id parameter. It is restored temporarily, so that the content can
be inspected. Once that inspection is finished, the state of the virtual machine can be made permanent, using the
commit_snapshot method, or discarded using the
undo_snapshot method.
30366 30367 30368 |
# File 'lib/ovirtsdk4/services.rb', line 30366 def preview_snapshot(opts = {}) internal_action(:previewsnapshot, nil, PREVIEW_SNAPSHOT, opts) end |
#reboot(opts = {}) ⇒ Object
Sends a reboot request to a virtual machine.
For example:
POST /ovirt-engine/api/vms/123/reboot HTTP/1.1
The reboot action does not take any action specific parameters; therefore, the request body should contain an
empty action:
<action/>
To reboot the VM even if a backup is running for it, the action should include the 'force' element.
For example, to force reboot virtual machine 123:
POST /ovirt-engine/api/vms/123/reboot HTTP/1.1
<action>
<force>true</force>
</action>
30424 30425 30426 |
# File 'lib/ovirtsdk4/services.rb', line 30424 def reboot(opts = {}) internal_action(:reboot, nil, REBOOT, opts) end |
#remove(opts = {}) ⇒ Object
Removes the virtual machine, including the virtual disks attached to it.
For example, to remove the virtual machine with identifier 123:
DELETE /ovirt-engine/api/vms/123 HTTP/1.1
30462 30463 30464 |
# File 'lib/ovirtsdk4/services.rb', line 30462 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#reorder_mac_addresses(opts = {}) ⇒ Object
Executes the reorder_mac_addresses method.
30488 30489 30490 |
# File 'lib/ovirtsdk4/services.rb', line 30488 def reorder_mac_addresses(opts = {}) internal_action(:reordermacaddresses, nil, REORDER_MAC_ADDRESSES, opts) end |
#reported_devices_service ⇒ VmReportedDevicesService
Locates the reported_devices service.
31208 31209 31210 |
# File 'lib/ovirtsdk4/services.rb', line 31208 def reported_devices_service @reported_devices_service ||= VmReportedDevicesService.new(self, 'reporteddevices') end |
#reset(opts = {}) ⇒ Object
Sends a reset request to a virtual machine.
For example:
POST /ovirt-engine/api/vms/123/reset HTTP/1.1
The reset action does not take any action specific parameters; therefore, the request body should contain an
empty action:
<action/>
30527 30528 30529 |
# File 'lib/ovirtsdk4/services.rb', line 30527 def reset(opts = {}) internal_action(:reset, nil, RESET, opts) end |
#screenshot(opts = {}) ⇒ Object
Captures screenshot of the current state of the VM.
For example:
POST /ovirt-engine/api/vms/123/screenshot HTTP/1.1
The screenshot action does not take any action specific parameters; therefore, the request body should contain an
empty action:
<action/>
30565 30566 30567 |
# File 'lib/ovirtsdk4/services.rb', line 30565 def screenshot(opts = {}) internal_action(:screenshot, nil, SCREENSHOT, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
31264 31265 31266 31267 31268 31269 31270 31271 31272 31273 31274 31275 31276 31277 31278 31279 31280 31281 31282 31283 31284 31285 31286 31287 31288 31289 31290 31291 31292 31293 31294 31295 31296 31297 31298 31299 31300 31301 31302 31303 31304 31305 31306 31307 31308 31309 31310 31311 31312 31313 31314 31315 31316 31317 31318 31319 31320 31321 31322 31323 31324 31325 31326 31327 31328 31329 31330 31331 31332 31333 31334 31335 31336 31337 31338 31339 31340 31341 31342 31343 31344 31345 31346 31347 31348 31349 31350 31351 31352 31353 31354 31355 31356 31357 31358 31359 31360 31361 31362 31363 31364 31365 31366 31367 31368 31369 31370 31371 31372 31373 31374 31375 31376 31377 31378 31379 31380 31381 31382 31383 |
# File 'lib/ovirtsdk4/services.rb', line 31264 def service(path) if path.nil? || path == '' return self end if path == 'affinitylabels' return affinity_labels_service end if path.start_with?('affinitylabels/') return affinity_labels_service.service(path[15..-1]) end if path == 'applications' return applications_service end if path.start_with?('applications/') return applications_service.service(path[13..-1]) end if path == 'backups' return backups_service end if path.start_with?('backups/') return backups_service.service(path[8..-1]) end if path == 'cdroms' return cdroms_service end if path.start_with?('cdroms/') return cdroms_service.service(path[7..-1]) end if path == 'checkpoints' return checkpoints_service end if path.start_with?('checkpoints/') return checkpoints_service.service(path[12..-1]) end if path == 'diskattachments' return end if path.start_with?('diskattachments/') return .service(path[16..-1]) end if path == 'graphicsconsoles' return graphics_consoles_service end if path.start_with?('graphicsconsoles/') return graphics_consoles_service.service(path[17..-1]) end if path == 'hostdevices' return host_devices_service end if path.start_with?('hostdevices/') return host_devices_service.service(path[12..-1]) end if path == 'katelloerrata' return katello_errata_service end if path.start_with?('katelloerrata/') return katello_errata_service.service(path[14..-1]) end if path == 'mediateddevices' return mediated_devices_service end if path.start_with?('mediateddevices/') return mediated_devices_service.service(path[16..-1]) end if path == 'nics' return nics_service end if path.start_with?('nics/') return nics_service.service(path[5..-1]) end if path == 'numanodes' return numa_nodes_service end if path.start_with?('numanodes/') return numa_nodes_service.service(path[10..-1]) end if path == 'permissions' return end if path.start_with?('permissions/') return .service(path[12..-1]) end if path == 'reporteddevices' return reported_devices_service end if path.start_with?('reporteddevices/') return reported_devices_service.service(path[16..-1]) end if path == 'sessions' return sessions_service end if path.start_with?('sessions/') return sessions_service.service(path[9..-1]) end if path == 'snapshots' return snapshots_service end if path.start_with?('snapshots/') return snapshots_service.service(path[10..-1]) end if path == 'statistics' return statistics_service end if path.start_with?('statistics/') return statistics_service.service(path[11..-1]) end if path == 'tags' return end if path.start_with?('tags/') return .service(path[5..-1]) end if path == 'watchdogs' return watchdogs_service end if path.start_with?('watchdogs/') return watchdogs_service.service(path[10..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#sessions_service ⇒ VmSessionsService
Reference to the service that provides information about virtual machine user sessions.
31217 31218 31219 |
# File 'lib/ovirtsdk4/services.rb', line 31217 def sessions_service @sessions_service ||= VmSessionsService.new(self, 'sessions') end |
#shutdown(opts = {}) ⇒ Object
This operation sends a shutdown request to a virtual machine.
For example:
POST /ovirt-engine/api/vms/123/shutdown HTTP/1.1
The shutdown action does not take any action specific parameters;
therefore, the request body should contain an empty action:
<action/>
To shutdown the VM even if a backup is running for it, the action should include the 'force' element.
For example, to force shutdown virtual machine 123:
POST /ovirt-engine/api/vms/123/shutdown HTTP/1.1
<action>
<force>true</force>
</action>
30627 30628 30629 |
# File 'lib/ovirtsdk4/services.rb', line 30627 def shutdown(opts = {}) internal_action(:shutdown, nil, SHUTDOWN, opts) end |
#snapshots_service ⇒ SnapshotsService
Locates the snapshots service.
31226 31227 31228 |
# File 'lib/ovirtsdk4/services.rb', line 31226 def snapshots_service @snapshots_service ||= SnapshotsService.new(self, 'snapshots') end |
#start(opts = {}) ⇒ Object
Starts the virtual machine.
If the virtual environment is complete and the virtual machine contains all necessary components to function, it can be started.
This example starts the virtual machine:
POST /ovirt-engine/api/vms/123/start HTTP/1.1
With a request body:
<action/>
30725 30726 30727 |
# File 'lib/ovirtsdk4/services.rb', line 30725 def start(opts = {}) internal_action(:start, nil, START, opts) end |
#statistics_service ⇒ StatisticsService
Locates the statistics service.
31235 31236 31237 |
# File 'lib/ovirtsdk4/services.rb', line 31235 def statistics_service @statistics_service ||= StatisticsService.new(self, 'statistics') end |
#stop(opts = {}) ⇒ Object
This operation forces a virtual machine to power-off.
For example:
POST /ovirt-engine/api/vms/123/stop
The stop action does not take any action specific parameters;
therefore, the request body should contain an empty action:
<action/>
To stop the VM even if a backup is running for it, the action should include the 'force' element.
For example, to force stop virtual machine 123:
POST /ovirt-engine/api/vms/123/stop HTTP/1.1
<action>
<force>true</force>
</action>
30787 30788 30789 |
# File 'lib/ovirtsdk4/services.rb', line 30787 def stop(opts = {}) internal_action(:stop, nil, STOP, opts) end |
#suspend(opts = {}) ⇒ Object
This operation saves the virtual machine state to disk and stops it. Start a suspended virtual machine and restore the virtual machine state with the start action.
For example:
POST /ovirt-engine/api/vms/123/suspend HTTP/1.1
The suspend action does not take any action specific parameters;
therefore, the request body should contain an empty action:
<action/>
30827 30828 30829 |
# File 'lib/ovirtsdk4/services.rb', line 30827 def suspend(opts = {}) internal_action(:suspend, nil, SUSPEND, opts) end |
#tags_service ⇒ AssignedTagsService
Locates the tags service.
31244 31245 31246 |
# File 'lib/ovirtsdk4/services.rb', line 31244 def @tags_service ||= AssignedTagsService.new(self, 'tags') end |
#thaw_filesystems(opts = {}) ⇒ Object
Thaws virtual machine file systems.
This operation thaws a virtual machine’s file systems using the QEMU guest agent when taking a live snapshot of a running virtual machine. Normally, this is done automatically by the manager, but this must be executed manually with the API for virtual machines using OpenStack Volume (Cinder) disks.
Example:
POST /api/vms/123/thawfilesystems HTTP/1.1
<action/>
30867 30868 30869 |
# File 'lib/ovirtsdk4/services.rb', line 30867 def thaw_filesystems(opts = {}) internal_action(:thawfilesystems, nil, THAW_FILESYSTEMS, opts) end |
#ticket(opts = {}) ⇒ Object
Generates a time-sensitive authentication token for accessing a virtual machine’s display.
For example:
POST /ovirt-engine/api/vms/123/ticket HTTP/1.1
The client-provided action optionally includes a desired ticket value and/or an expiry time in seconds.
The response specifies the actual ticket value and expiry used.
<action>
<ticket>
<value>abcd12345</value>
<expiry>120</expiry>
</ticket>
</action>
|
Important
|
If the virtual machine is configured to support only one graphics protocol then the generated authentication token will be valid for that protocol. But if the virtual machine is configured to support multiple protocols, VNC and SPICE, then the authentication token will only be valid for the SPICE protocol. In order to obtain an authentication token for a specific protocol, for
example for VNC, use the
|
30933 30934 30935 |
# File 'lib/ovirtsdk4/services.rb', line 30933 def ticket(opts = {}) internal_action(:ticket, :ticket, TICKET, opts) end |
#undo_snapshot(opts = {}) ⇒ Object
Restores the virtual machine to the state it had before previewing the snapshot.
See the preview_snapshot operation for details.
31047 31048 31049 |
# File 'lib/ovirtsdk4/services.rb', line 31047 def undo_snapshot(opts = {}) internal_action(:undosnapshot, nil, UNDO_SNAPSHOT, opts) end |
#update(vm, opts = {}) ⇒ Vm
Update the virtual machine in the system for the given virtual machine id.
31081 31082 31083 |
# File 'lib/ovirtsdk4/services.rb', line 31081 def update(vm, opts = {}) internal_update(vm, Vm, UPDATE, opts) end |
#watchdogs_service ⇒ VmWatchdogsService
Locates the watchdogs service.
31253 31254 31255 |
# File 'lib/ovirtsdk4/services.rb', line 31253 def watchdogs_service @watchdogs_service ||= VmWatchdogsService.new(self, 'watchdogs') end |