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
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
..
cli testing GalaxyCLI.run() does what is expected 2016-12-21 23:52:18 -08:00
contrib skip vmware inventory when missing lib 2016-11-07 15:37:59 -05:00
errors Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
executor Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
inventory Add lots of test cases to inventory/test_host.py (#17827) 2016-11-29 13:38:04 -05:00
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 2015-05-28 15:26:03 -05:00
mock Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
module_utils Adding auth support for google-api-python-client and gcloud-python (#19090) 2016-12-29 12:33:52 -05:00
modules Add regex support to gce_tag module, add unit tests and update integration test. (#19087) 2016-12-29 08:45:20 -05:00
parsing Fix unit test dirs to match code under test. 2016-11-10 18:59:07 -08:00
playbook unit tests for playbook/conditional.py (#18586) 2016-12-13 14:38:16 -05:00
plugins Lastpass lookup plugin (#16285) 2016-12-22 14:47:33 -08:00
template Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
utils FEATURE: adding variable serial batches 2016-08-04 15:04:10 -05:00
vars ansible_playbook_python (#18530) 2016-11-23 16:30:46 -05:00
__init__.py Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00