Update pki CLI to use ArgumentParser #4931
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
pki
CLI has been updated to parse the main arguments (which are also defined inMainCLI.java
) usingArgumentParser
, determine the subcommand, then pass the remaining arguments to the Python or Java module corresponding to the subcommand.It does not use subparsers like in
pki-server
since thepki
CLI does not have the list of Java subcommands.The
pki
CLI have options that might conflict with other options in some subcommands. That will be addressed separately later.The help message for default message format in
MainCLI.java
has also been updated.Note: All pylint issues have been fixed now, but apparently there are existing Flake8 issues that were hidden by pylint issues. They will be fixed separately later.