Add find() method to CrudManager

Add a find() methods to CrudManager to maintain compatability
with existing CLI lookups using utils.find_resource().

Change-Id: Ia9b38b975bb88fb361f3471b66f98c7e81bbc6de
Allow keystoneclient to work with older keystone installs

Older keystone installs may return 501 for GET / instead of 300
like today. We should be able to assume that if 501 is returned the
server will support v2.0 only.

Fixes bug 1159911

Change-Id: If264840d8678a490264f1bdb62f1b51c362619e1
Fix optional keyring support, add basic keyring tests

Commit 06d9437e8388b369546d760607f17cb5022750e9 made using a keyring
optional by adding a function to handle the imports. The problem is that
import needs to be available at a global level for it to be usable in
other parts of the code.

The function is replaced by a top-level try/except.

Fixing the imports isn't enough to get keyring support working because
in get_auth_ref_from_keyring() the wrong token was being used when
evaluating token expiration. It was using the token already in the
HTTPClient object and not the one returned from the keyring.

Some simple tests were added to prevent future regressions. These
tests will be skipped if the keyring or pickle packages are not
installed.

Change-Id: I1fe2c9e5cdf275df2047018368da2e4b3d2d6de2
Fixes: bug #1183072
Cleanup shell's authentication check.

The original logic for whether shell had enough information to
authenticate a user was confusing and will be very difficult to extend
to other forms of authentication.

Change-Id: I88763a651e494e60070a30f0824505acb09310cb
Provide keystone CLI man page.

Resolves: bug 1185142
Implements blueprint: clients-man-pages

Provide basic but hopefully useful man page.

shell.rst was merged into and replaced by the man page in HTML docs.

Change-Id: I0a90e4638cc7e4ed9c02c5abd7d84a4079e5f50d
Use AuthRef for some client fields

This tackles some TODO items left over.

Change-Id: Ib062744acbf56f05d09857d244b78b35c0ef4d39
Signed-off-by: Julien Danjou <julien@danjou.info>
Fix memcache encryption middleware

This fixes lp1175367 and lp1175368 by redesigning the memcache crypt
middleware to not do dangerous things. It is forward compatible, but
will invalidate any existing ephemeral encrypted or signed memcache
entries.

Change-Id: Ice8724949a48bfad3b8b7c41b5f50a18a9ad9f42
Signed-off-by: Bryan D. Payne <bdpayne@acm.org>
Change memcache config entry name in Keystone to be consistent with Oslo

Currently, Keystone-Client is using 'memcache_servers' config option to store
the memcache server info, while in OSLO project, it is using 'memcached_servers'
to config the same option. It is better to change keystone-client's
'memcache_servers' to 'memcached_servers' to keep consistent between these two
projects.

Change-Id: I93ca0aa368f95a3ccf6de6984262057e61f75ffe
Fixes: Bug 1172793
Implements v3 auth client.

Added support for domain scoping.

Enhancement on AccessInfo to support reading v2/v3 token information.

Enhancement on ServiceCatalog for reading/filtering v2/v3 service
catalog information.

Change-Id: Ibb678b9933d3673e37d0fba857a152a3c5d2b4f4
Python-2.6 compatibility for tests/test_keyring.py

TestCase.setUpClass() and unittest.SkipTest are features added in 2.7.
Calling super(KeyringTest, cls).setUpClass() could have never worked
since tests.utils.TestCase doesn't implement that (class) method.

Change-Id: Ifbb0465be24fd13ad68d52c0d7fa4c5090d0f694