-
Notifications
You must be signed in to change notification settings - Fork 923
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
More helpful pdnsutil help output #15082
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 13324705601Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
As you may or may not have guessed, this PR was not changing any of the existing help texts, only moving them around. Thanks to the review feedback I'll try to make them look better now. |
I can't remember if my original attempt did. I think I struggled because they were so inconsistent. |
Also, I'm really tempted to make the help text for every command span two lines, as in
On one hand, this would prevent some help sentences to span two lines due to them being preceded by about 35 spaces; on the other hand there are nevertheless a fair number of commands where synposis and help fits on a single line. Opinions? |
I started doing something like that in places in my PR. The existing wrapping was more trouble than it was worth. |
Here is what the output of
|
@jsoref I think I addressed all your comments (and used |
I can't quite figure out when we're using trailing
- Get zone metadata. If no KIND given, lists all known
+ Get zone metadata. If no KIND is given, lists all known - Set zone metadata, optionally providing a value. A missing value clears
+ Set zone metadata, optionally providing a value. An omitted value clears
- the metadata.
+ the metadata - List all active zone names. --verbose or -v will also include disabled
- or empty zones
+ List all active zone names.
+ Use --verbose (-v) to include disabled or empty zones Change the kind of ZONE to KIND (primary, secondary, native, producer,
- consumer)
+ or consumer)
We should standardize on text for empty=>delete
That ZONEMD is a thing and ZONE is an argument is confusing. delete-rrset ZONE NAME TYPE
- Delete named RRSET from zone
+ Delete named RRSET from ZONE
replace-rrset ZONE NAME TYPE [ttl] content [content...]
- Replace named RRSET from zone
+ Replace named RRSET from ZONE - List DNSSEC keys for ZONE. When ZONE is unset, display all keys
- for all active zones
+ List DNSSEC keys for ZONE.
+ When ZONE is omitted, display all keys for all active zones Enable sending CDS responses for ZONE, using DIGESTALGOS as signature
algorithms; DIGESTALGOS should be a comma-separated list of numbers,
- defaulting to '2'
+ (default: '2')
Using |
In the current state of the code, yes, you need to explicitly pass an empty argument. I'm fixing this en passant.
You can query for multiple kind of metadata, but only set one kind at once. |
8c98550
to
ff66eaf
Compare
I think it's good to go now. (which means that there is still a lot of room for improvement but I'd like to be able to push this in before this becomes unmanageable) |
I think you're missing a verb. Otherwise, let's ship it and iterate later |
Indeed, the word is "passed", I'll amend the commit (and fix a typo in the docs). The next bikeshed topic will be the different grouping of commands in the |
1. The commands dictionary is extended with a command group, as well as the one-liner synopsis and help message. When the list of these one-liners get output, they are now output in sorted order within each group. 2. Instead of having the syntax on the leftmost 40 columns and the description on the rightmost 40 columns, causing many commands to span more than one line total, we now display the syntax on a whole line, and the description on the next one, indented by a tab. This should hopefully improve readability (especially for complex syntax lines). 3. The command synopsis is now passed to the command handler. This allows error messages in case of invocation error to be consistent with the output of `pdnsutil help`.
Short description
This is another take at #12350 ("Group pdnsutil usage by topic"). The dictionary of
pdnsutil
commands is extended with a "command group" and the short help text, for every command. This allows these help texts to be output in groups, with alphabetical ordering within each group, automagically.Doing this also exposes a few commands which lack help texts, these can either remain hidden or get gifted a nice help text (to be discussed in this PR).
The grouping of commands is
stolenborrowed from #12350 and open for discussion as well. The changes in this PR allow for group assignment to be changed very easily, as well as new groups created, if deemed useful.Checklist
I have: