Open ydirson opened 1 year ago
This should work:
(** Return true if feature_balloon has been advertised *)
let get_feature_balloon cnx domid =
try
let is_advertised = read cnx domid _feature_balloon in
is_advertised = "1"
with Xs_protocol.Enoent _ -> false
It might even be worth looking at how other values are read and use the same function to read "booleans"
https://github.com/xapi-project/xen-api/blob/b8abdec8f169a7567d113bf66fed42de2abbc372/ocaml/squeezed/src/squeeze_xen.ml#L496-L501:
This usage is counter-intuitive, as its usage by `xe-deamon' shows: https://github.com/xenserver/xe-guest-utilities/blob/388091e02f2ac8d7dae7beb7c83ccf1c905ee6c4/guestmetric/guestmetric_linux.go#L44-L48
It should likely only consider value
1
here soxe-daemon -B
will work as intended.