diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2017-01-12 13:08:49 -0500 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2017-01-12 13:10:44 -0500 |
commit | d1c5a394204dab3b454cafa69b389acd10f4cb25 (patch) | |
tree | 34d6bb27eb091ca3bbf75b9609e6b94abda18c99 | |
parent | 06ed25e788a3324214ee3226ca35b5586ee83344 (diff) | |
download | ansible-d1c5a394204dab3b454cafa69b389acd10f4cb25.tar.gz |
ansible doc does not need plugin deprecation error
(cherry picked from commit 74421f42e1e20be040161030c8504fea381917fe)
-rw-r--r-- | lib/ansible/cli/doc.py | 4 | ||||
-rw-r--r-- | lib/ansible/plugins/__init__.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index 9e2604d037..8d8b8709ba 100644 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -89,7 +89,7 @@ class DocCLI(CLI): try: # if the module lives in a non-python file (eg, win_X.ps1), require the corresponding python file for docs - filename = module_loader.find_plugin(module, mod_type='.py') + filename = module_loader.find_plugin(module, mod_type='.py', ignore_deprecated=True) if filename is None: display.warning("module %s not found in %s\n" % (module, DocCLI.print_paths(module_loader))) continue @@ -174,7 +174,7 @@ class DocCLI(CLI): continue # if the module lives in a non-python file (eg, win_X.ps1), require the corresponding python file for docs - filename = module_loader.find_plugin(module, mod_type='.py') + filename = module_loader.find_plugin(module, mod_type='.py', ignore_deprecated=True) if filename is None: continue diff --git a/lib/ansible/plugins/__init__.py b/lib/ansible/plugins/__init__.py index 9e2229e8c9..7056617586 100644 --- a/lib/ansible/plugins/__init__.py +++ b/lib/ansible/plugins/__init__.py @@ -221,7 +221,7 @@ class PluginLoader: self._extra_dirs.append(directory) self._paths = None - def find_plugin(self, name, mod_type=''): + def find_plugin(self, name, mod_type='', ignore_deprecated=False): ''' Find a plugin named name ''' if mod_type: @@ -297,7 +297,7 @@ class PluginLoader: alias_name = '_' + name # We've already cached all the paths at this point if alias_name in pull_cache: - if not os.path.islink(pull_cache[alias_name]): + if not ignore_deprecated and not os.path.islink(pull_cache[alias_name]): display.deprecated('%s is kept for backwards compatibility ' 'but usage is discouraged. The module ' 'documentation details page may explain ' |