community.general/lib/ansible/module_utils
Ricardo Carrillo Cruz 64add28657 Platform agnostic net_system module (#24953)
* Platform agnostic net_system module

Also refactor the action network plugins for better code re-use

Still more refactoring to do once the connection plugin work is complete

* Replace importlib for imp

importlib is not available on 2.6, so we need to stick to imp

* Load action plugin via module metadata

* Better error message if no implementation is found

Now the plugin will show the module name and the network OS in the
error message

* Fix typo on documentation author line

* Fix pep8 issues

* Add missing options key on doc string and stringify version

* Return None in case module has no metadata

* Read module metadata only if it's a python module

Check for module suffix, if it's .py then read metadata.
Otherwise this fails on non-python modules, like Windows PS for example.

* Read metadata variable only if it's a python module

Fix referencing a variable before assignment

* Add action_handler to validate_modules metadata schema

* Pull metadata with plugin_docs get_docstring

Using load_source from PluginLoader is troublesome, it is not guaranteed
a module may be importable at the controller, e.g. if a module depends
on module_utils functions it won't work, because module_utils is not
in the sys path.
Rather than putting that module dependencies introspection, just
use plain parsing like plugin_docs get_docstring does as we only care
about reading ANSIBLE_METADATA.

* Add platform agnostic group of groups for integration tests

This will be the target for platform agnostic integration tests.

* Add integration tests for net_system

* Switch to action plugin inheritance from metadata driven action handler

As the metadata action driven action handler work is being worked on
on its standalone proposal+PR, let's just go back to have one
action handler per platform agnostic module.
Those action plugins will inherit from net_base.

* Add blank line to fix pep8

* Add aliases file to net_system integration test

This will avoid CI failure

* Fix integration tests for net_system

* Give more precedence to task network_os over inventory network_os
2017-06-02 14:06:38 +02:00
..
facts
six
__init__.py
_text.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
a10.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
ansible_tower.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
aos.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
api.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
asa.py
avi.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
azure_rm_common.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
basic.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
bigswitch_utils.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
ce.py
cloud.py
cloudengine.py
cloudstack.py
cnos.py
cnos_devicerules.py
cnos_errorcodes.py
connection.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
database.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
dellos6.py
dellos9.py
dellos10.py
dimensiondata.py
docker_common.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
ec2.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
eos.py Platform agnostic net_system module (#24953) 2017-06-02 14:06:38 +02:00
exoscale.py
f5_cli.py
f5_utils.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
fortios.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
gcdns.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
gce.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
gcp.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
infinibox.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
ios.py Platform agnostic net_system module (#24953) 2017-06-02 14:06:38 +02:00
iosxr.py Platform agnostic net_system module (#24953) 2017-06-02 14:06:38 +02:00
ipa.py
ismount.py
json_utils.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
junos.py Platform agnostic net_system module (#24953) 2017-06-02 14:06:38 +02:00
k8s_common.py
known_hosts.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
lxd.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
mysql.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
netapp.py
netcfg.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
netcli.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
netconf.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
network.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
network_common.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
nxos.py Platform agnostic net_system module (#24953) 2017-06-02 14:06:38 +02:00
openshift_common.py
openstack.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
openswitch.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
ordnance.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
ovirt.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
postgres.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
powershell.ps1
pycompat24.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
rax.py
redhat.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
service.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
shell.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
splitter.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
sros.py
univention_umc.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
urls.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
vca.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
vmware.py
vyos.py Platform agnostic net_system module (#24953) 2017-06-02 14:06:38 +02:00