Enhance tests for assignment create_grant when no user or group

There were no tests that show the behavior of create_grant when
the user or group doesn't exist. Turns out the behavior is
different depending on the backend (sql vs kvs vs ldap).

Change-Id: I71c3e2b94aaa44e40c8a891b49cc2a9961cee16f
Related-Bug: #1239476
Fix KVS create_grant to not raise NotFound if no user/group

The KVS assigment backend would fail with NotFound if the user
or group didn't exist when calling create_grant while the SQL
assignment backend did not fail.

It's unreasonable to check if the user or group exists when
creating a grant, so the KVS assignment backend is changed to
not require the user or group to exist.

Closes-Bug: #1239476
Change-Id: I2d3b2fd82e7d4d33ac7158968d72cbfbe37528dc
Dependency cleanup

Clean up dependency usage.

a) If the class uses a dependency directly, make sure it's
included (getting from superclass isn't enough)

b) If the class doesn't use a dependency directly, make
sure it's NOT included (being a superclass isn't excuse)

Change-Id: Ifbd489f349ec019a41093a2814664e6d8c9f0069
don't rebind stdlib's os.chdir function

Change-Id: I07d5e8c58007cf716eecb922afb67abe3b53b981
UUID vs PKI docs

Change-Id: I698516e212e3a1f470a8131aca207e96925b3a40
Utilites for manipulating base64 & PEM

Add two new utility modules

  - keystone.common.base64utils
  - keystone.common.pemutils

Add two new unit tests to exercise the above.

  - keystone.tests.test_base64utils
  - keystone.tests.test_pemutils

Functionality in these utilities will be utilized to fix bug #1233838
in a subsequent commit. It is hoped these modules will moved to Oslo
common code. Each module has a doc string describing their purpose and
functionalty.

Change-Id: I3546674dcd9eddec2c378929dd3f759f667cfd5d
Partial-Bug: #1233838
refactor test_catalog

- Tests for "missing" attributes are actually testing with null values,
  not missing keys.
- Not being able to explicitly provide alternative URLs resulting in
  hacky workarounds that can be avoiding by simply exposing kwargs with
  reasonable defaults
- Several tests redundantly asserted the expected response status, which
  is already handled by the test framework

Change-Id: Icadb4927bcf03ca7e79fef1507e419a4932f32a9
Related-Bug: 1250765
Easy testing with alternate keystoneclient

It wasn't easy to test with an alternative keystoneclient, just
the checked out ones.

This change makes it easy to test with an alternative local
keystoneclient, just set KSCTEST_PATH to the path:

 KSCTEST_PATH=/opt/stack/python-keystoneclient tox -e py27 KcOptTestCase

Change-Id: I0af834d2861220b72b93265a1ddbfd8bc3d13d49
Try decoding string to UTF-8 on error message fail

Database Errors from SQLAlchemy tend to get mangled into ASCII. If an
error is process that contains UTF-8 data in ASCII form if fails to
build the message and will lead to a 5xx error. Catch the error and try
to decode it to create the message again, if that doesn't work at least
fail gracefully.

Change-Id: Iecb1170387c51064918780dc6de07db7ca8aeeee
Closes-Bug: 1253905
Added documentation to keystone.common.dependency.

All public attributes now have docstrings describing their interface,
and the module has a top level docstring as well. Previously,
documentation was very sparse.

Closes-Bug: #1252428
Change-Id: I9c83883a6d9ae3201c9037c979689cb82c232120
Fix typo in keystone

1. Validate the user and tenant auth into in order to -> Validate the user
   and tenant auth info in order to
2. attmepting -> attempting
3. extnsion -> extension
4. identfier -> identifier
5. establed -> established
6. specifc -> specific
7. intitalized -> initialized
8. explicity -> explicitly
9. uniq -> unique

Change-Id: I8f4420e7c41cfdbc3f4751ed1c0b9a6e151b0940
Closes-Bug: #1254585
Ensure the sample policy file won't diverge

Currently rules should appear in both policy.v3cloudsample.json and
policy.json. In the future there may be a few exceptions that can be
documented by making the exception explicit in the test.

Change-Id: I3e9cdf64998d667941c44dc6edb48c2f7a9d37c4
Closes-Bug: #1255564
Updates .gitignore

To ignore swap files from getting into repository
currently the implemented ignore is *.swp
however vim adds more swap files if these files exists,
so improving this with *.sw?

Change-Id: I5c70908e32fc5316e395c72810fc45f5db8a7a77
Closes-Bug: #1255864
Deprecates V2 controllers

The revocation_list controller method's code was copied from the v2
controller to the v3 controller.  This allows us to cleanly deprecate
the v2 API without impacting the v3 API.

Closes-Bug:#1222696
Change-Id: I0ca7a091a50007c07dfe6942b2653c617ca98e70
Adds a resource for changing a user's password

blueprint v3-user-update-own-password

Change-Id: Icdf0ae76e7dfc82c01394ebbfcad4d751a33a3ef
Merge "Adds a resource for changing a user's password"
Merge "Deprecates V2 controllers"
Updated from global requirements

Closes-Bug: 1239892
Change-Id: I669865879d8c12c5b810553ef9c7f87b9fb26fb1
Merge "don't rebind stdlib's os.chdir function"
Merge "Dependency cleanup"