Interface DiskService

    • Method Detail

      • copy

        DiskService.CopyRequest copy()
        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] ---- ----
      • move

        DiskService.MoveRequest move()
        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] ---- ----
      • reduce

        DiskService.ReduceRequest reduce()
        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.
      • refreshLun

        DiskService.RefreshLunRequest refreshLun()
        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] ---- ----
      • sparsify

        DiskService.SparsifyRequest sparsify()
        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.
      • update

        DiskService.UpdateRequest update()
        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`. * For Cinder and 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.
      • diskSnapshotsService

        DiskSnapshotsService diskSnapshotsService()
        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 ....
      • permissionsService

        AssignedPermissionsService permissionsService()
        Reference to the service that manages the permissions assigned to the disk.