Updated Branches: refs/heads/trunk 5d44ce14b -> 0d5f1c965
docs: Add "How do I test if provider credentials are valid?" FAQ entry. Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/0d5f1c96 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/0d5f1c96 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/0d5f1c96 Branch: refs/heads/trunk Commit: 0d5f1c965ee07ae8ecb7687ab1cc0bc59c4399a1 Parents: 5d44ce1 Author: Tomaz Muraus <[email protected]> Authored: Wed Nov 13 23:38:39 2013 +0100 Committer: Tomaz Muraus <[email protected]> Committed: Wed Nov 13 23:38:39 2013 +0100 ---------------------------------------------------------------------- docs/faq.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/0d5f1c96/docs/faq.rst ---------------------------------------------------------------------- diff --git a/docs/faq.rst b/docs/faq.rst index fa1850c..1be0d24 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -31,6 +31,24 @@ Extension methods are there for your convenience, but you should be careful when you use them because they make switching or working with multiple providers harder. +How do I test if provider credentials are valid? +------------------------------------------------ + +Libcloud makes the whole authentication process transparent to the user. As +such, the easiest way to check if provider credentials are valid is by +instantiating a driver and calling a method which results in an HTTP call. + +If the credentials are valid, method will return a result, otherwise +:class:`libcloud.common.types.InvalidCredsError` exception will be thrown. + +An example of such method is +:func:`libcloud.compute.base.NodeDriver.list_nodes`. Keep in mind that depending +on the account state, list_nodes method might return a lot of data. + +If you want to avoid unnecessarily fetching a lot of data, you should find a +method specific to your provider which issues a request which results in small +amount of data being retrieved. + I want do add a new provider driver what should I do? -----------------------------------------------------
