Class VmServiceImpl
- java.lang.Object
-
- org.ovirt.engine.sdk4.internal.services.ServiceImpl
-
- org.ovirt.engine.sdk4.internal.services.MeasurableServiceImpl
-
- org.ovirt.engine.sdk4.internal.services.VmServiceImpl
-
- All Implemented Interfaces:
Service
,MeasurableService
,VmService
public class VmServiceImpl extends MeasurableServiceImpl implements VmService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ovirt.engine.sdk4.services.VmService
VmService.CancelMigrationRequest, VmService.CancelMigrationResponse, VmService.CloneRequest, VmService.CloneResponse, VmService.CommitSnapshotRequest, VmService.CommitSnapshotResponse, VmService.DetachRequest, VmService.DetachResponse, VmService.ExportRequest, VmService.ExportResponse, VmService.ExportToExportDomainRequest, VmService.ExportToExportDomainResponse, VmService.ExportToPathOnHostRequest, VmService.ExportToPathOnHostResponse, VmService.FreezeFilesystemsRequest, VmService.FreezeFilesystemsResponse, VmService.GetRequest, VmService.GetResponse, VmService.LogonRequest, VmService.LogonResponse, VmService.MaintenanceRequest, VmService.MaintenanceResponse, VmService.MigrateRequest, VmService.MigrateResponse, VmService.PreviewSnapshotRequest, VmService.PreviewSnapshotResponse, VmService.RebootRequest, VmService.RebootResponse, VmService.RemoveRequest, VmService.RemoveResponse, VmService.ReorderMacAddressesRequest, VmService.ReorderMacAddressesResponse, VmService.ShutdownRequest, VmService.ShutdownResponse, VmService.StartRequest, VmService.StartResponse, VmService.StopRequest, VmService.StopResponse, VmService.SuspendRequest, VmService.SuspendResponse, VmService.ThawFilesystemsRequest, VmService.ThawFilesystemsResponse, VmService.TicketRequest, VmService.TicketResponse, VmService.UndoSnapshotRequest, VmService.UndoSnapshotResponse, VmService.UpdateRequest, VmService.UpdateResponse
-
-
Constructor Summary
Constructors Constructor Description VmServiceImpl(HttpConnection connection, String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssignedAffinityLabelsService
affinityLabelsService()
List of scheduling labels assigned to this virtual machine.VmApplicationsService
applicationsService()
VmBackupsService
backupsService()
List of backups of this virtual machine.VmService.CancelMigrationRequest
cancelMigration()
This operation stops any migration of a virtual machine to another physical host.VmCdromsService
cdromsService()
VmService.CloneRequest
clone_()
VmService.CommitSnapshotRequest
commitSnapshot()
Permanently restores the virtual machine to the state of the previewed snapshot.VmService.DetachRequest
detach()
Detaches a virtual machine from a pool.DiskAttachmentsService
diskAttachmentsService()
List of disks attached to this virtual machine.VmService.ExportRequest
export()
Exports the virtual machine.VmService.ExportToExportDomainRequest
exportToExportDomain()
Exports a virtual machine to an export domain.VmService.ExportToPathOnHostRequest
exportToPathOnHost()
Exports a virtual machine as an OVA file to a given path on a specified host.VmService.FreezeFilesystemsRequest
freezeFilesystems()
Freezes virtual machine file systems.VmService.GetRequest
get()
Retrieves the description of the virtual machine.VmGraphicsConsolesService
graphicsConsolesService()
VmHostDevicesService
hostDevicesService()
KatelloErrataService
katelloErrataService()
Reference to the service that can show the applicable errata available on the virtual machine.VmService.LogonRequest
logon()
Initiates the automatic user logon to access a virtual machine from an external console.VmService.MaintenanceRequest
maintenance()
Sets the global maintenance mode on the hosted engine virtual machine.VmService.MigrateRequest
migrate()
Migrates a virtual machine to another physical host.VmNicsService
nicsService()
VmNumaNodesService
numaNodesService()
AssignedPermissionsService
permissionsService()
VmService.PreviewSnapshotRequest
previewSnapshot()
Temporarily restores the virtual machine to the state of a snapshot.VmService.RebootRequest
reboot()
Sends a reboot request to a virtual machine.VmService.RemoveRequest
remove()
Removes the virtual machine, including the virtual disks attached to it.VmService.ReorderMacAddressesRequest
reorderMacAddresses()
VmReportedDevicesService
reportedDevicesService()
Service
service(String path)
Service locator method, returns individual service on which the URI is dispatched.VmSessionsService
sessionsService()
Reference to the service that provides information about virtual machine user sessions.VmService.ShutdownRequest
shutdown()
This operation sends a shutdown request to a virtual machine.SnapshotsService
snapshotsService()
VmService.StartRequest
start()
Starts the virtual machine.StatisticsService
statisticsService()
VmService.StopRequest
stop()
This operation forces a virtual machine to power-off.VmService.SuspendRequest
suspend()
This operation saves the virtual machine state to disk and stops it.AssignedTagsService
tagsService()
VmService.ThawFilesystemsRequest
thawFilesystems()
Thaws virtual machine file systems.VmService.TicketRequest
ticket()
Generates a time-sensitive authentication token for accessing a virtual machine's display.String
toString()
VmService.UndoSnapshotRequest
undoSnapshot()
Restores the virtual machine to the state it had before previewing the snapshot.VmService.UpdateRequest
update()
Update the virtual machine in the system for the given virtual machine id.VmWatchdogsService
watchdogsService()
-
Methods inherited from class org.ovirt.engine.sdk4.internal.services.ServiceImpl
checkAction, checkFault, getConnection, getPath, throwError
-
-
-
-
Constructor Detail
-
VmServiceImpl
public VmServiceImpl(HttpConnection connection, String path)
-
-
Method Detail
-
cancelMigration
public VmService.CancelMigrationRequest cancelMigration()
Description copied from interface:VmService
This operation stops any migration of a virtual machine to another physical host. [source] ---- 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`: [source,xml] -------- - Specified by:
cancelMigration
in interfaceVmService
-
clone_
public VmService.CloneRequest clone_()
-
commitSnapshot
public VmService.CommitSnapshotRequest commitSnapshot()
Description copied from interface:VmService
Permanently restores the virtual machine to the state of the previewed snapshot. See the <> operation for details. - Specified by:
commitSnapshot
in interfaceVmService
-
detach
public VmService.DetachRequest detach()
Description copied from interface:VmService
Detaches a virtual machine from a pool. [source] ---- 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`: [source,xml] --------
-
export
public VmService.ExportRequest export()
Description copied from interface:VmService
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`: [source] ---- POST /ovirt-engine/api/vms/123/export ---- With a request body like this: [source,xml] ----myexport true true myhost /home/ovirt myvm.ova
-
freezeFilesystems
public VmService.FreezeFilesystemsRequest freezeFilesystems()
Description copied from interface:VmService
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: [source] ---- POST /ovirt-engine/api/vms/123/freezefilesystems ---- [source,xml] -------- - Specified by:
freezeFilesystems
in interfaceVmService
-
get
public VmService.GetRequest get()
Description copied from interface:VmService
Retrieves the description of the virtual machine.
-
logon
public VmService.LogonRequest logon()
Description copied from interface:VmService
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: [source] ---- POST /ovirt-engine/api/vms/123/logon ---- Request body: [source,xml] --------
-
maintenance
public VmService.MaintenanceRequest maintenance()
Description copied from interface:VmService
Sets the global maintenance mode on the hosted engine virtual machine. This action has no effect on other virtual machines. Example: [source] ---- POST /ovirt-engine/api/vms/123/maintenance ---- [source,xml] ----true - Specified by:
maintenance
in interfaceVmService
-
migrate
public VmService.MigrateRequest migrate()
Description copied from interface:VmService
Migrates a virtual machine to another physical host. Example: [source] ---- POST /ovirt-engine/api/vms/123/migrate ---- To specify a specific host to migrate the virtual machine to: [source,xml] ----
-
previewSnapshot
public VmService.PreviewSnapshotRequest previewSnapshot()
Description copied from interface:VmService
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 <> method, or discarded using the < > method. - Specified by:
previewSnapshot
in interfaceVmService
-
reboot
public VmService.RebootRequest reboot()
Description copied from interface:VmService
Sends a reboot request to a virtual machine. For example: [source] ---- 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`: [source,xml] --------
-
remove
public VmService.RemoveRequest remove()
Description copied from interface:VmService
Removes the virtual machine, including the virtual disks attached to it. For example, to remove the virtual machine with identifier `123`: [source] ---- DELETE /ovirt-engine/api/vms/123 ----
-
reorderMacAddresses
public VmService.ReorderMacAddressesRequest reorderMacAddresses()
- Specified by:
reorderMacAddresses
in interfaceVmService
-
shutdown
public VmService.ShutdownRequest shutdown()
Description copied from interface:VmService
This operation sends a shutdown request to a virtual machine. For example: [source] ---- 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`: [source,xml] --------
-
start
public VmService.StartRequest start()
Description copied from interface:VmService
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: [source] ---- POST /ovirt-engine/api/vms/123/start ---- With a request body: [source,xml] --------
-
stop
public VmService.StopRequest stop()
Description copied from interface:VmService
This operation forces a virtual machine to power-off. For example: [source] ---- 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`: [source,xml] --------
-
suspend
public VmService.SuspendRequest suspend()
Description copied from interface:VmService
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: [source] ---- 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`: [source,xml] --------
-
thawFilesystems
public VmService.ThawFilesystemsRequest thawFilesystems()
Description copied from interface:VmService
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: [source] ---- POST /api/vms/123/thawfilesystems ---- [source,xml] -------- - Specified by:
thawFilesystems
in interfaceVmService
-
ticket
public VmService.TicketRequest ticket()
Description copied from interface:VmService
Generates a time-sensitive authentication token for accessing a virtual machine's display. For example: [source] ---- 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. [source,xml] ----abcd12345 120 >, which manages the graphics consoles of the virtual machine, by sending a request: [source] ---- POST /ovirt-engine/api/vms/123/graphicsconsoles/456/ticket ---- ====
-
exportToExportDomain
public VmService.ExportToExportDomainRequest exportToExportDomain()
Description copied from interface:VmService
Exports a virtual machine to an export domain.- Specified by:
exportToExportDomain
in interfaceVmService
-
exportToPathOnHost
public VmService.ExportToPathOnHostRequest exportToPathOnHost()
Description copied from interface:VmService
Exports a virtual machine as an OVA file to a given path on a specified host.- Specified by:
exportToPathOnHost
in interfaceVmService
-
undoSnapshot
public VmService.UndoSnapshotRequest undoSnapshot()
Description copied from interface:VmService
Restores the virtual machine to the state it had before previewing the snapshot. See the <> operation for details. - Specified by:
undoSnapshot
in interfaceVmService
-
update
public VmService.UpdateRequest update()
Description copied from interface:VmService
Update the virtual machine in the system for the given virtual machine id.
-
affinityLabelsService
public AssignedAffinityLabelsService affinityLabelsService()
Description copied from interface:VmService
List of scheduling labels assigned to this virtual machine.- Specified by:
affinityLabelsService
in interfaceVmService
-
applicationsService
public VmApplicationsService applicationsService()
- Specified by:
applicationsService
in interfaceVmService
-
backupsService
public VmBackupsService backupsService()
Description copied from interface:VmService
List of backups of this virtual machine.- Specified by:
backupsService
in interfaceVmService
-
cdromsService
public VmCdromsService cdromsService()
- Specified by:
cdromsService
in interfaceVmService
-
diskAttachmentsService
public DiskAttachmentsService diskAttachmentsService()
Description copied from interface:VmService
List of disks attached to this virtual machine.- Specified by:
diskAttachmentsService
in interfaceVmService
-
graphicsConsolesService
public VmGraphicsConsolesService graphicsConsolesService()
- Specified by:
graphicsConsolesService
in interfaceVmService
-
hostDevicesService
public VmHostDevicesService hostDevicesService()
- Specified by:
hostDevicesService
in interfaceVmService
-
katelloErrataService
public KatelloErrataService katelloErrataService()
Description copied from interface:VmService
Reference to the service that can show the applicable errata available on the virtual machine. This information is taken from Katello.- Specified by:
katelloErrataService
in interfaceVmService
-
nicsService
public VmNicsService nicsService()
- Specified by:
nicsService
in interfaceVmService
-
numaNodesService
public VmNumaNodesService numaNodesService()
- Specified by:
numaNodesService
in interfaceVmService
-
permissionsService
public AssignedPermissionsService permissionsService()
- Specified by:
permissionsService
in interfaceVmService
-
reportedDevicesService
public VmReportedDevicesService reportedDevicesService()
- Specified by:
reportedDevicesService
in interfaceVmService
-
sessionsService
public VmSessionsService sessionsService()
Description copied from interface:VmService
Reference to the service that provides information about virtual machine user sessions.- Specified by:
sessionsService
in interfaceVmService
-
snapshotsService
public SnapshotsService snapshotsService()
- Specified by:
snapshotsService
in interfaceVmService
-
statisticsService
public StatisticsService statisticsService()
- Specified by:
statisticsService
in interfaceMeasurableService
- Overrides:
statisticsService
in classMeasurableServiceImpl
-
tagsService
public AssignedTagsService tagsService()
- Specified by:
tagsService
in interfaceVmService
-
watchdogsService
public VmWatchdogsService watchdogsService()
- Specified by:
watchdogsService
in interfaceVmService
-
service
public Service service(String path)
Description copied from interface:MeasurableService
Service locator method, returns individual service on which the URI is dispatched.- Specified by:
service
in interfaceMeasurableService
- Specified by:
service
in interfaceVmService
- Overrides:
service
in classMeasurableServiceImpl
-
toString
public String toString()
- Overrides:
toString
in classMeasurableServiceImpl
-
-