X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=libvirt%2Flibvirt.mli;h=af372aff24ef4d80b1018e13e042bafb87be0c80;hb=46d3772c9a5cf786fa4fbdb2ba29512580101f32;hp=e80cf91219871459b7f93cabe0e81e1fbbc8e758;hpb=4696e201fac1d3138fa583229ffa93478a1dea1d;p=virt-top.git diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli index e80cf91..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.