ansible/test
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
..
compile Initial Commit for Infinidat Ansible Modules (#19429) 2016-12-22 13:18:19 +00:00
integration Add regex support to gce_tag module, add unit tests and update integration test. (#19087) 2016-12-29 08:45:20 -05:00
results Initial ansible-test implementation. (#18556) 2016-11-29 21:21:53 -08:00
runner Improve ansible-test completion and messaging. (#19627) 2016-12-22 09:57:17 -08:00
sanity Remove legacy test alias migration script. (#19629) 2016-12-21 16:46:28 -08:00
units Adding auth support for google-api-python-client and gcloud-python (#19090) 2016-12-29 12:33:52 -05:00
utils Remove legacy test alias migration script. (#19629) 2016-12-21 16:46:28 -08:00
README.md Test reorganization and cleanup. (#18270) 2016-10-31 12:53:11 -07:00

Ansible Test System

Folders

units

Unit tests that test small pieces of code not suited for the integration test layer, usually very API based, and should leverage mock interfaces rather than producing side effects.

Playbook engine code is better suited for integration tests.

Requirements: sudo pip install paramiko PyYAML jinja2 httplib2 passlib nose mock

integration

Integration test layer, constructed using playbooks.

Some tests may require cloud credentials, others will not, and destructive tests are separated from non-destructive so a subset can be run on development machines.

learn more

hop into a subdirectory and see the associated README.md for more info.