Update network section in 2.5 porting guide (#35643)

* Update 2.5 porting guide with network module_utils move
This commit is contained in:
Ganesh Nalawade 2018-02-07 03:05:59 +05:30 committed by Alicia Cozine
parent 038b281da2
commit 1d068d4af9

View file

@ -212,3 +212,29 @@ Using a provider dictionary with one of the new persistent connection types for
(network_cli, netconf, etc.) will result in a warning. When using these connections
the standard Ansible infrastructure for controlling connections should be used.
(Link to basic inventory documentation?)
Developers: Shared Module Utilities Moved
-----------------------------------------
Beginning with Ansible 2.5, shared module utilities for network modules moved to ``ansible.module_utils.network``.
* Platform-independent utilities are found in ``ansible.module_utils.network.common``
* Platform-specific utilities are found in ``ansible.module_utils.network.{{ platform }}``
If your module uses shared module utilities, you must update all references. For example, change:
OLD In Ansible 2.4
.. code-block:: python
from ansible.module_utils.vyos import get_config, load_config
NEW In Ansible 2.5
.. code-block:: python
from ansible.module_utils.network.vyos.vyos import get_config, load_config
See the module utilities developer guide see :doc:`dev_guide/developing_module_utilities` for more information.