From 97e50cfb2e596660859aaae37ee74d876a78f6e2 Mon Sep 17 00:00:00 2001 From: Bengang Yuan Date: Thu, 10 Jul 2025 07:21:40 +0100 Subject: [PATCH] CA-413424: Enhance xe help output The previous `xe` help is as below: ``` Usage: xe [-s server] [-p port] ([-u username] [-pw password] or [-pwf ]) [--traceparent traceparent] A full list of commands can be obtained by running xe help -s -p ``` The previous `xe` help output lacked debug-related options and did not provide detailed parameter description. The new `xe` help output is as follows: ``` Usage: xe [ -s ] XenServer host [ -p ] XenServer port number [ -u -pw | -pwf ] User authentication (password or file) [ --nossl ] Disable SSL/TLS [ --debug ] Enable debug output [ --debug-on-fail ] Enable debug output only on failure [ --traceparent ] Distributed tracing context [ ... ] Command-specific options A full list of commands can be obtained by running xe help -s -p ``` Signed-off-by: Bengang Yuan --- ocaml/xe-cli/newcli.ml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ocaml/xe-cli/newcli.ml b/ocaml/xe-cli/newcli.ml index c33e32a2e0a..6d32834c524 100644 --- a/ocaml/xe-cli/newcli.ml +++ b/ocaml/xe-cli/newcli.ml @@ -67,13 +67,22 @@ exception Usage let usage () = error - "Usage: %s [-s server] [-p port] ([-u username] [-pw password] or \ - [-pwf ]) [--traceparent traceparent] \n" + "Usage:\n\ + \ %s \n\ + \ [ -s ] XenServer host \n\ + \ [ -p ] XenServer port number \n\ + \ [ -u -pw | -pwf ] \n\ + \ User authentication (password or file) \n\ + \ [ --nossl ] Disable SSL/TLS \n\ + \ [ --debug ] Enable debug output \n\ + \ [ --debug-on-fail ] Enable debug output only on failure \n\ + \ [ --traceparent ] Distributed tracing context \n\ + \ [ ... ] Command-specific options \n" Sys.argv.(0) ; error "\n\ A full list of commands can be obtained by running \n\ - \t%s help -s -p \n" + \ %s help -s -p \n" Sys.argv.(0) let is_localhost ip = ip = "127.0.0.1"