Class DisksServiceImpl
- java.lang.Object
-
- org.ovirt.engine.sdk4.internal.services.ServiceImpl
-
- org.ovirt.engine.sdk4.internal.services.DisksServiceImpl
-
- All Implemented Interfaces:
Service
,DisksService
public class DisksServiceImpl extends ServiceImpl implements DisksService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ovirt.engine.sdk4.services.DisksService
DisksService.AddLunRequest, DisksService.AddLunResponse, DisksService.AddOnStorageDomainRequest, DisksService.AddOnStorageDomainResponse, DisksService.AddRequest, DisksService.AddResponse, DisksService.ListRequest, DisksService.ListResponse
-
-
Constructor Summary
Constructors Constructor Description DisksServiceImpl(HttpConnection connection, String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DisksService.AddRequest
add()
Adds a new floating disk.DisksService.AddLunRequest
addLun()
Add a new lun disk to the storage domain.DisksService.AddOnStorageDomainRequest
addOnStorageDomain()
Add a new disk to the storage domain with the specified size allocating space from the storage domain.DiskService
diskService(String id)
Reference to a service managing a specific disk.DisksService.ListRequest
list()
Get list of disks.Service
service(String path)
Service locator method, returns individual service on which the URI is dispatched.String
toString()
-
Methods inherited from class org.ovirt.engine.sdk4.internal.services.ServiceImpl
checkAction, checkFault, getConnection, getPath, throwError
-
-
-
-
Constructor Detail
-
DisksServiceImpl
public DisksServiceImpl(HttpConnection connection, String path)
-
-
Method Detail
-
add
public DisksService.AddRequest add()
Description copied from interface:DisksService
Adds a new floating disk. There are three types of disks that can be added - disk image, direct LUN and https://wiki.openstack.org/wiki/Cinder[Cinder] disk. *Adding a new image disk:* When creating a new floating image <>, the API requires the `storage_domain`, `provisioned_size` and `format` attributes. Note that block storage domains (i.e., storage domains with the < > of iSCSI or FCP) don't support the combination of the raw `format` with `sparse=true`, so `sparse=false` must be stated explicitly. To create a new floating image disk with specified `provisioned_size`, `format` and `name` on a storage domain with an id `123`, send a request as follows: [source] ---- POST /ovirt-engine/api/disks ---- With a request body as follows: [source,xml] ---- mydisk 1048576 cow mylun iscsi 10.35.10.20 3260 iqn.2017-01.com.myhost:444 myceph cinderDomain 1073741824 virtio raw b548366b-fb51-4b41-97be-733c887fe305 mydisk 1048576 cow - Specified by:
add
in interfaceDisksService
-
list
public DisksService.ListRequest list()
Description copied from interface:DisksService
Get list of disks. [source] ---- GET /ovirt-engine/api/disks ---- You will get a XML response which will look like this one: [source,xml] ----... MyDisk MyDisk description 5345845248 MyDisk alias ...ok image false ... - Specified by:
list
in interfaceDisksService
-
addLun
public DisksService.AddLunRequest addLun()
Description copied from interface:DisksService
Add a new lun disk to the storage domain.- Specified by:
addLun
in interfaceDisksService
-
addOnStorageDomain
public DisksService.AddOnStorageDomainRequest addOnStorageDomain()
Description copied from interface:DisksService
Add a new disk to the storage domain with the specified size allocating space from the storage domain.- Specified by:
addOnStorageDomain
in interfaceDisksService
-
diskService
public DiskService diskService(String id)
Description copied from interface:DisksService
Reference to a service managing a specific disk.- Specified by:
diskService
in interfaceDisksService
-
service
public Service service(String path)
Description copied from interface:DisksService
Service locator method, returns individual service on which the URI is dispatched.- Specified by:
service
in interfaceDisksService
-
-