1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/units/module_utils
Tom Melendez 7e88df7ebc Adding auth support for google-api-python-client and gcloud-python (#19090)
Support for the Google API and GCloud-Python Clients have been added.

The three libraries:
* GCloud-Python: A new function, get_google_cloud_credentials, should be used.  The credentials-object returned can be passed to any gcloud-python client.  Using this client library requires in the installation of gcloud-python.  This is preferred library for new modules.

* Google API: A new function, gcp_api_auth, should be used to take advantage of services requiring this client.  This client library should be used if the desired functionality is not available in GCloud-Python.  Using this library requires the installation of google-api-python-client.

* libcloud: Existing function, gcp_connect, should be used.  The interface and return values have not changed and existing modules (such as gce, gce_pd and gce_net) should work without modification.  Note that the credentials-fetching code has been refactored out of gcp_connect so that can be reused by all connection functions. To use this function, apache-libcloud must be installed.

Import guards have been added and will only be trigger if a user tries to use a function that is missing dependencies.

Credential-specifying mechanisms (i.e, ansible module params, env vars and libcloud secrets.py) have not changed.  They have been refactored and unit tests have been added to allow for changes going forward. We are deprecating (and removing in a subsequent release) the ability to specify credentials via the libcloud secrets file.  Also, we have deprecated (and also plan to remove in a subsequent release) the ability to use a p12 pem file for a key - the JSON format is strongly preferred.  Deprecation warnings have been added for both of these issues (see the Ansible docs on how to disable deprecation warnings).
2016-12-29 12:33:52 -05:00
..
basic let chdir support relative path in more modules (#16736) 2016-12-22 00:19:50 -08:00
ec2 Skip test_aws.py if boto3/botocore are missing (#17814) 2016-10-13 13:19:40 -07:00
gcp Adding auth support for google-api-python-client and gcloud-python (#19090) 2016-12-29 12:33:52 -05:00
json_utils bugfixes to JSON junk filter, added unit/integration tests to exercise (#17834) 2016-10-02 08:03:42 -07:00
__init__.py Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
test_basic.py File attributes (#18213) 2016-11-07 15:48:04 -05:00
test_database.py Have unittests import mock from ansible.compat so they work on py3 without mock installed from pypi 2016-09-15 15:21:17 -07:00
test_distribution_version.py Set ansible_os_family correctly under KDE neon 2016-10-27 20:28:38 +01:00
test_facts.py Fix for run_command tests now that it returns native strings 2016-10-03 18:45:28 -07:00
test_text.py Various python3 updates for module_utils: (#17345) 2016-09-01 04:19:03 -07:00