mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-14 20:29:11 -07:00
Refactor parsing of CLI args so that we can modify them in the base class
Implement tag and skip_tag handling in the CLI() class. Change tag and skip_tag command line options to be accepted multiple times on the CLI and add them together rather than overwrite. * Make it configurable whether to merge or overwrite multiple --tags arguments * Make the base CLI class an abstractbaseclass so we can implement functionality in parse() but still make subclasses implement it. * Deprecate the overwrite feature of --tags with a message that the default will change in 2.4 and go away in 2.5. * Add documentation for merge_multiple_cli_flags * Fix galaxy search so its tags argument does not conflict with generic tags * Unit tests and more integration tests for tags
This commit is contained in:
parent
9962245b92
commit
1efe782b46
15 changed files with 162 additions and 77 deletions
|
@ -60,7 +60,8 @@ class DocCLI(CLI):
|
|||
self.parser.add_option("-s", "--snippet", action="store_true", default=False, dest='show_snippet',
|
||||
help='Show playbook snippet for specified module(s)')
|
||||
|
||||
self.options, self.args = self.parser.parse_args(self.args[1:])
|
||||
super(DocCLI, self).parse()
|
||||
|
||||
display.verbosity = self.options.verbosity
|
||||
|
||||
def run(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue