Skip to content

Commit 4ac4a87

Browse files
committed
network_monitor_thread: use Xmlrpc_client instead of Rpc_client
The Rpc_client module has been removed from ocaml-rpc Signed-off-by: Gabor Igloi <[email protected]>
1 parent fb73f33 commit 4ac4a87

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

networkd/jbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
networklibs
2323
profiling
2424
rpclib
25-
rpclib.unix
2625
systemd
2726
threads
2827
xapi-stdext-monadic

networkd/network_monitor_thread.ml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@ let monitor_whitelist = ref [
2828
"vif"; (* This includes "tap" owing to the use of standardise_name below *)
2929
]
3030

31-
let xapi_rpc request =
32-
Rpc_client.do_rpc_unix
33-
~content_type:(Rpc_client.content_type_of_string "text/xml")
34-
~filename:(Filename.concat "/var/lib/xcp" "xapi")
35-
~path:"/" request
31+
let xapi_rpc xml =
32+
let open Xmlrpc_client in
33+
XMLRPC_protocol.rpc ~srcstr:"xcp-networkd" ~dststr:"xapi" ~transport:(Unix "/var/xapi/xapi") ~http:(xmlrpc ~version:"1.0" "/") xml
3634

3735
let send_bond_change_alert dev interfaces message =
3836
let ifaces = String.concat "+" (List.sort String.compare interfaces) in

0 commit comments

Comments
 (0)