# File lib/ovirtsdk4/services.rb, line 28044 def maintenance(opts = {}) internal_action(:maintenance, nil, MAINTENANCE, opts) end
List of scheduling labels assigned to this virtual machine.
@return [AssignedAffinityLabelsService] A reference to `affinity_labels` service.
# File lib/ovirtsdk4/services.rb, line 28641 def affinity_labels_service @affinity_labels_service ||= AssignedAffinityLabelsService.new(self, 'affinitylabels') end
Locates the `applications` service.
@return [VmApplicationsService] A reference to `applications` service.
# File lib/ovirtsdk4/services.rb, line 28650 def applications_service @applications_service ||= VmApplicationsService.new(self, 'applications') end
This operation stops any migration of a virtual machine to another physical host.
POST /ovirt-engine/api/vms/123/cancelmigration
The cancel migration action does not take any action specific parameters; therefore, the request body should contain an empty `action`:
<action/>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the migration should cancelled asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 27690 def cancel_migration(opts = {}) internal_action(:cancelmigration, nil, CANCEL_MIGRATION, opts) end
Locates the `cdroms` service.
@return [VmCdromsService] A reference to `cdroms` service.
# File lib/ovirtsdk4/services.rb, line 28659 def cdroms_service @cdroms_service ||= VmCdromsService.new(self, 'cdroms') end
Executes the `clone` method.
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the clone should be performed asynchronously.
@option opts [Vm] :vm
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 27719 def clone(opts = {}) internal_action(:clone, nil, CLONE, opts) end
Permanently restores the virtual machine to the state of the previewed snapshot.
See the <<services/vm/methods/preview_snapshot, #preview_snapshot>> operation for details.
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the snapshots should be committed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 27747 def commit_snapshot(opts = {}) internal_action(:commitsnapshot, nil, COMMIT_SNAPSHOT, opts) end
Detaches a virtual machine from a pool.
POST /ovirt-engine/api/vms/123/detach
The detach action does not take any action specific parameters; therefore, the request body should contain an empty `action`:
<action/>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the detach action should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 27786 def detach(opts = {}) internal_action(:detach, nil, DETACH, opts) end
List of disks attached to this virtual machine.
@return [DiskAttachmentsService] A reference to `disk_attachments` service.
# File lib/ovirtsdk4/services.rb, line 28668 def disk_attachments_service @disk_attachments_service ||= DiskAttachmentsService.new(self, 'diskattachments') end
Exports a virtual machine to an export domain.
For example, to export virtual machine `123` to the export domain `myexport`:
POST /ovirt-engine/api/vms/123/export
With a request body like this:
<action>
<storage_domain> <name>myexport</name> </storage_domain> <exclusive>true</exclusive> <discard_snapshots>true</discard_snapshots>
</action>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the export should be performed asynchronously.
@option opts [Boolean] :discard_snapshots Use the `discard_snapshots` parameter when the virtual machine should be exported with all of its
snapshots collapsed.
@option opts [Boolean] :exclusive Use the `exclusive` parameter when the virtual machine should be exported even if another copy of
it already exists in the export domain (override).
@option opts [StorageDomain] :storage_domain
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 27843 def export(opts = {}) internal_action(:export, nil, EXPORT, opts) end
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
<action/>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the freeze should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 27885 def freeze_filesystems(opts = {}) internal_action(:freezefilesystems, nil, FREEZE_FILESYSTEMS, opts) end
Retrieves the description of the virtual machine.
@param opts [Hash] Additional options.
@option opts [Boolean] :all_content Indicates if all of the attributes of the virtual machine should be included in the response.
By default the following attributes are excluded: - %xconsole` - %xinitialization.configuration.data` - The OVF document describing the virtual machine. - %xrng_source` - %xsoundcard` - %xvirtio_scsi` For example, to retrieve the complete representation of the virtual machine '123': .... GET /ovirt-engine/api/vms/123?all_content=true .... NOTE: These attributes are not included by default as they reduce performance. These attributes are seldom used and require additional queries to the database. Only use this parameter when required as it will reduce performance.
@option opts [Boolean] :filter Indicates if the results should be filtered according to the permissions of the user.
@option opts [Boolean] :next_run Indicates if the returned result describes the virtual machine as it is currently running or if describes
the virtual machine with the modifications that have already been performed but that will only come into effect when the virtual machine is restarted. By default the value is `false`. If the parameter is included in the request, but without a value, it is assumed that the value is `true`. The the following request: [source] ---- GET /vms/{vm:id};next_run ---- Is equivalent to using the value `true`: [source] ---- GET /vms/{vm:id};next_run=true ----
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
@return [Vm]
# File lib/ovirtsdk4/services.rb, line 27953 def get(opts = {}) internal_get(GET, opts) end
Locates the `graphics_consoles` service.
@return [VmGraphicsConsolesService] A reference to `graphics_consoles` service.
# File lib/ovirtsdk4/services.rb, line 28677 def graphics_consoles_service @graphics_consoles_service ||= VmGraphicsConsolesService.new(self, 'graphicsconsoles') end
Locates the `host_devices` service.
@return [VmHostDevicesService] A reference to `host_devices` service.
# File lib/ovirtsdk4/services.rb, line 28686 def host_devices_service @host_devices_service ||= VmHostDevicesService.new(self, 'hostdevices') end
Reference to the service that can show the applicable errata available on the virtual machine. This information is taken from Katello.
@return [KatelloErrataService] A reference to `katello_errata` service.
# File lib/ovirtsdk4/services.rb, line 28696 def katello_errata_service @katello_errata_service ||= KatelloErrataService.new(self, 'katelloerrata') end
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
Request body:
<action/>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the logon should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 27999 def logon(opts = {}) internal_action(:logon, nil, LOGON, opts) end
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
<action>
<maintenance_enabled>true<maintenance_enabled/>
</action>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the global maintenance action should be performed asynchronously.
@option opts [Boolean] :maintenance_enabled Indicates if global maintenance should be enabled or disabled.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28044 def maintenance(opts = {}) internal_action(:maintenance, nil, MAINTENANCE, opts) end
Migrates a virtual machine to another physical host.
Example:
POST /ovirt-engine/api/vms/123/migrate
To specify a specific host to migrate the virtual machine to:
<action>
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"/>
</action>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the migration should be performed asynchronously.
@option opts [Cluster] :cluster Specifies the cluster the virtual machine should migrate to. This is an optional parameter. By default, the
virtual machine is migrated to another host within the same cluster.
@option opts [Boolean] :force Specifies that the virtual machine should migrate even if the virtual machine is defined as non-migratable.
This is an optional parameter. By default, it is set to `false`.
@option opts [Host] :host Specifies a specific host that the virtual machine should migrate to. This is an optional parameter. By default,
the {engine-name} automatically selects a default host for migration within the same cluster. If an API user requires a specific host, the user can specify the host with either an `id` or `name` parameter.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28099 def migrate(opts = {}) internal_action(:migrate, nil, MIGRATE, opts) end
Locates the `nics` service.
@return [VmNicsService] A reference to `nics` service.
# File lib/ovirtsdk4/services.rb, line 28705 def nics_service @nics_service ||= VmNicsService.new(self, 'nics') end
Locates the `numa_nodes` service.
@return [VmNumaNodesService] A reference to `numa_nodes` service.
# File lib/ovirtsdk4/services.rb, line 28714 def numa_nodes_service @numa_nodes_service ||= VmNumaNodesService.new(self, 'numanodes') end
Locates the `permissions` service.
@return [AssignedPermissionsService] A reference to `permissions` service.
# File lib/ovirtsdk4/services.rb, line 28723 def permissions_service @permissions_service ||= AssignedPermissionsService.new(self, 'permissions') end
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 <<services/vm/methods/commit_snapshot, #commit_snapshot>> method, or discarded using the <<services/vm/methods/undo_snapshot, #undo_snapshot>> method.
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the preview should be performed asynchronously.
@option opts [Array<Disk>] :disks
@option opts [Boolean] :restore_memory
@option opts [Snapshot] :snapshot
@option opts [Vm] :vm
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28142 def preview_snapshot(opts = {}) internal_action(:previewsnapshot, nil, PREVIEW_SNAPSHOT, opts) end
Sends a reboot request to a virtual machine.
For example:
POST /ovirt-engine/api/vms/123/reboot
The reboot action does not take any action specific parameters; therefore, the request body should contain an empty `action`:
<action/>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the reboot should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28183 def reboot(opts = {}) internal_action(:reboot, nil, REBOOT, opts) end
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
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the remove should be performed asynchronously. @option opts [Boolean] :detach_only Indicates if the attached virtual disks should be detached first and preserved instead of being removed. @option opts [Boolean] :force Indicates if the virtual machine should be forcibly removed.
Locked virtual machines and virtual machines with locked disk images cannot be removed without this flag set to true.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28222 def remove(opts = {}) internal_remove(REMOVE, opts) end
Executes the `reorder_mac_addresses` method.
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the action should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28248 def reorder_mac_addresses(opts = {}) internal_action(:reordermacaddresses, nil, REORDER_MAC_ADDRESSES, opts) end
Locates the `reported_devices` service.
@return [VmReportedDevicesService] A reference to `reported_devices` service.
# File lib/ovirtsdk4/services.rb, line 28732 def reported_devices_service @reported_devices_service ||= VmReportedDevicesService.new(self, 'reporteddevices') end
Locates the service corresponding to the given path.
@param path [String] The path of the service.
@return [Service] A reference to the service.
# File lib/ovirtsdk4/services.rb, line 28788 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 == 'cdroms' return cdroms_service end if path.start_with?('cdroms/') return cdroms_service.service(path[7..-1]) end if path == 'diskattachments' return disk_attachments_service end if path.start_with?('diskattachments/') return disk_attachments_service.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 == '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 permissions_service end if path.start_with?('permissions/') return permissions_service.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 tags_service end if path.start_with?('tags/') return tags_service.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
Reference to the service that provides information about virtual machine user sessions.
@return [VmSessionsService] A reference to `sessions` service.
# File lib/ovirtsdk4/services.rb, line 28741 def sessions_service @sessions_service ||= VmSessionsService.new(self, 'sessions') end
This operation sends a shutdown request to a virtual machine.
For example:
POST /ovirt-engine/api/vms/123/shutdown
The shutdown action does not take any action specific parameters; therefore, the request body should contain an empty `action`:
<action/>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the shutdown should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28289 def shutdown(opts = {}) internal_action(:shutdown, nil, SHUTDOWN, opts) end
Locates the `snapshots` service.
@return [SnapshotsService] A reference to `snapshots` service.
# File lib/ovirtsdk4/services.rb, line 28750 def snapshots_service @snapshots_service ||= SnapshotsService.new(self, 'snapshots') end
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
With a request body:
<action/>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the start action should be performed asynchronously.
@option opts [AuthorizedKey] :authorized_key
@option opts [Boolean] :filter Indicates if the results should be filtered according to the permissions of the user.
@option opts [Boolean] :pause If set to `true`, start the virtual machine in paused mode. The default is `false`.
@option opts [Boolean] :use_cloud_init If set to `true`, the initialization type is set to cloud-init. The default value is `false`.
See https://cloudinit.readthedocs.io/en/latest[this] for details.
@option opts [Boolean] :use_sysprep If set to `true`, the initialization type is set to Sysprep. The default value is `false`.
See https://en.wikipedia.org/wiki/Sysprep[this] for details.
@option opts [Vm] :vm The definition of the virtual machine for this specific run.
For example: [source,xml] ---- <action> <vm> <os> <boot> <devices> <device>cdrom</device> </devices> </boot> </os> </vm> </action> ---- This will set the boot device to the CDROM only for this specific start. After the virtual machine is powered off, this definition will be reverted.
@option opts [Boolean] :volatile Indicates that this run configuration will be discarded even in the case of guest-initiated reboot.
The default value is `false`.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28376 def start(opts = {}) internal_action(:start, nil, START, opts) end
Locates the `statistics` service.
@return [StatisticsService] A reference to `statistics` service.
# File lib/ovirtsdk4/services.rb, line 28759 def statistics_service @statistics_service ||= StatisticsService.new(self, 'statistics') end
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/>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the stop action should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28417 def stop(opts = {}) internal_action(:stop, nil, STOP, opts) end
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
The suspend action does not take any action specific parameters; therefore, the request body should contain an empty `action`:
<action/>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the suspend action should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28459 def suspend(opts = {}) internal_action(:suspend, nil, SUSPEND, opts) end
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
<action/>
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the thaw file systems action should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28501 def thaw_filesystems(opts = {}) internal_action(:thawfilesystems, nil, THAW_FILESYSTEMS, opts) end
Generates a time-sensitive authentication token for accessing a virtual machine's display.
For example:
POST /ovirt-engine/api/vms/123/ticket
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>
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 `ticket` method of the <<services/vm_graphics_console, service>>, which manages the graphics consoles of the virtual machine, by sending a request:
POST /ovirt-engine/api/vms/123/graphicsconsoles/456/ticket
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the generation of the ticket should be performed asynchronously.
@option opts [Ticket] :ticket
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28570 def ticket(opts = {}) internal_action(:ticket, :ticket, TICKET, opts) end
Returns an string representation of this service.
@return [String]
# File lib/ovirtsdk4/services.rb, line 28896 def to_s "#<#{VmService}:#{absolute_path}>" end
Restores the virtual machine to the state it had before previewing the snapshot.
See the <<services/vm/methods/preview_snapshot, #preview_snapshot>> operation for details.
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the undo snapshot action should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 28598 def undo_snapshot(opts = {}) internal_action(:undosnapshot, nil, UNDO_SNAPSHOT, opts) end
Update the virtual machine in the system for the given virtual machine id.
@param vm [Vm] The `vm` to update. @param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the update should be performed asynchronously.
@option opts [Boolean] :next_run Indicates if the update should be applied to the virtual machine immediately or if it should be applied only
when the virtual machine is restarted. The default value is `false`, so by default changes are applied immediately.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
@return [Vm]
# File lib/ovirtsdk4/services.rb, line 28632 def update(vm, opts = {}) internal_update(vm, Vm, UPDATE, opts) end
Locates the `watchdogs` service.
@return [VmWatchdogsService] A reference to `watchdogs` service.
# File lib/ovirtsdk4/services.rb, line 28777 def watchdogs_service @watchdogs_service ||= VmWatchdogsService.new(self, 'watchdogs') end