mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
module_utils/dimensiondata (#17604)
* Add dimensiondata.py in module_utils This is required by the Dimension Data modules under lib/ansible/modules/extras/cloud/dimensiondata * Implement change requests from PR #17604 Requests are listed in: https://github.com/ansible/ansible/pull/17604#pullrequestreview-819380 * Changes requested for Ansible PR #16704. As noted by @abadger: - Use Py3-compatible import syntax for ConfigParser. - Use comprehensions instead of filter function. - Fix buggy comparison of False to 'False'. - Change b_dict to block_dict. - Fix invalid syntax for except block that handles multiple exception types. * Additional changes requested for Ansible PR #16704. As noted by @abadger: - Missed a couple of places where we still had invalid exception-handling syntax. * Remove shebang from dimensiondata.py (Ansible PR #16704). * Switch to MCP_USER / MCP_PASSWORD. This is consistent with other Dimension Data Tooling. * Implement get_configured_credentials. * Fix typo (missing comma). * Unify get_credentials implementation (ansible/ansible#17604). get_credentials will now look in environment, dotfile, and module configuration for credentials (in that order). * Resolve user Id and password from module configuration before trying environment or dotfile (ansible/ansible#17604).
This commit is contained in:
parent
c7638be525
commit
b598575213
2 changed files with 426 additions and 0 deletions
0
lib/ansible/modules/cloud/dimensiondata/__init__.py
Normal file
0
lib/ansible/modules/cloud/dimensiondata/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue