public class VMDisks extends CollectionDecorator<Disk,Disks,VMDisk>
VMDisks providing relation and functional services
to Disks
.
Constructor and Description |
---|
VMDisks(HttpProxyBroker proxy,
VM parent) |
Modifier and Type | Method and Description |
---|---|
VMDisk |
add(Disk disk)
Adds Disk object.
|
VMDisk |
add(Disk disk,
String expect)
Adds Disk object.
|
VMDisk |
add(Disk disk,
String expect,
String correlationId)
Adds Disk object.
|
VMDisk |
get(UUID id)
Fetches VMDisk object by id.
|
VMDisk |
getById(String id)
Fetches VMDisk object by id.
|
List<VMDisk> |
list()
Lists VMDisk objects.
|
List<VMDisk> |
list(Integer max)
Lists VMDisk objects.
|
get
public VMDisks(HttpProxyBroker proxy, VM parent)
proxy
- HttpProxyBrokerparent
- VMpublic List<VMDisk> list() throws org.apache.http.client.ClientProtocolException, ServerException, IOException
list
in class CollectionDecorator<Disk,Disks,VMDisk>
VMDisk
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public VMDisk get(UUID id) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
get
in class CollectionDecorator<Disk,Disks,VMDisk>
id
- entity idVMDisk
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public VMDisk getById(String id) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
getById
in class CollectionDecorator<Disk,Disks,VMDisk>
id
- entity idVMDisk
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public VMDisk add(Disk disk) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
disk
- Disk
Overload 1: add a new disk to the virtual machine allocating space from the storage domain disk.format disk.interface disk.provisioned_size [disk.alias] [disk.name] [disk.size] [disk.sparse] [disk.description] [disk.bootable] [disk.shareable] [disk.propagate_errors] [disk.wipe_after_delete] [disk.quota.id] [disk.disk_profile.id] [disk.storage_domains.storage_domain] [disk.openstack_volume_type.name] Overload 2: add a new direct lun disk to the virtual machine, this operation does not require size but needs lun connection details disk.interface disk.lun_storage.type disk.lun_storage.logical_unit [disk.alias] [disk.sparse] [disk.description] [disk.bootable] [disk.shareable] [disk.propagate_errors] [disk.wipe_after_delete] [disk.quota.id] [disk.sgio] [disk.uses_scsi_reservation] [disk.lun_storage.host] Overload 3: attach a disk to the virtual machine disk.id [disk.active] [disk.read_only] Overload 4: attach a disk snapshot to the virtual machine disk.id disk.snapshot.id [disk.active]
VMDisk
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public VMDisk add(Disk disk, String expect) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
disk
- Disk
Overload 1: add a new disk to the virtual machine allocating space from the storage domain disk.format disk.interface disk.provisioned_size [disk.alias] [disk.name] [disk.size] [disk.sparse] [disk.description] [disk.bootable] [disk.shareable] [disk.propagate_errors] [disk.wipe_after_delete] [disk.quota.id] [disk.disk_profile.id] [disk.storage_domains.storage_domain] [disk.openstack_volume_type.name] Overload 2: add a new direct lun disk to the virtual machine, this operation does not require size but needs lun connection details disk.interface disk.lun_storage.type disk.lun_storage.logical_unit [disk.alias] [disk.sparse] [disk.description] [disk.bootable] [disk.shareable] [disk.propagate_errors] [disk.wipe_after_delete] [disk.quota.id] [disk.sgio] [disk.uses_scsi_reservation] [disk.lun_storage.host] Overload 3: attach a disk to the virtual machine disk.id [disk.active] [disk.read_only] Overload 4: attach a disk snapshot to the virtual machine disk.id disk.snapshot.id [disk.active]
expect
- [201-created]
VMDisk
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public VMDisk add(Disk disk, String expect, String correlationId) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
disk
- Disk
Overload 1: add a new disk to the virtual machine allocating space from the storage domain disk.format disk.interface disk.provisioned_size [disk.alias] [disk.name] [disk.size] [disk.sparse] [disk.description] [disk.bootable] [disk.shareable] [disk.propagate_errors] [disk.wipe_after_delete] [disk.quota.id] [disk.disk_profile.id] [disk.storage_domains.storage_domain] [disk.openstack_volume_type.name] Overload 2: add a new direct lun disk to the virtual machine, this operation does not require size but needs lun connection details disk.interface disk.lun_storage.type disk.lun_storage.logical_unit [disk.alias] [disk.sparse] [disk.description] [disk.bootable] [disk.shareable] [disk.propagate_errors] [disk.wipe_after_delete] [disk.quota.id] [disk.sgio] [disk.uses_scsi_reservation] [disk.lun_storage.host] Overload 3: attach a disk to the virtual machine disk.id [disk.active] [disk.read_only] Overload 4: attach a disk snapshot to the virtual machine disk.id disk.snapshot.id [disk.active]
expect
- [201-created]
correlationId
- [any string]
VMDisk
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public List<VMDisk> list(Integer max) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
max
- [max results]
VMDisk
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.Copyright ? 2010 Red Hat, Inc - released under the Apache License Version 2.0