Skip to content

Commit 8a4d2b4

Browse files
committed
Merge pull request #40 from robhoes/master
Plumb through new SR.stat fields "clustered" and "health"
2 parents a17a079 + bf17443 commit 8a4d2b4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

main.ml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,11 @@ let process root_dir name x =
491491
let srs = List.map ~f:(fun sr_stat -> sr_stat.Storage.Volume.Types.sr, {
492492
Storage_interface.total_space = sr_stat.Storage.Volume.Types.total_space;
493493
free_space = sr_stat.Storage.Volume.Types.free_space;
494+
clustered = sr_stat.Storage.Volume.Types.clustered;
495+
health = match sr_stat.Storage.Volume.Types.health with
496+
| Storage.Volume.Types.Healthy _ -> Healthy
497+
| Storage.Volume.Types.Recovering _ -> Recovering
498+
;
494499
}) response.Storage.Volume.Types.SR.Probe.Out.srs in
495500
let uris = response.Storage.Volume.Types.SR.Probe.Out.uris in
496501
let result = Storage_interface.(Probe { srs; uris }) in
@@ -785,6 +790,11 @@ let process root_dir name x =
785790
let response = {
786791
total_space = response.Storage.Volume.Types.total_space;
787792
free_space = response.Storage.Volume.Types.free_space;
793+
clustered = response.Storage.Volume.Types.clustered;
794+
health = match response.Storage.Volume.Types.health with
795+
| Storage.Volume.Types.Healthy _ -> Healthy
796+
| Storage.Volume.Types.Recovering _ -> Recovering
797+
;
788798
} in
789799
Deferred.Result.return (R.success (Args.SR.Stat.rpc_of_response response))
790800
| { R.name = "VDI.epoch_begin"; R.params = [ args ] } ->

0 commit comments

Comments
 (0)