Skip to content

Commit

Permalink
Remove unused internal -a argument and functionality (ansible#52602)
Browse files Browse the repository at this point in the history
  • Loading branch information
sivel authored Feb 19, 2019
1 parent 1ec376a commit d1116ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
12 changes: 2 additions & 10 deletions lib/ansible/cli/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ def init_parser(self):
help='List available plugins')
self.parser.add_option("-s", "--snippet", action="store_true", default=False, dest='show_snippet',
help='Show playbook snippet for specified plugin(s)')
self.parser.add_option("-a", "--all", action="store_true", default=False, dest='all_plugins',
help='**For internal testing only** Show documentation for all plugins.')
self.parser.add_option("-j", "--json", action="store_true", default=False, dest='json_dump',
help='**For internal testing only** Dump json metadata for all plugins.')
self.parser.add_option("-t", "--type", action="store", default='module', dest='type', type='choice',
Expand All @@ -73,17 +71,11 @@ def init_parser(self):
def post_process_args(self, options, args):
options, args = super(DocCLI, self).post_process_args(options, args)

if [options.all_plugins, options.json_dump, options.list_dir, options.list_files, options.show_snippet].count(True) > 1:
raise AnsibleOptionsError("Only one of -l, -F, -s, -j or -a can be used at the same time.")
if [options.json_dump, options.list_dir, options.list_files, options.show_snippet].count(True) > 1:
raise AnsibleOptionsError("Only one of -l, -F, -s, or -j can be used at the same time.")

display.verbosity = options.verbosity

# process all plugins of type
if options.all_plugins:
args = self.get_all_plugins_of_type(options.type)
if options.module_path:
display.warning('Ignoring "--module-path/-M" option as "--all/-a" only displays builtins')

return options, args

def run(self):
Expand Down
12 changes: 0 additions & 12 deletions test/units/cli/test_doc.py

This file was deleted.

0 comments on commit d1116ef

Please sign in to comment.