X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=libvirt%2Flibvirt.ml;h=d01db2f8566cfdb8812f6ac7b6cd01dd1cb9294b;hb=edd8d7c54997aa397dbe639d137766f140091428;hp=598cd7d2686e3e0a8485afefb8762117591b29af;hpb=43b894e0ef93f380dcd8b1b20a3cd6626a8f3b7d;p=virt-top.git diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml index 598cd7d..d01db2f 100644 --- a/libvirt/libvirt.ml +++ b/libvirt/libvirt.ml @@ -150,7 +150,7 @@ struct } external create_linux : [>`W] Connect.t -> xml -> rw t = "ocaml_libvirt_domain_create_linux" - external create_linux_job : [>`W] Connect.t -> xml -> ([`Domain], rw) job_t = "ocaml_libvirt_connect_create_linux_job" + external create_linux_job : [>`W] Connect.t -> xml -> ([`Domain], rw) job_t = "ocaml_libvirt_domain_create_linux_job" external lookup_by_id : 'a Connect.t -> int -> 'a t = "ocaml_libvirt_domain_lookup_by_id" external lookup_by_uuid : 'a Connect.t -> uuid -> 'a t = "ocaml_libvirt_domain_lookup_by_uuid" external lookup_by_uuid_string : 'a Connect.t -> string -> 'a t = "ocaml_libvirt_domain_lookup_by_uuid_string" @@ -230,6 +230,7 @@ struct type 'rw t type pool_state = Inactive | Active type pool_info = { + state : pool_state; capacity : int64; allocation : int64; } @@ -268,7 +269,7 @@ struct external lookup_by_name : 'a Pool.t -> string -> 'a t = "ocaml_libvirt_storage_vol_lookup_by_name" external lookup_by_key : 'a Pool.t -> string -> 'a t = "ocaml_libvirt_storage_vol_lookup_by_key" external lookup_by_path : 'a Pool.t -> string -> 'a t = "ocaml_libvirt_storage_vol_lookup_by_path" - external pool_of_volume : 'a t -> 'a Pool.t = "ocaml_libvirt_pool_of_volume" + external pool_of_volume : 'a t -> 'a Pool.t = "ocaml_libvirt_storage_pool_lookup_by_volume" external get_name : [`R] t -> string = "ocaml_libvirt_storage_vol_get_name" external get_key : [`R] t -> string = "ocaml_libvirt_storage_vol_get_key" external get_path : [`R] t -> string = "ocaml_libvirt_storage_vol_get_path" @@ -296,6 +297,7 @@ struct external get_domain : ([`Domain], 'a) t -> 'a Domain.t = "ocaml_libvirt_job_get_domain" external get_network : ([`Network], 'a) t -> 'a Network.t = "ocaml_libvirt_job_get_network" external cancel : ('a,'b) t -> unit = "ocaml_libvirt_job_cancel" + external free : ('a, [>`R]) t -> unit = "ocaml_libvirt_job_free" external const : ('a, [>`R]) t -> ('a, ro) t = "%identity" end @@ -347,6 +349,12 @@ struct | VIR_ERR_NO_DOMAIN | VIR_ERR_NO_NETWORK | VIR_ERR_INVALID_MAC + | VIR_ERR_AUTH_FAILED + | VIR_ERR_INVALID_STORAGE_POOL + | VIR_ERR_INVALID_STORAGE_VOL + | VIR_WAR_NO_STORAGE + | VIR_ERR_NO_STORAGE_POOL + | VIR_ERR_NO_STORAGE_VOL | VIR_ERR_UNKNOWN of int let string_of_code = function @@ -395,6 +403,12 @@ struct | VIR_ERR_NO_DOMAIN -> "VIR_ERR_NO_DOMAIN" | VIR_ERR_NO_NETWORK -> "VIR_ERR_NO_NETWORK" | VIR_ERR_INVALID_MAC -> "VIR_ERR_INVALID_MAC" + | VIR_ERR_AUTH_FAILED -> "VIR_ERR_AUTH_FAILED" + | VIR_ERR_INVALID_STORAGE_POOL -> "VIR_ERR_INVALID_STORAGE_POOL" + | VIR_ERR_INVALID_STORAGE_VOL -> "VIR_ERR_INVALID_STORAGE_VOL" + | VIR_WAR_NO_STORAGE -> "VIR_WAR_NO_STORAGE" + | VIR_ERR_NO_STORAGE_POOL -> "VIR_ERR_NO_STORAGE_POOL" + | VIR_ERR_NO_STORAGE_VOL -> "VIR_ERR_NO_STORAGE_VOL" | VIR_ERR_UNKNOWN i -> "VIR_ERR_" ^ string_of_int i type domain = @@ -415,6 +429,7 @@ struct | VIR_FROM_OPENVZ | VIR_FROM_XENXM | VIR_FROM_STATS_LINUX + | VIR_FROM_STORAGE | VIR_FROM_UNKNOWN of int let string_of_domain = function @@ -435,6 +450,7 @@ struct | VIR_FROM_OPENVZ -> "VIR_FROM_OPENVZ" | VIR_FROM_XENXM -> "VIR_FROM_XENXM" | VIR_FROM_STATS_LINUX -> "VIR_FROM_STATS_LINUX" + | VIR_FROM_STORAGE -> "VIR_FROM_STORAGE" | VIR_FROM_UNKNOWN i -> "VIR_FROM_" ^ string_of_int i type level =