X-Git-Url: http://git.annexia.org/?p=virt-top.git;a=blobdiff_plain;f=libvirt%2Flibvirt.mli;h=af372aff24ef4d80b1018e13e042bafb87be0c80;hp=642b845e8c18cdb7a3db215704d9998c23ac0158;hb=e6cca10e5cf86b9bd280e371fb1195835a96bff0;hpb=8a8008134e997330d61e0b9736e9067b5689b531 diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli index 642b845..af372af 100644 --- a/libvirt/libvirt.mli +++ b/libvirt/libvirt.mli @@ -641,12 +641,20 @@ sig type 'rw t (** Storage pool handle. *) - type pool_state = Inactive | Active + type pool_state = Inactive | Building | Running | Degraded (** 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; (** Pool state. *) capacity : int64; (** Logical size in bytes. *) allocation : int64; (** Currently allocated in bytes. *) + available : int64; (** Remaining free space bytes. *) } val lookup_by_name : 'a Connect.t -> string -> 'a t @@ -658,14 +666,16 @@ sig (** Create a storage pool. *) val define_xml : [>`W] Connect.t -> xml -> rw t (** Define but don't activate a storage pool. *) + val build : [>`W] t -> pool_build_flags -> unit + (** Build a storage pool. *) val undefine : [>`W] t -> unit (** Undefine configuration of a storage pool. *) val create : [>`W] t -> unit (** Start up a defined (inactive) storage pool. *) val destroy : [>`W] t -> unit (** Destroy a storage pool. *) - val shutdown : [>`W] t -> unit - (** Shutdown a storage pool. *) + val delete : [>`W] t -> unit + (** Delete a storage pool. *) val free : [>`R] t -> unit (** Free a storage pool object in memory. @@ -691,6 +701,11 @@ sig val set_autostart : [`W] t -> bool -> unit (** Set the autostart flag for the storage pool. *) + val num_of_volumes : [`R] t -> int + (** Returns the number of storage volumes within the storage pool. *) + val list_volumes : [`R] t -> int -> string array + (** Return list of storage volumes. *) + external const : [>`R] t -> ro t = "%identity" (** [const conn] turns a read/write storage pool into a read-only pool. Note that the opposite operation is impossible. @@ -705,9 +720,12 @@ sig type 'rw t (** Storage volume handle. *) - type vol_type = File | Block | Virtual + 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 : vol_type; (** Type of storage volume. *) capacity : int64; (** Logical size in bytes. *) @@ -715,8 +733,8 @@ sig } val lookup_by_name : 'a Pool.t -> string -> 'a t - val lookup_by_key : 'a Pool.t -> string -> 'a t - val lookup_by_path : 'a Pool.t -> string -> 'a t + val lookup_by_key : 'a Connect.t -> string -> 'a t + val lookup_by_path : 'a Connect.t -> string -> 'a t (** Look up a storage volume by name, key or path volume. *) val pool_of_volume : 'a t -> 'a Pool.t @@ -735,8 +753,8 @@ sig val create_xml : [`W] Pool.t -> xml -> unit (** Create a storage volume. *) - val destroy : [`W] t -> unit - (** Destroy a storage volume. *) + val delete : [`W] t -> unit + (** Delete a storage volume. *) val free : [>`R] t -> unit (** Free a storage volume object in memory. @@ -801,6 +819,14 @@ v} val cancel : ('a,'b) t -> unit (** Cancel a job. *) + val free : ('a, [>`R]) t -> unit + (** Free a job object in memory. + + The job object is automatically freed if it is garbage + collected. This function just forces it to be freed right + away. + *) + external const : ('a, [>`R]) t -> ('a, ro) t = "%identity" (** [const conn] turns a read/write job into a read-only job. Note that the opposite operation is impossible.