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 Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
six module_utils/six: PEP8 compliancy 2017-05-23 15:43:52 -07:00
__init__.py Fix ziploader for the cornercase of ansible invoking ansible. 2016-04-29 08:47:49 -07:00
_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 module_utils/asa: PEP8 compliancy (#24655) 2017-05-16 12:16:05 +01:00
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 Contributing new lib/ansible/module_utils/ce.py module to manage HUAWEI data center CloudEngine switch (#21666) 2017-05-17 18:36:34 +01:00
cloud.py CloudRetry/AWSRetry backoff decorator with unit tests (#17039) 2016-09-13 16:46:59 -04:00
cloudengine.py mod_utils/cloudengine: PEP8 compliancy (#24659) 2017-05-30 18:28:02 +01:00
cloudstack.py cloudstack: add check mode tests (#24908) 2017-05-26 12:19:47 +02:00
cnos.py Fixes for idempotent issue in cnos_vlan module and fixes for vlag/portchannel tests. (#22385) 2017-03-08 17:09:17 +00:00
cnos_devicerules.py New module: cnos_vlan and various utility files (#21107) 2017-02-16 08:11:39 +00:00
cnos_errorcodes.py spelling fixes (non-trivial, changing messages) (#25094) 2017-06-01 10:45:19 +01:00
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 Add dellos6 changes for Python3 (#24606) 2017-05-17 00:36:32 +05:30
dellos9.py Add dellos9 changes for Python3 (#24607) 2017-05-17 00:36:52 +05:30
dellos10.py Add dellos10 changes for python3 (#24608) 2017-05-17 00:36:15 +05:30
dimensiondata.py Refactor dimensiondata_network module (#21043) 2017-02-09 11:30:31 +00:00
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 exoscale: pep8 and python3 fixes (#21821) 2017-02-25 10:32:39 +01:00
f5_cli.py Adds CLI classes for some F5 modules (#21119) 2017-02-08 18:25:20 +00:00
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 IPA: Remove duplicated code and fix a bug that occurs if empty lists were passed and IPA didn't know the value before (#19210) 2017-02-08 14:16:44 +00:00
ismount.py fix typo 2016-02-08 19:10:04 +01:00
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 k8s/openshift module_utils split (#23115) 2017-03-30 19:02:17 +02:00
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 Add NetApp SolidFire volume module (#20732) 2017-02-16 15:21:14 -05:00
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 k8s/openshift module_utils split (#23115) 2017-03-30 19:02:17 +02:00
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 Ensure exit_json returns failed = False 2017-05-30 14:56:31 -07:00
pycompat24.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
rax.py module_utils/rax: Small parameter cleanup (#24664) 2017-05-16 10:02:04 -04:00
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 Add sros changes for Python3 (#24604) 2017-05-17 00:33:36 +05:30
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 vmware_guest: Fix VM creation when adding a network device without a MAC address (#24138) 2017-05-16 08:47:49 -07:00
vyos.py Platform agnostic net_system module (#24953) 2017-06-02 14:06:38 +02:00