Skip to content

CA-413424: Enhance xe help output #6584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions ocaml/xe-cli/newcli.ml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,22 @@ exception Usage

let usage () =
error
"Usage: %s <cmd> [-s server] [-p port] ([-u username] [-pw password] or \
[-pwf <password file>]) [--traceparent traceparent] <other arguments>\n"
"Usage:\n\
\ %s <command>\n\
\ [ -s <server> ] XenServer host \n\
\ [ -p <port> ] XenServer port number \n\
\ [ -u <username> -pw <password> | -pwf <password file> ] \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 <value> ] Distributed tracing context \n\
\ [ <other arguments> ... ] Command-specific options \n"
Copy link
Contributor

@changlei-li changlei-li Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will you also change xe help? Different with xe or xe -h, it seems be on server side.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for xe help you can manipulate the usage at client side and manipulate the remaining (Common command list .etc) at server side. Then the usage will keep consistent no matter if autogenerate it.

Sys.argv.(0) ;
error
"\n\
A full list of commands can be obtained by running \n\
\t%s help -s <server> -p <port>\n"
\ %s help -s <server> -p <port>\n"
Sys.argv.(0)

let is_localhost ip = ip = "127.0.0.1"
Expand Down
Loading