module Volume:sig
..end
type 'rw
t
type
vol_type =
| |
File |
|||
| |
Block |
(* |
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 t
val pool_of_volume : 'a t -> 'a Libvirt.Pool.t
val get_name : [ `R ] t -> string
val get_key : [ `R ] t -> string
val get_path : [ `R ] t -> string
val get_info : [ `R ] t -> vol_info
val get_xml_desc : [ `R ] t -> Libvirt.xml
val create_xml : [> `W ] Libvirt.Pool.t -> Libvirt.xml -> unit
val delete : [> `W ] t -> vol_delete_flags -> unit
val free : [> `R ] t -> unit
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 t
const conn
turns a read/write storage volume into a read-only
volume. Note that the opposite operation is impossible.