module Volume:sig..end
Module dealing with storage volumes.
type 'rw t
Storage volume handle.
type vol_type =
| |
File |
|||
| |
Block |
|||
| |
Dir |
|||
| |
Network |
|||
| |
NetDir |
|||
| |
Ploop |
(* | Type of a storage volume. | *) |
type vol_delete_flags =
| |
Normal |
|||
| |
Zeroed |
(* | Flags for deleting a storage volume. | *) |
type vol_info = {
|
typ : |
(* | Type of storage volume. | *) |
|
capacity : |
(* | Logical size in bytes. | *) |
|
allocation : |
(* | Currently allocated in bytes. | *) |
}
val lookup_by_name : 'a Libvirt.Pool.t -> string -> 'a t
val lookup_by_key : 'a Libvirt.Connect.t -> string -> 'a t
val lookup_by_path : 'a Libvirt.Connect.t -> string -> 'a tLook up a storage volume by name, key or path volume.
val pool_of_volume : 'a t -> 'a Libvirt.Pool.tGet the storage pool containing this volume.
val get_name : [ `R ] t -> stringName of the volume.
val get_key : [ `R ] t -> stringKey of the volume.
val get_path : [ `R ] t -> stringPath of the volume.
val get_info : [ `R ] t -> vol_infoGet information about the storage volume.
val get_xml_desc : [ `R ] t -> Libvirt.xmlGet the XML description.
val create_xml : [> `W ] Libvirt.Pool.t -> Libvirt.xml -> unitCreate a storage volume.
val delete : [> `W ] t -> vol_delete_flags -> unitDelete a storage volume.
val free : [> `R ] t -> unitFree a storage volume object in memory.
The storage volume object is automatically freed if it is garbage collected. This function just forces it to be freed right away.
val const : [> `R ] t -> Libvirt.ro tconst conn turns a read/write storage volume into a read-only
volume. Note that the opposite operation is impossible.