module Pool:sig..end
Module dealing with storage pools.
type 'rw t
Storage pool handle.
type pool_state =
| |
Inactive |
|||
| |
Building |
|||
| |
Running |
|||
| |
Degraded |
|||
| |
Inaccessible |
(* | State of the storage pool. | *) |
type pool_build_flags =
| |
New |
|||
| |
Repair |
|||
| |
Resize |
(* | Flags for creating a storage pool. | *) |
type pool_delete_flags =
| |
Normal |
|||
| |
Zeroed |
(* | Flags for deleting a storage pool. | *) |
type pool_info = {
|
state : |
(* | Pool state. | *) |
|
capacity : |
(* | Logical size in bytes. | *) |
|
allocation : |
(* | Currently allocated in bytes. | *) |
|
available : |
(* | Remaining free space bytes. | *) |
}
val lookup_by_name : 'a Libvirt.Connect.t -> string -> 'a t
val lookup_by_uuid : 'a Libvirt.Connect.t -> Libvirt.uuid -> 'a t
val lookup_by_uuid_string : 'a Libvirt.Connect.t -> string -> 'a tLook up a storage pool by name, UUID or UUID string.
val create_xml : [> `W ] Libvirt.Connect.t -> Libvirt.xml -> Libvirt.rw tCreate a storage pool.
val define_xml : [> `W ] Libvirt.Connect.t -> Libvirt.xml -> Libvirt.rw tDefine but don't activate a storage pool.
val build : [> `W ] t -> pool_build_flags -> unitBuild a storage pool.
val undefine : [> `W ] t -> unitUndefine configuration of a storage pool.
val create : [> `W ] t -> unitStart up a defined (inactive) storage pool.
val destroy : [> `W ] t -> unitDestroy a storage pool.
val delete : [> `W ] t -> unitDelete a storage pool.
val free : [> `R ] t -> unitFree a storage pool object in memory.
The storage pool object is automatically freed if it is garbage collected. This function just forces it to be freed right away.
val refresh : [ `R ] t -> unitRefresh the list of volumes in the storage pool.
val get_name : [ `R ] t -> stringName of the pool.
val get_uuid : [ `R ] t -> Libvirt.uuidGet the UUID (as a packed byte array).
val get_uuid_string : [ `R ] t -> stringGet the UUID (as a printable string).
val get_info : [ `R ] t -> pool_infoGet information about the pool.
val get_xml_desc : [ `R ] t -> Libvirt.xmlGet the XML description.
val get_autostart : [ `R ] t -> boolGet the autostart flag for the storage pool.
val set_autostart : [> `W ] t -> bool -> unitSet the autostart flag for the storage pool.
val num_of_volumes : [ `R ] t -> intReturns the number of storage volumes within the storage pool.
val list_volumes : [ `R ] t -> int -> string arrayReturn list of storage volumes.
val const : [> `R ] t -> Libvirt.ro tconst conn turns a read/write storage pool into a read-only
pool. Note that the opposite operation is impossible.