community.general/lib/ansible/plugins/action
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
..
__init__.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
add_host.py spelling fixes (non-trivial, changing messages) (#25094) 2017-06-01 10:45:19 +01:00
asa_config.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
asa_template.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
assemble.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
assert.py Implements verbose always to assert action plugin module (#17654) 2016-09-20 10:52:21 -05:00
ce.py Contributing new /lib/ansible/plugins/action/ce.py module to manage HUAWEI data center CloudEngine switch (#21645) 2017-05-25 17:33:57 +01:00
ce_config.py commit plugins action ce_config module. (#21648) 2017-05-19 08:42:36 +01:00
ce_template.py Contributing new /lib/ansible/plugins/action/ce_template.py module to manage HUAWEI data center CloudEngine switch (#21649) 2017-05-19 08:42:55 +01:00
copy.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
debug.py Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
dellos6.py Make logging consistent for network platforms (#23605) 2017-04-16 23:25:40 +05:30
dellos6_config.py Ansible 2.3 feature support for dellos6. (#23084) 2017-03-30 15:26:32 +02:00
dellos9.py Make logging consistent for network platforms (#23605) 2017-04-16 23:25:40 +05:30
dellos9_config.py Ansible 2.3 feature support for dellos9 and dellos10 (#22856) 2017-03-27 19:32:57 +01:00
dellos10.py Make logging consistent for network platforms (#23605) 2017-04-16 23:25:40 +05:30
dellos10_config.py Ansible 2.3 feature support for dellos9 and dellos10 (#22856) 2017-03-27 19:32:57 +01:00
eos.py Eos port default values (#23829) 2017-04-20 15:58:45 -04:00
eos_config.py updates eos modules to use socket (#21197) 2017-02-13 20:22:10 -05:00
eos_template.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
fail.py Two fixes to action plugins 2015-10-22 16:07:26 -07:00
fetch.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
group_by.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
include_vars.py fixed extension matching 2017-05-23 15:50:35 -04:00
ios.py Make logging consistent for network platforms (#23605) 2017-04-16 23:25:40 +05:30
ios_config.py updates ios modules to support persistent socket (#21258) 2017-02-13 15:22:14 +00:00
ios_template.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
iosxr.py Make logging consistent for network platforms (#23605) 2017-04-16 23:25:40 +05:30
iosxr_config.py updates iosxr modules to support socket (#21231) 2017-02-15 10:47:02 -05:00
iosxr_template.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
junos.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
junos_config.py Junos_config unicode (#23369) 2017-04-27 11:44:26 -04:00
junos_template.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
net_base.py Platform agnostic net_system module (#24953) 2017-06-02 14:06:38 +02:00
net_config.py code clean of old code from network modules updates (#21469) 2017-02-15 12:46:30 -05:00
net_system.py Platform agnostic net_system module (#24953) 2017-06-02 14:06:38 +02:00
net_template.py code clean of old code from network modules updates (#21469) 2017-02-15 12:46:30 -05:00
netconf_config.py netconf_config: support new src attribute (new Action Plugin) (#24337) 2017-05-11 18:43:44 +05:30
normal.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
nxos.py Make host required field and minor refactor (#24534) 2017-05-19 10:37:01 -06:00
nxos_config.py refactors nxos module to use persistent connections (#21470) 2017-02-15 11:43:09 -05:00
nxos_template.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
ops_config.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
ops_template.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
package.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
patch.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
pause.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
raw.py Ensure exit_json returns failed = False 2017-05-30 14:56:31 -07:00
script.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
set_fact.py Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
set_stats.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
sros.py Make logging consistent for network platforms (#23605) 2017-04-16 23:25:40 +05:30
sros_config.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
synchronize.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
template.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
unarchive.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
vyos.py Make logging consistent for network platforms (#23605) 2017-04-16 23:25:40 +05:30
vyos_config.py Vyos config fixes (#21862) 2017-02-25 21:14:40 -05:00
wait_for_connection.py wait_for_connection: Wait for system to become reachable (#20011) 2017-03-01 11:00:49 -08:00
win_copy.py Two fixes to action plugins 2015-10-22 16:07:26 -07:00
win_reboot.py ensure win_reboot warnings value is a list 2017-01-16 14:28:18 -08:00
win_template.py Windows: Use the correct newline sequence for the platform (#21846) 2017-03-23 19:47:10 -07:00