move some of basic into common (#48078)

* move file functions into common.file

* move *_PERM_BITS and mark as private (_*_PERM_BITS)

* move get_{platform, distribution, distribution_version} get_all_subclasses and load_platform_subclass into common.sys_info

* forgot get_distribution_version, properly rename get_all_subclasses

* add common/sys_info.py to recursive finder test

* update module paths in test_platform_distribution.py

* update docstrings, _get_all_subclasses -> get_all_subclasses

* forgot to update names

* remove trailing whitespace
This commit is contained in:
Andreas Calminder 2018-12-07 19:21:11 +01:00 committed by Toshio Kuratomi
commit 876b637208
5 changed files with 184 additions and 119 deletions

View file

@ -46,6 +46,7 @@ MODULE_UTILS_BASIC_IMPORTS = frozenset((('_text',),
('common', '_collections_compat'),
('common', 'file'),
('common', 'process'),
('common', 'sys_info'),
('parsing', '__init__'),
('parsing', 'convert_bool'),
('pycompat24',),
@ -61,6 +62,7 @@ MODULE_UTILS_BASIC_FILES = frozenset(('ansible/module_utils/parsing/__init__.py'
'ansible/module_utils/parsing/convert_bool.py',
'ansible/module_utils/common/__init__.py',
'ansible/module_utils/common/file.py',
'ansible/module_utils/common/sys_info.py',
'ansible/module_utils/pycompat24.py',
))