Class DiskServiceImpl

    • Method Detail

      • convert

        public DiskService.ConvertRequest convert()
        Description copied from interface: DiskService
        Converts disk format and/or preallocation mode. For example, to convert the disk format from preallocated-cow to a sparse-raw image, send a request like the following: [source] ---- POST /ovirt-engine/api/disks/123/convert ---- With the following request body: [source,xml] ---- true raw ----
        Specified by:
        convert in interface DiskService
      • copy

        public DiskService.CopyRequest copy()
        Description copied from interface: DiskService
        This operation copies a disk to the specified storage domain. For example, a disk can be copied using the following request: [source] ---- POST /ovirt-engine/api/disks/123/copy ---- With a request body like this: [source,xml] ---- mydisk ---- If the disk profile or the quota currently used by the disk are not defined for the new storage domain, they can be explicitly specified. If they are not specified, the first available disk profile and the default quota are used. For example, to specify disk profile `987` and quota `753`, send a request body like this: [source,xml] ---- ----
        Specified by:
        copy in interface DiskService
      • move

        public DiskService.MoveRequest move()
        Description copied from interface: DiskService
        Moves a disk to another storage domain. For example, to move the disk with identifier `123` to a storage domain with identifier `456` send the following request: [source] ---- POST /ovirt-engine/api/disks/123/move ---- With the following request body: [source,xml] ---- ---- If the disk profile or the quota used currently by the disk aren't defined for the new storage domain, then they can be explicitly specified. If they aren't then the first available disk profile and the default quota are used. For example, to explicitly use disk profile `987` and quota `753` send a request body like this: [source,xml] ---- ----
        Specified by:
        move in interface DiskService
      • reduce

        public DiskService.ReduceRequest reduce()
        Description copied from interface: DiskService
        Reduces the size of the disk image. Invokes _reduce_ on the logical volume (i.e. this is only applicable for block storage domains). This is applicable for floating disks and disks attached to non-running virtual machines. There is no need to specify the size as the optimal size is calculated automatically.
        Specified by:
        reduce in interface DiskService
      • refreshLun

        public DiskService.RefreshLunRequest refreshLun()
        Description copied from interface: DiskService
        Refreshes a direct LUN disk with up-to-date information from the storage. Refreshing a direct LUN disk is useful when: - The LUN was added using the API without the host parameter, and therefore does not contain any information from the storage (see <>). - New information about the LUN is available on the storage and you want to update the LUN with it. To refresh direct LUN disk `123` using host `456`, send the following request: [source] ---- POST /ovirt-engine/api/disks/123/refreshlun ---- With the following request body: [source,xml] ---- ----
        Specified by:
        refreshLun in interface DiskService
      • sparsify

        public DiskService.SparsifyRequest sparsify()
        Description copied from interface: DiskService
        Sparsify the disk. Sparsification frees space in the disk image that is not used by its filesystem. As a result, the image will occupy less space on the storage. Currently sparsification works only on disks without snapshots. Disks having derived disks are also not allowed.
        Specified by:
        sparsify in interface DiskService
      • update

        public DiskService.UpdateRequest update()
        Description copied from interface: DiskService
        Updates the parameters of the specified disk. This operation allows updating the following floating disk properties: * For Image disks: `provisioned_size`, `alias`, `description`, `wipe_after_delete`, `shareable`, `backup` and `disk_profile`. * For LUN disks: `alias`, `description` and `shareable`. * Cinder integration has been replaced by Managed Block Storage. * For Managed Block disks: `provisioned_size`, `alias` and `description`. * For VM attached disks, the `qcow_version` can also be updated. For example, a disk's update can be done by using the following request: [source] ---- PUT /ovirt-engine/api/disks/123 ---- With a request body like this: [source,xml] ---- qcow2_v3 new-alias new-desc ---- Since the backend operation is asynchronous, the disk element that is returned to the user might not be synced with the changed properties.
        Specified by:
        update in interface DiskService
      • diskSnapshotsService

        public DiskSnapshotsService diskSnapshotsService()
        Description copied from interface: DiskService
        Reference to the service that manages the DiskSnapshots. For example, to list all disk snapshots under the disks resource '123': .... GET /ovirt-engine/api/disks/123/disksnapshots .... For example, to retrieve a specific disk snapshot '789' under the disk resource '123': .... GET /ovirt-engine/api/disks/123/disksnapshots/789 ....
        Specified by:
        diskSnapshotsService in interface DiskService