org.libvirt

Class StorageVol

public class StorageVol extends Object

Nested Class Summary
static classStorageVol.Type
Method Summary
voiddelete(int flags)
Delete the storage volume from the pool
voidfree()
Release the storage volume handle.
ConnectgetConnect()
Provides the connection object associated with a storage volume.
StorageVolInfogetInfo()
Fetches volatile information about the storage volume such as its current allocation
StringgetKey()
Fetch the storage volume key.
StringgetName()
Fetch the storage volume name.
StringgetPath()
Fetch the storage volume path.
StringgetXMLDesc(int flags)
Fetch an XML document describing all aspects of this storage volume
StoragePoolstoragePoolLookupByVolume()
Fetch a storage pool which contains this volume

Method Detail

delete

public void delete(int flags)
Delete the storage volume from the pool

Parameters: flags future flags, use 0 for now

Throws: LibvirtException

free

public void free()
Release the storage volume handle. The underlying storage volume contains to exist

Throws: LibvirtException

getConnect

public Connect getConnect()
Provides the connection object associated with a storage volume. The reference counter on the connection is not increased by this call.

Returns: the Connect object

getInfo

public StorageVolInfo getInfo()
Fetches volatile information about the storage volume such as its current allocation

Returns: StorageVolInfo object

Throws: LibvirtException

getKey

public String getKey()
Fetch the storage volume key. This is globally unique, so the same volume will have the same key no matter what host it is accessed from

Returns: the key

Throws: LibvirtException

getName

public String getName()
Fetch the storage volume name. This is unique within the scope of a pool

Returns: the name

Throws: LibvirtException

getPath

public String getPath()
Fetch the storage volume path. Depending on the pool configuration this is either persistent across hosts, or dynamically assigned at pool startup. Consult pool documentation for information on getting the persistent naming

Returns: the storage volume path

Throws: LibvirtException

getXMLDesc

public String getXMLDesc(int flags)
Fetch an XML document describing all aspects of this storage volume

Parameters: flags flags for XML generation (unused, pass 0)

Returns: the XML document

Throws: LibvirtException

storagePoolLookupByVolume

public StoragePool storagePoolLookupByVolume()
Fetch a storage pool which contains this volume

Returns: StoragePool object,

Throws: LibvirtException