Commit 86a58a32 authored by Pino Toscano's avatar Pino Toscano Committed by Richard W.M. Jones

examples: switch from C.connect_readonly to connect_auth_readonly

This way it is possible to connect to URIs that require some kind of
authentication.
parent 7ae515aa
......@@ -62,7 +62,7 @@ let () =
Some (Sys.argv.(1))
else
None in
let conn = C.connect_readonly ?name () in
let conn = C.connect_auth_readonly ?name (C.get_auth_default ()) in
let spinner = [| '|'; '/'; '-'; '\\' |] in
......
......@@ -39,7 +39,7 @@ let () =
exit 1
);
let conn = C.connect_readonly () in
let conn = C.connect_auth_readonly (C.get_auth_default ()) in
let what = [
D.StatsState;
......
......@@ -17,7 +17,7 @@ let () =
);
let domname = Sys.argv.(1) in
let conn = C.connect_readonly () in
let conn = C.connect_auth_readonly (C.get_auth_default ()) in
(*
let nr_pcpus =
......
......@@ -26,7 +26,7 @@ let () =
Some (Sys.argv.(1))
else
None in
let conn = C.connect_readonly ?name () in
let conn = C.connect_auth_readonly ?name (C.get_auth_default ()) in
(* List all domains (running and inactive). *)
let domains = D.get_domains_and_infos conn [D.ListAll] in
......
......@@ -15,7 +15,7 @@ let () =
Some (Sys.argv.(1))
else
None in
let conn = C.connect_readonly ?name () in
let conn = C.connect_auth_readonly ?name (C.get_auth_default ()) in
(* Get node_info, hostname, etc. *)
let node_info = C.get_node_info conn in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment