From: Pino Toscano Date: Fri, 21 Sep 2018 09:59:45 +0000 (+0200) Subject: Synchronize few states/types with libvirt 4.6.0 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=e257cbcab6e1f20abc7bc4f9dfeb6e996cab4fc4;p=ocaml-libvirt.git Synchronize few states/types with libvirt 4.6.0 Add states/types that do not require using enum values in newer libvirt versions. --- diff --git a/examples/domain_events.ml b/examples/domain_events.ml index afe686f..12ddbc1 100644 --- a/examples/domain_events.ml +++ b/examples/domain_events.ml @@ -20,6 +20,7 @@ let string_of_state = function | D.InfoShutdown -> "shutdown" | D.InfoShutoff -> "shutoff" | D.InfoCrashed -> "crashed" + | D.InfoPMSuspended -> "pm suspended" let printd dom fmt = let prefix dom = diff --git a/examples/list_domains.ml b/examples/list_domains.ml index e8809b4..1d73b69 100644 --- a/examples/list_domains.ml +++ b/examples/list_domains.ml @@ -18,6 +18,7 @@ let string_of_state = function | D.InfoShutdown -> "shutdown" | D.InfoShutoff -> "shutoff" | D.InfoCrashed -> "crashed" + | D.InfoPMSuspended -> "pm suspended" let () = try diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml index fb5803a..49ccc3e 100644 --- a/libvirt/libvirt.ml +++ b/libvirt/libvirt.ml @@ -556,7 +556,7 @@ struct type state = | InfoNoState | InfoRunning | InfoBlocked | InfoPaused - | InfoShutdown | InfoShutoff | InfoCrashed + | InfoShutdown | InfoShutoff | InfoCrashed | InfoPMSuspended type info = { state : state; @@ -1560,7 +1560,7 @@ end module Pool = struct type 'rw t - type pool_state = Inactive | Building | Running | Degraded + type pool_state = Inactive | Building | Running | Degraded | Inaccessible type pool_build_flags = New | Repair | Resize type pool_delete_flags = Normal | Zeroed type pool_info = { @@ -1597,7 +1597,7 @@ end module Volume = struct type 'rw t - type vol_type = File | Block + type vol_type = File | Block | Dir | Network | NetDir | Ploop type vol_delete_flags = Normal | Zeroed type vol_info = { typ : vol_type; diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli index f3a827d..cc7a962 100644 --- a/libvirt/libvirt.mli +++ b/libvirt/libvirt.mli @@ -458,7 +458,7 @@ sig type state = | InfoNoState | InfoRunning | InfoBlocked | InfoPaused - | InfoShutdown | InfoShutoff | InfoCrashed + | InfoShutdown | InfoShutoff | InfoCrashed | InfoPMSuspended type info = { state : state; (** running state *) @@ -1149,7 +1149,7 @@ sig type 'rw t (** Storage pool handle. *) - type pool_state = Inactive | Building | Running | Degraded + type pool_state = Inactive | Building | Running | Degraded | Inaccessible (** State of the storage pool. *) type pool_build_flags = New | Repair | Resize @@ -1228,7 +1228,7 @@ sig type 'rw t (** Storage volume handle. *) - type vol_type = File | Block + type vol_type = File | Block | Dir | Network | NetDir | Ploop (** Type of a storage volume. *) type vol_delete_flags = Normal | Zeroed