File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -460,6 +460,12 @@ let on_boot_to_string onboot =
460460 | `reset -> " reset"
461461 | `persist -> " persist"
462462
463+ let tristate_to_string tristate =
464+ match tristate with
465+ | `yes -> " true"
466+ | `no -> " false"
467+ | `unspecified -> " unspecified"
468+
463469let wrap f err x = try f x with _ -> err x
464470let generic_error x = raise (Record_failure (" Unknown value: " ^ x))
465471let rpc_to_string = function | Rpc. String s -> s | _ -> failwith " Bad RPC type in record_util"
Original file line number Diff line number Diff line change @@ -882,6 +882,10 @@ let vm_record rpc session_id vm =
882882 ~get: (fun () -> default nid (may (fun m -> string_of_bool m.API. vM_guest_metrics_live) (xgm () ) )) () ;
883883 make_field ~name: " guest-metrics-last-updated"
884884 ~get: (fun () -> default nid (may (fun m -> Date. to_string m.API. vM_guest_metrics_last_updated) (xgm () ) )) () ;
885+ make_field ~name: " can-use-hotplug-vbd"
886+ ~get: (fun () -> default nid (may (fun m -> Record_util. tristate_to_string m.API. vM_guest_metrics_can_use_hotplug_vbd) (xgm () ) )) () ;
887+ make_field ~name: " can-use-hotplug-vif"
888+ ~get: (fun () -> default nid (may (fun m -> Record_util. tristate_to_string m.API. vM_guest_metrics_can_use_hotplug_vif) (xgm () ) )) () ;
885889 make_field ~name: " cooperative"
886890 (* NB this can receive VM_IS_SNAPSHOT *)
887891 ~get: (fun () -> string_of_bool (try Client.VM. get_cooperative rpc session_id vm with _ -> true ))
You can’t perform that action at this time.
0 commit comments