-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: vulnerability alias to vulnerability list
Running pro vulnerability is now an alias for running pro vulnerability list
- Loading branch information
1 parent
32c5bb6
commit d4f2e32
Showing
4 changed files
with
71 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
from uaclient import messages | ||
from uaclient.cli.commands import ProCommand | ||
from uaclient.cli.parser import HelpCategory | ||
from uaclient.cli.vulnerability.list import list_subcommand | ||
from uaclient.cli.vulnerability.list import ( | ||
action_list, | ||
list_subcommand, | ||
vulnerability_list_args_group, | ||
) | ||
from uaclient.cli.vulnerability.show import show_subcommand | ||
from uaclient.cli.vulnerability.update import update_subcommand | ||
|
||
|
||
def action_vulnerability(args, *, cfg, **kwargs): | ||
# Avoiding a circular import | ||
from uaclient.cli import get_parser | ||
|
||
get_parser().print_help_for_command("vulnerability") | ||
|
||
|
||
vulnerability_command = ProCommand( | ||
"vulnerability", | ||
help=messages.CLI_ROOT_VULNERABILITY, | ||
description=messages.CLI_VULNERABILITY_DESC, | ||
help_category=HelpCategory.SECURITY, | ||
preserve_description=True, | ||
action=action_vulnerability, | ||
action=action_list, | ||
subcommands=[show_subcommand, update_subcommand, list_subcommand], | ||
argument_groups=[vulnerability_list_args_group], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters