More porting updates (#30635)

* Update porting_guide_2.4.rst with more docs and some rst fixes

(cherry picked from commit a030472092)
This commit is contained in:
Brian Coca 2017-09-20 15:12:01 -04:00 committed by Brian Coca
parent a3d5b2f1ce
commit 5fdcbdaaee
2 changed files with 19 additions and 3 deletions

View file

@ -21,6 +21,7 @@ Ansible Changes By Release
* Fix colors for selective callback
* Fix for 'New password' prompt on 'ansible-vault edit' (https://github.com/ansible/ansible/issues/30491)
* Fix for 'ansible-vault encrypt' with vault_password_file in config and --ask-vault-pass cli (https://github.com/ansible/ansible/pull/30514#pullrequestreview-63395903)
* updated porting guide with notes for callbacks
<a id="2.4"></a>

View file

@ -97,6 +97,21 @@ Developers should start migrating from hardcoded inventory with dynamic inventor
Both users and developers should look into the new plugins because they are intended to alleviate the need for many of the hacks and workarounds found in the dynamic inventory scripts.
Callback plugins
----------------
Users:
* Callbacks are now using the new configuration system. Users should not need to change anything as the old system still works,
but you might see a deprecation notice if any callbacks used are not inheriting from the built in classes. Developers need to update them as stated below.
Developers:
* If your callback does not inherit from ``CallbackBase`` (directly or indirectly via another callback), it will still work, but issue a deprecation notice.
To avoid this and ensure it works in the future change it to inherit from ``callbackBase`` so it has the new options handling methods and properties.
You can also implement the new options handling methods and properties but that won't automatically inherit changes added in the future. You can look at ``CallbackBase`` itself and/or ``AnsiblePlugin`` for details.
* Any callbacks inheriting from other callbacks might need to also be updated to contain the same documented options
as the parent or the options won't be available. This is noted in the developer guide.
Networking
==========
@ -121,8 +136,8 @@ Configuration
The configuration system has had some major changes. Users should be unaffected except for the following:
* All relative paths defined are relative to the `ansible.cfg` file itself. Previously they varied by setting. The new behavior should be more predictable.
* A new macro ``{{CWD}}`` is available for paths, which will make paths relative to the 'current working directory',
* All relative paths defined are relative to the `ansible.cfg` file itself. Previously they varied by setting. The new behavior should be more predictable.
* A new macro ``{{CWD}}`` is available for paths, which will make paths relative to the 'current working directory',
this is unsafe but some users really want to rely on this behaviour.
Developers that were working directly with the previous API should revisit their usage as some methods (for example, ``get_config``) were kept for backwards compatibility but will warn users that the function has been deprecated.