Don't use mock non-exist method assert_called_once

There isn't method assert_called_once of mock class
and hence does not really check anything. Let's use
assertEqual(1, mock.call_count) to check.

Change-Id: I2bdf62b775badc0adbe2c6f55bcc65cd13ac2d60
Add service_name to URL discovery

The catalog was recently enhanced to allow filtering based on the
service_name so this should be passed on to endpoint filtering.

Change-Id: If08fcdba9719f6aacdcbbb6b951117f4f544f9ca
Refactor auth_token token cache members to class

The token cache members are moved from AuthToken to their own
class.

Change-Id: Ibf00d39435fa7a6d9a92a9bdfacc3f1b07f890ef
Set the iso8601 log level to WARN

When use "--debug" parameter in other projects's CLI, it may display
useless iso8601 debug info, this is because  other client's CLI will
call keystoneclient to get token, and keystoneclient will display the
iso8601 debug info.

set the iso8601 log level to "WARN" to avoid this issue.

Change-Id: Id90c86f0e7c8e9ae47ca53667f469d111d6ae373
Closes-bug: #1324470
Link to docstrings in using-api-v3

The references to classes and modules were just the names and
didn't link to the docstrings for the class or module. With this
change, names are now links to the class or module.

Change-Id: I9c7c03e8221ca71c7fddc0682abadc7a78d371db
Session Documentation

Include some client documentation for how to work with a Session object.
This is generally high level with this expectation that a developer
could take the concepts found here and determine more from the module
documentation.

Change-Id: I5e44c1029ce160cb2798cfb8a535aa9f3311799a
Added help text for the debug option

This adds a short help text for --debug on the command line. Prior to
this short help text the debug option was hidden.

Change-Id: I2e641ec496e596fcc4879855ac750d957522be88
Closes-Bug: #1328813
Merge "Set the iso8601 log level to WARN"
Merge "Refactor auth_token token cache members to class"
Merge "Don't use mock non-exist method assert_called_once"
Merge "Session Documentation"
Using six.u('') instead of u''

In a few places, there's some u'' strings, this patch replaces
them by six.u(''), as this fixes things when running the unit
tests in Debian Wheezy.

Change-Id: I60c01f85901a33a0e3e7a255049084126558f031
Adjust Python 2.6 OSerror-on-EPIPE workaround

Adjust the code to raise exceptions.CertificateConfigError
when the certificates are still missing even in the Python
2.6 subprocess bug-workaround case.

Change-Id: I9fdfa830e6f9bc9e8eab496da2597e4118577ec5
Closes-Bug: #1324921
auth_token _cache_get checks token expired

When auth_token stores the token in the cache, it's stored with
the expiration time; but when the token is retrieved from the
cache, if the expiration time has passed the token is treated as if
it wasn't cached. This creates extra work because now auth_token
has to check the token expiration (either by decrypting the PKI
token or online validation for UUID tokens).

With this change, getting the token from the cache will fail if the
expiration is past.

Change-Id: Id0ec6b3c2e5af4a2d910f16da4e0312733fc2198
Merge "Added help text for the debug option"
Merge "auth_token _cache_get checks token expired"
Updated from global requirements

Change-Id: I0804468699cd7af0b3b520c07fd0aeff809bd2b1
Imports to fix build warnings

There were warnings generated during the build due to missing
attributes, like this:

 keystoneclient.rst:7: WARNING: missing attribute mentioned in
   :members: or __all__: module keystoneclient.__init__, attribute
   v2_0

This is fixed by importing the symbol in __init__.

Closes-Bug: #1315523

Change-Id: I565c78ef8910353c4e1ce1641b42fba7cdbd77d8
Doc build fails if warnings

If the docstrings are invalid then the commit should fail the gate.

Change-Id: Iabe506fa914ac5e742c0c5f4682ed0471c4a64ca
Add role ids to the AccessInfo

Role Names are already there, add ids as well.

Change-Id: Ie6f14a60b182ec2f4ab97c6ced564e63a2f5169a