add helper factory function to avoid breaking network modules in devel

This is a temporary change to keep the get_module() function until all
of the network module refactoring is completed to avoid breaking them
in devel.   The get_module() function should not be used and will be
removed before 2.2 final.
This commit is contained in:
Peter Sprygada 2016-07-09 07:03:18 -04:00
commit c0c9cf6441
2 changed files with 55 additions and 48 deletions

View file

@ -19,12 +19,15 @@
import re
from ansible.module_utils.basic import json, get_exception, AnsibleModule
from ansible.module_utils.network import Command, NetCli, NetworkError, get_module
from ansible.module_utils.basic import json, AnsibleModule, get_exception
from ansible.module_utils.network import NetCli, NetworkError, NetworkModule, Command
from ansible.module_utils.network import add_argument, register_transport, to_list
from ansible.module_utils.netcfg import NetworkConfig
from ansible.module_utils.urls import fetch_url, url_argument_spec
# temporary fix until modules are update. to be removed before 2.2 final
from ansible.module_utils.network import get_module
EAPI_FORMATS = ['json', 'text']
add_argument('use_ssl', dict(default=True, type='bool'))