Add endpoint handling to Token/Endpoint auth

This auth plugin was initially created before get_endpoint was
available. Implement the get_endpoint method so that we can use the
plugin with relative URLs.

Closes-Bug: #1323926
Change-Id: Ic868f509e708ad29faf86ec5ceeab2a9c98a24fc
Clean up oauth auth plugin code

1) remove unnecessary setup
2) remove unnecessary init
3) change order of assertEquals

Change-Id: I852f6ba79e871e286d49836dab105ac18b6519a6
Closes-Bug: #1324379
Merge "Clean up oauth auth plugin code"
Fix tests to use UUID strings rather than ints for IDs

Several tests were using ints rather than strings for IDs. The ints
were changed to UUID strings.

Change-Id: I65312509c72078c08ca284e313104e926d9885ba
Add role assignments as concept in Client API V3 docs

Change-Id: Ia04e51d98b5f00a28d94c24ed7665fcead3f6507
Closes-Bug: #1325739
Changes exception raised by v3.trusts.update()

The client should raise a Client error, instead of
a Server one.

The MethodNotImplemented exeception handles calls
made to not supported methods.

Change-Id: I0e2a8c5e1e53b0f17b886aa693c922bc193bb882
Closes-Bug: #1325755
Make get_oauth_params conditional for specific oauthlib versions

With recent change to oauthlib 0.6.2, the get_oauth_params method
now takes an extra argument. This patch will change the behaviour
of test method _validate_oauth_headers, which will call
get_oauth_params with or without the extra argument, depending
on the version of oauthlib detected.

Change-Id: Id82c28993fa735b8c5b1a4d64ed2f55cc2eddbba
Closes-Bug: #1327430
Remove _factory methods from auth plugins

This was a simple factory that would give compatibility for the existing
client to load up the appropriate auth plugin. A more robust plugin
loading mechanism is coming for this and having it available encourages
other auth plugins that they should be using that where they shouldn't.

Just remove it from the auth plugin class. It shouldn't be used by
anyone else so lets keep it on the client objects.

Blueprint: plugin-params
Change-Id: I0618b646f302300d41c7dd7153a1c0bdc237a745
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
Merge "Add endpoint handling to Token/Endpoint auth"
Merge "Fix tests to use UUID strings rather than ints for IDs"
Merge "Remove _factory methods from auth plugins"
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"