-
Notifications
You must be signed in to change notification settings - Fork 292
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
base: master
Are you sure you want to change the base?
Conversation
The previous `xe` help is as below: ``` Usage: xe <cmd> [-s server] [-p port] ([-u username] [-pw password] or [-pwf <password file>]) [--traceparent traceparent] <other arguments> A full list of commands can be obtained by running xe help -s <server> -p <port> ``` 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 <command> [ -s <server> ] XenServer host [ -p <port> ] XenServer port number [ -u <username> -pw <password> | -pwf <password file> ] User authentication (password or file) [ --nossl ] Disable SSL/TLS [ --debug ] Enable debug output [ --debug-on-fail ] Enable debug output only on failure [ --traceparent <value> ] Distributed tracing context [ <other arguments> ... ] Command-specific options A full list of commands can be obtained by running xe help -s <server> -p <port> ``` Signed-off-by: Bengang Yuan <[email protected]>
When I run
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another way to format this in source code would be using {| ... |}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is definitely better, but we really need to stop hard-coding this and autogenerate it, the OCaml libraries for generating CLIs take care of this
\ [ --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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will.
There was a problem hiding this comment.
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.
|
Let me investigate how to auto-generate it. |
We usually use cmdliner for these. But don't feel pressured into adding it for this PR. xe's CLI has many shortcomings and needs a good rework. |
I think we should merge this. Moving towards Cmdliner will be a bigger change. |
The previous
xe
help is as below:The previous
xe
help output lacked debug-related options and did not provide detailed parameter description.The new
xe
help output is as follows: